diff --git a/.coderabbit.yml b/.coderabbit.yml deleted file mode 100644 index 1296d048ec..0000000000 --- a/.coderabbit.yml +++ /dev/null @@ -1,2 +0,0 @@ -paths_ignore: - - "**/vendor/**" diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ff8ca1f6f3..46e68728d7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,7 @@ name: ovn-docker-images on: push: - branches: [ master,release-1.0,release-1.1 ] + branches: [ master,release-1.0 ] permissions: contents: read diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ad404d04c8..e2a0067ee6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,10 +4,6 @@ on: merge_group: pull_request: branches: [ master ] - # Only run jobs if at least one non-doc file is changed - paths-ignore: - - '**/*.md' - - 'mkdocs.yml' schedule: - cron: '0 */12 * * *' workflow_dispatch: @@ -20,7 +16,7 @@ concurrency: cancel-in-progress: true env: - K8S_VERSION: v1.33.1 + K8S_VERSION: v1.32.3 KIND_CLUSTER_NAME: ovn KIND_INSTALL_INGRESS: true KIND_ALLOW_SYSTEM_WRITES: true @@ -61,7 +57,7 @@ jobs: - name: Verify uses: golangci/golangci-lint-action@v6 with: - version: v1.64.8 + version: v1.60.3 working-directory: go-controller args: --modules-download-mode=vendor --timeout=15m0s --verbose @@ -454,20 +450,20 @@ jobs: - {"target": "shard-conformance", "ha": "HA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "routeadvertisements": "advertise-default"} - {"target": "shard-conformance", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"} - {"target": "shard-conformance", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"} - - {"target": "control-plane", "ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-disabled"} + - {"target": "control-plane", "ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-disabled", "dns-name-resolver": "enable-dns-name-resolver"} - {"target": "control-plane", "ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-disabled", "traffic-flow-tests": "1,2,3"} - {"target": "control-plane-helm","ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-disabled", "dns-name-resolver": "enable-dns-name-resolver"} - {"target": "control-plane-helm","ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "dns-name-resolver": "enable-dns-name-resolver"} - {"target": "control-plane", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "dns-name-resolver": "enable-dns-name-resolver"} - {"target": "control-plane", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv6", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"} - {"target": "control-plane", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "2br", "ic": "ic-single-node-zones"} - - {"target": "control-plane", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "2br", "ic": "ic-single-node-zones"} + - {"target": "control-plane", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "2br", "ic": "ic-single-node-zones", "dns-name-resolver": "enable-dns-name-resolver"} - {"target": "multi-homing", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv4", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-disabled"} - {"target": "multi-homing-helm", "ha": "HA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-disabled", "network-segmentation": "enable-network-segmentation"} - {"target": "node-ip-mac-migration", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-disabled"} - {"target": "node-ip-mac-migration", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"} - {"target": "compact-mode", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv4", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-disabled"} - - {"target": "multi-homing", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "network-segmentation": "enable-network-segmentation"} + - {"target": "multi-homing", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"} - {"target": "multi-node-zones", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv4", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-multi-node-zones", "num-workers": "3", "num-nodes-per-zone": "2"} - {"target": "external-gateway", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "2br", "ic": "ic-single-node-zones"} - {"target": "external-gateway", "ha": "noHA", "gateway-mode": "local", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"} @@ -481,17 +477,16 @@ jobs: - {"target": "network-segmentation", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "dualstack", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-disabled"} - {"target": "network-segmentation", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"} - {"target": "network-segmentation", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv6", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones"} - - {"target": "bgp", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "routeadvertisements": "advertise-default", "network-segmentation": "enable-network-segmentation", "dns-name-resolver": "enable-dns-name-resolver"} - - {"target": "bgp", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "dualstack", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "routeadvertisements": "advertise-default", "network-segmentation": "enable-network-segmentation", "dns-name-resolver": "enable-dns-name-resolver"} - - {"target": "bgp-loose-isolation", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "dualstack", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "routeadvertisements": "advertise-default", "network-segmentation": "enable-network-segmentation", "advertised-udn-isolation-mode": "loose"} + - {"target": "bgp", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "snatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "routeadvertisements": "advertise-default", "network-segmentation": "enable-network-segmentation"} + - {"target": "bgp", "ha": "noHA", "gateway-mode": "shared", "ipfamily": "dualstack", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "routeadvertisements": "advertise-default", "network-segmentation": "enable-network-segmentation"} - {"target": "traffic-flow-test-only","ha": "noHA", "gateway-mode": "shared", "ipfamily": "ipv4", "disable-snat-multiple-gws": "noSnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "traffic-flow-tests": "1-24", "network-segmentation": "enable-network-segmentation"} - {"target": "tools", "ha": "noHA", "gateway-mode": "local", "ipfamily": "dualstack", "disable-snat-multiple-gws": "SnatGW", "second-bridge": "1br", "ic": "ic-single-node-zones", "network-segmentation": "enable-network-segmentation"} needs: [ build-pr ] env: JOB_NAME: "${{ matrix.target }}-${{ matrix.ha }}-${{ matrix.gateway-mode }}-${{ matrix.ipfamily }}-${{ matrix.disable-snat-multiple-gws }}-${{ matrix.second-bridge }}-${{ matrix.ic }}" OVN_HYBRID_OVERLAY_ENABLE: ${{ (matrix.target == 'control-plane' || matrix.target == 'control-plane-helm') && (matrix.ipfamily == 'ipv4' || matrix.ipfamily == 'dualstack' ) }} - OVN_MULTICAST_ENABLE: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'network-segmentation' || matrix.target == 'bgp' || matrix.target == 'bgp-loose-isolation' }}" - OVN_EMPTY_LB_EVENTS: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'bgp' || matrix.target == 'bgp-loose-isolation' }}" + OVN_MULTICAST_ENABLE: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'network-segmentation' || matrix.target == 'bgp' }}" + OVN_EMPTY_LB_EVENTS: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'bgp' }}" OVN_HA: "${{ matrix.ha == 'HA' }}" OVN_DISABLE_SNAT_MULTIPLE_GWS: "${{ matrix.disable-snat-multiple-gws == 'noSnatGW' }}" KIND_INSTALL_METALLB: "${{ matrix.target == 'control-plane' || matrix.target == 'control-plane-helm' || matrix.target == 'network-segmentation' }}" @@ -514,8 +509,6 @@ jobs: TRAFFIC_FLOW_TESTS: "${{ matrix.traffic-flow-tests }}" ENABLE_ROUTE_ADVERTISEMENTS: "${{ matrix.routeadvertisements != '' }}" ADVERTISE_DEFAULT_NETWORK: "${{ matrix.routeadvertisements == 'advertise-default' }}" - ENABLE_PRE_CONF_UDN_ADDR: "${{ matrix.ic == 'ic-single-node-zones' && (matrix.target == 'network-segmentation' || matrix.network-segmentation == 'enable-network-segmentation') }}" - ADVERTISED_UDN_ISOLATION_MODE: "${{ matrix.advertised-udn-isolation-mode }}" steps: - name: Install VRF kernel module @@ -649,7 +642,7 @@ jobs: # set 3 hours for control-plane tests as these might take a while # give 10m extra to give ginkgo chance to timeout before github so that we # get its output - timeout-minutes: ${{ matrix.target == 'bgp-loose-isolation' && 190 || matrix.target == 'bgp' && 190 || matrix.target == 'control-plane' && 190 || matrix.target == 'control-plane-helm' && 190 || matrix.target == 'external-gateway' && 190 || 130 }} + timeout-minutes: ${{ matrix.target == 'bgp' && 190 || matrix.target == 'control-plane' && 190 || matrix.target == 'control-plane-helm' && 190 || matrix.target == 'external-gateway' && 190 || 130 }} run: | # used by e2e diagnostics package export OVN_IMAGE="ovn-daemonset-fedora:pr" @@ -673,7 +666,7 @@ jobs: fi elif [ "${{ matrix.target }}" == "network-segmentation" ]; then make -C test control-plane WHAT="Network Segmentation" - elif [ "${{ matrix.target }}" == "bgp" ] || [ "${{ matrix.target }}" == "bgp-loose-isolation" ]; then + elif [ "${{ matrix.target }}" == "bgp" ]; then make -C test control-plane elif [ "${{ matrix.target }}" == "tools" ]; then make -C go-controller build diff --git a/Dockerfile b/Dockerfile index 74e10a832a..46ad2ccf60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ # The standard name for this image is ovn-kube # Build RHEL-9 binaries -FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.20 AS builder +FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder WORKDIR /go/src/github.com/openshift/ovn-kubernetes COPY . . @@ -13,7 +13,7 @@ RUN cd go-controller; CGO_ENABLED=1 make RUN cd go-controller; CGO_ENABLED=0 make windows # Build RHEL-8 binaries (for upgrades from 4.12 and earlier) -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.24-openshift-4.20 AS rhel8 +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.23-openshift-4.19 AS rhel8 WORKDIR /go/src/github.com/openshift/ovn-kubernetes COPY . . RUN cd go-controller; CGO_ENABLED=1 make @@ -26,7 +26,7 @@ RUN cd go-controller; CGO_ENABLED=1 make # - creating directories required by ovn-kubernetes # - git commit number # - ovnkube.sh script -FROM registry.ci.openshift.org/ocp/4.20:ovn-kubernetes-base +FROM registry.ci.openshift.org/ocp/4.19:ovn-kubernetes-base USER root diff --git a/Dockerfile.microshift b/Dockerfile.microshift index e11933d1b4..4846e332a4 100644 --- a/Dockerfile.microshift +++ b/Dockerfile.microshift @@ -12,7 +12,7 @@ # openvswitch-devel, openvswitch-ipsec, libpcap, iproute etc # ovn-kube-util, hybrid-overlay-node.exe, ovndbchecker and ovnkube-trace -FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.20 AS builder +FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder WORKDIR /go/src/github.com/openshift/ovn-kubernetes COPY . . @@ -20,7 +20,7 @@ COPY . . # build the binaries RUN cd go-controller; CGO_ENABLED=0 make -FROM registry.ci.openshift.org/ocp/4.20:ovn-kubernetes-base +FROM registry.ci.openshift.org/ocp/4.19:ovn-kubernetes-base USER root diff --git a/MEETINGS.md b/MEETINGS.md index 8964025628..701459788f 100644 --- a/MEETINGS.md +++ b/MEETINGS.md @@ -6,7 +6,7 @@ All are welcome to join our meetings! If you want to discuss something with the ## Meeting time -We meet alternate Monday's at 5:00 PM CET/CEST. +We meet alternate Monday's at 6:00 PM CET/CEST. In order to figure out when our next meeting is, please check our agenda for previous meeting history. The meetings last up to 1 hour. diff --git a/contrib/kind-common b/contrib/kind-common index 4f236d7c31..bbb7cda7e1 100644 --- a/contrib/kind-common +++ b/contrib/kind-common @@ -34,8 +34,7 @@ if_error_exit() { set_common_default_params() { KIND_IMAGE=${KIND_IMAGE:-kindest/node} - K8S_VERSION=${K8S_VERSION:-v1.33.1} - KIND_SETTLE_DURATION=${KIND_SETTLE_DURATION:-30} + K8S_VERSION=${K8S_VERSION:-v1.32.3} } run_kubectl() { @@ -56,37 +55,6 @@ run_kubectl() { done } -setup_kubectl_bin() { - ########################################################################### - # Description: # - # setup kubectl for querying the cluster # - # # - # Arguments: # - # $1 - error message if not provided, it will just exit # - ########################################################################### - if [ ! -d "./bin" ] - then - mkdir -p ./bin - if_error_exit "Failed to create bin dir!" - fi - - if [[ "$OSTYPE" == "linux-gnu" ]]; then - OS_TYPE="linux" - elif [[ "$OSTYPE" == "darwin"* ]]; then - OS_TYPE="darwin" - fi - - pushd ./bin - if [ ! -f ./kubectl ]; then - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/${OS_TYPE}/${ARCH}/kubectl" - if_error_exit "Failed to download kubectl failed!" - fi - popd - - chmod +x ./bin/kubectl - export PATH=${PATH}:$(pwd)/bin -} - command_exists() { cmd="$1" command -v ${cmd} >/dev/null 2>&1 @@ -95,20 +63,12 @@ command_exists() { detect_apiserver_url() { # Detect API_URL used for in-cluster communication # - # This will return apiserver address in format https://: - DNS_NAME_URL=$(kind get kubeconfig --internal --name "${KIND_CLUSTER_NAME}" | grep server | awk '{ print $2 }') - # cut https:// from the URL - CP_NODE=${DNS_NAME_URL#*//} - # cut port from the URL - CP_NODE=${CP_NODE%:*} - # find node IP address in the kind network - if [ "$PLATFORM_IPV4_SUPPORT" == false ] && [ "$PLATFORM_IPV6_SUPPORT" == true ]; then - NODE_IP="[$($OCI_BIN inspect -f '{{.NetworkSettings.Networks.kind.GlobalIPv6Address}}' $CP_NODE)]" - else - NODE_IP=$($OCI_BIN inspect -f '{{.NetworkSettings.Networks.kind.IPAddress}}' "$CP_NODE") - fi - # replace node name with node IP address - API_URL=${DNS_NAME_URL/$CP_NODE/$NODE_IP} + # Despite OVN run in pod they will only obtain the VIRTUAL apiserver address + # and since OVN has to provide the connectivity to service + # it can not be bootstrapped + # + # This is the address of the node with the control-plane + API_URL=$(kind get kubeconfig --internal --name "${KIND_CLUSTER_NAME}" | grep server | awk '{ print $2 }') } docker_disable_ipv6() { @@ -370,8 +330,8 @@ calculate_timeout() { } sleep_until_pods_settle() { - echo "Pods are all up, allowing things settle for ${KIND_SETTLE_DURATION} seconds..." - sleep ${KIND_SETTLE_DURATION} + echo "Pods are all up, allowing things settle for 30 seconds..." + sleep 30 } is_nested_virt_enabled() { @@ -428,7 +388,30 @@ install_kubevirt() { local kubevirt_stable_release_url=$(get_kubevirt_release_url "stable") kubectl -n kubevirt patch kubevirt kubevirt --type=json --patch '[{"op":"add","path":"/spec/configuration/network","value":{}},{"op":"add","path":"/spec/configuration/network/binding","value":{"l2bridge":{"domainAttachmentType":"managedTap","migration":{}}}}]' + + if [ ! -d "./bin" ] + then + mkdir -p ./bin + if_error_exit "Failed to create bin dir!" + fi + + if [[ "$OSTYPE" == "linux-gnu" ]]; then + OS_TYPE="linux" + elif [[ "$OSTYPE" == "darwin"* ]]; then + OS_TYPE="darwin" + fi + + pushd ./bin + if [ ! -f ./virtctl ]; then + kubevirt_stable_release_url=$(get_kubevirt_release_url "stable") + cli_name="virtctl-${kubevirt_stable_release_url##*/}-${OS_TYPE}-${ARCH}" + curl -LO "${kubevirt_stable_release_url}/${cli_name}" + mv ${cli_name} virtctl + if_error_exit "Failed to download virtctl!" + fi + popd + chmod +x ./bin/virtctl } install_cert_manager() { @@ -461,7 +444,7 @@ install_mpolicy_crd() { install_ipamclaim_crd() { echo "Installing IPAMClaim CRD ..." - ipamclaims_manifest="https://raw.githubusercontent.com/k8snetworkplumbingwg/ipamclaims/v0.5.1-alpha/artifacts/k8s.cni.cncf.io_ipamclaims.yaml" + ipamclaims_manifest="https://raw.githubusercontent.com/k8snetworkplumbingwg/ipamclaims/v0.4.0-alpha/artifacts/k8s.cni.cncf.io_ipamclaims.yaml" run_kubectl apply -f "$ipamclaims_manifest" } @@ -759,52 +742,22 @@ deploy_bgp_external_server() { $OCI_BIN run --cap-add NET_ADMIN --user 0 -d --network bgpnet --rm --name bgpserver -p 8080:8080 registry.k8s.io/e2e-test-images/agnhost:2.45 netexec # let's make the bgp external server have its default route towards FRR router so that we don't need to add routes during tests back to the pods in the # cluster for return traffic - local bgp_network_frr_v4 bgp_network_frr_v6 kind_network_frr_v4 kind_network_frr_v6 + local bgp_network_frr_v4 bgp_network_frr_v6 bgp_network_frr_v4=$($OCI_BIN inspect -f '{{.NetworkSettings.Networks.bgpnet.IPAddress}}' frr) - echo "FRR bgp network IPv4: ${bgp_network_frr_v4}" + echo "FRR kind network IPv4: ${bgp_network_frr_v4}" $OCI_BIN exec bgpserver ip route replace default via "$bgp_network_frr_v4" if [ "$PLATFORM_IPV6_SUPPORT" == true ] ; then bgp_network_frr_v6=$($OCI_BIN inspect -f '{{.NetworkSettings.Networks.bgpnet.GlobalIPv6Address}}' frr) - echo "FRR bgp network IPv6: ${bgp_network_frr_v6}" + echo "FRR kind network IPv6: ${bgp_network_frr_v6}" $OCI_BIN exec bgpserver ip -6 route replace default via "$bgp_network_frr_v6" fi - if [ "$ADVERTISED_UDN_ISOLATION_MODE" == "loose" ]; then - kind_network_frr_v4=$($OCI_BIN inspect -f '{{.NetworkSettings.Networks.kind.IPAddress}}' frr) - echo "FRR kind network IPv4: ${kind_network_frr_v4}" - # If UDN isolation is in loose disabled, we need to set the default gateway for the nodes in the cluster - # to the FRR router so that cross-UDN traffic can be routed back to the pods in the cluster in the loose mode. - echo "Setting default gateway for nodes in the cluster to FRR router IPv4: ${kind_network_frr_v4}" - set_nodes_default_gw "$kind_network_frr_v4" - if [ "$PLATFORM_IPV6_SUPPORT" == true ] ; then - kind_network_frr_v6=$($OCI_BIN inspect -f '{{.NetworkSettings.Networks.kind.GlobalIPv6Address}}' frr) - echo "FRR kind network IPv6: ${kind_network_frr_v6}" - set_nodes_default_gw "$kind_network_frr_v6" - fi - else - # disable the default route to make sure the container only routes accross - # directly connected or learnt networks (doing this at the very end since - # docker changes the routing table when a new network is connected) - $OCI_BIN exec frr ip route delete default - $OCI_BIN exec frr ip route - $OCI_BIN exec frr ip -6 route delete default - $OCI_BIN exec frr ip -6 route - fi -} - -set_nodes_default_gw() { - local gw="$1" - local ip_cmd="ip" - local route_cmd="route replace default via" - - # Check if $gw is IPv6 (contains ':') - if [[ "$gw" == *:* ]]; then - ip_cmd="ip -6" - fi - - KIND_NODES=$(kind_get_nodes) - for node in $KIND_NODES; do - $OCI_BIN exec "$node" $ip_cmd $route_cmd "$gw" - done + # disable the default route to make sure the container only routes accross + # directly connected or learnt networks (doing this at the very end since + # docker changes the routing table when a new network is connected) + $OCI_BIN exec frr ip route delete default + $OCI_BIN exec frr ip route + $OCI_BIN exec frr ip -6 route delete default + $OCI_BIN exec frr ip -6 route } destroy_bgp() { @@ -907,9 +860,3 @@ EOF done fi } - -interconnect_arg_check() { - if [ "${IC_ARG_PROVIDED:-}" = "true" ]; then - echo "INFO: Interconnect mode is now the default mode, you do not need to use pass -ic or --enable-interconnect anymore" - fi -} diff --git a/contrib/kind-helm.sh b/contrib/kind-helm.sh index 343a6d40cf..17c30a1bc7 100755 --- a/contrib/kind-helm.sh +++ b/contrib/kind-helm.sh @@ -62,7 +62,7 @@ set_default_params() { KIND_NUM_MASTER=3 fi - OVN_ENABLE_INTERCONNECT=${OVN_ENABLE_INTERCONNECT:-true} + OVN_ENABLE_INTERCONNECT=${OVN_ENABLE_INTERCONNECT:-false} if [ "$OVN_COMPACT_MODE" == true ] && [ "$OVN_ENABLE_INTERCONNECT" != false ]; then echo "Compact mode cannot be used together with Interconnect" exit 1 @@ -129,7 +129,7 @@ usage() { echo "-wk | --num-workers Number of worker nodes. DEFAULT: 2 workers" echo "-cn | --cluster-name Configure the kind cluster's name" echo "-dns | --enable-dnsnameresolver Enable DNSNameResolver for resolving the DNS names used in the DNS rules of EgressFirewall." - echo "-ce | --enable-central Deploy with OVN Central (Legacy Architecture)" + echo "-ic | --enable-interconnect Enable interconnect with each node as a zone (only valid if OVN_HA is false)" echo "-npz | --nodes-per-zone Specify number of nodes per zone (Default 0, which means global zone; >0 means interconnect zone, where 1 for single-node zone, >1 for multi-node zone). If this value > 1, then (total k8s nodes (workers + 1) / num of nodes per zone) should be zero." echo "" @@ -193,11 +193,7 @@ parse_args() { ;; -dns | --enable-dnsnameresolver ) OVN_ENABLE_DNSNAMERESOLVER=true ;; - -ce | --enable-central ) OVN_ENABLE_INTERCONNECT=false - CENTRAL_ARG_PROVIDED=true - ;; -ic | --enable-interconnect ) OVN_ENABLE_INTERCONNECT=true - IC_ARG_PROVIDED=true ;; -npz | --nodes-per-zone ) shift if ! [[ "$1" =~ ^[0-9]+$ ]]; then @@ -212,11 +208,6 @@ parse_args() { esac shift done - - if [[ -n "${CENTRAL_ARG_PROVIDED:-}" && -n "${IC_ARG_PROVIDED:-}" ]]; then - echo "Cannot specify both --enable-central and --enable-interconnect" >&2 - exit 1 - fi } print_params() { @@ -255,23 +246,15 @@ print_params() { } check_dependencies() { - if ! command_exists kubectl ; then - echo "'kubectl' not found, installing" - setup_kubectl_bin - fi - - for cmd in "$OCI_BIN" kind helm go ; do \ - if ! command_exists "$cmd" ; then - echo "Dependency not met: $cmd" + for cmd in $OCI_BIN kubectl kind helm go ; do \ + if ! command_exists $cmd ; then + 2&>1 echo "Dependency not met: $cmd" exit 1 fi done # check for currently unsupported features - if [ "${PLATFORM_IPV6_SUPPORT:-}" = "true" ]; then - echo "Fatal: PLATFORM_IPV6_SUPPORT support not implemented yet" - exit 1 - fi + [ "${PLATFORM_IPV6_SUPPORT}" == "true" ] && { &>1 echo "Fatal: PLATFORM_IPV6_SUPPORT support not implemented yet"; exit 1; } ||: } helm_prereqs() { @@ -422,7 +405,7 @@ create_ovn_kubernetes() { label_ovn_single_node_zones value_file="values-single-node-zone.yaml" ovnkube_db_options="" - elif [[ $KIND_NUM_NODES_PER_ZONE -gt 1 ]]; then + elif [[ $KIND_NUM_NODES_PER_ZONE > 1 ]]; then label_ovn_multiple_nodes_zones value_file="values-multi-node-zone.yaml" ovnkube_db_options="" @@ -523,5 +506,3 @@ fi if [ "$KIND_INSTALL_KUBEVIRT" == true ]; then install_kubevirt fi - -interconnect_arg_check diff --git a/contrib/kind.sh b/contrib/kind.sh index cff76b68ef..af1c0f537c 100755 --- a/contrib/kind.sh +++ b/contrib/kind.sh @@ -6,6 +6,37 @@ DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" # Source the kind-common file from the same directory where this script is located source "${DIR}/kind-common" +function setup_kubectl_bin() { + ########################################################################### + # Description: # + # setup kubectl for querying the cluster # + # # + # Arguments: # + # $1 - error message if not provided, it will just exit # + ########################################################################### + if [ ! -d "./bin" ] + then + mkdir -p ./bin + if_error_exit "Failed to create bin dir!" + fi + + if [[ "$OSTYPE" == "linux-gnu" ]]; then + OS_TYPE="linux" + elif [[ "$OSTYPE" == "darwin"* ]]; then + OS_TYPE="darwin" + fi + + pushd ./bin + if [ ! -f ./kubectl ]; then + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/${OS_TYPE}/${ARCH}/kubectl" + if_error_exit "Failed to download kubectl failed!" + fi + popd + + chmod +x ./bin/kubectl + export PATH=${PATH}:$(pwd)/bin +} + # Some environments (Fedora32,31 on desktop), have problems when the cluster # is deleted directly with kind `kind delete cluster --name ovn`, it restarts the host. # The root cause is unknown, this also can not be reproduced in Ubuntu 20.04 or @@ -53,7 +84,6 @@ usage() { echo " [-ic | --enable-interconnect]" echo " [-uae | --preconfigured-udn-addresses-enable]" echo " [-rae | --enable-route-advertisements]" - echo " [-rud | --routed-udn-isolation-disable]" echo " [-adv | --advertise-default-network]" echo " [-nqe | --network-qos-enable]" echo " [--isolated]" @@ -114,7 +144,7 @@ echo "-ehp | --egress-ip-healthcheck-port TCP port used for gRPC sessi echo "-is | --ipsec Enable IPsec encryption (spawns ovn-ipsec pods)" echo "-sm | --scale-metrics Enable scale metrics" echo "-cm | --compact-mode Enable compact mode, ovnkube master and node run in the same process." -echo "-ce | --enable-central Deploy with OVN Central (Legacy Architecture)" +echo "-ic | --enable-interconnect Enable interconnect with each node as a zone (only valid if OVN_HA is false)" echo "-nqe | --network-qos-enable Enable network QoS. DEFAULT: Disabled." echo "--disable-ovnkube-identity Disable per-node cert and ovnkube-identity webhook" echo "-npz | --nodes-per-zone If interconnect is enabled, number of nodes per zone (Default 1). If this value > 1, then (total k8s nodes (workers + 1) / num of nodes per zone) should be zero." @@ -128,7 +158,6 @@ echo "-obs | --observability Enable OVN Observability fea echo "-uae | --preconfigured-udn-addresses-enable Enable connecting workloads with preconfigured network to user-defined networks" echo "-rae | --enable-route-advertisements Enable route advertisements" echo "-adv | --advertise-default-network Applies a RouteAdvertisements configuration to advertise the default network on all nodes" -echo "-rud | --routed-udn-isolation-disable Disable isolation across BGP-advertised UDNs (sets advertised-udn-isolation-mode=loose). DEFAULT: strict." echo "" } @@ -318,14 +347,8 @@ parse_args() { ;; -adv | --advertise-default-network) ADVERTISE_DEFAULT_NETWORK=true ;; - -rud | --routed-udn-isolation-disable) ADVERTISED_UDN_ISOLATION_MODE=loose - ;; - -ce | --enable-central ) OVN_ENABLE_INTERCONNECT=false - CENTRAL_ARG_PROVIDED=true - ;; - -ic | --enable-interconnect ) OVN_ENABLE_INTERCONNECT=true - IC_ARG_PROVIDED=true - ;; + -ic | --enable-interconnect ) OVN_ENABLE_INTERCONNECT=true + ;; --disable-ovnkube-identity) OVN_ENABLE_OVNKUBE_IDENTITY=false ;; -mtu ) shift @@ -352,11 +375,6 @@ parse_args() { esac shift done - - if [[ -n "${CENTRAL_ARG_PROVIDED:-}" && -n "${IC_ARG_PROVIDED:-}" ]]; then - echo "Cannot specify both --enable-central and --enable-interconnect" >&2 - exit 1 - fi } print_params() { @@ -421,7 +439,6 @@ print_params() { echo "ENABLE_MULTI_NET = $ENABLE_MULTI_NET" echo "ENABLE_NETWORK_SEGMENTATION= $ENABLE_NETWORK_SEGMENTATION" echo "ENABLE_ROUTE_ADVERTISEMENTS= $ENABLE_ROUTE_ADVERTISEMENTS" - echo "ADVERTISED_UDN_ISOLATION_MODE= $ADVERTISED_UDN_ISOLATION_MODE" echo "ADVERTISE_DEFAULT_NETWORK = $ADVERTISE_DEFAULT_NETWORK" echo "ENABLE_PRE_CONF_UDN_ADDR = $ENABLE_PRE_CONF_UDN_ADDR" echo "OVN_ENABLE_INTERCONNECT = $OVN_ENABLE_INTERCONNECT" @@ -601,7 +618,7 @@ set_default_params() { BGP_SERVER_NET_SUBNET_IPV6=${BGP_SERVER_NET_SUBNET_IPV6:-fc00:f853:ccd:e796::/64} KIND_NUM_MASTER=1 - OVN_ENABLE_INTERCONNECT=${OVN_ENABLE_INTERCONNECT:-true} + OVN_ENABLE_INTERCONNECT=${OVN_ENABLE_INTERCONNECT:-false} OVN_ENABLE_OVNKUBE_IDENTITY=${OVN_ENABLE_OVNKUBE_IDENTITY:-true} OVN_NETWORK_QOS_ENABLE=${OVN_NETWORK_QOS_ENABLE:-false} @@ -668,7 +685,6 @@ set_default_params() { echo "Preconfigured UDN addresses requires interconnect to be enabled (-ic)" exit 1 fi - ADVERTISED_UDN_ISOLATION_MODE=${ADVERTISED_UDN_ISOLATION_MODE:-strict} ADVERTISE_DEFAULT_NETWORK=${ADVERTISE_DEFAULT_NETWORK:-false} OVN_COMPACT_MODE=${OVN_COMPACT_MODE:-false} if [ "$OVN_COMPACT_MODE" == true ]; then @@ -842,6 +858,9 @@ build_ovn_image() { if [ "$OVN_IMAGE" == local ]; then set_ovn_image + # Build binaries + make -C ${DIR}/../go-controller + # Build image make -C ${DIR}/../dist/images IMAGE="${OVN_IMAGE}" OVN_REPO="${OVN_REPO}" OVN_GITREF="${OVN_GITREF}" OCI_BIN="${OCI_BIN}" fedora-image @@ -922,7 +941,6 @@ create_ovn_kube_manifests() { --preconfigured-udn-addresses-enable="${ENABLE_PRE_CONF_UDN_ADDR}" \ --route-advertisements-enable="${ENABLE_ROUTE_ADVERTISEMENTS}" \ --advertise-default-network="${ADVERTISE_DEFAULT_NETWORK}" \ - --advertised-udn-isolation-mode="${ADVERTISED_UDN_ISOLATION_MODE}" \ --ovnkube-metrics-scale-enable="${OVN_METRICS_SCALE_ENABLE}" \ --compact-mode="${OVN_COMPACT_MODE}" \ --enable-interconnect="${OVN_ENABLE_INTERCONNECT}" \ @@ -1267,5 +1285,3 @@ fi if [ "$ENABLE_ROUTE_ADVERTISEMENTS" == true ]; then install_ffr_k8s fi - -interconnect_arg_check diff --git a/dist/images/Dockerfile.fedora b/dist/images/Dockerfile.fedora index c60e89921d..49b8da6872 100644 --- a/dist/images/Dockerfile.fedora +++ b/dist/images/Dockerfile.fedora @@ -14,7 +14,7 @@ ARG OVN_FROM=koji ############################################# # Stage to get OVN and OVS RPMs from source # ############################################# -FROM quay.io/fedora/fedora:42 AS ovnbuilder +FROM quay.io/fedora/fedora:41 AS ovnbuilder USER root @@ -78,8 +78,8 @@ RUN git log -n 1 ######################################## # Stage to download OVN RPMs from koji # ######################################## -FROM quay.io/fedora/fedora:42 AS kojidownloader -ARG ovnver=ovn-25.03.1-42.fc42 +FROM quay.io/fedora/fedora:41 AS kojidownloader +ARG ovnver=ovn-24.09.2-71.fc41 USER root @@ -93,20 +93,20 @@ RUN echo "Running on $BUILDPLATFORM, building for $TARGETPLATFORM" # Final stage RUN dnf install --best --refresh -y --setopt=tsflags=nodocs koji -RUN if [ "$TARGETPLATFORM" = "linux/amd64" ] || [ -z "$TARGETPLATFORM" ] ; then koji download-build $ovnver --arch=x86_64 ; \ +RUN if [ "$TARGETPLATFORM" = "linux/amd64" ] || [ -z "$TARGETPLATFORM"] ; then koji download-build $ovnver --arch=x86_64 ; \ else koji download-build $ovnver --arch=aarch64 ; fi ###################################### # Stage to copy OVN RPMs from source # ###################################### -FROM quay.io/fedora/fedora:42 AS source +FROM quay.io/fedora/fedora:41 AS source COPY --from=ovnbuilder /root/ovn/rpm/rpmbuild/RPMS/x86_64/*.rpm / COPY --from=ovnbuilder /root/ovs/rpm/rpmbuild/RPMS/x86_64/*.rpm / #################################### # Stage to copy OVN RPMs from koji # #################################### -FROM quay.io/fedora/fedora:42 AS koji +FROM quay.io/fedora/fedora:41 AS koji COPY --from=kojidownloader /*.rpm / diff --git a/dist/images/Dockerfile.ubuntu b/dist/images/Dockerfile.ubuntu index 7fedefa624..10addc57d4 100644 --- a/dist/images/Dockerfile.ubuntu +++ b/dist/images/Dockerfile.ubuntu @@ -8,12 +8,14 @@ # # So this file will change over time. -FROM ubuntu:25.04 +FROM ubuntu:24.10 USER root RUN apt-get update && apt-get install -y iproute2 curl software-properties-common util-linux nftables +RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - + # Install OVS and OVN packages. RUN apt-get update && apt-get install -y openvswitch-switch openvswitch-common ovn-central ovn-common ovn-host diff --git a/dist/images/Dockerfile.ubuntu.arm64 b/dist/images/Dockerfile.ubuntu.arm64 index 3830641cf0..48a408b036 100644 --- a/dist/images/Dockerfile.ubuntu.arm64 +++ b/dist/images/Dockerfile.ubuntu.arm64 @@ -8,12 +8,14 @@ # # So this file will change over time. -FROM ubuntu:25.04 +FROM ubuntu:24.10 USER root RUN apt-get update && apt-get install -y iproute2 curl software-properties-common util-linux nftables +RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - + # Install OVS and OVN packages. RUN apt-get update && apt-get install -y openvswitch-switch openvswitch-common ovn-central ovn-common ovn-host diff --git a/dist/images/daemonset.sh b/dist/images/daemonset.sh index f45f473a66..0613a37238 100755 --- a/dist/images/daemonset.sh +++ b/dist/images/daemonset.sh @@ -74,7 +74,6 @@ OVN_NETWORK_SEGMENTATION_ENABLE= OVN_PRE_CONF_UDN_ADDR_ENABLE= OVN_ROUTE_ADVERTISEMENTS_ENABLE= OVN_ADVERTISE_DEFAULT_NETWORK= -OVN_ADVERTISED_UDN_ISOLATION_MODE= OVN_V4_JOIN_SUBNET="" OVN_V6_JOIN_SUBNET="" OVN_V4_MASQUERADE_SUBNET="" @@ -284,9 +283,6 @@ while [ "$1" != "" ]; do --advertise-default-network) OVN_ADVERTISE_DEFAULT_NETWORK=$VALUE ;; - --advertised-udn-isolation-mode) - OVN_ADVERTISED_UDN_ISOLATION_MODE=$VALUE - ;; --egress-service-enable) OVN_EGRESSSERVICE_ENABLE=$VALUE ;; @@ -482,8 +478,6 @@ ovn_route_advertisements_enable=${OVN_ROUTE_ADVERTISEMENTS_ENABLE} echo "ovn_route_advertisements_enable: ${ovn_route_advertisements_enable}" ovn_advertise_default_network=${OVN_ADVERTISE_DEFAULT_NETWORK} echo "ovn_advertise_default_network: ${ovn_advertise_default_network}" -ovn_advertised_udn_isolation_mode=${OVN_ADVERTISED_UDN_ISOLATION_MODE} -echo "ovn_advertised_udn_isolation_mode: ${ovn_advertised_udn_isolation_mode}" ovn_hybrid_overlay_net_cidr=${OVN_HYBRID_OVERLAY_NET_CIDR} echo "ovn_hybrid_overlay_net_cidr: ${ovn_hybrid_overlay_net_cidr}" ovn_disable_snat_multiple_gws=${OVN_DISABLE_SNAT_MULTIPLE_GWS} @@ -626,7 +620,6 @@ ovn_image=${ovnkube_image} \ ovn_network_segmentation_enable=${ovn_network_segmentation_enable} \ ovn_pre_conf_udn_addr_enable=${ovn_pre_conf_udn_addr_enable} \ ovn_route_advertisements_enable=${ovn_route_advertisements_enable} \ - ovn_advertised_udn_isolation_mode=${ovn_advertised_udn_isolation_mode} \ ovn_egress_service_enable=${ovn_egress_service_enable} \ ovn_ssl_en=${ovn_ssl_en} \ ovn_remote_probe_interval=${ovn_remote_probe_interval} \ @@ -681,7 +674,6 @@ ovn_image=${ovnkube_image} \ ovn_multi_network_enable=${ovn_multi_network_enable} \ ovn_network_segmentation_enable=${ovn_network_segmentation_enable} \ ovn_route_advertisements_enable=${ovn_route_advertisements_enable} \ - ovn_advertised_udn_isolation_mode=${ovn_advertised_udn_isolation_mode} \ ovn_egress_service_enable=${ovn_egress_service_enable} \ ovn_ssl_en=${ovn_ssl_en} \ ovn_remote_probe_interval=${ovn_remote_probe_interval} \ @@ -781,7 +773,6 @@ ovn_image=${ovnkube_image} \ ovn_multi_network_enable=${ovn_multi_network_enable} \ ovn_network_segmentation_enable=${ovn_network_segmentation_enable} \ ovn_route_advertisements_enable=${ovn_route_advertisements_enable} \ - ovn_advertised_udn_isolation_mode=${ovn_advertised_udn_isolation_mode} \ ovn_egress_service_enable=${ovn_egress_service_enable} \ ovn_ssl_en=${ovn_ssl_en} \ ovn_master_count=${ovn_master_count} \ @@ -832,7 +823,6 @@ ovn_image=${ovnkube_image} \ ovn_network_segmentation_enable=${ovn_network_segmentation_enable} \ ovn_pre_conf_udn_addr_enable=${ovn_pre_conf_udn_addr_enable} \ ovn_route_advertisements_enable=${ovn_route_advertisements_enable} \ - ovn_advertised_udn_isolation_mode=${ovn_advertised_udn_isolation_mode} \ ovn_egress_service_enable=${ovn_egress_service_enable} \ ovn_ssl_en=${ovn_ssl_en} \ ovn_master_count=${ovn_master_count} \ @@ -914,7 +904,6 @@ ovn_image=${ovnkube_image} \ ovn_network_segmentation_enable=${ovn_network_segmentation_enable} \ ovn_pre_conf_udn_addr_enable=${ovn_pre_conf_udn_addr_enable} \ ovn_route_advertisements_enable=${ovn_route_advertisements_enable} \ - ovn_advertised_udn_isolation_mode=${ovn_advertised_udn_isolation_mode} \ ovn_egress_service_enable=${ovn_egress_service_enable} \ ovn_ssl_en=${ovn_ssl_en} \ ovn_remote_probe_interval=${ovn_remote_probe_interval} \ @@ -983,7 +972,6 @@ ovn_image=${ovnkube_image} \ ovn_network_segmentation_enable=${ovn_network_segmentation_enable} \ ovn_pre_conf_udn_addr_enable=${ovn_pre_conf_udn_addr_enable} \ ovn_route_advertisements_enable=${ovn_route_advertisements_enable} \ - ovn_advertised_udn_isolation_mode=${ovn_advertised_udn_isolation_mode} \ ovn_ssl_en=${ovn_ssl_en} \ ovn_remote_probe_interval=${ovn_remote_probe_interval} \ ovn_monitor_all=${ovn_monitor_all} \ @@ -1082,14 +1070,11 @@ ovn_network_segmentation_enable=${ovn_network_segmentation_enable} \ ovn_pre_conf_udn_addr_enable=${ovn_pre_conf_udn_addr_enable} \ ovn_enable_dnsnameresolver=${ovn_enable_dnsnameresolver} \ ovn_route_advertisements_enable=${ovn_route_advertisements_enable} \ -ovn_advertised_udn_isolation_mode=${ovn_advertised_udn_isolation_mode} \ jinjanate ../templates/rbac-ovnkube-cluster-manager.yaml.j2 -o ${output_dir}/rbac-ovnkube-cluster-manager.yaml ovn_network_segmentation_enable=${ovn_network_segmentation_enable} \ ovn_enable_dnsnameresolver=${ovn_enable_dnsnameresolver} \ ovn_route_advertisements_enable=${ovn_route_advertisements_enable} \ -ovn_pre_conf_udn_addr_enable=${ovn_pre_conf_udn_addr_enable} \ -ovn_advertised_udn_isolation_mode=${ovn_advertised_udn_isolation_mode} \ jinjanate ../templates/rbac-ovnkube-master.yaml.j2 -o ${output_dir}/rbac-ovnkube-master.yaml cp ../templates/rbac-ovnkube-identity.yaml.j2 ${output_dir}/rbac-ovnkube-identity.yaml diff --git a/dist/images/ovndb-raft-functions.sh b/dist/images/ovndb-raft-functions.sh index 87c5d8a393..8737ca3b50 100644 --- a/dist/images/ovndb-raft-functions.sh +++ b/dist/images/ovndb-raft-functions.sh @@ -2,7 +2,7 @@ #set -euo pipefail verify-ovsdb-raft() { - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" if [[ ${ovn_db_host} == "" ]]; then echo "failed to retrieve the IP address of the host $(hostname). Exiting..." diff --git a/dist/images/ovnkube.sh b/dist/images/ovnkube.sh index 3b41e7103c..3931d4e180 100755 --- a/dist/images/ovnkube.sh +++ b/dist/images/ovnkube.sh @@ -10,7 +10,7 @@ fi . /root/ovndb-raft-functions.sh # This script is the entrypoint to the image. -# Supports version 1.1.0 daemonsets +# Supports version 1.0.0 daemonsets # Keep the daemonset versioning aligned with the ovnkube release versions # Commands ($1 values) # ovs-server Runs the ovs daemons - ovsdb-server and ovs-switchd (v3) @@ -28,7 +28,7 @@ fi # ovn_debug Displays ovn/ovs configuration and flows # NOTE: The script/image must be compatible with the daemonset. -# This script supports version 1.1.0 daemonsets +# This script supports version 1.0.0 daemonsets # When called, it starts all needed daemons. # Currently the version here is used to match with the image version # It must be updated during every release @@ -41,7 +41,7 @@ fi # OVN_KUBERNETES_NAMESPACE - k8s namespace - v3 # K8S_NODE - hostname of the node - v3 # -# OVN_DAEMONSET_VERSION - version match daemonset and image - v1.1.0 +# OVN_DAEMONSET_VERSION - version match daemonset and image - v1.0.0 # K8S_TOKEN - the apiserver token. Automatically detected when running in a pod - v3 # K8S_CACERT - the apiserver CA. Automatically detected when running in a pod - v3 # OVN_CONTROLLER_OPTS - the options for ovn-ctl @@ -121,11 +121,11 @@ ovnkube_logfile_maxage=${OVNKUBE_LOGFILE_MAXAGE:-"5"} ovnkube_libovsdb_client_logfile=${OVNKUBE_LIBOVSDB_CLIENT_LOGFILE:-} # ovnkube.sh version (Update during each release) -ovnkube_version="1.1.0" +ovnkube_version="1.0.0" # The daemonset version must be compatible with this script. # The default when OVN_DAEMONSET_VERSION is not set is version 3 -ovn_daemonset_version=${OVN_DAEMONSET_VERSION:-"1.1.0"} +ovn_daemonset_version=${OVN_DAEMONSET_VERSION:-"1.0.0"} # hostname is the host's hostname when using host networking, # This is useful on the master @@ -273,8 +273,6 @@ ovn_network_segmentation_enable=${OVN_NETWORK_SEGMENTATION_ENABLE:=false} ovn_pre_conf_udn_addr_enable=${OVN_PRE_CONF_UDN_ADDR_ENABLE:=false} #OVN_NROUTE_ADVERTISEMENTS_ENABLE - enable route advertisements for ovn-kubernetes ovn_route_advertisements_enable=${OVN_ROUTE_ADVERTISEMENTS_ENABLE:=false} -#OVN_ADVERTISED_UDN_ISOLATION_MODE - pod network isolation between advertised UDN networks. -ovn_advertised_udn_isolation_mode=${OVN_ADVERTISED_UDN_ISOLATION_MODE:=strict} ovn_acl_logging_rate_limit=${OVN_ACL_LOGGING_RATE_LIMIT:-"20"} ovn_netflow_targets=${OVN_NETFLOW_TARGETS:-} ovn_sflow_targets=${OVN_SFLOW_TARGETS:-} @@ -817,12 +815,8 @@ function memory_trim_on_compaction_supported { function get_node_zone() { zone=$(kubectl --subresource=status --server=${K8S_APISERVER} --token=${k8s_token} --certificate-authority=${K8S_CACERT} \ get node ${K8S_NODE} -o=jsonpath={'.metadata.labels.k8s\.ovn\.org/zone-name'}) - if [ -z "$zone" ]; then - if [[ ${ovn_enable_interconnect} == "true" ]]; then - zone="${K8S_NODE}" - else - zone="global" - fi + if [ "$zone" == "" ]; then + zone="global" fi echo "$zone" } @@ -836,10 +830,10 @@ function get_ovnkube_zone_db_ep() { fi } -# v1.1.0 - run nb_ovsdb in a separate container +# v1.0.0 - run nb_ovsdb in a separate container nb-ovsdb() { trap 'ovsdb_cleanup nb' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovnnb_db.pid if [[ ${ovn_db_host} == "" ]]; then @@ -889,10 +883,10 @@ nb-ovsdb() { echo "=============== run nb_ovsdb ========== terminated" } -# v1.1.0 - run sb_ovsdb in a separate container +# v1.0.0 - run sb_ovsdb in a separate container sb-ovsdb() { trap 'ovsdb_cleanup sb' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovnsb_db.pid if [[ ${ovn_db_host} == "" ]]; then @@ -930,10 +924,10 @@ sb-ovsdb() { echo "=============== run sb_ovsdb ========== terminated" } -# v1.1.0 - Runs ovn-dbchecker on ovnkube-db pod. +# v1.0.0 - Runs ovn-dbchecker on ovnkube-db pod. ovn-dbchecker() { trap 'kill $(jobs -p); exit 0' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovn-dbchecker.pid # wait for ready_to_start_node @@ -984,7 +978,7 @@ ovn-dbchecker() { # unix sockets local-nb-ovsdb() { trap 'ovsdb_cleanup nb' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovnnb_db.pid echo "=============== run nb-ovsdb (unix sockets only) ==========" @@ -1018,7 +1012,7 @@ local-nb-ovsdb() { # unix sockets local-sb-ovsdb() { trap 'ovsdb_cleanup sb' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovnsb_db.pid echo "=============== run sb-ovsdb (unix sockets only) ========== " @@ -1036,10 +1030,10 @@ local-sb-ovsdb() { echo "=============== run sb-ovsdb (unix sockets only) ========== terminated" } -# v1.1.0 - Runs northd on master. Does not run nb_ovsdb, and sb_ovsdb +# v1.0.0 - Runs northd on master. Does not run nb_ovsdb, and sb_ovsdb run-ovn-northd() { trap 'ovn-appctl -t ovn-northd exit >/dev/null 2>&1; exit 0' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovn-northd.pid rm -f ${OVN_RUNDIR}/ovn-northd.*.ctl @@ -1088,10 +1082,10 @@ run-ovn-northd() { exit 8 } -# v1.1.0 - run ovnkube-identity +# v1.0.0 - run ovnkube-identity ovnkube-identity() { trap 'kill $(jobs -p); exit 0' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovnkube-identity.pid ovnkube_enable_interconnect_flag= @@ -1118,10 +1112,10 @@ ovnkube-identity() { exit 9 } -# v1.1.0 - run ovnkube --master (both cluster-manager and ovnkube-controller) +# v1.0.0 - run ovnkube --master (both cluster-manager and ovnkube-controller) ovn-master() { trap 'kill $(jobs -p); exit 0' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovnkube-master.pid echo "=============== ovn-master (wait for ready_to_start_node) ========== MASTER ONLY" @@ -1255,11 +1249,6 @@ ovn-master() { fi echo "route_advertisements_enabled_flag=${route_advertisements_enabled_flag}" - advertised_udn_isolation_flag= - if [[ -n ${ovn_advertised_udn_isolation_mode} ]]; then - advertised_udn_isolation_flag="--advertised-udn-isolation-mode=${ovn_advertised_udn_isolation_mode}" - fi - egressservice_enabled_flag= if [[ ${ovn_egressservice_enable} == "true" ]]; then egressservice_enabled_flag="--enable-egress-service" @@ -1367,7 +1356,6 @@ ovn-master() { ${multi_network_enabled_flag} \ ${network_segmentation_enabled_flag} \ ${route_advertisements_enabled_flag} \ - ${advertised_udn_isolation_flag} \ ${ovn_acl_logging_rate_limit_flag} \ ${ovn_enable_svc_template_support_flag} \ ${ovn_observ_enable_flag} \ @@ -1410,10 +1398,10 @@ ovn-master() { exit 9 } -# v1.1.0 - run ovnkube --ovnkube-controller +# v1.0.0 - run ovnkube --ovnkube-controller ovnkube-controller() { trap 'kill $(jobs -p); exit 0' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovnkube-controller.pid echo "=============== ovnkube-controller (wait for ready_to_start_node) ==========" @@ -1570,12 +1558,6 @@ ovnkube-controller() { fi echo "route_advertisements_enabled_flag=${route_advertisements_enabled_flag}" - advertised_udn_isolation_flag= - if [[ -n ${ovn_advertised_udn_isolation_mode} ]]; then - advertised_udn_isolation_flag="--advertised-udn-isolation-mode=${ovn_advertised_udn_isolation_mode}" - fi - echo "advertised_udn_isolation_flag=${advertised_udn_isolation_flag}" - egressservice_enabled_flag= if [[ ${ovn_egressservice_enable} == "true" ]]; then egressservice_enabled_flag="--enable-egress-service" @@ -1692,7 +1674,6 @@ ovnkube-controller() { ${network_segmentation_enabled_flag} \ ${pre_conf_udn_addr_enable_flag} \ ${route_advertisements_enabled_flag} \ - ${advertised_udn_isolation_flag} \ ${ovn_acl_logging_rate_limit_flag} \ ${ovn_dbs} \ ${ovn_enable_svc_template_support_flag} \ @@ -1733,7 +1714,7 @@ ovnkube-controller() { ovnkube-controller-with-node() { trap 'kill $(jobs -p) ; rm -f /etc/cni/net.d/10-ovn-kubernetes.conf ; exit 0' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovnkube-controller-with-node.pid if [[ ${ovnkube_node_mode} != "dpu-host" ]]; then @@ -1888,12 +1869,6 @@ ovnkube-controller-with-node() { fi echo "route_advertisements_enabled_flag=${route_advertisements_enabled_flag}" - advertised_udn_isolation_flag= - if [[ -n ${ovn_advertised_udn_isolation_mode} ]]; then - advertised_udn_isolation_flag="--advertised-udn-isolation-mode=${ovn_advertised_udn_isolation_mode}" - fi - echo "advertised_udn_isolation_flag=${advertised_udn_isolation_flag}" - egressservice_enabled_flag= if [[ ${ovn_egressservice_enable} == "true" ]]; then egressservice_enabled_flag="--enable-egress-service" @@ -2078,7 +2053,6 @@ ovnkube-controller-with-node() { ovnkube_metrics_scale_enable_flag="--metrics-enable-scale --metrics-enable-pprof" fi echo "ovnkube_metrics_scale_enable_flag: ${ovnkube_metrics_scale_enable_flag}" - ovnkube_local_cert_flags= if [[ ${ovn_enable_ovnkube_identity} == "true" ]]; then bootstrap_kubeconfig="/host-kubernetes/kubelet.conf" @@ -2123,12 +2097,6 @@ ovnkube-controller-with-node() { ovn_stateless_netpol_enable_flag="--enable-stateless-netpol" fi - ovn_disable_requestedchassis_flag= - if [[ ${ovn_disable_requestedchassis} == "true" ]]; then - ovn_disable_requestedchassis_flag="--disable-requestedchassis" - fi - echo "ovn_disable_requestedchassis_flag=${ovn_disable_requestedchassis_flag}" - echo "=============== ovnkube-controller-with-node --init-ovnkube-controller-with-node==========" /usr/bin/ovnkube --init-ovnkube-controller ${K8S_NODE} --init-node ${K8S_NODE} \ ${anp_enabled_flag} \ @@ -2156,7 +2124,6 @@ ovnkube-controller-with-node() { ${network_segmentation_enabled_flag} \ ${pre_conf_udn_addr_enable_flag} \ ${route_advertisements_enabled_flag} \ - ${advertised_udn_isolation_flag} \ ${netflow_targets} \ ${ofctrl_wait_before_clear} \ ${ovn_acl_logging_rate_limit_flag} \ @@ -2183,7 +2150,6 @@ ovnkube-controller-with-node() { ${ssl_opts} \ ${network_qos_enabled_flag} \ ${ovn_enable_dnsnameresolver_flag} \ - ${ovn_disable_requestedchassis_flag} \ --cluster-subnets ${net_cidr} --k8s-service-cidr=${svc_cidr} \ --export-ovs-metrics \ --gateway-mode=${ovn_gateway_mode} ${ovn_gateway_opts} \ @@ -2217,7 +2183,7 @@ ovnkube-controller-with-node() { # run ovnkube --cluster-manager. ovn-cluster-manager() { trap 'kill $(jobs -p); exit 0' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" ovn_encap_port_flag= if [[ -n "${ovn_encap_port}" ]]; then @@ -2335,11 +2301,6 @@ ovn-cluster-manager() { fi echo "route_advertisements_enabled_flag=${route_advertisements_enabled_flag}" - advertised_udn_isolation_flag= - if [[ -n ${ovn_advertised_udn_isolation_mode} ]]; then - advertised_udn_isolation_flag="--advertised-udn-isolation-mode=${ovn_advertised_udn_isolation_mode}" - fi - persistent_ips_enabled_flag= if [[ ${ovn_enable_persistent_ips} == "true" ]]; then persistent_ips_enabled_flag="--enable-persistent-ips" @@ -2403,7 +2364,6 @@ ovn-cluster-manager() { ${network_segmentation_enabled_flag} \ ${pre_conf_udn_addr_enable_flag} \ ${route_advertisements_enabled_flag} \ - ${advertised_udn_isolation_flag} \ ${persistent_ips_enabled_flag} \ ${ovnkube_enable_interconnect_flag} \ ${ovnkube_enable_multi_external_gateway_flag} \ @@ -2438,7 +2398,7 @@ ovn-cluster-manager() { # ovn-controller - all nodes ovn-controller() { - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovn-controller.pid echo "=============== ovn-controller - (wait for ovs)" @@ -2481,7 +2441,7 @@ ovn-controller() { # ovn-node - all nodes ovn-node() { trap 'kill $(jobs -p) ; rm -f /etc/cni/net.d/10-ovn-kubernetes.conf ; exit 0' TERM - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f ${OVN_RUNDIR}/ovnkube.pid if [[ ${ovnkube_node_mode} != "dpu-host" ]]; then @@ -2590,11 +2550,6 @@ ovn-node() { route_advertisements_enabled_flag="--enable-route-advertisements" fi - advertised_udn_isolation_flag= - if [[ -n ${ovn_advertised_udn_isolation_mode} ]]; then - advertised_udn_isolation_flag="--advertised-udn-isolation-mode=${ovn_advertised_udn_isolation_mode}" - fi - netflow_targets= if [[ -n ${ovn_netflow_targets} ]]; then netflow_targets="--netflow-targets ${ovn_netflow_targets}" @@ -2827,7 +2782,6 @@ ovn-node() { ${network_segmentation_enabled_flag} \ ${pre_conf_udn_addr_enable_flag} \ ${route_advertisements_enabled_flag} \ - ${advertised_udn_isolation_flag} \ ${netflow_targets} \ ${ofctrl_wait_before_clear} \ ${ovn_dbs} \ @@ -2878,7 +2832,7 @@ ovn-node() { # cleanup-ovn-node - all nodes cleanup-ovn-node() { - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" rm -f /etc/cni/net.d/10-ovn-kubernetes.conf @@ -2902,9 +2856,9 @@ cleanup-ovn-node() { } -# v1.1.0 - Runs ovn-kube-util in daemon mode to export prometheus metrics related to OVS. +# v1.0.0 - Runs ovn-kube-util in daemon mode to export prometheus metrics related to OVS. ovs-metrics() { - check_ovn_daemonset_version "1.1.0" + check_ovn_daemonset_version "1.0.0" echo "=============== ovs-metrics - (wait for ovs_ready)" wait_for_event ovs_ready diff --git a/dist/images/run-ovn-dpu.sh b/dist/images/run-ovn-dpu.sh index 328754e226..4ca6c9dc0a 100755 --- a/dist/images/run-ovn-dpu.sh +++ b/dist/images/run-ovn-dpu.sh @@ -1,7 +1,7 @@ docker run --pid host --network host --user=0 --name ovn -dit --cap-add=SYS_NICE -v /var/run/dbus:/var/run/dbus:ro -v \ /var/log/openvswitch:/var/log/openvswitch -v /var/log/openvswitch:/var/log/ovn -v \ /var/run/openvswitch:/var/run/openvswitch -v /var/run/openvswitch:/var/run/ovn -v $K8S_CACERT:$K8S_CACERT -v \ - /etc/ovn:/ovn-cert:ro -e OVN_DAEMONSET_VERSION=1.1.0 -e OVN_LOGLEVEL_CONTROLLER="-vconsole:info" \ + /etc/ovn:/ovn-cert:ro -e OVN_DAEMONSET_VERSION=1.0.0 -e OVN_LOGLEVEL_CONTROLLER="-vconsole:info" \ -e K8S_APISERVER=$K8S_APISERVER -e OVN_KUBERNETES_NAMESPACE=ovn-kubernetes -e OVN_SSL_ENABLE=no \ -e K8S_NODE=$K8S_NODE -e K8S_TOKEN=$K8S_TOKEN -e K8S_CACERT=$K8S_CACERT --entrypoint=/root/ovnkube.sh \ ovn-daemonset:latest "ovn-controller" diff --git a/dist/images/run-ovnkube-node-dpu.sh b/dist/images/run-ovnkube-node-dpu.sh index 5fb9ca3790..6db04840fe 100755 --- a/dist/images/run-ovnkube-node-dpu.sh +++ b/dist/images/run-ovnkube-node-dpu.sh @@ -3,7 +3,7 @@ docker run --pid host --network host --user=0 --name ovn-node -dit --cap-add=NET -v /var/log/ovn-kubernetes:/var/log/ovn-kubernetes -v /var/run/openvswitch:/var/run/openvswitch/ \ -v /var/run/openvswitch:/var/run/ovn/ -v /var/run/ovn-kubernetes:/var/run/ovn-kubernetes \ -v /etc/ovn:/ovn-cert:ro -v /var/lib/openvswitch:/etc/openvswitch:ro -v /var/lib/openvswitch:/etc/ovn:ro \ - -e OVN_DAEMONSET_VERSION=1.1.0 -e OVN_LOGLEVEL_CONTROLLER="-vconsole:info" \ + -e OVN_DAEMONSET_VERSION=1.0.0 -e OVN_LOGLEVEL_CONTROLLER="-vconsole:info" \ -e OVN_NET_CIDR=$OVN_NET_CIDR -e OVN_SVC_CIDR=$OVN_SVC_CIDR -e K8S_NODE=$K8S_NODE \ -e OVN_GATEWAY_MODE="shared" -e OVN_GATEWAY_ROUTER_SUBNET=$OVN_GATEWAY_ROUTER_SUBNET \ -e OVN_REMOTE_PROBE_INTERVAL=100000 -e K8S_APISERVER=$K8S_APISERVER \ diff --git a/dist/templates/k8s.ovn.org_clusteruserdefinednetworks.yaml.j2 b/dist/templates/k8s.ovn.org_clusteruserdefinednetworks.yaml.j2 index 88901528d4..8d832810d0 100644 --- a/dist/templates/k8s.ovn.org_clusteruserdefinednetworks.yaml.j2 +++ b/dist/templates/k8s.ovn.org_clusteruserdefinednetworks.yaml.j2 @@ -94,48 +94,6 @@ spec: layer2: description: Layer2 is the Layer2 topology configuration. properties: - defaultGatewayIPs: - description: |- - defaultGatewayIPs specifies the default gateway IP used in the internal OVN topology. - - Dual-stack clusters may set 2 IPs (one for each IP family), otherwise only 1 IP is allowed. - This field is only allowed for "Primary" network. - It is not recommended to set this field without explicit need and understanding of the OVN network topology. - When omitted, an IP from the subnets field is used. - items: - type: string - x-kubernetes-validations: - - message: IP is invalid - rule: isIP(self) - maxItems: 2 - minItems: 1 - type: array - x-kubernetes-validations: - - message: When 2 IPs are set, they must be from different - IP families - rule: size(self) != 2 || !isIP(self[0]) || !isIP(self[1]) - || ip(self[0]).family() != ip(self[1]).family() - infrastructureSubnets: - description: |- - infrastructureSubnets specifies a list of internal CIDR ranges that OVN-Kubernetes will reserve for internal network infrastructure. - Any IP addresses within these ranges cannot be assigned to workloads. - When omitted, OVN-Kubernetes will automatically allocate IP addresses from `subnets` for its infrastructure needs. - When there are not enough available IPs in the provided infrastructureSubnets, OVN-Kubernetes will automatically allocate IP addresses from subnets for its infrastructure needs. - When `reservedSubnets` is also specified the CIDRs cannot overlap. - When `defaultGatewayIPs` is also specified, the default gateway IPs must belong to one of the infrastructure subnet CIDRs. - Each item should be in range of the specified CIDR(s) in `subnets`. - The maximum number of entries allowed is 4. - The format should match standard CIDR notation (for example, "10.128.0.0/16"). - This field must be omitted if `subnets` is unset or `ipam.mode` is `Disabled`. - items: - maxLength: 43 - type: string - x-kubernetes-validations: - - message: CIDR is invalid - rule: isCIDR(self) - maxItems: 4 - minItems: 1 - type: array ipam: description: IPAM section contains IPAM-related configuration for the network. @@ -202,24 +160,6 @@ spec: maximum: 65536 minimum: 576 type: integer - reservedSubnets: - description: |- - reservedSubnets specifies a list of CIDRs reserved for static IP assignment, excluded from automatic allocation. - reservedSubnets is optional. When omitted, all IP addresses in `subnets` are available for automatic assignment. - IPs from these ranges can still be requested through static IP assignment. - Each item should be in range of the specified CIDR(s) in `subnets`. - The maximum number of entries allowed is 25. - The format should match standard CIDR notation (for example, "10.128.0.0/16"). - This field must be omitted if `subnets` is unset or `ipam.mode` is `Disabled`. - items: - maxLength: 43 - type: string - x-kubernetes-validations: - - message: CIDR is invalid - rule: isCIDR(self) - maxItems: 25 - minItems: 1 - type: array role: description: |- Role describes the network role in the pod. @@ -272,47 +212,6 @@ spec: subnet is used rule: '!has(self.subnets) || !has(self.mtu) || !self.subnets.exists_one(i, isCIDR(i) && cidr(i).ip().family() == 6) || self.mtu >= 1280' - - message: defaultGatewayIPs is only supported for Primary network - rule: '!has(self.defaultGatewayIPs) || has(self.role) && self.role - == ''Primary''' - - message: defaultGatewayIPs must belong to one of the subnets - specified in the subnets field - rule: '!has(self.defaultGatewayIPs) || self.defaultGatewayIPs.all(ip, - self.subnets.exists(subnet, cidr(subnet).containsIP(ip)))' - - message: defaultGatewayIPs must be specified for all IP families - rule: '!has(self.defaultGatewayIPs) || size(self.defaultGatewayIPs) - == size(self.subnets)' - - message: reservedSubnets must be unset when subnets is unset - rule: '!has(self.reservedSubnets) || has(self.subnets)' - - message: reservedSubnets is only supported for Primary network - rule: '!has(self.reservedSubnets) || has(self.role) && self.role - == ''Primary''' - - message: infrastructureSubnets must be unset when subnets is - unset - rule: '!has(self.infrastructureSubnets) || has(self.subnets)' - - message: infrastructureSubnets is only supported for Primary - network - rule: '!has(self.infrastructureSubnets) || has(self.role) && - self.role == ''Primary''' - - message: defaultGatewayIPs have to belong to infrastructureSubnets - rule: '!has(self.infrastructureSubnets) || !has(self.defaultGatewayIPs) - || self.defaultGatewayIPs.all(ip, self.infrastructureSubnets.exists(subnet, - cidr(subnet).containsIP(ip)))' - - fieldPath: .reservedSubnets - message: reservedSubnets must be subnetworks of the networks - specified in the subnets field - rule: '!has(self.reservedSubnets) || self.reservedSubnets.all(e, - self.subnets.exists(s, cidr(s).containsCIDR(cidr(e))))' - - fieldPath: .infrastructureSubnets - message: infrastructureSubnets must be subnetworks of the networks - specified in the subnets field - rule: '!has(self.infrastructureSubnets) || self.infrastructureSubnets.all(e, - self.subnets.exists(s, cidr(s).containsCIDR(cidr(e))))' - - message: infrastructureSubnets and reservedSubnets must not - overlap - rule: '!has(self.infrastructureSubnets) || !has(self.reservedSubnets) - || self.infrastructureSubnets.all(infra, !self.reservedSubnets.exists(reserved, - cidr(infra).containsCIDR(reserved) || cidr(reserved).containsCIDR(infra)))' layer3: description: Layer3 is the Layer3 topology configuration. properties: diff --git a/dist/templates/k8s.ovn.org_userdefinednetworks.yaml.j2 b/dist/templates/k8s.ovn.org_userdefinednetworks.yaml.j2 index 9b855382a9..bc121ebe9b 100644 --- a/dist/templates/k8s.ovn.org_userdefinednetworks.yaml.j2 +++ b/dist/templates/k8s.ovn.org_userdefinednetworks.yaml.j2 @@ -42,48 +42,6 @@ spec: layer2: description: Layer2 is the Layer2 topology configuration. properties: - defaultGatewayIPs: - description: |- - defaultGatewayIPs specifies the default gateway IP used in the internal OVN topology. - - Dual-stack clusters may set 2 IPs (one for each IP family), otherwise only 1 IP is allowed. - This field is only allowed for "Primary" network. - It is not recommended to set this field without explicit need and understanding of the OVN network topology. - When omitted, an IP from the subnets field is used. - items: - type: string - x-kubernetes-validations: - - message: IP is invalid - rule: isIP(self) - maxItems: 2 - minItems: 1 - type: array - x-kubernetes-validations: - - message: When 2 IPs are set, they must be from different IP - families - rule: size(self) != 2 || !isIP(self[0]) || !isIP(self[1]) || - ip(self[0]).family() != ip(self[1]).family() - infrastructureSubnets: - description: |- - infrastructureSubnets specifies a list of internal CIDR ranges that OVN-Kubernetes will reserve for internal network infrastructure. - Any IP addresses within these ranges cannot be assigned to workloads. - When omitted, OVN-Kubernetes will automatically allocate IP addresses from `subnets` for its infrastructure needs. - When there are not enough available IPs in the provided infrastructureSubnets, OVN-Kubernetes will automatically allocate IP addresses from subnets for its infrastructure needs. - When `reservedSubnets` is also specified the CIDRs cannot overlap. - When `defaultGatewayIPs` is also specified, the default gateway IPs must belong to one of the infrastructure subnet CIDRs. - Each item should be in range of the specified CIDR(s) in `subnets`. - The maximum number of entries allowed is 4. - The format should match standard CIDR notation (for example, "10.128.0.0/16"). - This field must be omitted if `subnets` is unset or `ipam.mode` is `Disabled`. - items: - maxLength: 43 - type: string - x-kubernetes-validations: - - message: CIDR is invalid - rule: isCIDR(self) - maxItems: 4 - minItems: 1 - type: array ipam: description: IPAM section contains IPAM-related configuration for the network. @@ -150,24 +108,6 @@ spec: maximum: 65536 minimum: 576 type: integer - reservedSubnets: - description: |- - reservedSubnets specifies a list of CIDRs reserved for static IP assignment, excluded from automatic allocation. - reservedSubnets is optional. When omitted, all IP addresses in `subnets` are available for automatic assignment. - IPs from these ranges can still be requested through static IP assignment. - Each item should be in range of the specified CIDR(s) in `subnets`. - The maximum number of entries allowed is 25. - The format should match standard CIDR notation (for example, "10.128.0.0/16"). - This field must be omitted if `subnets` is unset or `ipam.mode` is `Disabled`. - items: - maxLength: 43 - type: string - x-kubernetes-validations: - - message: CIDR is invalid - rule: isCIDR(self) - maxItems: 25 - minItems: 1 - type: array role: description: |- Role describes the network role in the pod. @@ -219,44 +159,6 @@ spec: is used rule: '!has(self.subnets) || !has(self.mtu) || !self.subnets.exists_one(i, isCIDR(i) && cidr(i).ip().family() == 6) || self.mtu >= 1280' - - message: defaultGatewayIPs is only supported for Primary network - rule: '!has(self.defaultGatewayIPs) || has(self.role) && self.role - == ''Primary''' - - message: defaultGatewayIPs must belong to one of the subnets specified - in the subnets field - rule: '!has(self.defaultGatewayIPs) || self.defaultGatewayIPs.all(ip, - self.subnets.exists(subnet, cidr(subnet).containsIP(ip)))' - - message: defaultGatewayIPs must be specified for all IP families - rule: '!has(self.defaultGatewayIPs) || size(self.defaultGatewayIPs) - == size(self.subnets)' - - message: reservedSubnets must be unset when subnets is unset - rule: '!has(self.reservedSubnets) || has(self.subnets)' - - message: reservedSubnets is only supported for Primary network - rule: '!has(self.reservedSubnets) || has(self.role) && self.role - == ''Primary''' - - message: infrastructureSubnets must be unset when subnets is unset - rule: '!has(self.infrastructureSubnets) || has(self.subnets)' - - message: infrastructureSubnets is only supported for Primary network - rule: '!has(self.infrastructureSubnets) || has(self.role) && self.role - == ''Primary''' - - message: defaultGatewayIPs have to belong to infrastructureSubnets - rule: '!has(self.infrastructureSubnets) || !has(self.defaultGatewayIPs) - || self.defaultGatewayIPs.all(ip, self.infrastructureSubnets.exists(subnet, - cidr(subnet).containsIP(ip)))' - - fieldPath: .reservedSubnets - message: reservedSubnets must be subnetworks of the networks specified - in the subnets field - rule: '!has(self.reservedSubnets) || self.reservedSubnets.all(e, - self.subnets.exists(s, cidr(s).containsCIDR(cidr(e))))' - - fieldPath: .infrastructureSubnets - message: infrastructureSubnets must be subnetworks of the networks - specified in the subnets field - rule: '!has(self.infrastructureSubnets) || self.infrastructureSubnets.all(e, - self.subnets.exists(s, cidr(s).containsCIDR(cidr(e))))' - - message: infrastructureSubnets and reservedSubnets must not overlap - rule: '!has(self.infrastructureSubnets) || !has(self.reservedSubnets) - || self.infrastructureSubnets.all(infra, !self.reservedSubnets.exists(reserved, - cidr(infra).containsCIDR(reserved) || cidr(reserved).containsCIDR(infra)))' layer3: description: Layer3 is the Layer3 topology configuration. properties: diff --git a/dist/templates/ovn-setup.yaml.j2 b/dist/templates/ovn-setup.yaml.j2 index 981a362859..8112e06670 100644 --- a/dist/templates/ovn-setup.yaml.j2 +++ b/dist/templates/ovn-setup.yaml.j2 @@ -89,9 +89,7 @@ spec: networkSelectors: - networkSelectionType: DefaultNetwork nodeSelector: {} - frrConfigurationSelector: - matchLabels: - name: receive-all + frrConfigurationSelector: {} advertisements: - "PodNetwork" {%- endif %} diff --git a/dist/templates/ovnkube-control-plane.yaml.j2 b/dist/templates/ovnkube-control-plane.yaml.j2 index ded7096f86..13403ceb31 100644 --- a/dist/templates/ovnkube-control-plane.yaml.j2 +++ b/dist/templates/ovnkube-control-plane.yaml.j2 @@ -85,7 +85,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVNKUBE_LOGLEVEL value: "{{ ovnkube_master_loglevel }}" - name: OVNKUBE_LOGFILE_MAXSIZE @@ -150,8 +150,6 @@ spec: value: "{{ ovn_pre_conf_udn_addr_enable }}" - name: OVN_ROUTE_ADVERTISEMENTS_ENABLE value: "{{ ovn_route_advertisements_enable }}" - - name: OVN_ADVERTISED_UDN_ISOLATION_MODE - value: "{{ ovn_advertised_udn_isolation_mode }}" - name: OVN_HYBRID_OVERLAY_NET_CIDR value: "{{ ovn_hybrid_overlay_net_cidr }}" - name: OVN_DISABLE_SNAT_MULTIPLE_GWS diff --git a/dist/templates/ovnkube-db-raft.yaml.j2 b/dist/templates/ovnkube-db-raft.yaml.j2 index ea607e3c66..5e29061255 100644 --- a/dist/templates/ovnkube-db-raft.yaml.j2 +++ b/dist/templates/ovnkube-db-raft.yaml.j2 @@ -139,7 +139,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_NB value: "{{ ovn_loglevel_nb }}" - name: K8S_APISERVER @@ -218,7 +218,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_SB value: "{{ ovn_loglevel_sb }}" - name: K8S_APISERVER @@ -285,7 +285,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVNKUBE_LOGLEVEL value: "{{ ovn_dbchecker_loglevel }}" - name: OVNKUBE_LOGFILE_MAXSIZE diff --git a/dist/templates/ovnkube-db.yaml.j2 b/dist/templates/ovnkube-db.yaml.j2 index 558d104818..2762be5201 100644 --- a/dist/templates/ovnkube-db.yaml.j2 +++ b/dist/templates/ovnkube-db.yaml.j2 @@ -104,7 +104,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_NB value: "{{ ovn_loglevel_nb }}" - name: K8S_APISERVER @@ -175,7 +175,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_SB value: "{{ ovn_loglevel_sb }}" - name: K8S_APISERVER diff --git a/dist/templates/ovnkube-identity.yaml.j2 b/dist/templates/ovnkube-identity.yaml.j2 index 1e1386d8f3..9726653d03 100644 --- a/dist/templates/ovnkube-identity.yaml.j2 +++ b/dist/templates/ovnkube-identity.yaml.j2 @@ -53,7 +53,7 @@ spec: name: webhook-cert env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: K8S_APISERVER valueFrom: configMapKeyRef: diff --git a/dist/templates/ovnkube-master.yaml.j2 b/dist/templates/ovnkube-master.yaml.j2 index 532216da7b..47ea81a6dc 100644 --- a/dist/templates/ovnkube-master.yaml.j2 +++ b/dist/templates/ovnkube-master.yaml.j2 @@ -102,7 +102,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_NORTHD value: "{{ ovn_loglevel_northd }}" - name: K8S_APISERVER @@ -199,7 +199,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVNKUBE_LOGLEVEL value: "{{ ovnkube_master_loglevel }}" - name: OVNKUBE_LOGFILE_MAXSIZE @@ -261,8 +261,6 @@ spec: value: "{{ ovn_network_segmentation_enable }}" - name: OVN_ROUTE_ADVERTISEMENTS_ENABLE value: "{{ ovn_route_advertisements_enable }}" - - name: OVN_ADVERTISED_UDN_ISOLATION_MODE - value: "{{ ovn_advertised_udn_isolation_mode }}" - name: OVN_EGRESSSERVICE_ENABLE value: "{{ ovn_egress_service_enable }}" - name: OVN_HYBRID_OVERLAY_NET_CIDR diff --git a/dist/templates/ovnkube-node.yaml.j2 b/dist/templates/ovnkube-node.yaml.j2 index 4a81df0582..2bf8e5ed2a 100644 --- a/dist/templates/ovnkube-node.yaml.j2 +++ b/dist/templates/ovnkube-node.yaml.j2 @@ -118,7 +118,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVNKUBE_LOGLEVEL value: "{{ ovnkube_node_loglevel }}" - name: OVNKUBE_LOGFILE_MAXSIZE @@ -242,8 +242,6 @@ spec: value: "{{ ovn_network_segmentation_enable }}" - name: OVN_ROUTE_ADVERTISEMENTS_ENABLE value: "{{ ovn_route_advertisements_enable }}" - - name: OVN_ADVERTISED_UDN_ISOLATION_MODE - value: "{{ ovn_advertised_udn_isolation_mode }}" - name: OVN_ENABLE_INTERCONNECT value: "{{ ovn_enable_interconnect }}" - name: OVN_ENABLE_MULTI_EXTERNAL_GATEWAY @@ -326,7 +324,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_CONTROLLER value: "{{ ovn_loglevel_controller }}" - name: K8S_APISERVER @@ -385,7 +383,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: K8S_NODE_IP valueFrom: fieldRef: diff --git a/dist/templates/ovnkube-single-node-zone.yaml.j2 b/dist/templates/ovnkube-single-node-zone.yaml.j2 index d5d6e6dd21..ad4e4488f9 100644 --- a/dist/templates/ovnkube-single-node-zone.yaml.j2 +++ b/dist/templates/ovnkube-single-node-zone.yaml.j2 @@ -74,7 +74,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_NB value: "{{ ovn_loglevel_nb }}" - name: OVN_NORTHD_BACKOFF_INTERVAL @@ -148,7 +148,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_SB value: "{{ ovn_loglevel_sb }}" - name: K8S_APISERVER @@ -215,7 +215,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_NORTHD value: "{{ ovn_loglevel_northd }}" - name: K8S_APISERVER @@ -303,9 +303,6 @@ spec: name: run-systemd subPath: private readOnly: true - - mountPath: /var/run/k8s.cni.cncf.io/devinfo/dp - name: host-devinfo-dp - readOnly: true resources: requests: @@ -315,7 +312,7 @@ spec: - name: OVN_EGRESSSERVICE_ENABLE value: "{{ ovn_egress_service_enable }}" - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVNKUBE_LOGLEVEL value: "{{ ovnkube_node_loglevel }}" - name: OVNKUBE_LOGFILE_MAXSIZE @@ -444,8 +441,6 @@ spec: value: "{{ ovn_pre_conf_udn_addr_enable }}" - name: OVN_ROUTE_ADVERTISEMENTS_ENABLE value: "{{ ovn_route_advertisements_enable }}" - - name: OVN_ADVERTISED_UDN_ISOLATION_MODE - value: "{{ ovn_advertised_udn_isolation_mode }}" - name: OVNKUBE_NODE_MGMT_PORT_NETDEV value: "{{ ovnkube_node_mgmt_port_netdev }}" - name: OVN_EMPTY_LB_EVENTS @@ -517,7 +512,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_CONTROLLER value: "{{ ovn_loglevel_controller }}" - name: K8S_APISERVER @@ -573,7 +568,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: K8S_NODE_IP valueFrom: fieldRef: @@ -644,9 +639,6 @@ spec: - name: run-systemd hostPath: path: /run/systemd - - name: host-devinfo-dp - hostPath: - path: /var/run/k8s.cni.cncf.io/devinfo/dp tolerations: - operator: "Exists" diff --git a/dist/templates/ovnkube-zone-controller.yaml.j2 b/dist/templates/ovnkube-zone-controller.yaml.j2 index d51cb82843..cc87fe1a53 100644 --- a/dist/templates/ovnkube-zone-controller.yaml.j2 +++ b/dist/templates/ovnkube-zone-controller.yaml.j2 @@ -92,7 +92,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_NB value: "{{ ovn_loglevel_nb }}" - name: OVN_NORTHD_BACKOFF_INTERVAL @@ -162,7 +162,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_SB value: "{{ ovn_loglevel_sb }}" - name: K8S_APISERVER @@ -229,7 +229,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVN_LOGLEVEL_NORTHD value: "{{ ovn_loglevel_northd }}" - name: K8S_APISERVER @@ -287,7 +287,7 @@ spec: memory: 300Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" - name: OVNKUBE_LOGLEVEL value: "{{ ovnkube_local_loglevel }}" - name: OVNKUBE_LOGFILE_MAXSIZE @@ -349,8 +349,6 @@ spec: value: "{{ ovn_pre_conf_udn_addr_enable }}" - name: OVN_ROUTE_ADVERTISEMENTS_ENABLE value: "{{ ovn_route_advertisements_enable }}" - - name: OVN_ADVERTISED_UDN_ISOLATION_MODE - value: "{{ ovn_advertised_udn_isolation_mode }}" - name: OVN_HYBRID_OVERLAY_NET_CIDR value: "{{ ovn_hybrid_overlay_net_cidr }}" - name: OVN_DISABLE_SNAT_MULTIPLE_GWS diff --git a/dist/templates/ovs-node.yaml.j2 b/dist/templates/ovs-node.yaml.j2 index b6e33fa6c0..32a88e5488 100644 --- a/dist/templates/ovs-node.yaml.j2 +++ b/dist/templates/ovs-node.yaml.j2 @@ -90,7 +90,7 @@ spec: memory: 500Mi env: - name: OVN_DAEMONSET_VERSION - value: "1.1.0" + value: "1.0.0" lifecycle: preStop: exec: diff --git a/dist/templates/rbac-ovnkube-master.yaml.j2 b/dist/templates/rbac-ovnkube-master.yaml.j2 index 0096e8c2ab..c99d655f91 100644 --- a/dist/templates/rbac-ovnkube-master.yaml.j2 +++ b/dist/templates/rbac-ovnkube-master.yaml.j2 @@ -191,42 +191,3 @@ spec: apiVersions: ["v1"] operations: ["UPDATE"] resources: ["namespaces"] - -{% if ovn_pre_conf_udn_addr_enable == "true" -%} ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingAdmissionPolicy -metadata: - name: default-network-annotation -spec: - matchConstraints: - resourceRules: - - apiGroups: [""] - apiVersions: ["v1"] - operations: ["UPDATE"] - resources: ["pods"] - failurePolicy: Fail - validations: - # Prevent any changes to the default-network annotation after pod creation: - # - If annotation exists in old pod: new pod must have same annotation with identical value - # - If annotation doesn't exist in old pod: new pod must also not have it - - expression: > - ('v1.multus-cni.io/default-network' in oldObject.metadata.annotations) - ? ('v1.multus-cni.io/default-network' in object.metadata.annotations) && oldObject.metadata.annotations['v1.multus-cni.io/default-network'] == object.metadata.annotations['v1.multus-cni.io/default-network'] - : !('v1.multus-cni.io/default-network' in object.metadata.annotations) - message: "The 'v1.multus-cni.io/default-network' annotation cannot be changed after the pod was created" ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingAdmissionPolicyBinding -metadata: - name: default-network-annotation-binding -spec: - policyName: default-network-annotation - validationActions: [Deny] - matchResources: - resourceRules: - - apiGroups: [""] - apiVersions: ["v1"] - operations: ["UPDATE"] - resources: ["pods"] -{%- endif %} diff --git a/docs/api-reference/introduction.md b/docs/api-reference/introduction.md index 1a221898ec..d976372579 100644 --- a/docs/api-reference/introduction.md +++ b/docs/api-reference/introduction.md @@ -38,4 +38,3 @@ designed and implemented by OVN-Kubernetes * [EgressFirewall](https://ovn-kubernetes.io/api-reference/egress-firewall-api-spec/) * [AdminPolicyBasedExternalRoutes](https://ovn-kubernetes.io/api-reference/admin-epbr-api-spec/) * [UserDefinedNetwork](https://ovn-kubernetes.io/api-reference/userdefinednetwork-api-spec/) -* [RouteAdvertisements](routeadvertisements-api-spec.md) diff --git a/docs/api-reference/routeadvertisements-api-spec.md b/docs/api-reference/routeadvertisements-api-spec.md deleted file mode 100644 index 9d9838a076..0000000000 --- a/docs/api-reference/routeadvertisements-api-spec.md +++ /dev/null @@ -1,112 +0,0 @@ -# API Reference - -## Packages -- [k8s.ovn.org/v1](#k8sovnorgv1) - - -## k8s.ovn.org/v1 - -Package v1 contains API Schema definitions for the RouteAdvertisements v1 API -group - -### Resource Types -- [RouteAdvertisements](#routeadvertisements) -- [RouteAdvertisementsList](#routeadvertisementslist) - - - -#### AdvertisementType - -_Underlying type:_ _string_ - -AdvertisementType determines the type of advertisement. - -_Validation:_ -- Enum: [PodNetwork EgressIP] - -_Appears in:_ -- [RouteAdvertisementsSpec](#routeadvertisementsspec) - -| Field | Description | -| --- | --- | -| `PodNetwork` | PodNetwork determines that the pod network is advertised.
| -| `EgressIP` | EgressIP determines that egress IPs are being advertised.
| - - -#### RouteAdvertisements - - - -RouteAdvertisements is the Schema for the routeadvertisements API - - - -_Appears in:_ -- [RouteAdvertisementsList](#routeadvertisementslist) - -| Field | Description | Default | Validation | -| --- | --- | --- | --- | -| `apiVersion` _string_ | `k8s.ovn.org/v1` | | | -| `kind` _string_ | `RouteAdvertisements` | | | -| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | | -| `spec` _[RouteAdvertisementsSpec](#routeadvertisementsspec)_ | | | | -| `status` _[RouteAdvertisementsStatus](#routeadvertisementsstatus)_ | | | | - - -#### RouteAdvertisementsList - - - -RouteAdvertisementsList contains a list of RouteAdvertisements - - - - - -| Field | Description | Default | Validation | -| --- | --- | --- | --- | -| `apiVersion` _string_ | `k8s.ovn.org/v1` | | | -| `kind` _string_ | `RouteAdvertisementsList` | | | -| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | | -| `items` _[RouteAdvertisements](#routeadvertisements) array_ | | | | - - -#### RouteAdvertisementsSpec - - - -RouteAdvertisementsSpec defines the desired state of RouteAdvertisements - - - -_Appears in:_ -- [RouteAdvertisements](#routeadvertisements) - -| Field | Description | Default | Validation | -| --- | --- | --- | --- | -| `targetVRF` _string_ | targetVRF determines which VRF the routes should be advertised in. | | Optional: \{\}
| -| `networkSelectors` _[NetworkSelectors](#networkselectors)_ | networkSelectors determines which network routes should be advertised.
Only ClusterUserDefinedNetworks and the default network can be selected. | | Required: \{\}
| -| `nodeSelector` _[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#labelselector-v1-meta)_ | nodeSelector limits the advertisements to selected nodes. This field
follows standard label selector semantics. | | Required: \{\}
| -| `frrConfigurationSelector` _[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#labelselector-v1-meta)_ | frrConfigurationSelector determines which FRRConfigurations will the
OVN-Kubernetes driven FRRConfigurations be based on. This field follows
standard label selector semantics. | | Required: \{\}
| -| `advertisements` _[AdvertisementType](#advertisementtype) array_ | advertisements determines what is advertised. | | Enum: [PodNetwork EgressIP]
MaxItems: 2
MinItems: 1
Required: \{\}
| - - -#### RouteAdvertisementsStatus - - - -RouteAdvertisementsStatus defines the observed state of RouteAdvertisements. -It should always be reconstructable from the state of the cluster and/or -outside world. - - - -_Appears in:_ -- [RouteAdvertisements](#routeadvertisements) - -| Field | Description | Default | Validation | -| --- | --- | --- | --- | -| `status` _string_ | status is a concise indication of whether the RouteAdvertisements
resource is applied with success. | | Optional: \{\}
| -| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | conditions is an array of condition objects indicating details about
status of RouteAdvertisements object. | | Optional: \{\}
| - - diff --git a/docs/ci/ci.md b/docs/ci/ci.md index 1d17671925..b0f98c0762 100644 --- a/docs/ci/ci.md +++ b/docs/ci/ci.md @@ -120,7 +120,7 @@ and set the environmental variable `K8S_VERSION` to the same value. Also make su your go directory with `export GOPATH=(...)`. ``` -K8S_VERSION=v1.33.1 +K8S_VERSION=v1.32.3 git clone --single-branch --branch $K8S_VERSION https://github.com/kubernetes/kubernetes.git $GOPATH/src/k8s.io/kubernetes/ pushd $GOPATH/src/k8s.io/kubernetes/ make WHAT="test/e2e/e2e.test vendor/github.com/onsi/ginkgo/ginkgo cmd/kubectl" diff --git a/docs/design/topology.md b/docs/design/topology.md index d3353a4487..36dc78b3e1 100644 --- a/docs/design/topology.md +++ b/docs/design/topology.md @@ -66,3 +66,7 @@ It is distributed across the nodes in the cluster and is responsible for routing traffic between the different zones. FIXME: This page is lazily written, there is so much more to do here. + +## References + +* https://docs.google.com/presentation/d/1BtkYAO30gI3v6ah2hS6XTGtt6JBHNRHh64vhGEtfLEM/edit#slide=id.gfb215b3717_0_3299 \ No newline at end of file diff --git a/docs/features/bgp-integration/route-advertisements.md b/docs/features/bgp-integration/route-advertisements.md deleted file mode 100644 index 1787507375..0000000000 --- a/docs/features/bgp-integration/route-advertisements.md +++ /dev/null @@ -1,665 +0,0 @@ -# Route Advertisements - -## Introduction - -The Route Advertisements feature introduces BGP as a supported routing protocol -with OVN-Kubernetes enabling the integration into different BGP user -environments. The extent of the Route Advertisements feature and corresponding -API allows importing routes from BGP peers on the provider network into OVN pod -networks as well as exporting pod network and egress IP routes to BGP peers on -the provider network. Both default pod network as well as primary Layer 3 and -Layer 2 cluster-user-defined networks (CUDNs) are supported. - -> [!NOTE] -> For purposes of this documentation, the external, physical network of the -> cluster which a user administers will be called the “provider network”. - -## Prerequisites - -- [FRR-k8s](https://github.com/metallb/frr-k8s) - -## Motivation - -There are multiple driving factors which necessitate integrating BGP into -OVN-Kubernetes: - -- Importing Routes from the Provider Network: Today there is no API for a user -to be able to configure routes into OVN. In order for a user to change how -egress traffic is routed, the user leverages local gateway mode. This mode -forces traffic to hop through the Linux networking stack, and there a user can -configure routes inside the host to control egress routing. This manual -configuration would need to be performed and maintained across nodes and VRFs -within each node. - -- Exporting Routes into the Provider Network: There exists a need for provider -networks to learn routes directly to pods today in Kubernetes. One such use case -is integration with 3rd party load balancers, where they terminate a load -balancer and then send packets directly to cluster nodes with the destination IP -address being the pod IP itself. Today these load balancers rely on custom -operators to detect which node a pod is scheduled to and then add routes into -its load balancer to send the packet to the right node. By integrating BGP and -advertising the pod subnets/addresses directly on the provider network, load -balancers and other entities on the network would be able to reach the pod IPs -directly. - -Additionally, integrating BGP support paves the way for other BGP based features -that might be implemented in the future, like: - -- EVPN support to extend pod network isolation outside the cluster. -- No overlay mode to avoid the Geneve overhead. - -## User-Stories/Use-Cases - -- As a user, I want to be able to leverage my existing BGP network to dynamically - learn routes to pods in my Kubernetes cluster. -- As a user, rather than having to maintain routes manually in each Kubernetes - node, as well as being constrained to using local gateway mode for respecting - user-defined routes; I want to use BGP so that I can dynamically advertise - egress routes for the Kubernetes pod traffic in either gateway mode. -- As an egress IP user, I want to use a pure routing implementation to handle - advertising egress IP movement across nodes. -- As a user, I want to extend CUDN isolation to the provider network over a - VRF-Lite type of VPN where I can restrict traffic of the CUDN to an interface - attached to the VRF associated with the CUDN. - -> [!NOTE] -> The [isolation](#cudn-isolation) between different pod networks is unaffected -> by this feature. - -## How to enable this feature on an OVN-Kubernetes cluster? - -The `route-advertisements` feature must be enabled in the OVN-Kubernetes -configuration. Please use the `Feature Config` option -`enable-route-advertisements` under `OVNKubernetesFeatureConfig` config to -enable it. - -## User-facing API Changes - -A new OVN-Kubernetes API is introduced for this feature: -[`RouteAdvertisements`](../../api-reference/routeadvertisements-api-spec.md). - -## Workflow Description - -OVN-Kubernetes integrates with FRR-k8s to provide BGP support and it must be -deployed before enabling the `route-advertisements` feature. - -Once deployed, an initial FRR-k8s configuration must be done using its -`FRRConfiguration` API which serves, among others, three purposes: - -- Configure BGP peering. -- Configure route import. -- Serve as a template to the `FRRConfiguration` instances that OVN-Kubernetes - generates. - -Finally, route export is configured through `RouteAdvertisements` instances. -Each `RouteAdvertisements` instance allows to select which pod networks to -export routes for. It also allows to select which `FRRConfiguration` instances -to use as template, and as a consequence, provides the flexibility to export -routes in a different number of ways including: which BGP peers to export to, -the use of iBGP or eBGP, etc. - -### Import routes into the default pod network - -The following example represents an initial FRR-k8s configuration that -configures FRR-k8s to have all the nodes establish a BGP peering session and -receive routes in the `172.20.0.0/16` subnet: - -```yaml -apiVersion: frrk8s.metallb.io/v1beta1 -kind: FRRConfiguration -metadata: - labels: - use-for-advertisements: default - name: receive-filtered - namespace: frr-k8s-system -spec: - nodeSelector: {} - bgp: - routers: - - asn: 64512 - neighbors: - - address: 192.168.111.3 - asn: 64512 - disableMP: true - toReceive: - allowed: - mode: filtered - prefixes: - - prefix: 172.20.0.0/16 -``` - -This will result in the routes being installed in the main (default VRF) routing -table on the nodes and used by the pod egress traffic in local gateway mode. As -long as the `route-advertisements` feature is enabled, OVN-Kubernetes will -synchronize the BGP routes from the default VRF to the default OVN pod network -gateway router and hence used for the egress traffic of the pods on that network -in shared gateway mode. - -> [!NOTE] -> For two BGP routers to establish a peering session and exchange routes, their -> configurations must be mutually aligned: the `neighbor` configuration in the -> previous example must correspond to the remote BGP router's configuration -> (router ID, AS number, accept routes, etc...), and vice versa. - -### Import routes into a CUDN - -Assuming we have a CUDN: - -```yaml -apiVersion: k8s.ovn.org/v1 -kind: ClusterUserDefinedNetwork -metadata: - name: extranet - labels: - advertise: "true" -spec: - namespaceSelector: - matchLabels: - network: extranet - network: - topology: Layer3 - layer3: - role: Primary - subnets: - - cidr: "22.100.0.0/16" - hostSubnet: 24 -``` - -This example is similar to the previous one with the exception that the BGP -peering session is configured to happen over VRF `extranet`: - -```yaml -apiVersion: frrk8s.metallb.io/v1beta1 -kind: FRRConfiguration -metadata: - labels: - use-for-advertisements: extranet - name: receive-filtered-extranet - namespace: frr-k8s-system -spec: - nodeSelector: {} - bgp: - routers: - - asn: 64512 - neighbors: - - address: 192.168.221.3 - asn: 64512 - disableMP: true - toReceive: - allowed: - mode: filtered - prefixes: - - prefix: 172.20.0.0/16 - vrf: extranet -``` - -This will result in the routes being installed in the extranet VRF associated to -the CUDN of the same name. If `route-advertisements` feature is enabled, -OVN-Kubernetes will synchronize the BGP routes installed on a VRF to the OVN -gateway router of the associated CUDN and hence will be used for the egress -traffic of the pods on that network. - -> [!NOTE] -> As long as the name of the CUDN is less than 16 characters, the corresponding -> VRF name for the network will have the same name. Otherwise the name will be -> pseudo-randomly generated and not easy to predict. Future enhancements will -> allow for the VRF name to be configurable. - -A typical scenario is to import installed BGP routes from the default VRF to a -CUDN. This can be achieved with: - -```yaml -apiVersion: frrk8s.metallb.io/v1beta1 -kind: FRRConfiguration -metadata: - labels: - use-for-advertisements: default - name: import-extranet - namespace: frr-k8s-system -spec: - nodeSelector: {} - bgp: - routers: - - asn: 64512 - imports: - - vrf: default - vrf: extranet -``` - -> [!NOTE] -> If you export routes for a CUDN over the default VRF as detailed on the next -> sections, installed BGP routes in the default VRF are imported to the CUDN -> automatically and this configuration is not necessary. - -### Export routes to the default pod network - -Assuming the `FRRConfiguration` examples that have been used previously, this -example would advertise routes to the default pod network and its egress IPs: - -```yaml -apiVersion: k8s.ovn.org/v1 -kind: RouteAdvertisements -metadata: - name: default -spec: - targetVRF: default - advertisements: - - PodNetwork - - EgressIP - nodeSelector: {} - frrConfigurationSelector: - matchLabels: - use-for-advertisements: default - networkSelectors: - - networkSelectionType: DefaultNetwork -``` - -This would advertise routes for the pod network to the BGP peers as defined on -the selected `FRRConfiguration` instances; and make the necessary changes to -correctly handle N/S traffic directly addressing IPs of that network. - -Currently, when the `advertisements` field includes `PodNetwork`, you must -select all nodes with `nodeSelector`. However, if you are only advertising -egress IPs, you can limit advertisements to egress IPs assigned to the selected -nodes: - -```yaml -apiVersion: k8s.ovn.org/v1 -kind: RouteAdvertisements -metadata: - name: default-egressip -spec: - advertisements: - - EgressIP - nodeSelector: - matchLabels: - egress-nodes: bgp - frrConfigurationSelector: - matchLabels: - use-for-advertisements: default - networkSelectors: - - networkSelectionType: DefaultNetwork -``` - -> [!NOTE] -> Egress IPs will be advertised over the selected BGP sessions -> regardless of whether they are assigned to the same interface those sessions -> are established over or not, probably making the advertisements ineffective if -> they are not the same. - -### Export routes to a CUDN over the default VRF - -Similarly, routes to pods on a CUDN can be advertised over the default VRF: - -```yaml -apiVersion: k8s.ovn.org/v1 -kind: RouteAdvertisements -metadata: - name: default-cudn -spec: - targetVRF: default - advertisements: - - PodNetwork - - EgressIP - nodeSelector: {} - frrConfigurationSelector: - matchLabels: - use-for-advertisements: default - networkSelectors: - - networkSelectionType: ClusterUserDefinedNetworks - clusterUserDefinedNetworkSelector: - networkSelector: - matchLabels: - advertise: true -``` - -Note that this configuration also results in the BGP installed routes of the -default VRF to be imported to the CUDN VRF. - -Multiple types of network selectors can be specified making it possible to merge -the previous two examples into one: - -```yaml -apiVersion: k8s.ovn.org/v1 -kind: RouteAdvertisements -metadata: - name: default-all -spec: - targetVRF: default - advertisements: - - PodNetwork - - EgressIP - nodeSelector: {} - frrConfigurationSelector: - matchLabels: - use-for-advertisements: default - networkSelectors: - - networkSelectionType: DefaultNetwork - - networkSelectionType: ClusterUserDefinedNetworks - clusterUserDefinedNetworkSelector: - networkSelector: - matchLabels: - advertise: true -``` - -### Export routes to a CUDN over the network VRF (VRF-Lite) - -It is also possible to export routes to a CUDN over a BGP session established -over that network's VRF: - -```yaml -apiVersion: k8s.ovn.org/v1 -kind: RouteAdvertisements -metadata: - name: extranet -spec: - targetVRF: auto - advertisements: - - PodNetwork - nodeSelector: {} - frrConfigurationSelector: - matchLabels: - use-for-advertisements: extranet - networkSelectors: - - networkSelectionType: ClusterUserDefinedNetworks - clusterUserDefinedNetworkSelector: - networkSelector: - matchLabels: - advertise: true -``` - -`targetVRF` value `auto` is a magic helper value that tells OVN-Kubernetes to -advertise each network over that network's VRF. - -When a CUDN is advertised only over its own VRF, OVN-Kubernetes interprets this -as an explicit intention to isolate the network to that VRF and takes additional -measures to ensure that no network traffic is leaked externally over the default -VRF. This configuration is referred to as `VRF-Lite`. An external provider edge -BGP router could map this isolated traffic to an EVPN achieving a similar use -case as if EVPN were to be supported directly. - -> [!NOTE] -> For the BGP session to be actually established over that network's -> VRF, at least one interface with proper IP configuration needs to be attached -> to the network's VRF. The resulting network egress traffic will be routed -> through that interface. OVN-Kubernetes does not manage this interface nor its -> attachment to the network's VRF. - -> [!NOTE] -> This configuration is only supported in local gateway mode. -> Additionally, this configuration does not support the advertisement of egress -> IPs. - -## CUDN isolation - -User defined networks are isolated by default. In other words, users on CUDN A -cannot access pods on CUDN B via their internal pod or service addresses. When -advertising CUDNs via BGP on the same VRF (typically the default VRF), the -behavior of inter-CUDN isolation is preserved: from the perspective of a CUDN, -traffic addressing the subnet of a different CUDN will be considered N/S traffic -and will egress the cluster towards the provider network; and if the provider -network is able to route it back to the cluster by virtue of learned BGP routes, -the traffic will still be dropped to upkeep the CUDN isolation promise. - -In the future, different alternatives will be provided to allow interconnecting -user defined networks. - -## Implementation Details - -> [!NOTE] -> This section is work in progress. - -### Overview - -```mermaid -flowchart TD - S@{shape: sm-circ} - - S-->|User configures|T0 - - subgraph T0 - J0@{shape: f-circ} - F0(FRRConfiguration) - R0(RouteAdvertisements) - C0(CUDNs) - J0-->|to configure BGP peering and route import|F0 - J0-->|to export routes|R0 - J0-->|to add networks|C0 - end - - R0-->|ovn-kubernetes configures|J1 - - subgraph T1 - J1@{shape: f-circ} - F1(FRRConfiguration) - O1(OVN Networks) - H1(Host Networks) - J1-->F1 - J1-->O1 - J1-->H1 - end - - F0-->J2 - F1-->J2 - - subgraph T2 - J2@{shape: f-circ} - F2{/etc/frr.conf} - J2 -->|FRR-k8s configures|F2 - end - - F2-->T3 - - subgraph T3 - J3@{shape: f-circ} - E3@{shape: framed-circle} - F31(FRR advertises exported routes) - F32(FRR installs imported routes in host) - J3-->F31-->E3 - J3-->F32-->E3 - end - - T3-->T4 - - subgraph T4 - J4@{shape: f-circ} - E4@{shape: framed-circle} - O4(ovn-kubernetes copies installed routes to OVN) - J4-->O4-->E4 - end -``` - -The flowchart above gives an idea on what happens on different convergence -timelines: - -- T0: Initially a user configures CUDN networks, sets up BGP peering and route - import with `FRRConfiguration` instances and route export with - `RouteAdvertisements` instances. -- T1: OVN-Kubernetes reacts to the configured `RouteAdvertisements` and - generates the appropriate `FRRConfiguration` instances to export the selected - networks. OVN-Kubernetes then reconfigures those networks in both OVN and the - host stack so that they operate correctly when advertised. -- T2: FRR-k8s merges all the `FRRConfiguration` instances and configures its - internal FRR daemons. -- T3: FRR daemons export, import and install routes accordingly. -- T4: OVN-Kubernetes copies installed routes to the appropriate OVN networks. - -### RouteAdvertisements controller - -The `RouteAdvertisements` controller reacts to `RouteAdvertisements` instances and -generates the corresponding `FRRConfiguration` instances to export routes for the -selected networks. It also annotates the NetworkAttachmentDefinition instances -for the selected networks to instruct the OVN and host network controllers on -each node to reconfigure the network. - -#### FRRConfiguration instances generated by OVN-Kubernetes - -When `RouteAdvertisements` instances are configured, OVN-Kubernetes generates -additional `FRRConfiguration` instances in order for the selected network -prefixes to be advertised, using the following logic: - -- For each pair combination of selected network and selected node; and for each - selected `FRRConfiguration` to be used as template: - - If the `FRRConfiguration` does not apply to the node, it is discarded. - - If a router defined in that `FRRConfiguration` does not apply to the - target VRF, it is discarded. - - An `FRRConfiguration` instance is generated that contains all routers that - were not discarded with the following modifications: - - If advertising pod network: - - Router `prefixes` and neighbors `toAdvertise` `prefixes` set to: - - the network host subnet for default network or layer 3 - topologies. - - the network subnet for layer 2 topologies. - - Neighbors “toReceive” cleared defaulting to `filtered` mode with - no prefixes. - - If `targetVRF` and network VRF are different and `targetVRF` is - not “auto”, routes are imported reciprocally across both VRFs: - - An import from the network VRF. - - An additional router on network VRF to import from target VRF. - - If advertising egress IPs: for each egress IP, if the egress IP - selects a namespace served by the selected network and it is assigned - to the selected node, the egress IP is added to “prefixes” and - neighbors “toAdvertise”. - -This is an example of an `FRRConfiguration` instance generated for a node from -previous `RouteAdvertisements` examples when a CUDN is advertised over the -default VRF: - -```yaml -apiVersion: frrk8s.metallb.io/v1beta1 -kind: FRRConfiguration -metadata: - annotations: - k8s.ovn.org/route-advertisements: extranet/receive-filtered/master-1.ostest.test.metalkube.org - labels: - k8s.ovn.org/route-advertisements: extranet - name: ovnk-generated-vl8gk - namespace: frr-k8s-system -spec: - bgp: - routers: - - asn: 64512 - imports: - - vrf: extranet - neighbors: - - address: 192.168.111.3 - asn: 64512 - disableMP: true - toAdvertise: - allowed: - mode: filtered - prefixes: - - 22.100.2.0/24 - toReceive: - allowed: - mode: filtered - prefixes: - - 22.100.2.0/24 - - asn: 64512 - imports: - - vrf: default - vrf: extranet - nodeSelector: - matchLabels: - kubernetes.io/hostname: master-1.ostest.test.metalkube.org -``` - -This example `FRRConfiguration` instance applies to one of the nodes but you -would see similar `FRRConfiguration` instances for the other selected nodes. In -summary, the instance is instructing FRR-k8s to advertise the `22.100.2.0/24` -prefix, which is the one assigned to pods hosted on that node for that network, -over the session established towards the BGP peer `192.168.111.3` as instructed -by the selected `FRRConfiguration` instances used as a template to generate this -one. - -From this example, it is relevant to highlight a couple of things: - -- When a CUDN is advertised over the default VRF, received routes on the default - VRF will also be imported to the VRF associated with the CUDN and become - available for use to that CUDN. -- A previously mentioned, this generated configuration only deals with the - advertisement of routes. Route reception must be configured manually as - detailed in previous sections. Particularly, cluster advertised routes are not - configured to be received by other cluster nodes as that would be problematic - for the intra-cluster connectivity. - -> [!NOTE] -> `FRRConfiguration` instances generated in this manner by -> OVN-Kubernetes can't become selected by `RouteAdvertisements`. - -### OVN Network controllers: impacts in OVN configuration - -OVN Network controllers on each node react to annotations on the -NetworkAttachmentDefinition, processing the applicable `RouteAdvertisements` -instances for the network and gathering information on how the network is being -advertised. - -#### OVN SNAT behavior with BGP Advertisement - -Usually N/S egress traffic from a pod is SNATed to the node IP. This does not -happen when the network is advertised. In that case the traffic egresses the -cluster with the pod IP as source. For shared gateway mode this is handled with -a conditional SNAT on the OVN configuration for the network which ensures that -E/W egress traffic continues to be SNATed. Egress IP SNAT is unaffected. - -#### Route import - -When BGP routes get installed in a node's routing table, OVN-Kubernetes -synchronizes them to the gateway router of the corresponding OVN network. - -### Host network controllers: impacts on host networking stack - -#### Ingress OVS flows - -Flows are added to handle the ingress of N/S traffic addressing IPs of the -advertised pod networks. This traffic is forwarded to the corresponding patch -port of the network and is then handled by OVN with no extra changes required in -shared gateway mode. - -In local gateway mode, the traffic is forwarded to the host networking stack -where it is handled with no further configuration changes required. - -#### Host SNAT behavior with BGP Advertisement - -In the same way that was done for the OVN configuration, the host networking -stack configuration is updated to inhibit the SNAT for N/S traffic. - -#### VRF-Lite isolation - -To ensure isolation in VRF-Lite configurations, the default route pointing to -the default VRF gateway present on the network's VRF is inhibited. Thus only BGP -installed routes will be used for N/S traffic. - -## Troubleshooting - -TBD - -## Best Practices - -TBD - -## Future Items - -- EVPN support -- No overlay support - -## Known Limitations - -- The `route-advertisements` feature is only supported in inter-connect mode. -- Advertised CUDNs must have a name of length under 16 characters to use a - homonym and predictable VRF name. -- Pod network IPs must be advertised from all nodes. As such, a - `RouteAdvertisements` instance including `PodNetwork` as `advertisements` type - must select all nodes with its `nodeSelector`. -- VRF-Lite configurations are only supported in local gateway mode. -- Egress IP advertisements are not supported for Layer 2 CUDNs or in VRF-Lite - configurations. -- Egress IPs will be advertised over the selected BGP sessions regardless of - whether they are assigned to the same interface as those sessions are - established over or not, probably making the advertisements ineffective if - they are not the same. - -## References - -- [FRR-k8s](https://github.com/metallb/frr-k8s) -- [FRR](https://frrouting.org/) diff --git a/docs/features/cluster-egress-controls/egress-ip.md b/docs/features/cluster-egress-controls/egress-ip.md index f5c02232f5..d4cbd30b8c 100644 --- a/docs/features/cluster-egress-controls/egress-ip.md +++ b/docs/features/cluster-egress-controls/egress-ip.md @@ -204,11 +204,11 @@ Due to the fact that ovn-controllers on different nodes apply the changes indepe there is a chance that some pod traffic will reach the egress node before it configures the SNAT rules. The following flows are added on breth0 to address this scenario: ```shell -# Output traffic from local pods so they are not affected by the drop rule below, this is required for ICNIv2 and advertised UDNs -priority=104,ip,in_port=2,nw_src= actions=output:eth0 +# Commit connections from local pods so they are not affected by the drop rule below, this is required for ICNIv2 +priority=109,ip,in_port=2,nw_src= actions=ct(commit,zone=64000,exec(set_field:0x1->ct_mark)),output:1 # Drop non SNATed egress traffic coming from non-local pods -priority=103,ip,in_port=2,nw_src= actions=drop +priority=104,ip,in_port=2,nw_src= actions=drop # Commit connections coming from IPs not in cluster network priority=100,ip,in_port=2 actions=ct(commit,zone=64000,exec(set_field:0x1->ct_mark)),output:1 diff --git a/docs/features/multiple-networks/mirrored-endpointslices.md b/docs/features/multiple-networks/mirrored-endpointslices.md new file mode 100644 index 0000000000..39f8615779 --- /dev/null +++ b/docs/features/multiple-networks/mirrored-endpointslices.md @@ -0,0 +1,135 @@ +# EndpointSlices mirror controller for User-Defined Networks + +## Summary + +Pods that use a [user-defined network](https://github.com/trozet/enhancements/blob/multiple_networks/enhancements/network/user-defined-network-segmentation.md) as their primary network will still have the cluster default network IP in their status. For services this results in the EndpointSlices providing the IPs of the cluster default network in the Kubernetes API. To enable services support for primary user-defined networks, the EndpointSlices mirror controller was introduced to create custom EndpointSlices with user-defined network IP addresses extracted from OVN-Kubernetes annotations. + +## Implementation + +The introduced controller duplicates the default EndpointSlices, creating new copies that include IP addresses from primary user-defined network. It bypasses EndpointSlices in namespaces that do not have a user-defined primary network. The controller lacks specific logic for selecting endpoints, it only replicates those generated by the default controller and replaces the IP addresses. For host-networked pods, the controller retains the same IP addresses as the default controller. Custom EndpointSlices not created by the default controller are not processed. + +The default EndpointSlices controller creates objects that contain the following labels: + +- `endpointslice.kubernetes.io/managed-by:endpointslice-controller.k8s.io` - Indicates that the EndpointSlice is managed by the default Kubernetes EndpointSlice controller. +- `kubernetes.io/service-name:` - The service that this EndpointSlice belongs to, used by the default network service controller. + +The EndpointSlices mirror controller uses a separate set of labels: + +- `endpointslice.kubernetes.io/managed-by:endpointslice-mirror-controller.k8s.ovn.org` - Indicates that the EndpointSlice is managed by the mirror controller. +- `k8s.ovn.org/service-name:` - The service that this mirrored EndpointSlice belongs to, used by the user-defined network service controller. Note that the label key is different from the default EndpointSlice. +- `k8s.ovn.org/source-endpointslice-version:` - The last reconciled resource version from the default EndpointSlice. + +and annotations (Label values have a length limit of 63 characters): +- `k8s.ovn.org/endpointslice-network:` - The user-defined network that the IP addresses in the mirrored EndpointSlice belong to. +- `k8s.ovn.org/source-endpointslice:` - The name of the default EndpointSlice that was the source of the mirrored EndpointSlice. + + +### Example + +With the following NetworkAttachmentDefinition: + +```yaml +apiVersion: k8s.cni.cncf.io/v1 +kind: NetworkAttachmentDefinition +metadata: + name: l3-network + namespace: nad-l3 +spec: + config: |2 + { + "cniVersion": "1.0.0", + "name": "l3-network", + "type": "ovn-k8s-cni-overlay", + "topology":"layer3", + "subnets": "10.128.0.0/16/24", + "mtu": 1300, + "netAttachDefName": "nad-l3/l3-network", + "role": "primary" + } +``` + +We can observe the following EndpointSlices created for a one-replica deployment exposed through a `sample-deployment` service: + + + + + + + + + +
Default EndpointSliceMirrored EndpointSlice
+ +```yaml +kind: EndpointSlice +apiVersion: discovery.k8s.io/v1 +metadata: + name: sample-deployment-rkk4n + generateName: sample-deployment- + generation: 1 + labels: + app: l3pod + endpointslice.kubernetes.io/managed-by: endpointslice-controller.k8s.io + kubernetes.io/service-name: sample-deployment + name: sample-deployment-rkk4n + namespace: nad-l3 + resourceVersion: "31533" +addressType: IPv4 +endpoints: +- addresses: + - 10.244.1.17 + conditions: + ready: true + serving: true + terminating: false + nodeName: ovn-worker + targetRef: + kind: Pod + name: sample-deployment-6b64bd4868-7ftt6 + namespace: nad-l3 + uid: 6eb5d05c-cff4-467d-bc1b-890443750463 +ports: +- name: "" + port: 80 + protocol: TCP +``` + + + +```yaml +kind: EndpointSlice +apiVersion: discovery.k8s.io/v1 +metadata: + name: l3-network-sample-deployment-hgkmw + generateName: l3-network-sample-deployment- + labels: + endpointslice.kubernetes.io/managed-by: endpointslice-mirror-controller.k8s.ovn.org + k8s.ovn.org/service-name: sample-deployment + k8s.ovn.org/source-endpointslice-version: "31533" + annotations: + k8s.ovn.org/endpointslice-network: l3-network + k8s.ovn.org/source-endpointslice: sample-deployment-rkk4n + namespace: nad-l3 + resourceVersion: "31535" +addressType: IPv4 +endpoints: +- addresses: + - 10.128.1.3 + conditions: + ready: true + serving: true + terminating: false + nodeName: ovn-worker + targetRef: + kind: Pod + name: sample-deployment-6b64bd4868-7ftt6 + namespace: nad-l3 + uid: 6eb5d05c-cff4-467d-bc1b-890443750463 +ports: +- name: "" + port: 80 + protocol: TCP + +``` + +
diff --git a/docs/features/user-defined-networks/images/KubeletHealthchecks-Part1.png b/docs/features/user-defined-networks/images/KubeletHealthchecks-Part1.png deleted file mode 100644 index 4ca1233bc7..0000000000 Binary files a/docs/features/user-defined-networks/images/KubeletHealthchecks-Part1.png and /dev/null differ diff --git a/docs/features/user-defined-networks/images/KubeletHealthchecks-Part2.png b/docs/features/user-defined-networks/images/KubeletHealthchecks-Part2.png deleted file mode 100644 index 8426824bd0..0000000000 Binary files a/docs/features/user-defined-networks/images/KubeletHealthchecks-Part2.png and /dev/null differ diff --git a/docs/features/user-defined-networks/images/L2DeepDive-2segments.png b/docs/features/user-defined-networks/images/L2DeepDive-2segments.png deleted file mode 100644 index b04dda3f11..0000000000 Binary files a/docs/features/user-defined-networks/images/L2DeepDive-2segments.png and /dev/null differ diff --git a/docs/features/user-defined-networks/images/L3DeepDive.png b/docs/features/user-defined-networks/images/L3DeepDive.png deleted file mode 100644 index c28fa0a93c..0000000000 Binary files a/docs/features/user-defined-networks/images/L3DeepDive.png and /dev/null differ diff --git a/docs/features/user-defined-networks/images/Layer2VMMigration.png b/docs/features/user-defined-networks/images/Layer2VMMigration.png deleted file mode 100644 index 992e9637d7..0000000000 Binary files a/docs/features/user-defined-networks/images/Layer2VMMigration.png and /dev/null differ diff --git a/docs/features/user-defined-networks/images/localnet-topology.png b/docs/features/user-defined-networks/images/localnet-topology.png deleted file mode 100644 index 9d3782ca51..0000000000 Binary files a/docs/features/user-defined-networks/images/localnet-topology.png and /dev/null differ diff --git a/docs/features/user-defined-networks/images/native-namespace-isolation.png b/docs/features/user-defined-networks/images/native-namespace-isolation.png deleted file mode 100644 index adeb18d565..0000000000 Binary files a/docs/features/user-defined-networks/images/native-namespace-isolation.png and /dev/null differ diff --git a/docs/features/user-defined-networks/images/overlappingpodIPs.png b/docs/features/user-defined-networks/images/overlappingpodIPs.png deleted file mode 100644 index be29b67092..0000000000 Binary files a/docs/features/user-defined-networks/images/overlappingpodIPs.png and /dev/null differ diff --git a/docs/features/user-defined-networks/images/tenant-isolation-lighter.png b/docs/features/user-defined-networks/images/tenant-isolation-lighter.png deleted file mode 100644 index 11cfb812bb..0000000000 Binary files a/docs/features/user-defined-networks/images/tenant-isolation-lighter.png and /dev/null differ diff --git a/docs/features/user-defined-networks/user-defined-networks.md b/docs/features/user-defined-networks/user-defined-networks.md deleted file mode 100644 index 1b0393bd5e..0000000000 --- a/docs/features/user-defined-networks/user-defined-networks.md +++ /dev/null @@ -1,692 +0,0 @@ -# User Defined Networks - -## Introduction - -User Defined Networks (UDNs) in OVN-Kubernetes offer flexible network configurations -for users, going beyond the traditional single default network model for all pods -within a Kubernetes cluster. This feature addresses the diverse and advanced networking -requirements of various applications and use cases. - -## Motivation - -Traditional Kubernetes networking, which typically connects all pods to a default Layer3 network, -lacks the necessary flexibility for many modern use cases and advanced network capabilities. -UDNs provide several key advantages: - -* **Workload/Tenant Isolation**: UDNs enable the grouping of different application -types into isolated networks within the cluster, preventing communication between them. -* **Flexible Network Topologies**: Users can create different types of overlay networks -that suits their use cases and then attach their workloads to these networks which are -then isolated natively. -* **Overlapping Pod IPs**: UDNs allow the creation of multiple networks within a cluster that -can use the same IP address ranges for pods, expanding deployment scenarios. - -See the [enhancement] for more details. - -[enhancement]: https://ovn-kubernetes.io/okeps/okep-5193-user-defined-networks/ - -### User-Stories/Use-Cases - -See the [user-stories] defined in the enhancement. - -[user-stories]: https://ovn-kubernetes.io/okeps/okep-5193-user-defined-networks/#user-storiesuse-cases - -The two main user stories are: - -#### Native Namespace Isolation using Networks - -![namespace-isolation](images/native-namespace-isolation.png) -Here the blue, green, purple and yellow networks within those -namespaces cannot reach other and hence provide native isolation -to the workloads in those networks from workloads in other networks. - -#### Native Tenant Isolation using Networks - -![tenant-isolation](images/tenant-isolation-lighter.png) -Here the tenants BERLIN and MUNICH are isolated from each other. -So the workloads in namespaces belonging to BERLIN across the -four namespaces - purple, yellow, green and blue can talk to each other -but they can't talk to the workloads belogning to MUNICH tenant -across namespaces brown, cyan, orange and violet. - -There are more user stories which will be covered in the sections below -with appropriate diagrams. - -## How to enable this feature on an OVN-Kubernetes cluster? - -This feature is enabled by default on all OVN-Kubernetes clusters. -You don't need to do anything extra to start using this feature. -There is a Feature Config option `--enable-network-segmentation` under -`OVNKubernetesFeatureConfig` config that can be used to disable this -feature. However note that disabling the feature will not remove -existing CRs in the cluster. This feature has to be enabled along with -the flag for multiple-networks `--enable-multi-network` since UDNs -use Network Attachment Definitions as underlying implementation detail -construct and reuse the secondary network controllers. - -## Workflow Description - -A tenant consists of one or more namespaces in a cluster. Network segmentation -can be achieved by attaching 1 or more namespaces as part of same network which -are then not reachable from other namespaces in the cluster that are not part -of that network. - -## Implementation Details - -### User facing API Changes - -The implementation of UDNs introduces two new Custom Resource Definitions (CRDs) -for network creation: - -* Namespace-scoped **UserDefinedNetwork** (UDN): This CRD is for tenant owners, -allowing them to create networks within their namespace. This provides isolation -for their namespaces from other tenants' namespaces. - -* Cluster-scoped **ClusterUserDefinedNetwork** (CUDN): This CRD provides cluster -administrators with the ability to allow multiple namespaces to be part of the -same network that is then isolated from other networks. - -**NOTE**: For a namespace to be considered for UDN creation, it must be -labeled with `k8s.ovn.org/primary-user-defined-network` at the time of its -creation. This label cannot be updated later, and if absent, the namespace -will not be considered for UDN creation. - -See the [api-specification-docs] for information on each of the fields - -[api-specification-docs]: https://ovn-kubernetes.io/api-reference/userdefinednetwork-api-spec/ - -### OVN-Kubernetes Implementation Details - -`UserDefinedNetworks` is an opinionated implementation -of multi-networking in Kubernetes. There are two types of -UserDefinedNetworks: - -* `Primary`: Also known as P-UDN -> Primary UserDefinedNetwork: This means the - network will act as the primary network for the pod and all default traffic - will pass through this network except for Kubelet healthchecks which still uses - the default cluster-wide network as Kubernetes is not multi-networking aware. -* `Secondary`: Also known as S-UDN -> Secondary UserDefinedNetwork: This means the - network will act as only a secondary network for the pod and only pod traffic - that is part of the secondary network may be routed through this interface. These - types of networks have existed for a long time usually created using - `NetworkAttachmentDefinitions` API but are now more standardised using UDN CRs. - -OVN-Kubernetes currently doesn't support north-south traffic for -secondary networks and none of the core Kubernetes features like Services will work there. -Primary networks on the other hand has full support for all features as present -on cluster default network. - -UDNs can have flexible virtual network topologies to suit the use cases -of end users. Currently supported topology types for a given network include: - -**Layer3 Networks** - -`Layer3`: is a topology type wherein the pods or VMs are connected to their -node’s local router and all these routers are then connected to the distributed -switch across nodes. - * Each pod would hence get an IP from the node's subnet segment - * When in doubt which topology to use go with layer3 which is the same topology - as the cluster default network - * Can be of type `primary` or `secondary` - -Let's see how a Layer3 Network looks on the OVN layer. - -![l3-UDN](images/L3DeepDive.png) - -Here we can see a blue and green P-UDN. On node1, pod1 is part of green UDN and -pod2 is part of blue UDN. They each have a udn-0 interface that is attached to -the UDN network and a eth0 interface that is attached to the cluster default -network (grey color) which is only used for kubelet healthchecks. - -**Layer2 Networks** - -`Layer2`: is a topology type wherein the pods or VMs are all connected to the -same layer2 flat switch. - * Usually used when the applications deployed expect a layer2 type network - connection (Perhaps applications want a single broadcast domain, latency sensitive, use proprietary L2 protocols) - * Common in Virtualization world for seamless migration of the VM since - persistent IPs of the VMs can be preserved across nodes in your cluster - during live migration - * Can be of type `primary` or `secondary` - -![l2-UDN](images/L2DeepDive-2segments.png) - -Here we can see a blue and green P-UDN. On node1, pod1 is part of green UDN and -pod2 is part of blue UDN. They each have a udn-0 interface that is attached to -the UDN network and a eth0 interface that is attached to the cluster default -network (grey color) which is only used for kubelet healthchecks. - -**Localnet Networks** - -`Localnet`: is a topology type wherein the pods or VMs attached to a localnet -network on the overlay can egress to the provider’s physical network - * without SNATing to nodeIPs… preserves the podIPs - * podIPs can be on the same subnet as the provider’s VLAN - * VLAN IDs can be used to mark the traffic coming from the localnet for - isolation on provider network - * Can be of type `secondary`, it cannot be a `primary` network of a pod. - * Only `ClusterUserDefinedNetwork` supports `localnet` - -![localnet-UDN](images/localnet-topology.png) - -Here we can see blue and green S-UDN localnet networks. - -The ovnkube-cluster-manager component watches for these CR's and the controller -reacts to it by creating NADs under the hood. The ovnkube-controller watches for -the NADs and creates the required OVN logical constructs in the OVN database. -The ovnkube-node also adds the required gateway plumbing such as openflows and -VRF tables and routes to provide networking to these networks. - -### Creating UserDefinedNetworks - -Now that we understand what a UDN is, let's get handson! - -Let's create two namespaces `blue` and `green`: - -```yaml -apiVersion: v1 -kind: Namespace -metadata: - name: blue - labels: - name: blue - k8s.ovn.org/primary-user-defined-network: "" ---- -apiVersion: v1 -kind: Namespace -metadata: - name: green - labels: - name: green - k8s.ovn.org/primary-user-defined-network: "" -``` - -Sample API yaml for create two `UserDefinedNetworks` of type `Layer3` in these namespaces: - -```yaml -apiVersion: k8s.ovn.org/v1 -kind: UserDefinedNetwork -metadata: - name: blue-network - namespace: blue - labels: - name: blue - purpose: kubecon-eu-2025-demo -spec: - topology: Layer3 - layer3: - role: Primary - subnets: - - cidr: 103.103.0.0/16 - hostSubnet: 24 ---- -apiVersion: k8s.ovn.org/v1 -kind: UserDefinedNetwork -metadata: - name: green-network - namespace: green - labels: - name: green - purpose: kubecon-eu-2025-demo -spec: - topology: Layer3 - layer3: - role: Primary - subnets: - - cidr: 203.203.0.0/16 - hostSubnet: 24 -``` - -### Inspecting a UDN Pod - -Now if you create pods on these two namespaces and try to ping one pod from -the other pod, you will see that connection won't work. - -``` - $ k get pods -n blue -owide - NAME READY STATUS RESTARTS AGE IP NODE - blue 1/1 Running 0 9h 10.244.0.7 ovn-worker - blue1 1/1 Running 0 8h 10.244.1.4 ovn-worker2 - - $ k get pods -n green -owide - NAME READY STATUS RESTARTS AGE IP NODE - green 1/1 Running 0 9h 10.244.0.6 ovn-worker -``` - -NOTE: Doing kubectl get pods and describe pod will all show the default network -podIP which is not to be confused with the UDN podIPs. Remember how we said -Kubernetes is not multi-networking aware? Hence pod.Status.IPs will always -be the IPs that kubelet is aware of for healthchecks to work. - -In order to see the real UDN PodIPs, always do a describe on the pod and see -the following annotations on the pod: -``` -$ k get pod -n green green -oyaml -apiVersion: v1 -kind: Pod -metadata: - annotations: - k8s.ovn.org/pod-networks: '{"default":{"ip_addresses":["10.244.0.6/24"], - "mac_address":"0a:58:0a:f4:00:06","routes":[{"dest":"10.244.0.0/16", - "nextHop":"10.244.0.1"},{"dest":"100.64.0.0/16","nextHop":"10.244.0.1"}], - "ip_address":"10.244.0.6/24","role":"infrastructure-locked"}, - "green/green-network":{"ip_addresses":["203.203.2.5/24"], - "mac_address":"0a:58:c8:0a:02:05","gateway_ips":["203.203.2.1"], - "routes":[{"dest":"203.203.0.0/16","nextHop":"203.203.2.1"}, - {"dest":"10.96.0.0/16","nextHop":"203.203.2.1"},{"dest":"100.65.0.0/16", - "nextHop":"203.203.2.1"}],"ip_address":"203.203.2.5/24","gateway_ip":"203.203.2.1", - "role":"primary"},"green/green-secondary-network":{"ip_addresses":["100.10.1.7/24"], - "mac_address":"0a:58:64:0a:01:07","routes":[{"dest":"100.10.0.0/16", - "nextHop":"100.10.1.1"}],"ip_address":"100.10.1.7/24","role":"secondary"}}' -``` -The above shows the OVN-Kubernetes IPAM Annotation for each type of network: -* `default` which is the cluster-wide `infrastructure-locked` network only used - for Kubelet health checks and pod has IP 10.244.0.6 here -* `primary` which is the primary UDN for the pod through which all traffic - passes through and pod has IP 203.203.2.5. -* `secondary` which is the secondary UDN network for the pod from which pod has IP 100.10.1.7 - -One can also use the multus annotation to figure out the podIPs on each interface: - -``` -$ oc get pod -n green green -oyaml -apiVersion: v1 -kind: Pod -metadata: - annotations: - k8s.v1.cni.cncf.io/network-status: |- - [{ - "name": "ovn-kubernetes", - "interface": "eth0", - "ips": [ - "10.244.0.6" - ], - "mac": "0a:58:0a:f4:00:06", - "dns": {} - },{ - "name": "ovn-kubernetes", - "interface": "ovn-udn1", - "ips": [ - "200.203.2.5" - ], - "mac": "0a:58:c8:0a:02:05", - "default": true, - "dns": {} - },{ - "name": "green/green-secondary-network", - "interface": "net1", - "ips": [ - "100.10.1.7" - ], - "mac": "0a:58:64:0a:01:07", - "dns": {} - }] -``` - -### KubeletHealthChecks for UDN pods - -In each of the above diagrams we saw a grey network still attached to all -pods across all UDNs. This represents the cluster default network which -is `infrastructure-locked` for primary-UDN pods and is only used for healthchecks. - -We add UDN Isolation ACLs and cgroups NFTable rules on these pod ports so that -no traffic except healthcheck traffic from kubelet is allowed to reach these pods. - -Using OVN ACLs, we ensure only traffic from kubelet is allowed on the -default `eth0` interface of the pods: - -``` -_uuid : 1278b0f4-0a14-4637-9d05-83ba9df6ec03 -action : allow -direction : from-lport -external_ids : {direction=Egress, "k8s.ovn.org/id"="default-network-controller:UDNIsolation:AllowHostARPSecondary:Egress", "k8s.ovn.org/name"=AllowHostARPSecondary, "k8s.ovn.org/owner-controller"=default-network-controller, "k8s.ovn.org/owner-type"=UDNIsolation} -label : 0 -log : false -match : "inport == @a8747502060113802905 && (( arp && arp.tpa == 10.244.2.2 ) || ( nd && nd.target == fd00:10:244:3::2 ))" -meter : acl-logging -name : [] -options : {} -priority : 1001 -sample_est : [] -sample_new : [] -severity : [] -tier : 0 - -_uuid : 489ae95b-ae9d-47d0-bf1d-b2477a9ed6a2 -action : allow -direction : to-lport -external_ids : {direction=Ingress, "k8s.ovn.org/id"="default-network-controller:UDNIsolation:AllowHostARPSecondary:Ingress", "k8s.ovn.org/name"=AllowHostARPSecondary, "k8s.ovn.org/owner-controller"=default-network-controller, "k8s.ovn.org/owner-type"=UDNIsolation} -label : 0 -log : false -match : "outport == @a8747502060113802905 && (( arp && arp.spa == 10.244.2.2 ) || ( nd && nd.target == fd00:10:244:3::2 ))" -meter : acl-logging -name : [] -options : {} -priority : 1001 -sample_est : [] -sample_new : [] -severity : [] -tier : 0 - - -_uuid : 980be3e4-75af-45f7-bce3-3bb08ecd8b3a -action : drop -direction : to-lport -external_ids : {direction=Ingress, "k8s.ovn.org/id"="default-network-controller:UDNIsolation:DenySecondary:Ingress", "k8s.ovn.org/name"=DenySecondary, "k8s.ovn.org/owner-controller"=default-network-controller, "k8s.ovn.org/owner-type"=UDNIsolation} -label : 0 -log : false -match : "outport == @a8747502060113802905" -meter : acl-logging -name : [] -options : {} -priority : 1000 -sample_est : [] -sample_new : [] -severity : [] -tier : 0 - -_uuid : cca19dca-1fde-4a14-841d-7e2cce804de4 -action : drop -direction : from-lport -external_ids : {direction=Egress, "k8s.ovn.org/id"="default-network-controller:UDNIsolation:DenySecondary:Egress", "k8s.ovn.org/name"=DenySecondary, "k8s.ovn.org/owner-controller"=default-network-controller, "k8s.ovn.org/owner-type"=UDNIsolation} -label : 0 -log : false -match : "inport == @a8747502060113802905" -meter : acl-logging -name : [] -options : {} -priority : 1000 -sample_est : [] -sample_new : [] -severity : [] -tier : 0 -``` - -![kubelet-healthchecks-part1](images/KubeletHealthchecks-Part1.png) - -As you can see here a default network pod, `pod2` can't reach -the UDN pod `pod1` via its eth0 interface thanks to the ACLs in place. -So no traffic from the UDN pod ever leaves via `eth0`. The only traffic -that is allowed via `eth0` interface is the kubelet probe traffic. - -But given how we have allow ACLs for kubelet traffic, but this matches -on management portIP which is the hostIP, any process on the host can -potentially reach the UDN pods. In order to have more tighter security, -we have cgroups based NFT rules on the host to prevent any non-kubelet -process from being able to reach the default network `eth0` port on -UDN pods. - -![kubelet-healthchecks-part2](images/KubeletHealthchecks-Part2.png) - -These rules look like this: - -``` - chain udn-isolation { - comment "Host isolation for user defined networks" - type filter hook output priority filter; policy accept; - ip daddr . meta l4proto . th dport @udn-open-ports-v4 accept - ip daddr @udn-open-ports-icmp-v4 meta l4proto icmp accept - socket cgroupv2 level 2 475436 ip daddr @udn-pod-default-ips-v4 accept - ip daddr @udn-pod-default-ips-v4 drop - ip6 daddr . meta l4proto . th dport @udn-open-ports-v6 accept - ip6 daddr @udn-open-ports-icmp-v6 meta l4proto ipv6-icmp accept - socket cgroupv2 level 2 475436 ip6 daddr @udn-pod-default-ips-v6 accept - ip6 daddr @udn-pod-default-ips-v6 drop - } - - set udn-open-ports-v4 { - type ipv4_addr . inet_proto . inet_service - comment "default network open ports of pods in user defined networks (IPv4)" - } - - set udn-open-ports-v6 { - type ipv6_addr . inet_proto . inet_service - comment "default network open ports of pods in user defined networks (IPv6)" - } - - set udn-open-ports-icmp-v4 { - type ipv4_addr - comment "default network IPs of pods in user defined networks that allow ICMP (IPv4)" - } - - set udn-open-ports-icmp-v6 { - type ipv6_addr - comment "default network IPs of pods in user defined networks that allow ICMP (IPv6)" - } - - set udn-pod-default-ips-v4 { - type ipv4_addr - comment "default network IPs of pods in user defined networks (IPv4)" - } - - set udn-pod-default-ips-v6 { - type ipv6_addr - comment "default network IPs of pods in user defined networks (IPv6)" - } -``` - -The only exception to this is when users annotate -the UDN pod using the `open-default-ports` annotation: -``` -k8s.ovn.org/open-default-ports: | - - protocol: tcp - port: 80 - - protocol: udp - port: 53 -``` -which means we open up allow ACLs and nftrules to allow traffic -to reach at those ports. - -### Overlapping PodIPs - -Two networks can have the same subnet since they are completely -isolated. We use a `masqueradeIP` SNAT per UDN to avoid conntrack -collisions on the host. So traffic leaving each UDN is SNATed to -a unique IP before being sent to the host. - -![overlapping-podips](images/overlappingpodIPs.png) - -### VM LiveMigration and PersistentIPs over Layer2 UDNs - -Users can use the `layer2` topology when creating virtual machines -on OVN-Kubernetes and can easily live migrate the VMs across nodes -along with preserving their IPs. - -![overlapping-podips](images/Layer2VMMigration.png) - -### Services on UDNs - -Creating a service on UDNs is same as creating them on default -network, no extra plumbing is required. - -```yaml -apiVersion: v1 -kind: Service -metadata: - name: service-blue - namespace: blue - labels: - network: blue -spec: - type: LoadBalancer - selector: - network: blue - ports: - - name: web - port: 80 - targetPort: 8080 -``` -``` -$ k get svc -n blue -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -service-blue LoadBalancer 10.96.207.175 172.19.0.10 80:31372/TCP 5s -$ k get endpointslice -n blue -NAME ADDRESSTYPE PORTS ENDPOINTS AGE -service-blue-55d6c IPv4 8080 103.103.1.5,103.103.0.5 65s -service-blue-pkll7 IPv4 8080 10.244.0.3,10.244.1.8 66s -``` -One set of endpoints show the UDN ntework IPs of the pods and the other set -shows default network IPs. - -When the service is created inside the blue namespace, the -clusterIPs get automatically isolated from pods in other networks. -However nodeports, loadbalancerIPs and externalIPs can be reached -across UDNs. - -### EndpointSlices mirror controller for User-Defined Networks - -Pods that use a UDN as their primary network will still have the cluster -default network IP in their status. For services this results in the EndpointSlices -providing the IPs of the cluster default network in the Kubernetes API. To enable -services support for primary user-defined networks, the EndpointSlices mirror -controller was introduced to create custom EndpointSlices with user-defined -network IP addresses extracted from OVN-Kubernetes annotations. - -The introduced controller duplicates the default EndpointSlices, creating -new copies that include IP addresses from primary user-defined network. It -bypasses EndpointSlices in namespaces that do not have a user-defined primary -network. The controller lacks specific logic for selecting endpoints, it only -replicates those generated by the default controller and replaces the IP addresses. -For host-networked pods, the controller retains the same IP addresses as the -default controller. Custom EndpointSlices not created by the default controller -are not processed. - -The default EndpointSlices controller creates objects that contain the following labels: - -- `endpointslice.kubernetes.io/managed-by:endpointslice-controller.k8s.io` - Indicates - that the EndpointSlice is managed by the default Kubernetes EndpointSlice controller. -- `kubernetes.io/service-name:` - The service that this EndpointSlice - belongs to, used by the default network service controller. - -The EndpointSlices mirror controller uses a separate set of labels: - -- `endpointslice.kubernetes.io/managed-by:endpointslice-mirror-controller.k8s.ovn.org` - Indicates - that the EndpointSlice is managed by the mirror controller. -- `k8s.ovn.org/service-name:` - The service that this mirrored EndpointSlice - belongs to, used by the user-defined network service controller. Note that the label - key is different from the default EndpointSlice. -- `k8s.ovn.org/source-endpointslice-version:` - The - last reconciled resource version from the default EndpointSlice. - -and annotations (Label values have a length limit of 63 characters): -- `k8s.ovn.org/endpointslice-network:` - The user-defined network - that the IP addresses in the mirrored EndpointSlice belong to. -- `k8s.ovn.org/source-endpointslice:` - The name of the - default EndpointSlice that was the source of the mirrored EndpointSlice. - -Example: - -With the following NetworkAttachmentDefinition: - -```yaml -apiVersion: k8s.cni.cncf.io/v1 -kind: NetworkAttachmentDefinition -metadata: - name: l3-network - namespace: nad-l3 -spec: - config: |2 - { - "cniVersion": "1.0.0", - "name": "l3-network", - "type": "ovn-k8s-cni-overlay", - "topology":"layer3", - "subnets": "10.128.0.0/16/24", - "mtu": 1300, - "netAttachDefName": "nad-l3/l3-network", - "role": "primary" - } -``` - -We can observe the following EndpointSlices created for a one-replica deployment -exposed through a `sample-deployment` service: - - - - - - - - - -
Default EndpointSliceMirrored EndpointSlice
- -```yaml -kind: EndpointSlice -apiVersion: discovery.k8s.io/v1 -metadata: - name: sample-deployment-rkk4n - generateName: sample-deployment- - generation: 1 - labels: - app: l3pod - endpointslice.kubernetes.io/managed-by: endpointslice-controller.k8s.io - kubernetes.io/service-name: sample-deployment - name: sample-deployment-rkk4n - namespace: nad-l3 - resourceVersion: "31533" -addressType: IPv4 -endpoints: -- addresses: - - 10.244.1.17 - conditions: - ready: true - serving: true - terminating: false - nodeName: ovn-worker - targetRef: - kind: Pod - name: sample-deployment-6b64bd4868-7ftt6 - namespace: nad-l3 - uid: 6eb5d05c-cff4-467d-bc1b-890443750463 -ports: -- name: "" - port: 80 - protocol: TCP -``` - - - -```yaml -kind: EndpointSlice -apiVersion: discovery.k8s.io/v1 -metadata: - name: l3-network-sample-deployment-hgkmw - generateName: l3-network-sample-deployment- - labels: - endpointslice.kubernetes.io/managed-by: endpointslice-mirror-controller.k8s.ovn.org - k8s.ovn.org/service-name: sample-deployment - k8s.ovn.org/source-endpointslice-version: "31533" - annotations: - k8s.ovn.org/endpointslice-network: l3-network - k8s.ovn.org/source-endpointslice: sample-deployment-rkk4n - namespace: nad-l3 - resourceVersion: "31535" -addressType: IPv4 -endpoints: -- addresses: - - 10.128.1.3 - conditions: - ready: true - serving: true - terminating: false - nodeName: ovn-worker - targetRef: - kind: Pod - name: sample-deployment-6b64bd4868-7ftt6 - namespace: nad-l3 - uid: 6eb5d05c-cff4-467d-bc1b-890443750463 -ports: -- name: "" - port: 80 - protocol: TCP - -``` - -
- -That's how behind the scenes services on UDNs are implemented. - -## References - -* Use the workshop yamls [here](https://github.com/tssurya/kubecon-eu-2025-london-udn-workshop/tree/main/manifests) to play around diff --git a/docs/images/bgp_novpn_advertisements.png b/docs/images/bgp_novpn_advertisements.png deleted file mode 100644 index 8f4ce50ce0..0000000000 Binary files a/docs/images/bgp_novpn_advertisements.png and /dev/null differ diff --git a/docs/images/vrf-lite.png b/docs/images/vrf-lite.png deleted file mode 100644 index bfb26d0ec8..0000000000 Binary files a/docs/images/vrf-lite.png and /dev/null differ diff --git a/docs/installation/launching-ovn-kubernetes-on-kind.md b/docs/installation/launching-ovn-kubernetes-on-kind.md index 183f738884..1a6ae11a15 100644 --- a/docs/installation/launching-ovn-kubernetes-on-kind.md +++ b/docs/installation/launching-ovn-kubernetes-on-kind.md @@ -375,7 +375,7 @@ sudo ln -s /usr/bin/kubectl-v1.17.3 /usr/bin/kubectl Download and install latest version of `kubectl`: ``` -$ K8S_VERSION=v1.33.1 +$ K8S_VERSION=v1.32.3 $ curl -LO https://storage.googleapis.com/kubernetes-release/release/$K8S_VERSION/bin/linux/amd64/kubectl $ chmod +x kubectl $ sudo mv kubectl /usr/bin/kubectl-$K8S_VERSION @@ -431,7 +431,7 @@ $ cd ../dist/images/ $ make fedora-image $ cd ../../contrib/ -$ PLATFORM_IPV4_SUPPORT=true PLATFORM_IPV6_SUPPORT=true K8S_VERSION=v1.33.1 ./kind.sh +$ PLATFORM_IPV4_SUPPORT=true PLATFORM_IPV6_SUPPORT=true K8S_VERSION=v1.32.3 ./kind.sh ``` Once `kind.sh` completes, setup kube config file: @@ -457,7 +457,7 @@ one (or both of) the following variables: ``` $ cd ../../contrib/ -$ KIND_IMAGE=example.com/kindest/node K8S_VERSION=v1.33.1 ./kind.sh +$ KIND_IMAGE=example.com/kindest/node K8S_VERSION=v1.32.3 ./kind.sh ``` ### Using kind local registry to deploy non ovn-k containers diff --git a/docs/okeps/okep-5296-bgp.md b/docs/okeps/okep-5296-bgp.md deleted file mode 100644 index 295a36c55d..0000000000 --- a/docs/okeps/okep-5296-bgp.md +++ /dev/null @@ -1,669 +0,0 @@ -# OKEP-5296: OVN-Kubernetes BGP Integration - -* Issue: [#5296](https://github.com/ovn-org/ovn-kubernetes/issues/5296) - -## Networking Glossary - -| Term | Definition | -|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **BGP** (Border Gateway Protocol) | A standardized exterior gateway protocol used to exchange routing and reachability information between autonomous systems (ASes) on the Internet. BGP makes routing decisions based on path attributes and policies. | -| **BGPd** | A daemon (background service) that implements the BGP protocol, commonly found in routing software suites like FRRouting (FRR) or Quagga. It manages BGP sessions, route advertisements, and policy enforcement. | -| **BFD** (Bidirectional Forwarding Detection) | A network protocol that quickly detects faults in the path between two forwarding devices. It enables sub-second failure detection, often used with BGP or OSPF for faster convergence. | -| **iBGP** (Internal BGP) | A BGP session between routers within the same autonomous system (AS). It is used to distribute external routes internally, usually requiring a full mesh or route reflectors. | -| **eBGP** (External BGP) | A BGP session between routers in different autonomous systems. It is the primary method for routing between networks on the Internet. | -| **OSPF** (Open Shortest Path First) | A link-state interior gateway protocol (IGP) used to distribute IP routing information within a single autonomous system. It calculates the shortest path to each destination using Dijkstra's algorithm and converges quickly. | - -## Problem Statement - -OVN-Kubernetes currently has no native routing protocol integration, and relies on a Geneve overlay for east/west -traffic, as well as third party operators to handle external network integration into the cluster. The purpose of this -enhancement is to introduce BGP as a supported routing protocol with OVN-Kubernetes. The extent of this support will -allow OVN-Kubernetes to integrate into different BGP user environments, enabling it to dynamically expose cluster scoped -network entities into a provider’s network, as well as program BGP learned routes from the provider’s network into OVN. - -## Goals - -* To provide a user facing API to allow configuration of iBGP or eBGP peers, along typical BGP configuration including - communities, route filtering, etc. -* Support for advertising Egress IP addresses. -* To enable BFD to BGP peers. -* To allow east/west traffic without encapsulation. -* ECMP routing support within OVN for BGP learned routes. -* Support for advertising user-defined networks via BGP as long as there is no subnet overlap over the default VRF. -* Allowing for VRF-Lite type of VPN where the user maps interfaces on the host to user-defined VRFs/networks and - advertises VPN routes via BGP sessions over said VRFs. - -## Non-Goals - -* Running separate BGPd instances per VRF network. -* Providing any type of API or operator to automatically connect two Kubernetes clusters via L3VPN. -* Replacing the support that MetalLB provides today for advertising service IPs. -* Support for any other type of BGP speaker other than FRR. - -## Future Goals - -* Support EVPN configuration and integration with a user’s DC fabric, along with MAC-VRFs and IP-VRFs. -* Support iBGP with route reflectors. -* Potentially advertising other IP addresses, including the Kubernetes API VIP across the BGP fabric. -* Optimize Layer 2 network routing. -* Allow selecting only a subset of nodes to advertise BGP. -* Support other routing protocols like OSPF. -* Support disabling Geneve as an overlay transport and either using a pure routed, no-overlay topology as well as an EVPN -VXLAN overlay. - -## Introduction - -There are multiple driving factors which necessitate integrating BGP into OVN-Kubernetes. They will be broken down into -sections below, describing each use case/requirement. Additionally, implementing BGP paves the way for full EVPN support -in the future, which is the choice of networking fabric in the modern data center. For purposes of this document, the -external, physical network of the cluster which a user administers will be called the “provider network”. - -### Importing Routes from the Provider Network - -Today there is no API for a user to be able to configure routes into OVN. In order for a user to change how -egress traffic is routed, the user leverages local gateway mode. This mode forces traffic to hop through the Linux -networking stack, and there a user can configure routes inside of the host via NM State to control egress routing. This -manual configuration would need to be performed and maintained across nodes and VRFs within each node. - -Additionally, if a user chooses to not manage routes within the host for local gateway mode, or the user chooses shared -gateway mode, then by default traffic is always sent to the default gateway. The only other way to affect egress routing -is by using the Multiple External Gateways (MEG) feature. With this feature the user may choose to have multiple -different egress gateways per namespace to send traffic to. - -As an alternative, configuring BGP peers and which route-targets to import would eliminate the need to manually -configure routes in the host, and would allow dynamic routing updates based on changes in the provider’s network. - -### Exporting Routes into the Provider Network - -There exists a need for provider networks to learn routes directly to services and pods today in Kubernetes. More -specifically, MetalLB is already one solution where load balancer IPs are advertised by BGP to provider networks. The -goal of this RFE is to not duplicate or replace the function of MetalLB. MetalLB should be able to interoperate with -OVN-Kubernetes, and be responsible for advertising services to a provider’s network. - -However, there is an alternative need to advertise pod IPs on the provider network. One use case is integration with 3rd -party load balancers, where they terminate a load balancer and then send packets directly to OCP nodes with the -destination IP address being the pod IP itself. Today these load balancers rely on custom operators to detect which node -a pod is scheduled to and then add routes into its load balancer to send the packet to the right node. - -By integrating BGP and advertising the pod subnets/addresses directly on the provider network, load balancers and other -entities on the network would be able to reach the pod IPs directly. - -### Datapath Performance - -In cases where throughput is a priority, using the underlay directly can eliminate the need for tunnel encapsulation, -and thus reducing the overhead and byte size of each packet. This allows for greater throughput. - -### Multi-homing, Link Redundancy, Fast Convergence - -BGP can use multi-homing with ECMP routing in order to provide layer 3 failover. When a link goes down, BGP can reroute -via a different path. This functionality can be coupled with BFD in order to provide fast failover. A typical use case -is in a spine and leaf topology, where a node has multiple NICs for redundancy that connect to different BGP routers in -topology. In this case if a link goes down to one BGP peer or the BGP peer fails, BFD can detect the outage on the order -of milliseconds to hundreds of milliseconds and quickly assist BGP in purging the routes to that failed peer. This then -causes fast failover and route convergence to the alternate peer. - -## User-Stories/Use-Cases - -* As a user I want to be able to leverage my existing BGP network to dynamically learn routes to pods in my Kubernetes - cluster. -* As a user, rather than having to maintain routes with NM State manually in each Kubernetes node, as well as being - constrained to using local gateway mode for respecting user defined routes; I want to use BGP so that I can dynamically - advertise egress routes for the Kubernetes pod traffic in either gateway mode. -* As a user where maximum throughput is a priority, I want to reduce packet overhead by not having to encapsulate - traffic with Geneve. -* As an egress IP user, I do not want to have to restrict my nodes to the same layer 2 segment and prefer - to use a pure routing implementation to handle advertising egress IP movement across nodes. - -## Proposed Solution - -OVN-Kubernetes will leverage other CNCF projects that already exist to enable BGP in Linux. FRR will be used as the BGP -speaker, as well as provide support for other protocols like BFD. For FRR configuration, the -MetalLB project has already started an API to be able to configure FRR: -[https://github.com/metallb/frr-k8s](https://github.com/metallb/frr-k8s). While some of the configuration support for -FRR may be directly exposed by FRR-K8S API, it may also be the case that some intermediary CRD provided by -OVN-Kubernetes is required to integrate OVN-Kubernetes networking concepts into FRR. - -Functionally, FRR will handle advertising and importing routes and configuring those inside a Linux VRF. OVN-Kubernetes -will be responsible for listening on netlink and configuring logical routers in OVN with routes learned -by FRR. OVN-Kubernetes will manage FRR configuration through the FRR-K8S API in order to advertise routes outside of the -node onto the provider network. - -There should be no changes required in FRR. FRR-K8S may need extended APIs to cover the OVN-Kubernetes use cases -proposed in this enhancement. The lifecycle management of FRR-K8S and FRR is outside the scope of this enhancement and -will not be managed by OVN-Kubernetes. - -OVN will require no changes. - -### Workflow Description - -An admin has the ability to configure BGP peering and choose what networks to advertise. A tenant is able to define -networks for their namespace, but requires admin permission in order to expose those networks onto the provider's BGP -fabric. A typical workflow will be for a user or admin to create a user-defined network, and then the admin will be -responsible to: - -1. If setting up VRF-Lite, do any host modifications necessary via NMState to enslave an IP interface to the - matching network VRF. -2. Configure BGP peering via interacting with the FRR-K8S API for a given set of worker nodes. Also define filters for - what routes should be received from the provider network. -3. Create the OVN-Kubernetes RouteAdvertisements CR to configure what routes and where to advertise them. -4. Verify peering and that routes have been propagated correctly. - -For detailed examples, see the [BGP Configuration](#bgp-configuration) section. - -### API Extensions -FRR-K8S API will be used in order to create BGP Peering and configure other BGP related configuration. A -RouteAdvertisements CRD will be introduced in order to determine which routes should be advertised for specific networks. -Additionally, the network CRD will be modified in order to expose a new transport field to determine if encapsulation -should be used for east/west traffic. - -### API Details - -#### Route Advertisements - -When OVN-Kubernetes detects that a FRR-K8S CR has been created for BGP peering, OVN-Kubernetes will by default -advertise the pod subnet for each node, via creating an additive, per node FRR-K8S CR that is managed by OVN-Kubernetes. -OVN-Kubernetes CRD: - -```yaml -apiVersion: k8s.ovn.org/v1 -kind: RouteAdvertisements -metadata: - name: default -spec: - nodeSelector: {} - frrConfigurationSelector: {} - networkSelectors: - - networkSelectionType: ClusterUserDefinedNetworks - clusterUserDefinedNetworkSelector: - networkSelector: - matchLabels: - bgp: "enabled" - targetVRF: default - advertisements: - - PodNetwork - - EgressIP -``` - -In the above example, a required networkSelector field is populated to match on CUDNs matching the shown label. Alternatively, -a user may specify the DefaultNetwork as the networkSelectionType. If a selector is used that selects the -default cluster network, it will be enabled for any namespace using the cluster default network. Additionally, -advertisements may be limited to specific nodes via the nodeSelector. - -In the case where a CUDN network selector is used, the networks will be checked by OVN-Kubernetes to determine if -there is any overlap of the IP subnets. If so, an error status will be reported to the CRD and no BGP configuration -will be done by OVN-Kubernetes. - -Multiple CRs may not select the same network. If this happens OVN-Kubernetes will report an error to the -RouteAdvertisements CR and will refuse to apply the config. - -The CRD will support enabling advertisements for pod subnet and egress IPs. Note, MetalLB still handles advertising -LoadBalancer IP so there is no conflict of responsibilities here. When the pod network is set to be advertised, there is -no longer a need to SNAT pod IPs for this network to the node IP. Therefore, when pod network advertisements are enabled, -the traffic from these pods will no longer be SNAT'ed on egress. - -The "targetVRF" key is used to determine which VRF the routes should be advertised in. The default value is "default", in -which case routes will be leaked into the default VRF. One use case for this would be when a user wants to define a -network with a specific IP addressing scheme, and then wants to advertise the pod IPs into the provider BGP network without -VPN. Note that by using route leaking with a user-defined network, the network is no longer fully -isolated, as now any other networks also leaked or attached to that VRF may reach this user-defined network. If a user -attempts to leak routes into a targetVRF for a user-defined network whose IP subnet would collide with another, -OVN-Kubernetes will report an error to the RouteAdvertisement status. Alternatively, a user may specify the value "auto", -which in which case OVN-Kubernetes will advertise routes in the VRF that corresponds to the selected network. Any other -values other than "auto" or "default" will result in an error. There is no support at this time for routing leaking into -any other VRF. - -The frrConfigurationSelector is used in order to determine which FRRConfiguration CR to use for building the OVN-Kubernetes -driven FRRConfiguration. OVN-Kubernetes needs to leverage a pre-existing FRRConfiguration to be able to find required -pieces of configuration like BGP peering, etc. If more than one FRRConfiguration is found matching the selector, then -an error will be propagated to the RouteAdvertisements CR and no configuration shall be done. - -### Implementation Details - -#### BGP Configuration - -When OVN-Kubernetes detects that a FRRConfiguration has been created that has a corresponding and valid FRRNodeState, -OVN-Kubernetes will then use RouteAdvertisements CR create a corresponding FRRConfiguration. The following examples will -use an environment where a user has created an FRRConfiguration: - -```yaml -apiVersion: frrk8s.metallb.io/v1beta1 -kind: FRRConfiguration -metadata: - creationTimestamp: "2024-06-11T14:22:37Z" - generation: 1 - name: metallb-ovn-worker - namespace: metallb-system - resourceVersion: "1323" - uid: 99b64be3-4f36-4e0b-8704-75aa5182d89f - labels: - routeAdvertisements: default -spec: - bgp: - routers: - - asn: 64512 - neighbors: - - address: 172.18.0.5 - asn: 64512 - disableMP: false - holdTime: 1m30s - keepaliveTime: 30s - passwordSecret: {} - port: 179 - toAdvertise: - allowed: - mode: filtered - toReceive: - allowed: - mode: filtered - nodeSelector: - matchLabels: - kubernetes.io/hostname: ovn-worker -``` - -ovnkube-controller will check that if this FRRConfiguration applies to its node, ovn-worker. For this example, a user-defined -network named "blue", has been created with a network of 10.0.0.0/16, and a matching vrf exists in the Linux host. The slice -of this supernet that has been allocated to node ovn-worker is 10.0.1.0/24. - -#### Example 1: Advertising pod IPs from a user-defined network over BGP - -![](../images/bgp_novpn_advertisements.png) - -In this example a user wants to expose network blue outside their OCP cluster so that pod IPs are reachable on the -external network. The admin has creates the following RouteAdvertisements CR for the blue tenant: -```yaml -apiVersion: k8s.ovn.org/v1 -kind: RouteAdvertisements -metadata: - name: default -spec: - advertisements: - podNetwork: true - networkSelector: - matchLabels: - k8s.ovn.org/metadata.name: blue - nodeSelector: - matchLabels: - kubernetes.io/hostname: ovn-worker - frrConfigurationSelector: - matchLabels: - routeAdvertisements: default -``` - -ovnkube-controller will now see it needs to generate corresponding FRRConfiguration: - -```yaml -apiVersion: frrk8s.metallb.io/v1beta1 -kind: FRRConfiguration -metadata: - name: route-advertisements-blue - namespace: metallb-system -spec: - bgp: - routers: - - asn: 64512 - vrf: blue - prefixes: - - 10.0.1.0/24 - - asn: 64512 - neighbors: - - address: 172.18.0.5 - asn: 64512 - toAdvertise: - allowed: - prefixes: - - 10.0.1.0/24 - raw: - rawConfig: |- - router bgp 64512 - address-family ipv4 unicast - import vrf blue - exit-address-family - router bgp 64512 vrf blue - address-family ipv4 unicast - import vrf default - exit-address-family - nodeSelector: - matchLabels: - kubernetes.io/hostname: ovn-worker -``` - -In the above configuration generated by OVN-Kubernetes, the subnet 10.0.1.0/24 which belongs to VRF blue, is being -imported into the default VRF, and advertised to the 172.18.0.5 neighbor. This is because the targetVRF was defaulted so -the routes are leaked and advertised in the default VRF. Additionally, routes are being imported from the default VRF -into the blue VRF. At the time of this writing, FRR-K8S does not support importing vrf routes as an API, and thus rawConfig -is used. However, when implementing this enhancement every attempt should be made to add support into FRR-K8S to use its -API rather than using rawConfig. - -#### Example 2: VRF Lite - Advertising pod IPs from a user-defined network over BGP with VPN - -![](../images/vrf-lite.png) - -In this example, the user provisions a VLAN interface, enslaved to the VRF, which carries the blue network in isolation -to the external PE router. This provides a VRF-Lite design where FRR-K8S is going to be leveraged to advertise the blue -network only over the corresponding VRF/VLAN link to the next hop PE router. The same is done for the red tenant. -Here the user has created an additional FRRConfiguration CR to peer with the PE router on the blue and red VLANs: - -```yaml -apiVersion: frrk8s.metallb.io/v1beta1 -kind: FRRConfiguration -metadata: - name: vpn-ovn-worker - namespace: metallb-system - labels: - routeAdvertisements: vpn-blue-red -spec: - bgp: - routers: - - asn: 64512 - vrf: blue - neighbors: - - address: 182.18.0.5 - asn: 64512 - disableMP: false - holdTime: 1m30s - keepaliveTime: 30s - passwordSecret: {} - port: 179 - toAdvertise: - allowed: - mode: filtered - toReceive: - allowed: - mode: filtered - - asn: 64512 - vrf: red - neighbors: - - address: 192.18.0.5 - asn: 64512 - disableMP: false - holdTime: 1m30s - keepaliveTime: 30s - passwordSecret: {} - port: 179 - toAdvertise: - allowed: - mode: filtered - toReceive: - allowed: - mode: filtered -``` - -The admin now creates the following RouteAdvertisements CR: -```yaml -apiVersion: k8s.ovn.org/v1 -kind: RouteAdvertisements -metadata: - name: default -spec: - targetVRF: auto - advertisements: - podNetwork: true - networkSelector: - matchExpressions: - - { key: k8s.ovn.org/metadata.name, operator: In, values: [blue,red] } - nodeSelector: - matchLabels: - kubernetes.io/hostname: ovn-worker - frrConfigurationSelector: - matchLabels: - routeAdvertisements: vpn-blue-red -``` - -In the above CR, the targetVRF is set to auto, meaning the advertisements will occur within the VRF corresponding to the -individual networks selected. In this case, the pod subnet for blue will be advertised over the blue VRF, while the pod -subnet for red will be advertised over the red VRF. OVN-Kubernetes creates the following FRRConfiguration: - -```yaml -apiVersion: frrk8s.metallb.io/v1beta1 -kind: FRRConfiguration -metadata: - name: route-advertisements-blue - namespace: metallb-system -spec: - bgp: - routers: - - asn: 64512 - neighbors: - - address: 182.18.0.5 - asn: 64512 - toAdvertise: - allowed: - prefixes: - - 10.0.1.0/24 - vrf: blue - prefixes: - - 10.0.1.0/24 - - asn: 64512 - neighbors: - - address: 192.18.0.5 - asn: 64512 - toAdvertise: - allowed: - prefixes: - - 10.0.1.0/24 - vrf: red - prefixes: - - 10.0.1.0/24 - nodeSelector: - matchLabels: - kubernetes.io/hostname: ovn-worker -``` - -OVN-Kubernetes uses the configuration already in place in FRR and the desired RouteAdvertisements to generate the above -FRRConfiguration. For filtering or choosing what routes to receive, a user should do that in the FRRConfiguration they -declare for peering. - -Note, VRF-Lite is only available when using Local Gateway Mode in OVN-Kubernetes. - -#### Preserving UDN Isolation - -By definition, UDNs are expected to provide network isolation. With the ability to advertise UDNs within the same BGP -VRF, it opens the door for users on one UDN to try to access another UDN via external routing. This may be undesirable -for users who are simply exposing their UDN onto a VRF to allow direct ingress to those pods from outside the cluster, -and not necessarily wanting to allow UDNs to communicate. Therefore by default, access between externally routed UDNs will -be blocked by ACLs internal to OVN. This will protect users from accidentally exposing their UDNs to other tenants. - -In the future, an option will be added to allow a cluster admin to specify that UDNs exposed via BGP may be externally -routed between each other. Note, this security limitation only applies to pod and cluster IP service addresses . If a -group of pods is exposed externally as service (LoadBalancer, NodePort, External IP), then external routing from another -UDN will succeed. This is by design as the user has explicitly opened their service up to the outside world. - -Additionally, when Kubernetes nodes are directly peered with each other and not an external provider BGP router, remote -node UDN subnets are not imported in order to prevent issues with isolation, as well as issues with accidentally routing -via the underlay for a UDN pod subnet. - -#### BGP Route Advertisements - -##### Layer 3 Topology - -With a Layer 3 network type, each BGP node should advertise the node subnet assigned to it. Since the cluster supernet -is divided into per node subnets, it makes sense to advertise those from each node. This will result in direct routing -to the node that hosts destination pod. In the future when nodeSelector is supported, all BGP speakers will also need -to advertise the cluster supernet. This will allow ECMP routes via any BGP enabled node for reachability to nodes not -participating in BGP. - -##### Layer 2 Topology - -Layer 2 networks are more complicated than Layer 3 due to the nature of a single subnet spanning multiple nodes. In other -words the cluster supernet is not subnetted out on a per-node basis. Therefore, every node must advertise the cluster supernet. -This results in asynchronous routing, and in practical terms, packets having to endure an extra hop before making it to their -destination node. This can result in reply traffic hitting different nodes, and thus conntrack is unreliable. With OVN, -Logical Switches will by default drop packets that are CT_INVALID (Logical Routers do not behave this way) and thus the -OVN will need to be configured to not drop CT_INVALID packets by setting: - -```bash -ovn-nbctl set NB_Global . options:use_ct_inv_match=false -``` -This change is only required in Local Gateway Mode. - -In the future, routing optimizations will be implemented which break up contiguous address blocks of the -supernet to each node for assignment. This will be similar to how Layer 3 subnetting works, except there will not be -individual subnets, but ranges instead. With this design, each node can advertise their contiguous range as well as the -supernet. For example with a supernet of 10.244.0.0/16, a node A may be assigned a block of 256 addresses (10.244.0.0/24). -In this case node A would advertise both 10.244.0.0/16 and 10.244.0.0.0/24 routes. This will result in direct routing for -pods. - -Additionally, VMs may migrate on Layer 2 networks. In, which case the VM pod on node A with an address of 10.244.0.5 may -migrate to node B. With the existing route advertisement scheme, traffic destined to this VM would first route towards -node A and then to node B. To resolve this, when a VM migrates to a node, a /32 route will be advertised from the target -node. So node B would advertise (in order of longest prefix): - - 10.244.0.5/32 - - 10.244.1.0/24 - - 10.244.0.0/16 - -As a VM migrates back to another node or back to its original node, the /32 route will be removed. - -##### Egress IP - -Egress IP will be advertised at the node where the Egress IP is assigned as a /32 route. If the Egress IP migrates to -a different node, then the new node will be responsible for advertising the Egress IP route. Egress IPs advertised via -BGP must share the same nodeSelector in the Egress IP resource and the RouteAdvertisement resource to function correctly. - -#### Feature Compatibility - -##### Multiple External Gateways (MEG) - -When using BGP to learn routes to next hops, there can be overlap with gateways detected by the MEG feature. MEG may -still be configured along with BFD in OVN, and overlapping routes learned from BGP will be ignored by OVN-Kubernetes. -BFD may also be configured in FRR, for immediate purging of learned routes by FRR. - -A user can also configure RouteAdvertisements for namespaces affected by MEG. Since MEG directly uses pod IPs -(in disable-snat-multiple-gws mode), the external gateway needs to know where to route pod IPs for ingress and egress -reply traffic. Traditionally this is done by the gateway having its own operator to detect pod subnets via kubernetes -API. With BGP, this is no longer necessary. A user can simply configure RouteAdvertisements, and the pod subnet routes -will be dynamically learned by an external gateway capable of BGP peering. - -##### Egress IP - -EgressIP feature that is dynamically moved between nodes. By enabling the feature in RouteAdvertisements, OVN-Kubernetes -will automatically change FRR-K8S configuration so that the node where an egress IP resides will advertise the IP. This -eliminates the need for nodes to be on the same layer 2 segment, as we no longer have to rely on gratuitous ARP (GARP). - -##### Services - -MetalLB will still be used in order to advertise services across the BGP fabric. - -##### Egress Service - -Full support. - -##### Egress Firewall - -Full support. - -##### Egress QoS - -Full Support. - - -##### Network Policy/ANP - -Full Support. - -##### Direct Pod Ingress - -Direct pod ingress is already enabled for the default cluster network. With direct pod ingress, any external entity can -talk to a pod IP if it sends the packet to the node where the pod lives. Previously, support for direct pod ingress on -user-defined networks was not supported. RouteAdvertisements with this enhancement may select user-defined networks and -enable pod network advertisements. Therefore, it only makes sense to also accept direct pod ingress for these -user-defined networks as well, especially since we know the selected subnets will not overlap in IP address space. - -###### Ingress via OVS bridge - -Modifications will need to be made so that for packets arriving on br-ex, flows are added to steer the selected pod -subnets to the right OVN GR patch port. Today the flow for the default cluster network looks like this: - -``` -[root@ovn-worker ~]# ovs-ofctl show breth0 -OFPT_FEATURES_REPLY (xid=0x2): dpid:00000242ac120003 -n_tables:254, n_buffers:0 -capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP -actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst - 1(eth0): addr:02:42:ac:12:00:03 - config: 0 - state: 0 - current: 10GB-FD COPPER - speed: 10000 Mbps now, 0 Mbps max - 2(patch-breth0_ov): addr:ca:2c:82:e9:06:42 - config: 0 - state: 0 - speed: 0 Mbps now, 0 Mbps max - - -[root@ovn-worker ~]# ovs-ofctl dump-flows breth0 |grep 10.244 - cookie=0xdeff105, duration=437.393s, table=0, n_packets=4, n_bytes=392, idle_age=228, priority=109,ip,in_port=2,dl_src=02:42:ac:12:00:03,nw_src=10.244.1.0/24 actions=ct(commit,zone=64000,exec(load:0x1->NXM_NX_CT_MARK[])),output:1 - cookie=0xdeff105, duration=437.393s, table=0, n_packets=0, n_bytes=0, idle_age=437, priority=104,ip,in_port=2,nw_src=10.244.0.0/16 actions=drop - cookie=0xdeff105, duration=437.393s, table=1, n_packets=4, n_bytes=392, idle_age=228, priority=15,ip,nw_dst=10.244.0.0/16 actions=output:2 - -``` - -Packets matching the pod IP are forwarded directly to OVN, where they are forwarded to the pod without SNAT. Additional -flows will need to be created for additional networks. For shared gateway mode, the reply packet will always return via -OVS and follow a symmetrical path. This is also true if local gateway mode is being used in combination with Multiple -External Gateways (MEG). However, if local gateway mode is used without MEG, then the reply packet will be forwarded into -the kernel networking stack, where it will routed out br-ex via the kernel routing table. - -###### Ingress via a Secondary NIC - -If packets enter into the host via a NIC that is not attached to OVS, the kernel networking stack will forward it into -the proper VRF, where it will be forwarded via ovn-k8s-mp0 of the respective user-defined network. Today when these -packets ingress ovn-k8s-mp0 into OVN, they are SNAT'ed to the ovn-k8s-mp0 address (.2 address). Reasons for this include: -1. To ensure incoming traffic that may be routed to another node via geneve would return back to this node. This is undesirable - and unnecessary for networks where only their respective per-node pod subnet is being advertised to the BGP fabric. -2. If running shared gateway mode, the reply packet would be routed via br-ex with the default gateway configured in - ovn_cluster_router. - -For local gateway mode, changes will need to be made to skip the SNAT as it is not necessary and provides pods with the -true source IP of the sender. - - -Additionally, modifications will need to be made in the kernel routing table to -leak routes to the pod subnets from each user-defined VRF into the default VRF routing table. - -### Testing Details - -* E2E upstream with a framework (potentially [containerlab.dev](containerlab.dev) to simulate a routed spine and leaf - topology with integration using OVN Kubernetes. -* Testing using transport none for some networks, and Geneve for non-BGP enabled networks. -* Testing to cover BGP functionality including MEG, Egress IP, Egress QoS, etc. -* Scale testing to determine impact of FRR-K8S footprint on large scale deployments. - -### Documentation Details - -* ovn-kubernetes.io will be updated with a BGP user guide -* Additional dev guides will be added to the repo to show how the internal design of BGP is implemented. - -## Risks, Known Limitations and Mitigations - -Using BGP, especially for east/west transport relies on the user's BGP network. Therefore, BGP control plane outages in -a user's network may impact cluster networking. Furthermore, when changing a network's transport there will -be some amount of traffic disruption. Finally, this entire feature will depend on correct BGP peering via FRR-K8S -configuration, as well as settings to match the proper communities, route filtering, and other BGP configuration -within the provider's BGP network. - -In addition, by dynamically learning routes and programming them into OVN, we risk a customer accidentally introducing -potentially hundreds or even thousands of routes into different OVN logical routers. As a mitigation, we can recommend -using communities or route aggregation to customers to limit RIB size. We will also need to scale test the effect of -many routes inside OVN logical routers. - -Another risk is integration with MetalLB. We need to ensure that MetalLB is still able to function correctly with -whatever OVN-Kubernetes is configuring within FRR. - -BGP has a wide range of configurations and configuration options that are supported by FRR today. There is a big risk -of scope creep to try to support all of these options during the initial development phase. During the initial release -the number of options supported will be limited to mitigate this issue, and the main focus will be on stability of a -default environment without enabling these extra options/features. - -Reliance on FRR is another minor risk, with no presence from the OVN-Kubernetes team involved in that project. - -## OVN Kubernetes Version Skew - -BGP will be delivered in version 1.1.0. - -## Alternatives - -None - -## References - -None \ No newline at end of file diff --git a/go-controller/.golangci.yml b/go-controller/.golangci.yml index 91be64adc3..d381676a37 100644 --- a/go-controller/.golangci.yml +++ b/go-controller/.golangci.yml @@ -60,10 +60,6 @@ linters-settings: # Other frequently used deps - pkg: github.com/ovn-kubernetes/libovsdb/ovsdb alias: "" - - pkg: github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/util - alias: nodeutil - - pkg: github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types - alias: nodetypes revive: rules: diff --git a/go-controller/Makefile b/go-controller/Makefile index 6487d04279..4c86486ce2 100644 --- a/go-controller/Makefile +++ b/go-controller/Makefile @@ -11,7 +11,7 @@ PKGS ?= GOPATH ?= $(shell go env GOPATH) TEST_REPORT_DIR?=$(CURDIR)/_artifacts export TEST_REPORT_DIR -GO_VERSION ?= 1.24 +GO_VERSION ?= 1.23 GO_DOCKER_IMG = quay.io/lib/golang:${GO_VERSION} # CONTAINER_RUNNABLE determines if the tests can be run inside a container. It checks to see if # podman/docker is installed on the system. @@ -22,7 +22,8 @@ else CONTAINER_RUNTIME=docker endif CONTAINER_RUNNABLE ?= $(shell $(CONTAINER_RUNTIME) -v > /dev/null 2>&1; echo $$?) -OVN_SCHEMA_VERSION ?= v25.03.1 +# FIXME(tssurya): In one week when OVN 24.09 is released change the schema version +OVN_SCHEMA_VERSION ?= 8efac26f6637fc OVS_VERSION ?= v2.17.0 ifeq ($(NOROOT),TRUE) C_ARGS = -e NOROOT=TRUE diff --git a/go-controller/cmd/ovn-k8s-cni-overlay/ovn-k8s-cni-overlay.go b/go-controller/cmd/ovn-k8s-cni-overlay/ovn-k8s-cni-overlay.go index 88d94faeb5..621d1e01d1 100644 --- a/go-controller/cmd/ovn-k8s-cni-overlay/ovn-k8s-cni-overlay.go +++ b/go-controller/cmd/ovn-k8s-cni-overlay/ovn-k8s-cni-overlay.go @@ -20,12 +20,10 @@ func main() { p := cni.NewCNIPlugin("") c.Action = func(_ *cli.Context) error { - skel.PluginMainFuncs( - skel.CNIFuncs{ - Add: p.CmdAdd, - Check: p.CmdCheck, - Del: p.CmdDel, - }, + skel.PluginMain( + p.CmdAdd, + p.CmdCheck, + p.CmdDel, version.All, bv.BuildString("ovn-k8s-cni-overlay")) return nil diff --git a/go-controller/cmd/ovnkube-trace/ovnkube-trace.go b/go-controller/cmd/ovnkube-trace/ovnkube-trace.go index 96cea038d2..2460ff3d36 100644 --- a/go-controller/cmd/ovnkube-trace/ovnkube-trace.go +++ b/go-controller/cmd/ovnkube-trace/ovnkube-trace.go @@ -15,11 +15,9 @@ import ( "strings" corev1 "k8s.io/api/core/v1" - discoveryv1 "k8s.io/api/discovery/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - discoveryv1client "k8s.io/client-go/kubernetes/typed/discovery/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/remotecommand" @@ -46,7 +44,7 @@ const ( const ( // nbdb and sbdb local socket file path and protocol string which are // used by ovnkube-trace for establishing the connection when node - // runs on its own zone in an interconnect environment + // runs on its own zone in an interconnect environment. nbdbServerSock = "unix:/var/run/ovn/ovnnb_db.sock" sbdbServerSock = "unix:/var/run/ovn/ovnsb_db.sock" sockProtocol = "unix" @@ -366,20 +364,13 @@ func getSvcInfo(coreclient *corev1client.CoreV1Client, restconfig *rest.Config, ClusterIP: clusterIPStr, } - discoveryClient, err := discoveryv1client.NewForConfig(restconfig) + ep, err := coreclient.Endpoints(namespace).Get(context.TODO(), svcName, metav1.GetOptions{}) if err != nil { - return nil, fmt.Errorf("failed to create discovery client: %w", err) + return nil, fmt.Errorf("endpoints for service %s in namespace %s not found, err: %v", svcName, namespace, err) } + klog.V(5).Infof("==> Got Endpoint %v for service %s in namespace %s\n", ep, svcName, namespace) - es, err := discoveryClient.EndpointSlices(namespace).List(context.TODO(), metav1.ListOptions{ - LabelSelector: fmt.Sprintf("kubernetes.io/service-name=%s", svcName), - }) - if err != nil { - return nil, fmt.Errorf("EndpointSlices for service %s in namespace %s not found, err: %w", svcName, namespace, err) - } - klog.V(5).Infof("==> Got EndpointSlices %v for service %s in namespace %s\n", es, svcName, namespace) - - err = extractEndpointSliceInfo(coreclient, restconfig, es.Items, svcInfo, ovnNamespace, addressFamily) + err = extractSubsetInfo(coreclient, restconfig, ep.Subsets, svcInfo, ovnNamespace, addressFamily) if err != nil { return nil, err } @@ -387,69 +378,58 @@ func getSvcInfo(coreclient *corev1client.CoreV1Client, restconfig *rest.Config, return svcInfo, err } -// extractEndpointSliceInfo copies information from the endpoint slices into the SvcInfo object. +// extractSubsetInfo copies information from the endpoint subsets into the SvcInfo object. // Modifies the svcInfo object the pointer of which is passed to it. -// slice is *discoveryv1.EndpointSlice slices is -func extractEndpointSliceInfo(coreclient *corev1client.CoreV1Client, restconfig *rest.Config, slices []discoveryv1.EndpointSlice, svcInfo *SvcInfo, ovnNamespace, addressFamily string) error { - - for _, slice := range slices { - klog.V(5).Infof("==> Trying to extract information for service %s in namespace %s from slice %v", - svcInfo.SvcName, svcInfo.SvcNamespace, slice) +func extractSubsetInfo(coreclient *corev1client.CoreV1Client, restconfig *rest.Config, subsets []corev1.EndpointSubset, svcInfo *SvcInfo, ovnNamespace, addressFamily string) error { + for _, subset := range subsets { + klog.V(5).Infof("==> Trying to extract information for service %s in namespace %s from subset %v", + svcInfo.SvcName, svcInfo.SvcNamespace, subset) - // Find a port for the endpoint slice. + // Find a port for the subset. var podPort string - for _, epPort := range slice.Ports { - if epPort.Port == nil { - klog.V(5).Infof("==> Endpoint Port is nil, skipping.") - continue // with the next port - } - podPort = strconv.Itoa(int(*epPort.Port)) + for _, port := range subset.Ports { + podPort = strconv.Itoa(int(port.Port)) if podPort == "" { - klog.V(5).Infof("==> Could not parse port %v, skipping.", epPort) + klog.V(5).Infof("==> Could not parse port %v, skipping.", port) continue // with the next port } } - // Continue with the next slice if podPort is empty. + // Continue with the next subset if podPort is empty. if podPort == "" { - continue // with the next slice + continue // with the next subset } - // Parse pod information from the endpoint slice addresses. One of the slices must have a valid address which does not belong + // Parse pod information from the subset addresses. One of the subsets must have a valid address which does not belong // to a host networked pod. - for _, endpoint := range slice.Endpoints { - epAddress := endpoint.Addresses - if len(epAddress) == 0 { - klog.V(5).Infof("Address is empty for endpoint. Skipping.") - continue - } + for _, epAddress := range subset.Addresses { // This is nil for host networked services. - if endpoint.TargetRef == nil { + if epAddress.TargetRef == nil { klog.V(5).Infof("Address %v belongs to a host networked pod. Skipping.", epAddress) continue // with the next address } - if endpoint.TargetRef.Name == "" || endpoint.TargetRef.Namespace == "" { - klog.V(5).Infof("Address %v contains invalid data. podName %s, podNamespace %s. Skipping.", - epAddress, endpoint.TargetRef.Name, endpoint.TargetRef.Namespace) + if epAddress.TargetRef.Name == "" || epAddress.TargetRef.Namespace == "" || epAddress.IP == "" { + klog.V(5).Infof("Address %v contains invalid data. podName %s, podNamespace %s, podIP %s. Skipping.", + epAddress, epAddress.TargetRef.Name, epAddress.TargetRef.Namespace, epAddress.IP) continue // with the next address } // Get info needed for the src Pod - svcPodInfo, err := getPodInfo(coreclient, restconfig, endpoint.TargetRef.Name, ovnNamespace, endpoint.TargetRef.Namespace, addressFamily) + svcPodInfo, err := getPodInfo(coreclient, restconfig, epAddress.TargetRef.Name, ovnNamespace, epAddress.TargetRef.Namespace, addressFamily) if err != nil { - klog.Exitf("Failed to get information from pod %s: %v", endpoint.TargetRef.Name, err) + klog.Exitf("Failed to get information from pod %s: %v", epAddress.TargetRef.Name, err) } klog.V(5).Infof("svcPodInfo is %s\n", svcPodInfo) // At this point, we should have found valid pod information + a port, so set them and return nil. svcInfo.PodInfo = svcPodInfo svcInfo.PodPort = podPort - klog.V(5).Infof("==> Got address and port information for service endpoint slice. podName: %s, podNamespace: %s, podIP: %s, podPort: %s, podNodeName: %s", + klog.V(5).Infof("==> Got address and port information for service endpoint. podName: %s, podNamespace: %s, podIP: %s, podPort: %s, podNodeName: %s", svcInfo.PodInfo.PodName, svcInfo.PodInfo.PodNamespace, svcInfo.PodInfo.IP, svcInfo.PodPort, svcInfo.PodInfo.NodeName) return nil } } - return fmt.Errorf("could not extract pod and port information from endpointslice for service %s in namespace %s", svcInfo.SvcName, svcInfo.SvcNamespace) + return fmt.Errorf("could not extract pod and port information from endpoints for service %s in namespace %s", svcInfo.SvcName, svcInfo.SvcNamespace) } // getPodInfo returns a pointer to a fully populated PodInfo struct, or error on failure. @@ -1242,6 +1222,7 @@ func main() { } klog.V(5).Infof("OVN Kubernetes namespace is %s", ovnNamespace) + if *dumpVRFTableIDs { nodesVRFTableIDs, err := findUserDefinedNetworkVRFTableIDs(coreclient, restconfig, ovnNamespace) if err != nil { diff --git a/go-controller/cmd/ovnkube/ovnkube.go b/go-controller/cmd/ovnkube/ovnkube.go index 6ce5de42c9..4211a7fec5 100644 --- a/go-controller/cmd/ovnkube/ovnkube.go +++ b/go-controller/cmd/ovnkube/ovnkube.go @@ -453,7 +453,7 @@ func runOvnKube(ctx context.Context, runMode *ovnkubeRunMode, ovnClientset *util wg := &sync.WaitGroup{} var cancel context.CancelFunc ctx, cancel = context.WithCancel(ctx) - var managerErr, controllerErr, nodeErr, ovsCLIErr error + var managerErr, controllerErr, nodeErr error if runMode.clusterManager { wg.Add(1) @@ -587,23 +587,21 @@ func runOvnKube(ctx context.Context, runMode *ovnkubeRunMode, ovnClientset *util // Note: for ovnkube node mode dpu-host no metrics is required as ovs/ovn is not running on the node. if config.OvnKubeNode.Mode != types.NodeModeDPUHost && config.Metrics.OVNMetricsBindAddress != "" { metricsScrapeInterval := 30 + defer cancel() if ovsClient == nil { ovsClient, err = libovsdb.NewOVSClient(ctx.Done()) if err != nil { - ovsCLIErr = fmt.Errorf("failed to initialize libovsdb vswitchd client: %w", err) - cancel() + return fmt.Errorf("failed to initialize libovsdb vswitchd client: %w", err) } } - if ovsClient != nil { - if config.Metrics.ExportOVSMetrics { - metrics.RegisterOvsMetricsWithOvnMetrics(ovsClient, metricsScrapeInterval, ctx.Done()) - } - metrics.RegisterOvnMetrics(ovnClientset.KubeClient, runMode.identity, - ovsClient, metricsScrapeInterval, ctx.Done()) - metrics.StartOVNMetricsServer(config.Metrics.OVNMetricsBindAddress, - config.Metrics.NodeServerCert, config.Metrics.NodeServerPrivKey, ctx.Done(), wg) + if config.Metrics.ExportOVSMetrics { + metrics.RegisterOvsMetricsWithOvnMetrics(ovsClient, metricsScrapeInterval, ctx.Done()) } + metrics.RegisterOvnMetrics(ovnClientset.KubeClient, runMode.identity, + ovsClient, metricsScrapeInterval, ctx.Done()) + metrics.StartOVNMetricsServer(config.Metrics.OVNMetricsBindAddress, + config.Metrics.NodeServerCert, config.Metrics.NodeServerPrivKey, ctx.Done(), wg) } // run until cancelled @@ -614,7 +612,7 @@ func runOvnKube(ctx context.Context, runMode *ovnkubeRunMode, ovnClientset *util wg.Wait() klog.Infof("Stopped ovnkube") - err = utilerrors.Join(managerErr, controllerErr, nodeErr, ovsCLIErr) + err = utilerrors.Join(managerErr, controllerErr, nodeErr) if err != nil { return fmt.Errorf("failed to run ovnkube: %w", err) } diff --git a/go-controller/go.mod b/go-controller/go.mod index 9df6b1ccba..f40f5001e2 100644 --- a/go-controller/go.mod +++ b/go-controller/go.mod @@ -1,8 +1,8 @@ module github.com/ovn-org/ovn-kubernetes/go-controller -go 1.24.0 +go 1.23.0 -toolchain go1.24.5 +toolchain go1.23.6 require ( github.com/Microsoft/hcsshim v0.9.6 @@ -10,22 +10,22 @@ require ( github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d github.com/bhendo/go-powershell v0.0.0-20190719160123-219e7fb4e41e github.com/cenkalti/backoff/v4 v4.3.0 - github.com/containernetworking/cni v1.2.3 + github.com/containernetworking/cni v1.1.2 github.com/containernetworking/plugins v1.2.0 github.com/coreos/go-iptables v0.6.0 github.com/fsnotify/fsnotify v1.7.0 github.com/gaissmai/cidrtree v0.1.4 - github.com/go-logr/logr v1.4.3 + github.com/go-logr/logr v1.4.2 github.com/go-logr/stdr v1.2.2 github.com/godbus/dbus/v5 v5.1.0 - github.com/google/go-cmp v0.7.0 + github.com/google/go-cmp v0.6.0 github.com/google/gopacket v1.1.19 github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.0 github.com/k8snetworkplumbingwg/govdpa v0.1.5-0.20230926073613-07c1031aea47 - github.com/k8snetworkplumbingwg/ipamclaims v0.5.1-alpha + github.com/k8snetworkplumbingwg/ipamclaims v0.4.0-alpha github.com/k8snetworkplumbingwg/multi-networkpolicy v1.0.1 - github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.7 + github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.6.0 github.com/k8snetworkplumbingwg/sriovnet v1.2.1-0.20230427090635-4929697df2dc github.com/mdlayher/arp v0.0.0-20220512170110-6706a2966875 github.com/mdlayher/ndp v1.0.1 @@ -38,47 +38,45 @@ require ( github.com/onsi/gomega v1.36.1 github.com/openshift/api v0.0.0-20231120222239-b86761094ee3 github.com/openshift/client-go v0.0.0-20231121143148-910ca30a1a9a - github.com/ovn-kubernetes/libovsdb v0.8.1 - github.com/prometheus/client_golang v1.22.0 + github.com/ovn-kubernetes/libovsdb v0.8.0 + github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model v0.6.1 github.com/safchain/ethtool v0.3.1-0.20231027162144-83e5e0097c91 github.com/spf13/afero v1.9.5 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.9.0 github.com/urfave/cli/v2 v2.27.2 github.com/vishvananda/netlink v1.3.1-0.20250206174618-62fb240731fa golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 golang.org/x/net v0.38.0 golang.org/x/sync v0.12.0 golang.org/x/sys v0.31.0 - golang.org/x/time v0.9.0 - google.golang.org/grpc v1.68.1 + golang.org/x/time v0.7.0 + google.golang.org/grpc v1.65.0 google.golang.org/grpc/security/advancedtls v0.0.0-20240425232638-1e8b9b7fc655 - google.golang.org/protobuf v1.36.5 + google.golang.org/protobuf v1.35.1 gopkg.in/fsnotify/fsnotify.v1 v1.4.7 gopkg.in/gcfg.v1 v1.2.3 - gopkg.in/k8snetworkplumbingwg/multus-cni.v4 v4.0.2 gopkg.in/natefinch/lumberjack.v2 v2.2.1 - k8s.io/api v0.33.3 - k8s.io/apimachinery v0.33.3 - k8s.io/client-go v0.33.3 - k8s.io/component-helpers v0.33.3 + k8s.io/api v0.32.3 + k8s.io/apimachinery v0.32.3 + k8s.io/client-go v0.32.3 + k8s.io/component-helpers v0.32.3 k8s.io/klog/v2 v2.130.1 - k8s.io/kubernetes v1.33.3 + k8s.io/kubernetes v1.32.6 k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 kubevirt.io/api v1.0.0-alpha.0 - sigs.k8s.io/controller-runtime v0.21.0 + sigs.k8s.io/controller-runtime v0.20.3 sigs.k8s.io/knftables v0.0.18 sigs.k8s.io/network-policy-api v0.1.5 - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 + sigs.k8s.io/structured-merge-diff/v4 v4.4.2 sigs.k8s.io/yaml v1.4.0 ) require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/blang/semver/v4 v4.0.0 // indirect - github.com/cenkalti/hub v1.0.2 // indirect - github.com/cenkalti/rpc2 v1.0.4 // indirect + github.com/cenkalti/hub v1.0.1 // indirect + github.com/cenkalti/rpc2 v0.0.0-20210604223624-c1acbc6ec984 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect @@ -86,26 +84,23 @@ require ( github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.8 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.26.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect - github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect + github.com/gorilla/websocket v1.5.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/josharian/native v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/juju/errors v0.0.0-20200330140219-3fe23663418f // indirect github.com/juju/testing v0.0.0-20200706033705-4c23f9c453cd // indirect - github.com/leodido/go-urn v1.4.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118 // indirect github.com/mdlayher/packet v1.0.0 // indirect @@ -119,7 +114,7 @@ require ( github.com/pborman/uuid v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/common v0.62.0 // indirect + github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect @@ -129,29 +124,23 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.33.0 // indirect - go.opentelemetry.io/otel/trace v1.33.0 // indirect golang.org/x/crypto v0.36.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/term v0.30.0 // indirect golang.org/x/text v0.23.0 // indirect golang.org/x/tools v0.26.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.33.3 // indirect - k8s.io/apiserver v0.33.3 // indirect - k8s.io/component-base v0.33.3 // indirect - k8s.io/controller-manager v0.33.3 // indirect - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect - k8s.io/kubelet v0.22.8 // indirect + k8s.io/apiextensions-apiserver v0.32.3 // indirect + k8s.io/component-base v0.32.3 // indirect + k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect kubevirt.io/containerized-data-importer-api v1.55.0 // indirect kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect - sigs.k8s.io/randfill v1.0.0 // indirect ) replace ( diff --git a/go-controller/go.sum b/go-controller/go.sum index 9dfe0d36d4..50d5e1270d 100644 --- a/go-controller/go.sum +++ b/go-controller/go.sum @@ -26,7 +26,6 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -40,8 +39,6 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= @@ -80,22 +77,16 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/alexflint/go-filemutex v1.2.0 h1:1v0TJPDtlhgpW4nJ+GvxCLSlUDC3+gW0CQQvlmfDR/s= github.com/alexflint/go-filemutex v1.2.0/go.mod h1:mYyQSWvw9Tx2/H2n9qXPb52tTYfE0pZAWcBq5mK025c= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -105,23 +96,22 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bhendo/go-powershell v0.0.0-20190719160123-219e7fb4e41e h1:KCjb01YiNoRaJ5c+SbnPLWjVzU9vqRYHg3e5JcN50nM= github.com/bhendo/go-powershell v0.0.0-20190719160123-219e7fb4e41e/go.mod h1:f7vw6ObmmNcyFQLhZX9eUGBJGpnwTJFDvVjqZxIxHWY= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/cenk/hub v1.0.1 h1:RBwXNOF4a8KjD8BJ08XqN8KbrqaGiQLDrgvUGJSHuPA= +github.com/cenk/hub v1.0.1/go.mod h1:rJM1LNAW0ppT8FMMuPK6c2NP/R2nH/UthtuRySSaf6Y= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cenkalti/hub v1.0.2 h1:Nqv9TNaA9boeO2wQFW8o87BY3zKthtnzXmWGmJqhAV8= -github.com/cenkalti/hub v1.0.2/go.mod h1:8LAFAZcCasb83vfxatMUnZHRoQcffho2ELpHb+kaTJU= -github.com/cenkalti/rpc2 v1.0.4 h1:MJWmm7mbt8r/ZkQS+qr/e2KMMrhMLPr/62CYZIHybdI= -github.com/cenkalti/rpc2 v1.0.4/go.mod h1:2yfU5b86vOr16+iY1jN3MvT6Kxc9Nf8j5iZWwUf7iaw= +github.com/cenkalti/hub v1.0.1 h1:UMtjc6dHSaOQTO15SVA50MBIR9zQwvsukQupDrkIRtg= +github.com/cenkalti/hub v1.0.1/go.mod h1:tcYwtS3a2d9NO/0xDXVJWx3IedurUjYCqFCmpi0lpHs= +github.com/cenkalti/rpc2 v0.0.0-20210604223624-c1acbc6ec984 h1:CNwZyGS6KpfaOWbh2yLkSy3rSTUh3jub9CzpFpP6PVQ= +github.com/cenkalti/rpc2 v0.0.0-20210604223624-c1acbc6ec984/go.mod h1:v2npkhrXyk5BCnkNIiPdRI23Uq6uWPUQGL2hnRcRr/M= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -209,8 +199,8 @@ github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNR github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v1.2.3 h1:hhOcjNVUQTnzdRJ6alC5XF+wd9mfGIUaj8FuJbEslXM= -github.com/containernetworking/cni v1.2.3/go.mod h1:DuLgF+aPd3DzcTQTtp/Nvl1Kim23oFKdm2okJzBQA5M= +github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ= +github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= github.com/containernetworking/plugins v1.2.0 h1:SWgg3dQG1yzUo4d9iD8cwSVh1VqI+bP7mkPDoSfP9VU= @@ -220,7 +210,6 @@ github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgU github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -237,7 +226,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lV github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= @@ -277,7 +265,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -287,7 +274,6 @@ github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= @@ -298,8 +284,6 @@ github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyT github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM= -github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8= github.com/gaissmai/cidrtree v0.1.4 h1:/aYnv1LIwjtSDHNr1eNN99WJeh6vLrB+Sgr1tRMhHDc= github.com/gaissmai/cidrtree v0.1.4/go.mod h1:nrjEeeMZmvoJpLcSvZ3qIVFxw/+9GHKi7wDHHmHKGRI= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= @@ -312,17 +296,15 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -345,14 +327,6 @@ github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/ github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k= -github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= @@ -404,8 +378,8 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -420,8 +394,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= -github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -465,39 +439,23 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= -github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -513,7 +471,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/josharian/native v1.0.0 h1:Ts/E8zCSEsG17dUqv7joXJFybuMLjQfWE04tsBODTxk= github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -535,23 +492,20 @@ github.com/juju/testing v0.0.0-20200706033705-4c23f9c453cd/go.mod h1:hpGvhGHPVbN github.com/juju/utils v0.0.0-20180808125547-9dfc6dbfb02b/go.mod h1:6/KLg8Wz/y2KVGWEpkK9vMNGkOnu4k/cqs8Z1fKjTOk= github.com/juju/version v0.0.0-20161031051906-1f41e27e54f2/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/k8snetworkplumbingwg/govdpa v0.1.5-0.20230926073613-07c1031aea47 h1:iSncnlC+rtlNOIpPa3fbqQMhpTscGJIlkiWaPl1VcS4= github.com/k8snetworkplumbingwg/govdpa v0.1.5-0.20230926073613-07c1031aea47/go.mod h1:SPaDIyUmwN03Bgn0u/mhoiE4o/+koeKh11VUsdsUX0U= -github.com/k8snetworkplumbingwg/ipamclaims v0.5.1-alpha h1:RPXmPp07hm6l2/a3PSInne+6VnZeSapcFeegpDNklCs= -github.com/k8snetworkplumbingwg/ipamclaims v0.5.1-alpha/go.mod h1:MGaMX1tJ7MlHDee4/xmqp3guQh+eDiuCLAauqD9K11Q= +github.com/k8snetworkplumbingwg/ipamclaims v0.4.0-alpha h1:ss+EP77GlQmh90hGKpnAG4Q3VVxRlB7GoncemaPtO4g= +github.com/k8snetworkplumbingwg/ipamclaims v0.4.0-alpha/go.mod h1:qlR+sKxQ2OGfwhFCuXSd7rJ/GgC38vQBeHKQ7f2YnpI= github.com/k8snetworkplumbingwg/multi-networkpolicy v1.0.1 h1:Egj1hEVYNXWFlKpgzAXxe/2o8VNiVcAJLrKzlinILQo= github.com/k8snetworkplumbingwg/multi-networkpolicy v1.0.1/go.mod h1:kEJ4WM849yNmXekuSXLRwb+LaZ9usC06O8JgoAIq+f4= -github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.7 h1:z4P744DR+PIpkjwXSEc6TvN3L6LVzmUquFgmNm8wSUc= -github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.7/go.mod h1:CM7HAH5PNuIsqjMN0fGc1ydM74Uj+0VZFhob620nklw= +github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.6.0 h1:BT3ghAY0q7lWib9rz+tVXDFkm27dJV6SLCn7TunZwo4= +github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.6.0/go.mod h1:wxt2YWRVItDtaQmVSmaN5ubE2L1c9CiNoHQwSJnM8Ko= github.com/k8snetworkplumbingwg/sriovnet v1.2.1-0.20230427090635-4929697df2dc h1:v6+jUd70AayPbIRgTYUNpnBLG5cBPTY0+10y80CZeMk= github.com/k8snetworkplumbingwg/sriovnet v1.2.1-0.20230427090635-4929697df2dc/go.mod h1:jyWzGe6ZtYiPq6ih6aXCOy6mZ49Y9mNyBOLBBXnli+k= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -567,14 +521,9 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= -github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= @@ -583,7 +532,6 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= @@ -601,20 +549,13 @@ github.com/mdlayher/socket v0.2.1 h1:F2aaOwb53VsBE+ebRS9bLd7yPOfYUMC8lOODdCBDY6w github.com/mdlayher/socket v0.2.1/go.mod h1:QLlNPkFR88mRUNQIzRBMfXxwKal8H7u1h3bL1CV+f0E= github.com/metallb/frr-k8s v0.0.15 h1:6M3UGhovX1EFoaSGjrRD7djUAx3w2I+g81FH8OVtHkM= github.com/metallb/frr-k8s v0.0.15/go.mod h1:TjrGoAf+v00hYGlI8jUdyDxY5udMAOs2GWwrvLWnA4E= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.31 h1:sJFOl9BgwbYAWOGEwr61FU28pqsBNdpRBnhGXtO06Oo= github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= @@ -629,7 +570,6 @@ github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGq github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -642,7 +582,6 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= @@ -664,6 +603,7 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg= github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -699,9 +639,8 @@ github.com/openshift/client-go v0.0.0-20231121143148-910ca30a1a9a h1:4FVrw8hz0Wb github.com/openshift/client-go v0.0.0-20231121143148-910ca30a1a9a/go.mod h1:arApQobmOjZqtxw44TwnQdUCH+t9DgZ8geYPFqksHws= github.com/openshift/custom-resource-status v1.1.2 h1:C3DL44LEbvlbItfd8mT5jWrqPfHnSOQoQf/sypqA6A4= github.com/openshift/custom-resource-status v1.1.2/go.mod h1:DB/Mf2oTeiAmVVX1gN+NEqweonAPY0TKUwADizj8+ZA= -github.com/ovn-kubernetes/libovsdb v0.8.1 h1:M2J8bcJt5mXCom0HqzfEtuHkT80CTSQRcYG7acT8gf4= -github.com/ovn-kubernetes/libovsdb v0.8.1/go.mod h1:ZlnHLzagmLOSvyd9qfxBIZp6wOSOw0IsRsc+6lNUGbU= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/ovn-kubernetes/libovsdb v0.8.0 h1:cWhqWb5rCiS3yTJ6VJ7s85cElE1NWWJ2XksPGLd5WII= +github.com/ovn-kubernetes/libovsdb v0.8.0/go.mod h1:8nqWvM5pjHRbI5K6Uy/yuA5MdhCnGhNFH5fsSjZD8Rc= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -716,7 +655,6 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -724,9 +662,8 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -740,9 +677,8 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -757,19 +693,16 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/safchain/ethtool v0.3.1-0.20231027162144-83e5e0097c91 h1:q815fjV3G+4JvXNo2VwT2m+/msMU0sUkCK68CgHV9Y8= github.com/safchain/ethtool v0.3.1-0.20231027162144-83e5e0097c91/go.mod h1:qIWCTaK0xQlXNlNlIVoZjKMZFopqfMZcg4JcRqGoYc0= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -783,7 +716,6 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= @@ -794,7 +726,6 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -803,7 +734,6 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -824,9 +754,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -885,39 +814,20 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= -go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= -go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180214000028-650f4a345ab4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -958,7 +868,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -976,9 +885,7 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1038,8 +945,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1053,11 +960,9 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1106,11 +1011,9 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1132,7 +1035,6 @@ golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1170,8 +1072,8 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1190,7 +1092,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1293,7 +1194,6 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -1309,9 +1209,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1329,15 +1228,11 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= -google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/grpc/examples v0.0.0-20201112215255-90f1b3ee835b h1:NuxyvVZoDfHZwYW9LD4GJiF5/nhiSyP4/InTrvw9Ibk= google.golang.org/grpc/examples v0.0.0-20201112215255-90f1b3ee835b/go.mod h1:IBqQ7wSUJ2Ep09a8rMWFsg4fmI2r38zwsq8a0GgxXpM= google.golang.org/grpc/security/advancedtls v0.0.0-20240425232638-1e8b9b7fc655 h1:m116OZfEvs1iB0qlYNH3M9C+t8eQj3rT+2hzn88UWnU= @@ -1355,8 +1250,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1379,9 +1274,6 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/k8snetworkplumbingwg/multus-cni.v4 v4.0.2 h1:71L/o4mHzVZit0yaIHkOBaEO1fj0lucarJCmhuPCsOA= -gopkg.in/k8snetworkplumbingwg/multus-cni.v4 v4.0.2/go.mod h1:u1IhI+b7jS0cdRNRJajg0VIzEbQkNNXPZGBSvDr7t0M= gopkg.in/mgo.v2 v2.0.0-20160818015218-f2b6f6c918c4 h1:hILp2hNrRnYjZpmIbx70psAHbBSEcQ1NIzDcUbJ1b6g= gopkg.in/mgo.v2 v2.0.0-20160818015218-f2b6f6c918c4/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= @@ -1399,7 +1291,6 @@ gopkg.in/yaml.v2 v2.0.0-20170712054546-1be3d31502d6/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1425,44 +1316,36 @@ k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.22.7/go.mod h1:7hejA1BgBEiSsWljUyRkIjj+AISXO16IwsaDgFjJsQE= -k8s.io/api v0.22.8/go.mod h1:uLlWJNRJ+AYwgAdsNwf0TsD3eByNYW9RlXFmkMdL3yk= k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= -k8s.io/api v0.33.3 h1:SRd5t//hhkI1buzxb288fy2xvjubstenEKL9K51KBI8= -k8s.io/api v0.33.3/go.mod h1:01Y/iLUjNBM3TAvypct7DIj0M0NIZc+PzAHCIo0CYGE= -k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs= -k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8= +k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= +k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= +k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY= +k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.22.7/go.mod h1:ZvVLP5iLhwVFg2Yx9Gh5W0um0DUauExbRhe+2Z8I1EU= -k8s.io/apimachinery v0.22.8/go.mod h1:ZvVLP5iLhwVFg2Yx9Gh5W0um0DUauExbRhe+2Z8I1EU= k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apimachinery v0.33.3 h1:4ZSrmNa0c/ZpZJhAgRdcsFcZOw1PQU1bALVQ0B3I5LA= -k8s.io/apimachinery v0.33.3/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= +k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= +k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4= -k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= k8s.io/client-go v0.22.7/go.mod h1:pGU/tWSzzvsYT7M3npHhoZ3Jh9qJTTIvFvDtWuW31dw= -k8s.io/client-go v0.22.8/go.mod h1:dOHOy82WOBz0siYHpVyY7FqTIq+iXFXW3+THFk6qErU= -k8s.io/client-go v0.33.3 h1:M5AfDnKfYmVJif92ngN532gFqakcGi6RvaOF16efrpA= -k8s.io/client-go v0.33.3/go.mod h1:luqKBQggEf3shbxHY4uVENAxrDISLOarxpTKMiUuujg= +k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU= +k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY= k8s.io/code-generator v0.22.7/go.mod h1:iOZwYADSgFPNGWfqHFfg1V0TNJnl1t0WyZluQp4baqU= k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/component-base v0.22.8/go.mod h1:rt0sHx3GT3i8e72rPKQSrTIV3THWyEl2IDYcnEbxraI= -k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA= -k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4= -k8s.io/component-helpers v0.33.3 h1:fjWVORSQfI0WKzPeIFSju/gMD9sybwXBJ7oPbqQu6eM= -k8s.io/component-helpers v0.33.3/go.mod h1:7iwv+Y9Guw6X4RrnNQOyQlXcvJrVjPveHVqUA5dm31c= -k8s.io/controller-manager v0.33.3 h1:OItg5te3ixRw9MFko5KW2ed4ogBbwnJfrS4mCXixbsg= -k8s.io/controller-manager v0.33.3/go.mod h1:sH/I5CXliIc+3bnEjdalgSTJ/3fJhIHrDA3sOwTNgxM= +k8s.io/component-base v0.32.3 h1:98WJvvMs3QZ2LYHBzvltFSeJjEx7t5+8s71P7M74u8k= +k8s.io/component-base v0.32.3/go.mod h1:LWi9cR+yPAv7cu2X9rZanTiFKB2kHA+JjmhkKjCZRpI= +k8s.io/component-helpers v0.32.3 h1:9veHpOGTPLluqU4hAu5IPOwkOIZiGAJUhHndfVc5FT4= +k8s.io/component-helpers v0.32.3/go.mod h1:utTBXk8lhkJewBKNuNf32Xl3KT/0VV19DmiXU/SV4Ao= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -1483,12 +1366,10 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= -k8s.io/kubelet v0.22.8 h1:Ce1yoWCd03Gp5Dqe4BUy1FlQntyIUfCUcL8E6mKIgi4= -k8s.io/kubelet v0.22.8/go.mod h1:IHfh4AnROFQ6fMnCeoTQIrnF0H148PlfllXeupW698c= -k8s.io/kubernetes v1.33.3 h1:dBx5Z2ZhR8kNzAwCoCz4j1niUbUrNUDVxeSj4/Ienu0= -k8s.io/kubernetes v1.33.3/go.mod h1:nrt8sldmckKz2fCZhgRX3SKfS2e+CzXATPv6ITNkU00= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/kubernetes v1.32.6 h1:tp1gRjOqZjaoFBek5PN6eSmODdS1QRrH5UKiFP8ZByg= +k8s.io/kubernetes v1.32.6/go.mod h1:REY0Gok66BTTrbGyZaFMNKO9JhxvgBDW9B7aksWRFoY= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1505,8 +1386,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8= -sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM= +sigs.k8s.io/controller-runtime v0.20.3 h1:I6Ln8JfQjHH7JbtCD2HCYHoIzajoRxPNuvhvcDbZgkI= +sigs.k8s.io/controller-runtime v0.20.3/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= @@ -1514,14 +1395,11 @@ sigs.k8s.io/knftables v0.0.18 h1:6Duvmu0s/HwGifKrtl6G3AyAPYlWiZqTgS8bkVMiyaE= sigs.k8s.io/knftables v0.0.18/go.mod h1:f/5ZLKYEUPUhVjUCg6l80ACdL7CIIyeL0DxfgojGRTk= sigs.k8s.io/network-policy-api v0.1.5 h1:xyS7VAaM9EfyB428oFk7WjWaCK6B129i+ILUF4C8l6E= sigs.k8s.io/network-policy-api v0.1.5/go.mod h1:D7Nkr43VLNd7iYryemnj8qf0N/WjBzTZDxYA+g4u1/Y= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= -sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/go-controller/hack/lint.sh b/go-controller/hack/lint.sh index 92863e6b5c..57f4695827 100755 --- a/go-controller/hack/lint.sh +++ b/go-controller/hack/lint.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -VERSION=v1.64.8 +VERSION=v1.60.3 extra_flags="" if [ "$#" -ne 1 ]; then if [ "$#" -eq 2 ] && [ "$2" == "fix" ]; then diff --git a/go-controller/hybrid-overlay/pkg/controller/ovn_node_linux.go b/go-controller/hybrid-overlay/pkg/controller/ovn_node_linux.go index cff727c9bf..df8a9559c8 100644 --- a/go-controller/hybrid-overlay/pkg/controller/ovn_node_linux.go +++ b/go-controller/hybrid-overlay/pkg/controller/ovn_node_linux.go @@ -22,7 +22,6 @@ import ( hotypes "github.com/ovn-org/ovn-kubernetes/go-controller/hybrid-overlay/pkg/types" houtil "github.com/ovn-org/ovn-kubernetes/go-controller/hybrid-overlay/pkg/util" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" @@ -500,7 +499,7 @@ func (n *NodeController) EnsureHybridOverlayBridge(node *corev1.Node) error { return nil } if n.gwLRPIP == nil { - gwLRPIP, err := udn.GetGWRouterIPv4(node, &util.DefaultNetInfo{}) + gwLRPIP, err := util.ParseNodeGatewayRouterJoinIPv4(node, types.DefaultNetworkName) if err != nil { return fmt.Errorf("invalid Gateway Router LRP IP: %v", err) } diff --git a/go-controller/hybrid-overlay/pkg/controller/ovn_node_linux_test.go b/go-controller/hybrid-overlay/pkg/controller/ovn_node_linux_test.go index dbad262352..94df4f067f 100644 --- a/go-controller/hybrid-overlay/pkg/controller/ovn_node_linux_test.go +++ b/go-controller/hybrid-overlay/pkg/controller/ovn_node_linux_test.go @@ -395,7 +395,7 @@ var _ = Describe("Hybrid Overlay Node Linux Operations", func() { app.Action = func(ctx *cli.Context) error { annotations := createNodeAnnotationsForSubnet(thisNodeSubnet) annotations[hotypes.HybridOverlayDRMAC] = thisNodeDRMAC - annotations[util.OvnNodeID] = "3" + annotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.64.0.3/16\"}}" annotations[hotypes.HybridOverlayDRIP] = thisNodeDRIP node := createNode(thisNode, "linux", thisNodeIP, annotations) fakeClient := fake.NewSimpleClientset(&corev1.NodeList{ @@ -461,13 +461,13 @@ var _ = Describe("Hybrid Overlay Node Linux Operations", func() { annotations := createNodeAnnotationsForSubnet(thisNodeSubnet) annotations[hotypes.HybridOverlayDRMAC] = thisNodeDRMAC - annotations[util.OvnNodeID] = "3" + annotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.64.0.3/16\"}}" annotations[hotypes.HybridOverlayDRIP] = thisNodeDRIP node := createNode(thisNode, "linux", thisNodeIP, annotations) remoteNodeAnnotations := createNodeAnnotationsForSubnet(remoteNodeSubnet) remoteNodeAnnotations[hotypes.HybridOverlayDRMAC] = remoteNodeDRMAC - remoteNodeAnnotations[util.OvnNodeID] = "3" + remoteNodeAnnotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.65.0.3/16\"}}" remoteNodeAnnotations[hotypes.HybridOverlayDRIP] = "1.2.4.3" remoteNode := createNode(remoteNodeName, "linux", "10.20.20.1", remoteNodeAnnotations) @@ -564,7 +564,7 @@ var _ = Describe("Hybrid Overlay Node Linux Operations", func() { annotations := createNodeAnnotationsForSubnet(thisNodeSubnet) annotations[hotypes.HybridOverlayDRMAC] = thisNodeDRMAC - annotations[util.OvnNodeID] = "3" + annotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.64.0.3/16\"}}" annotations[hotypes.HybridOverlayDRIP] = thisNodeDRIP node := createNode(thisNode, "linux", thisNodeIP, annotations) testPod := createPod("test", "pod1", thisNode, pod1CIDR, pod1MAC) @@ -648,7 +648,7 @@ var _ = Describe("Hybrid Overlay Node Linux Operations", func() { annotations := createNodeAnnotationsForSubnet(thisNodeSubnet) annotations[hotypes.HybridOverlayDRMAC] = thisNodeDRMAC - annotations[util.OvnNodeID] = "3" + annotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.64.0.3/16\"}}" annotations[hotypes.HybridOverlayDRIP] = thisNodeDRIP node := createNode(thisNode, "linux", thisNodeIP, annotations) fakeClient := fake.NewSimpleClientset(&corev1.NodeList{ @@ -748,7 +748,7 @@ var _ = Describe("Hybrid Overlay Node Linux Operations", func() { annotations := createNodeAnnotationsForSubnet(thisNodeSubnet) annotations[hotypes.HybridOverlayDRMAC] = thisNodeDRMAC - annotations[util.OvnNodeID] = "3" + annotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.64.0.3/16\"}}" annotations[hotypes.HybridOverlayDRIP] = thisNodeDRIP node := createNode(thisNode, "linux", thisNodeIP, annotations) fakeClient := fake.NewSimpleClientset(&corev1.NodeList{ @@ -888,7 +888,7 @@ var _ = Describe("Hybrid Overlay Node Linux Operations", func() { annotations := createNodeAnnotationsForSubnet(thisNodeSubnet) annotations[hotypes.HybridOverlayDRMAC] = thisNodeDRMAC - annotations[util.OvnNodeID] = "3" + annotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.64.0.3/16\"}}" annotations[hotypes.HybridOverlayDRIP] = thisNodeDRIP node := createNode(thisNode, "linux", thisNodeIP, annotations) fakeClient := fake.NewSimpleClientset(&corev1.NodeList{ @@ -1017,7 +1017,7 @@ var _ = Describe("Hybrid Overlay Node Linux Operations", func() { annotations := createNodeAnnotationsForSubnet(thisNodeSubnet) annotations[hotypes.HybridOverlayDRMAC] = thisNodeDRMAC - annotations[util.OvnNodeID] = "3" + annotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.64.0.3/16\"}}" annotations[hotypes.HybridOverlayDRIP] = thisNodeDRIP node := createNode(thisNode, "linux", thisNodeIP, annotations) fakeClient := fake.NewSimpleClientset(&corev1.NodeList{ diff --git a/go-controller/pkg/allocator/ip/allocator.go b/go-controller/pkg/allocator/ip/allocator.go index 7205ecc677..0e5ea71011 100644 --- a/go-controller/pkg/allocator/ip/allocator.go +++ b/go-controller/pkg/allocator/ip/allocator.go @@ -27,9 +27,11 @@ import ( allocator "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/bitmap" ) -// StaticAllocator provides IP allocation functionality for explicit/static allocations only. -type StaticAllocator interface { +// Interface manages the allocation of IP addresses out of a range. Interface +// should be threadsafe. +type Interface interface { Allocate(net.IP) error + AllocateNext() (net.IP, error) Release(net.IP) ForEach(func(net.IP)) CIDR() net.IPNet @@ -37,14 +39,6 @@ type StaticAllocator interface { Reserved(ip net.IP) bool } -// ContinuousAllocator extends StaticAllocator with next-available allocation support. -// This is the primary interface for IP allocation that supports both explicit -// allocation and continuous allocation. -type ContinuousAllocator interface { - StaticAllocator - AllocateNext() (net.IP, error) -} - var ( ErrFull = errors.New("subnet address pool exhausted") ErrAllocated = errors.New("provided IP is already allocated") @@ -90,30 +84,7 @@ type Range struct { } // NewAllocatorCIDRRange creates a Range over a net.IPNet, calling allocatorFactory to construct the backing store. -// It excludes the network address (.0) and broadcast address (IPv4 only) from allocation. func NewAllocatorCIDRRange(cidr *net.IPNet, allocatorFactory allocator.AllocatorFactory) (*Range, error) { - r, err := NewAllocatorFullCIDRRange(cidr, allocatorFactory) - if err != nil { - return nil, err - } - - if utilnet.IsIPv4CIDR(cidr) { - // Don't use the IPv4 network's broadcast address. - r.max-- - } - // Don't use the network's ".0" address. - r.base.Add(r.base, big.NewInt(1)) - r.max-- - - r.max = maximum(0, r.max) - // Reconfigure the allocator to use the new max value - r.alloc, err = allocatorFactory(r.max, r.net.String()) - return r, err -} - -// NewAllocatorFullCIDRRange creates a Range over a net.IPNet without excluding any IPs, -// calling allocatorFactory to construct the backing store. -func NewAllocatorFullCIDRRange(cidr *net.IPNet, allocatorFactory allocator.AllocatorFactory) (*Range, error) { max := utilnet.RangeSize(cidr) base := utilnet.BigForIP(cidr.IP) rangeSpec := cidr.String() @@ -123,11 +94,19 @@ func NewAllocatorFullCIDRRange(cidr *net.IPNet, allocatorFactory allocator.Alloc if max > 65536 { max = 65536 } + } else { + // Don't use the IPv4 network's broadcast address. + max-- } + + // Don't use the network's ".0" address. + base.Add(base, big.NewInt(1)) + max-- + r := Range{ net: cidr, base: base, - max: int(max), + max: maximum(0, int(max)), } var err error r.alloc, err = allocatorFactory(r.max, rangeSpec) @@ -228,37 +207,14 @@ func (r *Range) Has(ip net.IP) bool { } // Reserved returns true if the provided IP can't be allocated. This is *only* -// true for the network and broadcast addresses of the original CIDR. +// true for the network and broadcast addresses. func (r *Range) Reserved(ip net.IP) bool { if !r.net.Contains(ip) { return false } - // For IPv4, reserve network (.0) and broadcast addresses - if utilnet.IsIPv4CIDR(r.net) { - // Network address is the base IP of the original CIDR - networkAddr := r.net.IP - if ip.Equal(networkAddr) { - return true - } - - // Broadcast address is the last IP in the original CIDR - rangeSize := utilnet.RangeSize(r.net) - broadcastAddr, _ := utilnet.GetIndexedIP(r.net, int(rangeSize)-1) - if ip.Equal(broadcastAddr) { - return true - } - } - - // For IPv6, only reserve the network address (no broadcast concept) - if utilnet.IsIPv6CIDR(r.net) { - networkAddr := r.net.IP - if ip.Equal(networkAddr) { - return true - } - } - - return false + offset := calculateIPOffset(r.base, ip) + return offset == -1 || offset == r.max } // contains returns true and the offset if the ip is in the range, and false diff --git a/go-controller/pkg/allocator/ip/subnet/allocator.go b/go-controller/pkg/allocator/ip/subnet/allocator.go index 67b3f81a04..d5abf27c04 100644 --- a/go-controller/pkg/allocator/ip/subnet/allocator.go +++ b/go-controller/pkg/allocator/ip/subnet/allocator.go @@ -10,25 +10,16 @@ import ( iputils "github.com/containernetworking/plugins/pkg/ip" "k8s.io/klog/v2" - utilnet "k8s.io/utils/net" bitmapallocator "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/bitmap" ipallocator "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/ip" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" ) -// SubnetConfig contains configuration parameters for adding or updating a subnet -type SubnetConfig struct { - Name string - Subnets []*net.IPNet - ReservedSubnets []*net.IPNet - ExcludeSubnets []*net.IPNet -} - // Allocator manages the allocation of IP within specific set of subnets // identified by a name. Allocator should be threadsafe. type Allocator interface { - AddOrUpdateSubnet(config SubnetConfig) error + AddOrUpdateSubnet(name string, subnets []*net.IPNet, excludeSubnets ...*net.IPNet) error DeleteSubnet(name string) GetSubnets(name string) ([]*net.IPNet, error) AllocateUntilFull(name string) error @@ -55,14 +46,10 @@ var ErrSubnetNotFound = errors.New("subnet not found") // of the managed subnets type subnetInfo struct { subnets []*net.IPNet - // ipams holds continuous IP allocators for dynamic IP allocation within the managed subnets. - ipams []ipallocator.ContinuousAllocator - // staticIPAMs holds static IP allocators for reserved subnets that support static IP allocation (currently only supported for Layer2 primary networks) - staticIPAMs []ipallocator.StaticAllocator + ipams []ipallocator.Interface } -type continuousIPAMFactoryFunc func(*net.IPNet) (ipallocator.ContinuousAllocator, error) -type staticIPAMFactoryFunc func(*net.IPNet) (ipallocator.StaticAllocator, error) +type ipamFactoryFunc func(*net.IPNet) (ipallocator.Interface, error) // allocator provides IPAM for different sets of subnets. Each set is // identified with a subnet name. @@ -70,100 +57,62 @@ type allocator struct { cache map[string]subnetInfo // A RW mutex which holds subnet information sync.RWMutex - ipamFunc continuousIPAMFactoryFunc - reservedIPAMFunc staticIPAMFactoryFunc + ipamFunc ipamFactoryFunc } // newIPAMAllocator provides an ipam interface which can be used for IPAM // allocations for a given cidr using a contiguous allocation strategy. // It also pre-allocates certain special subnet IPs such as the .1, .2, and .3 // addresses as reserved. -func newIPAMAllocator(cidr *net.IPNet) (ipallocator.ContinuousAllocator, error) { +func newIPAMAllocator(cidr *net.IPNet) (ipallocator.Interface, error) { return ipallocator.NewAllocatorCIDRRange(cidr, func(max int, rangeSpec string) (bitmapallocator.Interface, error) { return bitmapallocator.NewRoundRobinAllocationMap(max, rangeSpec), nil }) } -// newReservedIPAMAllocator provides an ipam interface which can be used for IPAM -// allocations for a given cidr using static IP allocations only. All IPs are available. -func newReservedIPAMAllocator(cidr *net.IPNet) (ipallocator.StaticAllocator, error) { - return ipallocator.NewAllocatorFullCIDRRange(cidr, func(max int, rangeSpec string) (bitmapallocator.Interface, error) { - return bitmapallocator.NewRoundRobinAllocationMap(max, rangeSpec), nil - }) -} - // Initializes a new subnet IP allocator func NewAllocator() *allocator { return &allocator{ - cache: make(map[string]subnetInfo), - RWMutex: sync.RWMutex{}, - ipamFunc: newIPAMAllocator, - reservedIPAMFunc: newReservedIPAMAllocator, + cache: make(map[string]subnetInfo), + RWMutex: sync.RWMutex{}, + ipamFunc: newIPAMAllocator, } } // AddOrUpdateSubnet set to the allocator for IPAM management, or update it. -func (allocator *allocator) AddOrUpdateSubnet(config SubnetConfig) error { +func (allocator *allocator) AddOrUpdateSubnet(name string, subnets []*net.IPNet, excludeSubnets ...*net.IPNet) error { allocator.Lock() defer allocator.Unlock() - if subnetInfo, ok := allocator.cache[config.Name]; ok && !reflect.DeepEqual(subnetInfo.subnets, config.Subnets) { - klog.Warningf("Replacing subnets %v with %v for %s", util.StringSlice(subnetInfo.subnets), util.StringSlice(config.Subnets), config.Name) + if subnetInfo, ok := allocator.cache[name]; ok && !reflect.DeepEqual(subnetInfo.subnets, subnets) { + klog.Warningf("Replacing subnets %v with %v for %s", util.StringSlice(subnetInfo.subnets), util.StringSlice(subnets), name) } - var ipams []ipallocator.ContinuousAllocator - - // subnetBoundaryIPs holds network and broadcast addresses for IPv4 subnets. - // These are automatically excluded from reserved subnet allocators to prevent allocation. - var subnetBoundaryIPs []net.IP - for _, subnet := range config.Subnets { + var ipams []ipallocator.Interface + for _, subnet := range subnets { ipam, err := allocator.ipamFunc(subnet) if err != nil { - return fmt.Errorf("failed to initialize IPAM of subnet %s for %s: %w", subnet, config.Name, err) + return fmt.Errorf("failed to initialize IPAM of subnet %s for %s: %w", subnet, name, err) } ipams = append(ipams, ipam) - - if utilnet.IsIPv4CIDR(subnet) { - subnetBoundaryIPs = append(subnetBoundaryIPs, subnet.IP, util.SubnetBroadcastIP(*subnet)) - } + } + allocator.cache[name] = subnetInfo{ + subnets: subnets, + ipams: ipams, } - // reservedSubnets is a subset of subnets, and it should not be used by automatic IPAM - for _, excludeFromIPAM := range append(config.ReservedSubnets, config.ExcludeSubnets...) { + for _, excludeSubnet := range excludeSubnets { var excluded bool - for i, subnet := range config.Subnets { - if util.ContainsCIDR(subnet, excludeFromIPAM) { - err := reserveSubnets(excludeFromIPAM, ipams[i]) + for i, subnet := range subnets { + if util.ContainsCIDR(subnet, excludeSubnet) { + err := reserveSubnets(excludeSubnet, ipams[i]) if err != nil { - return fmt.Errorf("failed to exclude subnet %s for %s: %w", excludeFromIPAM, config.Name, err) + return fmt.Errorf("failed to exclude subnet %s for %s: %w", excludeSubnet, name, err) } - excluded = true } + excluded = true } if !excluded { - return fmt.Errorf("failed to exclude subnet %s for %s: not contained in any of the subnets", excludeFromIPAM, config.Name) - } - } - - var staticIPAMs []ipallocator.StaticAllocator - for _, reservedSubnet := range config.ReservedSubnets { - ipam, err := allocator.reservedIPAMFunc(reservedSubnet) - if err != nil { - return fmt.Errorf("failed to initialize IPAM of reserved subnet %s for %s: %w", reservedSubnet, config.Name, err) + return fmt.Errorf("failed to exclude subnet %s for %s: not contained in any of the subnets", excludeSubnet, name) } - staticIPAMs = append(staticIPAMs, ipam) - - // Exclude network and broadcast addresses from reserved subnet allocators - for _, excludedSubnetIP := range subnetBoundaryIPs { - if reservedSubnet.Contains(excludedSubnetIP) { - if err := ipam.Allocate(excludedSubnetIP); err != nil { - return fmt.Errorf("failed to exclude %s from reserved subnet allocator %s: %w", excludedSubnetIP, ipam.CIDR(), err) - } - } - } - } - allocator.cache[config.Name] = subnetInfo{ - subnets: config.Subnets, - ipams: ipams, - staticIPAMs: staticIPAMs, } return nil } @@ -224,77 +173,46 @@ func (allocator *allocator) AllocateIPPerSubnet(name string, ips []*net.IPNet) e subnetInfo, ok := allocator.cache[name] if !ok { return fmt.Errorf("failed to allocate IPs %v for %s: %w", util.StringSlice(ips), name, ErrSubnetNotFound) - } else if len(subnetInfo.ipams) == 0 && len(subnetInfo.staticIPAMs) == 0 { + } else if len(subnetInfo.ipams) == 0 { return fmt.Errorf("failed to allocate IPs %v for subnet %s: has no IPAM", util.StringSlice(ips), name) } var err error - allocatedContinuous := make(map[int]*net.IPNet) - allocatedStatic := make(map[int]*net.IPNet) + allocated := make(map[int]*net.IPNet) defer func() { if err != nil { // iterate over range of already allocated indices and release // ips allocated before the error occurred. - for relIdx, relIPNet := range allocatedContinuous { + for relIdx, relIPNet := range allocated { subnetInfo.ipams[relIdx].Release(relIPNet.IP) if relIPNet.IP != nil { - klog.Warningf("Continuous IP %s was released for %s", relIPNet.IP, name) - } - } - for relIdx, relIPNet := range allocatedStatic { - subnetInfo.staticIPAMs[relIdx].Release(relIPNet.IP) - if relIPNet.IP != nil { - klog.Warningf("Static IP %s was released for %s", relIPNet.IP, name) + klog.Warningf("Reserved IP %s was released for %s", relIPNet.IP, name) } } } }() for _, ipnet := range ips { - allocated := false - - // Try static IPAMs first (for reserved subnets) - for idx, staticIPAM := range subnetInfo.staticIPAMs { - cidr := staticIPAM.CIDR() + for idx, ipam := range subnetInfo.ipams { + cidr := ipam.CIDR() if cidr.Contains(ipnet.IP) { - if _, ok = allocatedStatic[idx]; ok { - err = fmt.Errorf("failed to allocate IP %s for %s: attempted to reserve multiple IPs in the same static IPAM instance", ipnet.IP, name) + if _, ok = allocated[idx]; ok { + err = fmt.Errorf("failed to allocate IP %s for %s: attempted to reserve multiple IPs in the same IPAM instance", ipnet.IP, name) return err } - - if err = staticIPAM.Allocate(ipnet.IP); err != nil { + if err = ipam.Allocate(ipnet.IP); err != nil { return err } - allocatedStatic[idx] = ipnet - allocated = true + allocated[idx] = ipnet break } } - - // If not found in static IPAMs, try continuous IPAMs - if !allocated { - for idx, ipam := range subnetInfo.ipams { - cidr := ipam.CIDR() - if cidr.Contains(ipnet.IP) { - if _, ok = allocatedContinuous[idx]; ok { - err = fmt.Errorf("failed to allocate IP %s for %s: attempted to reserve multiple IPs in the same continuous IPAM instance", ipnet.IP, name) - return err - } - if err = ipam.Allocate(ipnet.IP); err != nil { - return err - } - allocatedContinuous[idx] = ipnet - allocated = true - break - } - } - } } return nil } // reserveSubnets reserves subnet IPs -func reserveSubnets(subnet *net.IPNet, ipam ipallocator.ContinuousAllocator) error { +func reserveSubnets(subnet *net.IPNet, ipam ipallocator.Interface) error { // FIXME: allocate IP ranges when https://github.com/ovn-org/ovn-kubernetes/issues/3369 is fixed for ip := subnet.IP; subnet.Contains(ip); ip = iputils.NextIP(ip) { if ipam.Reserved(ip) { @@ -375,20 +293,6 @@ func (allocator *allocator) ReleaseIPs(name string, ips []*net.IPNet) error { } for _, ipnet := range ips { - released := false - for _, ipam := range subnetInfo.staticIPAMs { - cidr := ipam.CIDR() - if cidr.Contains(ipnet.IP) { - ipam.Release(ipnet.IP) - released = true - break - } - } - // Continue if the IP was released already - if released { - continue - } - for _, ipam := range subnetInfo.ipams { cidr := ipam.CIDR() if cidr.Contains(ipnet.IP) { @@ -413,23 +317,13 @@ func (allocator *allocator) ConditionalIPRelease(name string, ips []*net.IPNet, if !ok { return false, nil } - if len(subnetInfo.ipams) == 0 && len(subnetInfo.staticIPAMs) == 0 { + if len(subnetInfo.ipams) == 0 { return false, nil } // check if ipam has one of the ip addresses, and then execute the predicate function to determine // if this IP should be released or not for _, ipnet := range ips { - // Check static IPAMs first - for _, ipam := range subnetInfo.staticIPAMs { - cidr := ipam.CIDR() - if cidr.Contains(ipnet.IP) { - if ipam.Has(ipnet.IP) { - return predicate() - } - } - } - // Check continuous IPAMs for _, ipam := range subnetInfo.ipams { cidr := ipam.CIDR() if cidr.Contains(ipnet.IP) { @@ -458,13 +352,6 @@ func (allocator *allocator) GetSubnetName(subnets []*net.IPNet) (string, bool) { defer allocator.RUnlock() for _, subnet := range subnets { for switchName, lsInfo := range allocator.cache { - for _, ipam := range lsInfo.staticIPAMs { - ipamCIDR := ipam.CIDR() - if ipamCIDR.Contains(subnet.IP) { - return switchName, true - } - } - for _, ipam := range lsInfo.ipams { ipamCIDR := ipam.CIDR() if ipamCIDR.Contains(subnet.IP) { diff --git a/go-controller/pkg/allocator/ip/subnet/allocator_test.go b/go-controller/pkg/allocator/ip/subnet/allocator_test.go index 5c9df2f17a..c2d8f1ac27 100644 --- a/go-controller/pkg/allocator/ip/subnet/allocator_test.go +++ b/go-controller/pkg/allocator/ip/subnet/allocator_test.go @@ -30,10 +30,7 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { expectedIPs := []string{"10.1.1.1", "2000::1"} - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - }) + err := allocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets(subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) ips, err := allocator.AllocateNextIPs(subnetName) @@ -51,10 +48,7 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { expectedIPs := []string{"10.1.1.1", "2000::1"} - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - }) + err := allocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets(subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) ips, err := allocator.AllocateNextIPs(subnetName) @@ -64,10 +58,7 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { } subnets = []string{"10.1.2.0/24"} expectedIPs = []string{"10.1.2.1"} - err = allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - }) + err = allocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets(subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) ips, err = allocator.AllocateNextIPs(subnetName) @@ -87,11 +78,7 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { expectedIPs := []string{"10.1.1.8"} - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - ExcludeSubnets: ovntest.MustParseIPNets(excludes...), - }) + err := allocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets(subnets...), ovntest.MustParseIPNets(excludes...)...) gomega.Expect(err).NotTo(gomega.HaveOccurred()) ips, err := allocator.AllocateNextIPs(subnetName) @@ -115,10 +102,7 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { {"10.1.1.2", "2000::2"}, } - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - }) + err := allocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets(subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) for _, expectedIPs := range expectedIPAllocations { ips, err := allocator.AllocateNextIPs(subnetName) @@ -138,10 +122,8 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { {"10.1.1.1"}, {"10.1.1.2"}, } - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - }) + + err := allocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets(subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) for _, expectedIPs := range expectedIPAllocations { ips, err := allocator.AllocateNextIPs(subnetName) @@ -159,16 +141,12 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { ginkgo.It("fails to allocate multiple IPs from the same subnet", func() { subnets := []string{"10.1.1.0/24", "2000::/64"} - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - }) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(allocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets(subnets...))).To(gomega.Succeed()) ips, err := util.ParseIPNets([]string{"10.1.1.1/24", "10.1.1.2/24"}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) gomega.Expect(allocator.AllocateIPPerSubnet(subnetName, ips)).To(gomega.MatchError( - "failed to allocate IP 10.1.1.2 for subnet1: attempted to reserve multiple IPs in the same continuous IPAM instance", + "failed to allocate IP 10.1.1.2 for subnet1: attempted to reserve multiple IPs in the same IPAM instance", )) }) @@ -186,10 +164,7 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { {"10.1.1.5", "10.1.2.5"}, } - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - }) + err := allocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets(subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) // exhaust valid ips in second subnet for _, expectedIPs := range expectedIPAllocations { @@ -227,10 +202,7 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { "2000::1/64", } - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - }) + err := allocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets(subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) ips, err := allocator.AllocateNextIPs(subnetName) gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -244,96 +216,6 @@ var _ = ginkgo.Describe("Subnet IP allocator operations", func() { }) - // Reserved subnets test cases - ginkgo.It("reserves subnets correctly and allows specific allocation", func() { - subnets := []string{ - "10.1.1.0/24", - } - reservedSubnets := []string{ - "10.1.1.16/28", // Reserve 10.1.1.16-31 - } - expectedIP := "10.1.1.1/24" - - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - ReservedSubnets: ovntest.MustParseIPNets(reservedSubnets...), - }) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - ips, err := allocator.AllocateNextIPs(subnetName) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - gomega.Expect(ips).To(gomega.HaveLen(1)) - gomega.Expect(ips[0].String()).To(gomega.Equal(expectedIP)) - - // Should be able to allocate the first IP from the reserved range - reservedIPs, err := util.ParseIPNets([]string{"10.1.1.16/24"}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = allocator.AllocateIPPerSubnet(subnetName, reservedIPs) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - // Should be able to allocate the last IP from the reserved range - reservedIPs, err = util.ParseIPNets([]string{"10.1.1.31/24"}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = allocator.AllocateIPPerSubnet(subnetName, reservedIPs) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - // Should not be able to allocate an IP that is already allocated - err = allocator.AllocateIPPerSubnet(subnetName, reservedIPs) - gomega.Expect(err).To(gomega.MatchError(ipam.ErrAllocated)) - }) - - ginkgo.It("handles reserved together with exclude subnets correctly", func() { - subnets := []string{ - "10.1.1.0/24", - } - reservedSubnets := []string{ - "10.1.1.0/28", // Reserve 10.1.1.0-15 - "10.1.1.240/28", // Reserve 10.1.1.240-255 - } - excludeSubnets := []string{ - "10.1.1.200/29", // Exclude 10.1.1.200-207 - } - expectedIP := "10.1.1.16/24" - - err := allocator.AddOrUpdateSubnet(SubnetConfig{ - Name: subnetName, - Subnets: ovntest.MustParseIPNets(subnets...), - ExcludeSubnets: ovntest.MustParseIPNets(excludeSubnets...), - ReservedSubnets: ovntest.MustParseIPNets(reservedSubnets...), - }) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - ips, err := allocator.AllocateNextIPs(subnetName) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - gomega.Expect(ips).To(gomega.HaveLen(1)) - gomega.Expect(ips[0].String()).To(gomega.Equal(expectedIP)) - - // Should be able to allocate from reserved range but not excluded range - reservedIPs, err := util.ParseIPNets([]string{"10.1.1.5/24"}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = allocator.AllocateIPPerSubnet(subnetName, reservedIPs) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - // Should NOT be able to allocate from excluded range - excludedIPs, err := util.ParseIPNets([]string{"10.1.1.202/24"}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = allocator.AllocateIPPerSubnet(subnetName, excludedIPs) - gomega.Expect(err).To(gomega.MatchError(ipam.ErrAllocated)) - - // Should not be able to allocate the network IP - reservedIPs, err = util.ParseIPNets([]string{"10.1.1.0/24"}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = allocator.AllocateIPPerSubnet(subnetName, reservedIPs) - gomega.Expect(err).To(gomega.HaveOccurred()) - - // Should not be able to allocate the broadcast IP - reservedIPs, err = util.ParseIPNets([]string{"10.1.1.255/24"}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = allocator.AllocateIPPerSubnet(subnetName, reservedIPs) - gomega.Expect(err).To(gomega.HaveOccurred()) - }) - }) func TestSubnetIPAllocator(t *testing.T) { diff --git a/go-controller/pkg/allocator/pod/pod_annotation.go b/go-controller/pkg/allocator/pod/pod_annotation.go index d174a5e3d9..940952f7ff 100644 --- a/go-controller/pkg/allocator/pod/pod_annotation.go +++ b/go-controller/pkg/allocator/pod/pod_annotation.go @@ -10,13 +10,10 @@ import ( corev1 "k8s.io/api/core/v1" listers "k8s.io/client-go/listers/core/v1" "k8s.io/klog/v2" - utilnet "k8s.io/utils/net" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/id" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/ip" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/ip/subnet" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/persistentips" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" @@ -210,35 +207,6 @@ func allocatePodAnnotationWithTunnelID( return pod, podAnnotation, nil } -// validateStaticIPRequest checks if a static IP request can be honored when IPAM is enabled for the given network. -func validateStaticIPRequest(netInfo util.NetInfo, network *nadapi.NetworkSelectionElement, ipamClaim *ipamclaimsapi.IPAMClaim, podDesc string) error { - // Allow static IPs with IPAM only for primary networks with layer2 topology when EnablePreconfiguredUDNAddresses is enabled - // Feature gate integration: EnablePreconfiguredUDNAddresses controls static IP allocation with IPAM - if !util.IsPreconfiguredUDNAddressesEnabled() { - // Feature is disabled, reject static IPs with IPAM - return fmt.Errorf("cannot allocate a static IP request with IPAM for pod %s (custom network configuration disabled)", podDesc) - } - if !netInfo.IsPrimaryNetwork() { - // Static IP requests with IPAM are only supported on primary networks - return fmt.Errorf("cannot allocate a static IP request with IPAM for pod %s: only supported on primary networks", podDesc) - } - if netInfo.TopologyType() != types.Layer2Topology { - // Static IP requests with IPAM are only supported on layer2 topology networks. - // On other topologies, we cannot distinguish between already allocated IPs and - // IPs excluded from allocation, making it impossible to safely honor static IP - // requests when IPAM is enabled. - return fmt.Errorf("cannot allocate a static IP request with IPAM for pod %s: layer2 topology is required, but network has topology %q", podDesc, netInfo.TopologyType()) - } - if ipamClaim != nil && len(ipamClaim.Status.IPs) > 0 { - for _, ipRequest := range network.IPRequest { - if !util.IsItemInSlice(ipamClaim.Status.IPs, ipRequest) { - return fmt.Errorf("cannot allocate a static IP request with IPAM for pod %q: the pod references an ipam claim with IPs not containing the requested IP %q", podDesc, ipRequest) - } - } - } - return nil -} - // allocatePodAnnotationWithRollback allocates the PodAnnotation which includes // IPs, a mac address, routes, gateways and an ID. Returns the allocated pod // annotation and a pod with that annotation set. Returns a nil pod and the existing @@ -362,11 +330,13 @@ func allocatePodAnnotationWithRollback( } hasIPAMClaim = ipamClaim != nil && len(ipamClaim.Status.IPs) > 0 } - if hasIPAM && hasStaticIPRequest { - if err = validateStaticIPRequest(netInfo, network, ipamClaim, podDesc); err != nil { - return - } + // for now we can't tell apart already allocated IPs from IPs excluded + // from allocation so we can't really honor static IP requests when + // there is IPAM as we don't really know if the requested IP should not + // be allocated or was already allocated by the same pod + err = fmt.Errorf("cannot allocate a static IP request with IPAM for pod %s", podDesc) + return } // we need to update the annotation if it is missing IPs or MAC @@ -378,7 +348,6 @@ func allocatePodAnnotationWithRollback( if hasIPRequest { tentative.IPs, err = util.ParseIPNets(network.IPRequest) if err != nil { - klog.Warningf("Failed parsing IPRequest %+v for pod %s: %v", network.IPRequest, podDesc, err) return } } else if hasIPAMClaim { @@ -437,7 +406,7 @@ func allocatePodAnnotationWithRollback( } // handle routes & gateways - err = AddRoutesGatewayIP(netInfo, node, pod, tentative, network) + err = util.AddRoutesGatewayIP(netInfo, node, pod, tentative, network) if err != nil { return } @@ -459,187 +428,3 @@ func allocatePodAnnotationWithRollback( return } - -func joinSubnetToRoute(netinfo util.NetInfo, isIPv6 bool, gatewayIP net.IP) util.PodRoute { - joinSubnet := netinfo.JoinSubnetV4() - if isIPv6 { - joinSubnet = netinfo.JoinSubnetV6() - } - return util.PodRoute{ - Dest: joinSubnet, - NextHop: gatewayIP, - } -} - -func serviceCIDRToRoute(isIPv6 bool, gatewayIP net.IP) []util.PodRoute { - var podRoutes []util.PodRoute - for _, serviceSubnet := range config.Kubernetes.ServiceCIDRs { - if isIPv6 == utilnet.IsIPv6CIDR(serviceSubnet) { - podRoutes = append(podRoutes, util.PodRoute{ - Dest: serviceSubnet, - NextHop: gatewayIP, - }) - } - } - return podRoutes -} - -func hairpinMasqueradeIPToRoute(isIPv6 bool, gatewayIP net.IP) util.PodRoute { - ip := config.Gateway.MasqueradeIPs.V4OVNServiceHairpinMasqueradeIP - if isIPv6 { - ip = config.Gateway.MasqueradeIPs.V6OVNServiceHairpinMasqueradeIP - } - return util.PodRoute{ - Dest: &net.IPNet{ - IP: ip, - Mask: util.GetIPFullMask(ip), - }, - NextHop: gatewayIP, - } -} - -// addRoutesGatewayIP updates the provided pod annotation for the provided pod -// with the gateways derived from the allocated IPs -func AddRoutesGatewayIP( - netinfo util.NetInfo, - node *corev1.Node, - pod *corev1.Pod, - podAnnotation *util.PodAnnotation, - network *nadapi.NetworkSelectionElement) error { - - // generate the nodeSubnets from the allocated IPs - nodeSubnets := util.IPsToNetworkIPs(podAnnotation.IPs...) - - if netinfo.IsSecondary() { - // for secondary network, see if its network-attachment's annotation has default-route key. - // If present, then we need to add default route for it - podAnnotation.Gateways = append(podAnnotation.Gateways, network.GatewayRequest...) - topoType := netinfo.TopologyType() - switch topoType { - case types.LocalnetTopology: - // no route needed for directly connected subnets - return nil - case types.Layer2Topology: - if !util.IsNetworkSegmentationSupportEnabled() || !netinfo.IsPrimaryNetwork() { - return nil - } - for _, podIfAddr := range podAnnotation.IPs { - isIPv6 := utilnet.IsIPv6CIDR(podIfAddr) - nodeSubnet, err := util.MatchFirstIPNetFamily(isIPv6, nodeSubnets) - if err != nil { - return err - } - gatewayIPnet := netinfo.GetNodeGatewayIP(nodeSubnet) - // Ensure default service network traffic always goes to OVN - podAnnotation.Routes = append(podAnnotation.Routes, serviceCIDRToRoute(isIPv6, gatewayIPnet.IP)...) - // Ensure UDN join subnet traffic always goes to UDN LSP - podAnnotation.Routes = append(podAnnotation.Routes, joinSubnetToRoute(netinfo, isIPv6, gatewayIPnet.IP)) - if network != nil && len(network.GatewayRequest) == 0 { // if specific default route for pod was not requested then add gatewayIP - podAnnotation.Gateways = append(podAnnotation.Gateways, gatewayIPnet.IP) - } - } - // Until https://github.com/ovn-kubernetes/ovn-kubernetes/issues/4876 is fixed, it is limited to IC only - if config.OVNKubernetesFeature.EnableInterconnect { - if _, isIPv6Mode := netinfo.IPMode(); isIPv6Mode { - joinAddrs, err := udn.GetGWRouterIPs(node, netinfo.GetNetInfo()) - if err != nil { - if util.IsAnnotationNotSetError(err) { - return types.NewSuppressedError(err) - } - return fmt.Errorf("failed parsing node gateway router join addresses, network %q, %w", netinfo.GetNetworkName(), err) - } - podAnnotation.GatewayIPv6LLA = util.HWAddrToIPv6LLA(util.IPAddrToHWAddr(joinAddrs[0].IP)) - } - } - return nil - case types.Layer3Topology: - for _, podIfAddr := range podAnnotation.IPs { - isIPv6 := utilnet.IsIPv6CIDR(podIfAddr) - nodeSubnet, err := util.MatchFirstIPNetFamily(isIPv6, nodeSubnets) - if err != nil { - return err - } - gatewayIPnet := netinfo.GetNodeGatewayIP(nodeSubnet) - for _, clusterSubnet := range netinfo.Subnets() { - if isIPv6 == utilnet.IsIPv6CIDR(clusterSubnet.CIDR) { - podAnnotation.Routes = append(podAnnotation.Routes, util.PodRoute{ - Dest: clusterSubnet.CIDR, - NextHop: gatewayIPnet.IP, - }) - } - } - if !util.IsNetworkSegmentationSupportEnabled() || !netinfo.IsPrimaryNetwork() { - continue - } - // Ensure default service network traffic always goes to OVN - podAnnotation.Routes = append(podAnnotation.Routes, serviceCIDRToRoute(isIPv6, gatewayIPnet.IP)...) - // Ensure UDN join subnet traffic always goes to UDN LSP - podAnnotation.Routes = append(podAnnotation.Routes, joinSubnetToRoute(netinfo, isIPv6, gatewayIPnet.IP)) - if network != nil && len(network.GatewayRequest) == 0 { // if specific default route for pod was not requested then add gatewayIP - podAnnotation.Gateways = append(podAnnotation.Gateways, gatewayIPnet.IP) - } - } - return nil - } - return fmt.Errorf("topology type %s not supported", topoType) - } - - // if there are other network attachments for the pod, then check if those network-attachment's - // annotation has default-route key. If present, then we need to skip adding default route for - // OVN interface - networks, err := util.GetK8sPodAllNetworkSelections(pod) - if err != nil { - return fmt.Errorf("error while getting network attachment definition for [%s/%s]: %v", - pod.Namespace, pod.Name, err) - } - otherDefaultRouteV4 := false - otherDefaultRouteV6 := false - for _, network := range networks { - for _, gatewayRequest := range network.GatewayRequest { - if utilnet.IsIPv6(gatewayRequest) { - otherDefaultRouteV6 = true - } else { - otherDefaultRouteV4 = true - } - } - } - - for _, podIfAddr := range podAnnotation.IPs { - isIPv6 := utilnet.IsIPv6CIDR(podIfAddr) - nodeSubnet, err := util.MatchFirstIPNetFamily(isIPv6, nodeSubnets) - if err != nil { - return err - } - - gatewayIPnet := netinfo.GetNodeGatewayIP(nodeSubnet) - - // Ensure default pod network traffic always goes to OVN - for _, clusterSubnet := range config.Default.ClusterSubnets { - if isIPv6 == utilnet.IsIPv6CIDR(clusterSubnet.CIDR) { - podAnnotation.Routes = append(podAnnotation.Routes, util.PodRoute{ - Dest: clusterSubnet.CIDR, - NextHop: gatewayIPnet.IP, - }) - } - } - - if podAnnotation.Role == types.NetworkRolePrimary { - // Ensure default service network traffic always goes to OVN - podAnnotation.Routes = append(podAnnotation.Routes, serviceCIDRToRoute(isIPv6, gatewayIPnet.IP)...) - // Ensure service hairpin masquerade traffic always goes to OVN - podAnnotation.Routes = append(podAnnotation.Routes, hairpinMasqueradeIPToRoute(isIPv6, gatewayIPnet.IP)) - otherDefaultRoute := otherDefaultRouteV4 - if isIPv6 { - otherDefaultRoute = otherDefaultRouteV6 - } - if !otherDefaultRoute { - podAnnotation.Gateways = append(podAnnotation.Gateways, gatewayIPnet.IP) - } - } - - // Ensure default join subnet traffic always goes to OVN - podAnnotation.Routes = append(podAnnotation.Routes, joinSubnetToRoute(netinfo, isIPv6, gatewayIPnet.IP)) - } - - return nil -} diff --git a/go-controller/pkg/allocator/pod/pod_annotation_test.go b/go-controller/pkg/allocator/pod/pod_annotation_test.go index e4642ac027..7930bd0e11 100644 --- a/go-controller/pkg/allocator/pod/pod_annotation_test.go +++ b/go-controller/pkg/allocator/pod/pod_annotation_test.go @@ -109,28 +109,25 @@ func Test_allocatePodAnnotationWithRollback(t *testing.T) { reallocate bool } tests := []struct { - name string - args args - netInfo util.NetInfo - nadName string - ipam bool - idAllocation bool - persistentIPAllocation bool - enablePreconfiguredUDNAddresses bool - role string - podAnnotation *util.PodAnnotation - invalidNetworkAnnotation bool - wantUpdatedPod bool - wantGeneratedMac bool - wantPodAnnotation *util.PodAnnotation - wantReleasedIPs []*net.IPNet - wantReleasedIPsOnRollback []*net.IPNet - wantReleaseID bool - wantRelasedIDOnRollback bool - wantErr bool - isSingleStackIPv4 bool - isSingleStackIPv6 bool - multiNetworkDisabled bool + name string + args args + ipam bool + idAllocation bool + persistentIPAllocation bool + role string + podAnnotation *util.PodAnnotation + invalidNetworkAnnotation bool + wantUpdatedPod bool + wantGeneratedMac bool + wantPodAnnotation *util.PodAnnotation + wantReleasedIPs []*net.IPNet + wantReleasedIPsOnRollback []*net.IPNet + wantReleaseID bool + wantRelasedIDOnRollback bool + wantErr bool + isSingleStackIPv4 bool + isSingleStackIPv6 bool + multiNetworkDisabled bool }{ { // on secondary L2 networks with no IPAM, we expect to generate a @@ -198,9 +195,8 @@ func Test_allocatePodAnnotationWithRollback(t *testing.T) { { // on networks with IPAM, expect error if static IP request present // in the network selection annotation - name: "expect error, static ip request, IPAM, non layer2", - netInfo: &util.DefaultNetInfo{}, - nadName: types.DefaultNetworkName, + name: "expect error, static ip request, IPAM", + ipam: true, args: args{ network: &nadapi.NetworkSelectionElement{ IPRequest: []string{"192.168.0.3/24"}, @@ -544,9 +540,9 @@ func Test_allocatePodAnnotationWithRollback(t *testing.T) { wantReleasedIPs: ovntest.MustParseIPNets("192.168.0.3/24"), }, { - // on networks with IPAM, honor a IP and MAC request through the network + // on networks with IPAM, honor a MAC request through the network // selection element - name: "expect requested MAC, IPAM", + name: "expect requested MAC", ipam: true, args: args{ network: &nadapi.NetworkSelectionElement{ @@ -579,122 +575,6 @@ func Test_allocatePodAnnotationWithRollback(t *testing.T) { wantReleasedIPsOnRollback: ovntest.MustParseIPNets("192.168.0.3/24"), role: types.NetworkRolePrimary, // has to be primary network for default routes to be set }, - { - // on primary networks with IPAM and layer2 topology, expect success when EnablePreconfiguredUDNAddresses is enabled - name: "expect success, static IP and MAC with IPAM on primary network when EnablePreconfiguredUDNAddresses is enabled", - ipam: true, - enablePreconfiguredUDNAddresses: true, - role: types.NetworkRolePrimary, // has to be primary network for default routes to be set - persistentIPAllocation: true, - args: args{ - network: &nadapi.NetworkSelectionElement{ - MacRequest: requestedMAC, - IPRequest: []string{"192.168.0.101/24"}, - }, - ipAllocator: &ipAllocatorStub{ - nextIPs: ovntest.MustParseIPNets("192.168.0.3/24"), - }, - }, - wantUpdatedPod: true, - wantPodAnnotation: &util.PodAnnotation{ - IPs: ovntest.MustParseIPNets("192.168.0.101/24"), - MAC: requestedMACParsed, - Gateways: []net.IP{ovntest.MustParseIP("192.168.0.1").To4()}, - Routes: []util.PodRoute{ - { - Dest: ovntest.MustParseIPNet("100.65.0.0/16"), - NextHop: ovntest.MustParseIP("192.168.0.1").To4(), - }, - }, - Role: types.NetworkRolePrimary, - }, - wantReleasedIPsOnRollback: ovntest.MustParseIPNets("192.168.0.101/24"), - }, - { - // on primary networks with IPAM and layer2 topology, expect success when EnablePreconfiguredUDNAddresses is enabled - name: "expect success, just static IP with IPAM on primary network when EnablePreconfiguredUDNAddresses is enabled", - ipam: true, - enablePreconfiguredUDNAddresses: true, - persistentIPAllocation: true, - role: types.NetworkRolePrimary, - args: args{ - network: &nadapi.NetworkSelectionElement{ - IPRequest: []string{"192.168.0.101/24"}, - }, - ipAllocator: &ipAllocatorStub{ - nextIPs: ovntest.MustParseIPNets("192.168.0.101/24"), - }, - }, - wantUpdatedPod: true, - wantPodAnnotation: &util.PodAnnotation{ - IPs: ovntest.MustParseIPNets("192.168.0.101/24"), - MAC: util.IPAddrToHWAddr(ovntest.MustParseIPNets("192.168.0.101/24")[0].IP), - Gateways: []net.IP{ovntest.MustParseIP("192.168.0.1").To4()}, - Routes: []util.PodRoute{ - { - Dest: &net.IPNet{ - IP: ovntest.MustParseIP("100.65.0.0").To4(), - Mask: net.CIDRMask(16, 32), - }, - NextHop: ovntest.MustParseIP("192.168.0.1").To4(), - }, - }, - Role: types.NetworkRolePrimary, - }, - wantReleasedIPsOnRollback: ovntest.MustParseIPNets("192.168.0.101/24"), - }, - - { - // on networks with IPAM and layer2 topology, expect error when EnablePreconfiguredUDNAddresses is false - name: "expect error, static IP with IPAM on layer2 when EnablePreconfiguredUDNAddresses is false", - ipam: true, - role: types.NetworkRolePrimary, - persistentIPAllocation: true, - // enablePreconfiguredUDNAddresses defaults to false - args: args{ - network: &nadapi.NetworkSelectionElement{ - IPRequest: []string{"192.168.0.101/24"}, - }, - }, - wantErr: true, - }, - { - // on networks with IPAM and layer2 topology, expect error when IPAMClaims status IPs do not match requested IPs - name: "expect error, static IP with IPAM on layer2 when IPAMClaims status IPs do not match requested IPs", - ipam: true, - role: types.NetworkRolePrimary, - persistentIPAllocation: true, - enablePreconfiguredUDNAddresses: true, - args: args{ - network: &nadapi.NetworkSelectionElement{ - IPRequest: []string{"192.168.0.101/24"}, - IPAMClaimReference: "my-ipam-claim", - }, - ipamClaim: &ipamclaimsapi.IPAMClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-ipam-claim", - }, - Status: ipamclaimsapi.IPAMClaimStatus{ - IPs: []string{"192.168.0.200/24"}, - }, - }, - }, - wantErr: true, - }, - { - // with preconfigured UDN address feature enabled still continue failing with secondary layer2 with ipam + static IPs - name: "expect error, static IP with IPAM on secondary network when EnablePreconfiguredUDNAddresses is enabled", - ipam: true, - enablePreconfiguredUDNAddresses: true, - persistentIPAllocation: true, - args: args{ - network: &nadapi.NetworkSelectionElement{ - IPRequest: []string{"192.168.0.101/24"}, - }, - }, - role: types.NetworkRoleSecondary, - wantErr: true, - }, { // on networks with IPAM, expect error on an invalid network // selection element @@ -897,7 +777,6 @@ func Test_allocatePodAnnotationWithRollback(t *testing.T) { config.OVNKubernetesFeature.EnableInterconnect = tt.idAllocation config.OVNKubernetesFeature.EnableMultiNetwork = !tt.multiNetworkDisabled config.OVNKubernetesFeature.EnableNetworkSegmentation = true - config.OVNKubernetesFeature.EnablePreconfiguredUDNAddresses = tt.enablePreconfiguredUDNAddresses config.IPv4Mode = true if tt.isSingleStackIPv6 { config.IPv4Mode = false @@ -906,40 +785,46 @@ func Test_allocatePodAnnotationWithRollback(t *testing.T) { if tt.isSingleStackIPv4 { config.IPv6Mode = false } - if tt.netInfo == nil { - tt.netInfo = &util.DefaultNetInfo{} - tt.nadName = types.DefaultNetworkName - if !tt.ipam || tt.idAllocation || tt.persistentIPAllocation || tt.args.ipamClaim != nil { - tt.nadName = util.GetNADName(network.Namespace, network.Name) - var subnets string - if tt.ipam { - subnets = "192.168.0.0/24,2001:db8::/64" - if tt.isSingleStackIPv4 { - subnets = "192.168.0.0/24" - } else if tt.isSingleStackIPv6 { - subnets = "2001:db8::/64" - } - } - tt.netInfo, err = util.NewNetInfo(&ovncnitypes.NetConf{ - Topology: types.Layer2Topology, - NetConf: cnitypes.NetConf{ - Name: network.Name, - }, - NADName: tt.nadName, - Subnets: subnets, - AllowPersistentIPs: tt.persistentIPAllocation, - Role: tt.role, - }) - if err != nil { - t.Fatalf("failed to create NetInfo: %v", err) + var netInfo util.NetInfo + netInfo = &util.DefaultNetInfo{} + nadName := types.DefaultNetworkName + if !tt.ipam || tt.idAllocation || tt.persistentIPAllocation || tt.args.ipamClaim != nil { + nadName = util.GetNADName(network.Namespace, network.Name) + var subnets string + if tt.ipam { + subnets = "192.168.0.0/24,2001:db8::/64" + if tt.isSingleStackIPv4 { + subnets = "192.168.0.0/24" + } else if tt.isSingleStackIPv6 { + subnets = "2001:db8::/64" } } + netInfo, err = util.NewNetInfo(&ovncnitypes.NetConf{ + Topology: types.Layer2Topology, + NetConf: cnitypes.NetConf{ + Name: network.Name, + }, + NADName: nadName, + Subnets: subnets, + AllowPersistentIPs: tt.persistentIPAllocation, + Role: tt.role, + }) + if err != nil { + t.Fatalf("failed to create NetInfo: %v", err) + } + } + + ifaddrs := `{"network":{"ipv4":"100.65.0.4/16","ipv6":"fd99::4/64"}}` + if tt.isSingleStackIPv4 { + ifaddrs = `{"network":{"ipv4":"100.65.0.4/16"}}` + } else if tt.isSingleStackIPv6 { + ifaddrs = `{"network":{"ipv6":"fd99::4/64"}}` } node := &corev1.Node{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - "k8s.ovn.org/node-id": "4", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": ifaddrs, }, }, } @@ -951,7 +836,7 @@ func Test_allocatePodAnnotationWithRollback(t *testing.T) { }, } if tt.podAnnotation != nil { - pod.Annotations, err = util.MarshalPodAnnotation(nil, tt.podAnnotation, tt.nadName) + pod.Annotations, err = util.MarshalPodAnnotation(nil, tt.podAnnotation, nadName) if err != nil { t.Fatalf("failed to set pod annotations: %v", err) } @@ -977,7 +862,7 @@ func Test_allocatePodAnnotationWithRollback(t *testing.T) { pod, podAnnotation, rollback, err := allocatePodAnnotationWithRollback( tt.args.ipAllocator, tt.args.idAllocator, - tt.netInfo, + netInfo, node, pod, network, @@ -1002,7 +887,7 @@ func Test_allocatePodAnnotationWithRollback(t *testing.T) { if tt.args.ipAllocator != nil { releasedIPs := tt.args.ipAllocator.(*ipAllocatorStub).releasedIPs - g.Expect(releasedIPs).To(gomega.Equal(tt.wantReleasedIPsOnRollback), "Release IP on rollback behaved unexpectedly: %s", tt.netInfo.TopologyType()) + g.Expect(releasedIPs).To(gomega.Equal(tt.wantReleasedIPsOnRollback), "Release IP on rollback behaved unexpectedly") } if tt.args.idAllocator != nil { diff --git a/go-controller/pkg/clustermanager/clustermanager.go b/go-controller/pkg/clustermanager/clustermanager.go index 281fb000ec..3bdf4d52c0 100644 --- a/go-controller/pkg/clustermanager/clustermanager.go +++ b/go-controller/pkg/clustermanager/clustermanager.go @@ -146,7 +146,6 @@ func NewClusterManager( ovnClient.UserDefinedNetworkClient, wf.UserDefinedNetworkInformer(), wf.ClusterUserDefinedNetworkInformer(), udntemplate.RenderNetAttachDefManifest, - cm.networkManager.Interface(), wf.PodCoreInformer(), wf.NamespaceInformer(), cm.recorder, diff --git a/go-controller/pkg/clustermanager/clustermanager_test.go b/go-controller/pkg/clustermanager/clustermanager_test.go index 74c2e0d1bf..f97de8fc3f 100644 --- a/go-controller/pkg/clustermanager/clustermanager_test.go +++ b/go-controller/pkg/clustermanager/clustermanager_test.go @@ -19,7 +19,6 @@ import ( hotypes "github.com/ovn-org/ovn-kubernetes/go-controller/hybrid-overlay/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" ovntypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" @@ -35,9 +34,10 @@ const ( var _ = ginkgo.Describe("Cluster Manager", func() { var ( - app *cli.App - f *factory.WatchFactory - wg *sync.WaitGroup + app *cli.App + f *factory.WatchFactory + stopChan chan struct{} + wg *sync.WaitGroup ) const ( @@ -54,10 +54,12 @@ var _ = ginkgo.Describe("Cluster Manager", func() { app = cli.NewApp() app.Name = "test" app.Flags = config.Flags + stopChan = make(chan struct{}) wg = &sync.WaitGroup{} }) ginkgo.AfterEach(func() { + close(stopChan) if f != nil { f.Shutdown() } @@ -894,7 +896,7 @@ var _ = ginkgo.Describe("Cluster Manager", func() { return err } - gwLRPAddrs, err := udn.GetGWRouterIPs(updatedNode, &util.DefaultNetInfo{}) + gwLRPAddrs, err := util.ParseNodeGatewayRouterJoinAddrs(updatedNode, ovntypes.DefaultNetworkName) if err != nil { return err } @@ -915,6 +917,239 @@ var _ = ginkgo.Describe("Cluster Manager", func() { }) gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) + + ginkgo.It("clear the node annotations for gateway router port ips and check", func() { + app.Action = func(ctx *cli.Context) error { + nodes := []corev1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node2", + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node3", + }, + }, + } + kubeFakeClient := fake.NewSimpleClientset(&corev1.NodeList{ + Items: nodes, + }) + fakeClient := &util.OVNClusterManagerClientset{ + KubeClient: kubeFakeClient, + } + + _, err := config.InitConfig(ctx, nil, nil) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + config.Kubernetes.HostNetworkNamespace = "" + + f, err = factory.NewClusterManagerWatchFactory(fakeClient) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + err = f.Start() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + + clusterManager, err := NewClusterManager(fakeClient, f, "identity", nil) + gomega.Expect(clusterManager).NotTo(gomega.BeNil()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + err = clusterManager.Start(ctx.Context) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + defer clusterManager.Stop() + + nodeAddrs := make(map[string]string) + // Check that cluster manager has set the node-gateway-router-lrp-ifaddr annotation for each node. + for _, n := range nodes { + gomega.Eventually(func() error { + updatedNode, err := fakeClient.KubeClient.CoreV1().Nodes().Get(context.TODO(), n.Name, metav1.GetOptions{}) + if err != nil { + return err + } + + gwLRPAddrs, err := util.ParseNodeGatewayRouterJoinAddrs(updatedNode, ovntypes.DefaultNetworkName) + if err != nil { + return err + } + gomega.Expect(gwLRPAddrs).NotTo(gomega.BeNil()) + gomega.Expect(gwLRPAddrs).To(gomega.HaveLen(2)) + nodeAddrs[n.Name] = updatedNode.Annotations[util.OVNNodeGRLRPAddrs] + return nil + }).ShouldNot(gomega.HaveOccurred()) + } + + // Clear the node-gateway-router-lrp-ifaddr annotation of nodes and make sure it is reset by cluster manager + // with the same addrs. + for _, n := range nodes { + nodeAnnotator := kube.NewNodeAnnotator(&kube.Kube{KClient: kubeFakeClient}, n.Name) + + nodeAnnotations := n.Annotations + for k, v := range nodeAnnotations { + gomega.Expect(nodeAnnotator.Set(k, v)).To(gomega.Succeed()) + } + nodeAnnotator.Delete(util.OVNNodeGRLRPAddrs) + err = nodeAnnotator.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + } + + for _, n := range nodes { + gomega.Eventually(func() error { + updatedNode, err := fakeClient.KubeClient.CoreV1().Nodes().Get(context.TODO(), n.Name, metav1.GetOptions{}) + if err != nil { + return err + } + + nodeGWRPIPs, ok := updatedNode.Annotations[util.OVNNodeGRLRPAddrs] + if !ok { + return fmt.Errorf("expected node annotation for node %s to have node gateway-router-lrp-ifaddr allocated", n.Name) + } + + gomega.Expect(nodeGWRPIPs).To(gomega.Equal(nodeAddrs[n.Name])) + return nil + }).ShouldNot(gomega.HaveOccurred()) + } + return nil + } + + err := app.Run([]string{ + app.Name, + "-cluster-subnets=" + clusterCIDR + "," + clusterv6CIDR, + "-k8s-service-cidr=10.96.0.0/16,fd00:10:96::/112", + }) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("Stop cluster manager, change id of a node and verify the gateway router port addr node annotation", func() { + app.Action = func(ctx *cli.Context) error { + nodes := []corev1.Node{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node1", + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node2", + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "node3", + }, + }, + } + kubeFakeClient := fake.NewSimpleClientset(&corev1.NodeList{ + Items: nodes, + }) + fakeClient := &util.OVNClusterManagerClientset{ + KubeClient: kubeFakeClient, + } + + _, err := config.InitConfig(ctx, nil, nil) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + config.Kubernetes.HostNetworkNamespace = "" + + f, err = factory.NewClusterManagerWatchFactory(fakeClient) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + err = f.Start() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + + wg1 := &sync.WaitGroup{} + clusterManager, err := NewClusterManager(fakeClient, f, "identity", nil) + gomega.Expect(clusterManager).NotTo(gomega.BeNil()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + err = clusterManager.Start(ctx.Context) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + + node3GWRPAnnotation := "" + // Check that cluster manager has set the node-gateway-router-lrp-ifaddr annotation for each node. + for _, n := range nodes { + gomega.Eventually(func() error { + updatedNode, err := fakeClient.KubeClient.CoreV1().Nodes().Get(context.TODO(), n.Name, metav1.GetOptions{}) + if err != nil { + return err + } + + gwLRPAddrs, err := util.ParseNodeGatewayRouterJoinAddrs(updatedNode, ovntypes.DefaultNetworkName) + if err != nil { + return err + } + gomega.Expect(gwLRPAddrs).NotTo(gomega.BeNil()) + gomega.Expect(gwLRPAddrs).To(gomega.HaveLen(2)) + + // Store the node 3's gw router port addresses + if updatedNode.Name == "node3" { + node3GWRPAnnotation = updatedNode.Annotations[util.OVNNodeGRLRPAddrs] + } + return nil + }).ShouldNot(gomega.HaveOccurred()) + } + + // stop the cluster manager. + clusterManager.Stop() + wg1.Wait() + + updatedNodes := []corev1.Node{} + + for _, n := range nodes { + updatedNode, _ := fakeClient.KubeClient.CoreV1().Nodes().Get(context.TODO(), n.Name, metav1.GetOptions{}) + if updatedNode.Name == "node3" { + // Change the id of node3 duplicate. + updatedNode.Annotations[ovnNodeIDAnnotaton] = "50" + } + updatedNodes = append(updatedNodes, *updatedNode) + } + + // Close the watch factory and create a new one + f.Shutdown() + kubeFakeClient = fake.NewSimpleClientset(&corev1.NodeList{ + Items: updatedNodes, + }) + fakeClient = &util.OVNClusterManagerClientset{ + KubeClient: kubeFakeClient, + } + f, err = factory.NewClusterManagerWatchFactory(fakeClient) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + err = f.Start() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + + // Start a new cluster manager + cm2, err := NewClusterManager(fakeClient, f, "cm2", nil) + gomega.Expect(cm2).NotTo(gomega.BeNil()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + err = cm2.Start(ctx.Context) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + defer cm2.Stop() + + gomega.Eventually(func() error { + updatedNode, err := fakeClient.KubeClient.CoreV1().Nodes().Get(context.TODO(), "node3", metav1.GetOptions{}) + if err != nil { + return err + } + + node3UpdatedGWRPAnnotation := updatedNode.Annotations[util.OVNNodeGRLRPAddrs] + gomega.Expect(node3UpdatedGWRPAnnotation).NotTo(gomega.Equal(node3GWRPAnnotation)) + + gwLRPAddrs, err := util.ParseNodeGatewayRouterJoinAddrs(updatedNode, ovntypes.DefaultNetworkName) + if err != nil { + return err + } + gomega.Expect(gwLRPAddrs).NotTo(gomega.BeNil()) + gomega.Expect(gwLRPAddrs).To(gomega.HaveLen(2)) + return nil + }).ShouldNot(gomega.HaveOccurred()) + return nil + } + + err := app.Run([]string{ + app.Name, + "-cluster-subnets=" + clusterCIDR + "," + clusterv6CIDR, + "-k8s-service-cidr=10.96.0.0/16,fd00:10:96::/112", + }) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) }) ginkgo.Context("Transit switch port IP allocations", func() { @@ -1201,102 +1436,4 @@ var _ = ginkgo.Describe("Cluster Manager", func() { }) }) - ginkgo.Context("starting the cluster manager", func() { - const networkName = "default" - - var fakeClient *util.OVNClusterManagerClientset - - ginkgo.BeforeEach(func() { - fakeClient = util.GetOVNClientset().GetClusterManagerClientset() - }) - - ginkgo.When("the required features are not enabled", func() { - ginkgo.It("does *not* automatically provision a NAD for the default network", func() { - app.Action = func(ctx *cli.Context) error { - _, err := config.InitConfig(ctx, nil, nil) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - f, err = factory.NewClusterManagerWatchFactory(fakeClient) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - clusterMngr, err := clusterManager(fakeClient, f) - gomega.Expect(clusterMngr).NotTo(gomega.BeNil()) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - gomega.Expect(clusterMngr.Start(ctx.Context)).To(gomega.Succeed()) - - _, err = fakeClient.NetworkAttchDefClient. - K8sCniCncfIoV1(). - NetworkAttachmentDefinitions(config.Kubernetes.OVNConfigNamespace). - Get( - context.Background(), - networkName, - metav1.GetOptions{}, - ) - gomega.Expect(err).To( - gomega.MatchError("network-attachment-definitions.k8s.cni.cncf.io \"default\" not found"), - ) - - return nil - } - gomega.Expect(app.Run([]string{app.Name})).To(gomega.Succeed()) - }) - }) - - ginkgo.When("the multi-network, network-segmentation, and preconfigured-udn-addresses features are enabled", func() { - ginkgo.BeforeEach(func() { - config.OVNKubernetesFeature.EnableMultiNetwork = true - config.OVNKubernetesFeature.EnableNetworkSegmentation = true - config.OVNKubernetesFeature.EnablePreconfiguredUDNAddresses = true - }) - - ginkgo.It("automatically provisions a NAD for the default network", func() { - app.Action = func(ctx *cli.Context) error { - _, err := config.InitConfig(ctx, nil, nil) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - f, err = factory.NewClusterManagerWatchFactory(fakeClient) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - clusterMngr, err := clusterManager(fakeClient, f) - gomega.Expect(clusterMngr).NotTo(gomega.BeNil()) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - c, cancel := context.WithCancel(ctx.Context) - defer cancel() - gomega.Expect(clusterMngr.Start(c)).To(gomega.Succeed()) - defer clusterMngr.Stop() - - nad, err := fakeClient.NetworkAttchDefClient. - K8sCniCncfIoV1(). - NetworkAttachmentDefinitions(config.Kubernetes.OVNConfigNamespace). - Get( - context.Background(), - networkName, - metav1.GetOptions{}, - ) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - const expectedNADContents = `{"cniVersion": "0.4.0", "name": "ovn-kubernetes", "type": "ovn-k8s-cni-overlay"}` - gomega.Expect(nad.Spec.Config).To(gomega.Equal(expectedNADContents)) - - return nil - } - gomega.Expect(app.Run([]string{app.Name})).To(gomega.Succeed()) - }) - }) - }) - }) - -func clusterManager(client *util.OVNClusterManagerClientset, f *factory.WatchFactory) (*ClusterManager, error) { - if err := f.Start(); err != nil { - return nil, fmt.Errorf("failed to start the CM watch factory: %w", err) - } - - clusterMngr, err := NewClusterManager(client, f, "identity", nil) - if err != nil { - return nil, fmt.Errorf("failed to start the CM watch factory: %w", err) - } - - return clusterMngr, nil -} diff --git a/go-controller/pkg/clustermanager/egressip_controller.go b/go-controller/pkg/clustermanager/egressip_controller.go index 4cbd00d18f..65eae9c3ca 100644 --- a/go-controller/pkg/clustermanager/egressip_controller.go +++ b/go-controller/pkg/clustermanager/egressip_controller.go @@ -615,13 +615,9 @@ func checkEgressNodesReachabilityIterate(eIPC *egressIPClusterController) { nodeToAdd, err := eIPC.watchFactory.GetNode(nodeName) if err != nil { klog.Errorf("Node: %s is detected as reachable and ready again, but could not re-assign egress IPs, err: %v", nodeName, err) - continue - } - if err := eIPC.retryEgressNodes.AddRetryObjWithAddNoBackoff(nodeToAdd); err != nil { + } else if err := eIPC.retryEgressNodes.AddRetryObjWithAddNoBackoff(nodeToAdd); err != nil { klog.Errorf("Node: %s is detected as reachable and ready again, but could not re-assign egress IPs, err: %v", nodeName, err) - continue } - eIPC.retryEgressNodes.RequestRetryObjs() } } } diff --git a/go-controller/pkg/clustermanager/egressip_controller_test.go b/go-controller/pkg/clustermanager/egressip_controller_test.go index 7f47c2d25d..b505c651b2 100644 --- a/go-controller/pkg/clustermanager/egressip_controller_test.go +++ b/go-controller/pkg/clustermanager/egressip_controller_test.go @@ -5,7 +5,6 @@ import ( "fmt" "net" "strconv" - "sync" "time" "github.com/onsi/ginkgo/v2" @@ -37,18 +36,13 @@ type fakeEgressIPHealthClient struct { Connected bool ProbeCount int FakeProbeFailure bool - mutex sync.Mutex } func (fehc *fakeEgressIPHealthClient) IsConnected() bool { - fehc.mutex.Lock() - defer fehc.mutex.Unlock() return fehc.Connected } func (fehc *fakeEgressIPHealthClient) Connect(context.Context, []net.IP, int) bool { - fehc.mutex.Lock() - defer fehc.mutex.Unlock() if fehc.FakeProbeFailure { return false } @@ -57,15 +51,11 @@ func (fehc *fakeEgressIPHealthClient) Connect(context.Context, []net.IP, int) bo } func (fehc *fakeEgressIPHealthClient) Disconnect() { - fehc.mutex.Lock() - defer fehc.mutex.Unlock() fehc.Connected = false fehc.ProbeCount = 0 } func (fehc *fakeEgressIPHealthClient) Probe(context.Context) bool { - fehc.mutex.Lock() - defer fehc.mutex.Unlock() if fehc.Connected && !fehc.FakeProbeFailure { fehc.ProbeCount++ return true @@ -73,18 +63,6 @@ func (fehc *fakeEgressIPHealthClient) Probe(context.Context) bool { return false } -func (fehc *fakeEgressIPHealthClient) getProbeCount() int { - fehc.mutex.Lock() - defer fehc.mutex.Unlock() - return fehc.ProbeCount -} - -func (fehc *fakeEgressIPHealthClient) setFakeProbeFailure(probeFailure bool) { - fehc.mutex.Lock() - defer fehc.mutex.Unlock() - fehc.FakeProbeFailure = probeFailure -} - type fakeEgressIPHealthClientAllocator struct{} func (f *fakeEgressIPHealthClientAllocator) allocate(string) healthcheck.EgressIPHealthClient { @@ -1144,26 +1122,26 @@ var _ = ginkgo.Describe("OVN cluster-manager EgressIP Operations", func() { if !prevNodeIsConnected && !currNodeIsConnected { // Not connected (before and after): no probes should be successful - gomega.Expect(hcc.getProbeCount()).To(gomega.Equal(prevProbes), desc) + gomega.Expect(hcc.ProbeCount).To(gomega.Equal(prevProbes), desc) } else if prevNodeIsConnected && currNodeIsConnected { if failProbes { // Still connected, but no probes should be successful - gomega.Expect(prevProbes).To(gomega.Equal(hcc.getProbeCount()), desc) + gomega.Expect(prevProbes).To(gomega.Equal(hcc.ProbeCount), desc) } else { // Still connected and probe counters should be going up - gomega.Expect(prevProbes).To(gomega.BeNumerically("<", hcc.getProbeCount()), desc) + gomega.Expect(prevProbes).To(gomega.BeNumerically("<", hcc.ProbeCount), desc) } } } for _, tt := range tests { - hcc1.setFakeProbeFailure(tt.node1FailProbes) - hcc2.setFakeProbeFailure(tt.node2FailProbes) + hcc1.FakeProbeFailure = tt.node1FailProbes + hcc2.FakeProbeFailure = tt.node2FailProbes prevNode1IsConnected := hcc1.IsConnected() prevNode2IsConnected := hcc2.IsConnected() - prevNode1Probes := hcc1.getProbeCount() - prevNode2Probes := hcc2.getProbeCount() + prevNode1Probes := hcc1.ProbeCount + prevNode2Probes := hcc2.ProbeCount if tt.tcPrepareFunc != nil { tt.tcPrepareFunc(hcc1, hcc2) @@ -1708,12 +1686,12 @@ var _ = ginkgo.Describe("OVN cluster-manager EgressIP Operations", func() { egressIPs, _ := getEgressIPStatus(eIP1.Name) gomega.Expect(egressIPs[0]).To(gomega.Equal(egressIP)) hcClient := fakeClusterManagerOVN.eIPC.nodeAllocator.cache[node.Name].healthClient.(*fakeEgressIPHealthClient) - hcClient.setFakeProbeFailure(true) + hcClient.FakeProbeFailure = true // explicitly call check reachability, periodic checker is not active checkEgressNodesReachabilityIterate(fakeClusterManagerOVN.eIPC) gomega.Eventually(getEgressIPStatusLen(eIP1.Name)).Should(gomega.Equal(0)) - hcClient.setFakeProbeFailure(false) + hcClient.FakeProbeFailure = false node.Annotations["test"] = "dummy" _, err = fakeClusterManagerOVN.fakeClient.KubeClient.CoreV1().Nodes().Update(context.TODO(), &node, metav1.UpdateOptions{}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) diff --git a/go-controller/pkg/clustermanager/network_cluster_controller.go b/go-controller/pkg/clustermanager/network_cluster_controller.go index f8241aadca..ef2ac665ae 100644 --- a/go-controller/pkg/clustermanager/network_cluster_controller.go +++ b/go-controller/pkg/clustermanager/network_cluster_controller.go @@ -16,7 +16,6 @@ import ( cache "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/retry" - k8snodeutil "k8s.io/component-helpers/node/util" "k8s.io/klog/v2" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/id" @@ -577,10 +576,7 @@ func (h *networkClusterControllerEventHandler) UpdateResource(oldObj, newObj int // 1. we missed an add event (bug in kapi informer code) // 2. a user removed the annotation on the node // Either way to play it safe for now do a partial json unmarshal check - _, nodeCondition := k8snodeutil.GetNodeCondition(&newNode.Status, corev1.NodeNetworkUnavailable) - nodeNetworkUnavailable := nodeCondition != nil && nodeCondition.Status == corev1.ConditionTrue - if !nodeFailed && util.NoHostSubnet(oldNode) == util.NoHostSubnet(newNode) && - !h.ncc.nodeAllocator.NeedsNodeAllocation(newNode) && !nodeNetworkUnavailable { + if !nodeFailed && util.NoHostSubnet(oldNode) == util.NoHostSubnet(newNode) && !h.ncc.nodeAllocator.NeedsNodeAllocation(newNode) { // no other node updates would require us to reconcile again return nil } @@ -781,22 +777,22 @@ func newIPAllocatorForNetwork(netInfo util.NetInfo) (subnet.Allocator, error) { subnets := netInfo.Subnets() ipNets := make([]*net.IPNet, 0, len(subnets)) - excludeSubnets := append(netInfo.ExcludeSubnets(), netInfo.InfrastructureSubnets()...) - + excludeSubnets := netInfo.ExcludeSubnets() for _, subnet := range subnets { ipNets = append(ipNets, subnet.CIDR) + if isLayer2UserDefinedPrimaryNetwork(netInfo) { + excludeSubnets = append( + excludeSubnets, + autoExcludeCIDRs(subnet.CIDR)..., + ) + } } - if isLayer2UserDefinedPrimaryNetwork(netInfo) && len(netInfo.InfrastructureSubnets()) == 0 { - excludeSubnets = append(excludeSubnets, infrastructureExcludeCIDRs(netInfo)...) - } - - if err := ipAllocator.AddOrUpdateSubnet(subnet.SubnetConfig{ - Name: netInfo.GetNetworkName(), - Subnets: ipNets, - ReservedSubnets: netInfo.ReservedSubnets(), - ExcludeSubnets: excludeSubnets, - }); err != nil { + if err := ipAllocator.AddOrUpdateSubnet( + netInfo.GetNetworkName(), + ipNets, + excludeSubnets..., + ); err != nil { return nil, err } @@ -807,17 +803,11 @@ func isLayer2UserDefinedPrimaryNetwork(netInfo util.NetInfo) bool { return netInfo.IsPrimaryNetwork() && netInfo.TopologyType() == types.Layer2Topology } -// infrastructureExcludeCIDRs returns a list of IPs that should be excluded from IP allocation (gateway and management port IPs) -func infrastructureExcludeCIDRs(netInfo util.NetInfo) []*net.IPNet { - var excludeCIDRs []*net.IPNet - - for _, subnet := range netInfo.Subnets() { - gwIP := netInfo.GetNodeGatewayIP(subnet.CIDR).IP - mgmtPortIP := netInfo.GetNodeManagementIP(subnet.CIDR).IP - excludeCIDRs = append(excludeCIDRs, - &net.IPNet{IP: gwIP, Mask: util.GetIPFullMask(gwIP)}, - &net.IPNet{IP: mgmtPortIP, Mask: util.GetIPFullMask(mgmtPortIP)}, - ) +func autoExcludeCIDRs(subnet *net.IPNet) []*net.IPNet { + gwIP := util.GetNodeGatewayIfAddr(subnet).IP + mgmtPortIP := util.GetNodeManagementIfAddr(subnet).IP + return []*net.IPNet{ + {IP: gwIP, Mask: util.GetIPFullMask(gwIP)}, + {IP: mgmtPortIP, Mask: util.GetIPFullMask(mgmtPortIP)}, } - return excludeCIDRs } diff --git a/go-controller/pkg/clustermanager/node/node_allocator.go b/go-controller/pkg/clustermanager/node/node_allocator.go index ab4f950035..83c3d80fde 100644 --- a/go-controller/pkg/clustermanager/node/node_allocator.go +++ b/go-controller/pkg/clustermanager/node/node_allocator.go @@ -4,6 +4,9 @@ import ( "fmt" "net" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" listers "k8s.io/client-go/listers/core/v1" @@ -15,6 +18,7 @@ import ( houtil "github.com/ovn-org/ovn-kubernetes/go-controller/hybrid-overlay/pkg/util" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/id" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" + ipgenerator "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/ip" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" @@ -35,6 +39,9 @@ type NodeAllocator struct { idAllocator id.Allocator clusterSubnetAllocator SubnetAllocator hybridOverlaySubnetAllocator SubnetAllocator + // node gateway router port IP generators (connecting to the join switch) + nodeGWRouterLRPIPv4Generator *ipgenerator.IPGenerator + nodeGWRouterLRPIPv6Generator *ipgenerator.IPGenerator // unique id of the network networkID int @@ -68,10 +75,27 @@ func NewNodeAllocator(networkID int, netInfo util.NetInfo, nodeLister listers.No } func (na *NodeAllocator) Init() error { + if na.hasJoinSubnetAllocation() { + if config.IPv4Mode { + nodeGWRouterLRPIPv4Generator, err := ipgenerator.NewIPGenerator(na.netInfo.JoinSubnetV4().String()) + if err != nil { + return fmt.Errorf("error creating IP Generator for v4 join subnet %s: %w", na.netInfo.JoinSubnetV4().String(), err) + } + na.nodeGWRouterLRPIPv4Generator = nodeGWRouterLRPIPv4Generator + } + + if config.IPv6Mode { + nodeGWRouterLRPIPv6Generator, err := ipgenerator.NewIPGenerator(na.netInfo.JoinSubnetV6().String()) + if err != nil { + return fmt.Errorf("error creating IP Generator for v6 join subnet %s: %w", na.netInfo.JoinSubnetV6().String(), err) + } + na.nodeGWRouterLRPIPv6Generator = nodeGWRouterLRPIPv6Generator + } + } + if !na.hasNodeSubnetAllocation() { return nil } - na.CleanupStaleAnnotation() clusterSubnets := na.netInfo.Subnets() @@ -97,31 +121,6 @@ func (na *NodeAllocator) Init() error { return nil } -// CleanupStaleAnnotation cleans up the stale annotations on all nodes. -// If an error occurs, it logs the error and continues to the next node. -func (na *NodeAllocator) CleanupStaleAnnotation() { - // only cleanup once with the default network NodeAllocator - if !na.netInfo.IsDefault() { - return - } - existingNodes, err := na.nodeLister.List(labels.Everything()) - if err != nil { - klog.Errorf("Error in retrieving the nodes: %v", err) - return - } - - for _, node := range existingNodes { - if _, ok := node.Annotations[util.OVNNodeGRLRPAddrs]; !ok { - continue - } - // to cleanup an annotation, set it to nil - if err = na.kube.SetAnnotationsOnNode(node.Name, map[string]interface{}{util.OVNNodeGRLRPAddrs: nil}); err != nil { - klog.Warningf("Failed to clear node %s annotation %s: %v", - node.Name, util.OVNNodeGRLRPAddrs, err) - } - } -} - func (na *NodeAllocator) hasHybridOverlayAllocation() bool { // When config.HybridOverlay.ClusterSubnets is empty, assume the subnet allocation will be managed by an external component. return config.HybridOverlay.Enabled && !na.netInfo.IsSecondary() && len(config.HybridOverlay.ClusterSubnets) > 0 @@ -201,6 +200,11 @@ func (na *NodeAllocator) NeedsNodeAllocation(node *corev1.Node) bool { return true } } + if na.hasJoinSubnetAllocation() { + if !util.HasNodeGatewayRouterJoinNetwork(node, na.netInfo.GetNetworkName()) { + return true + } + } if util.IsNetworkSegmentationSupportEnabled() && na.netInfo.IsPrimaryNetwork() && util.DoesNetworkRequireTunnelIDs(na.netInfo) { if !util.HasUDNLayer2NodeGRLRPTunnelID(node, na.netInfo.GetNetworkName()) { @@ -263,7 +267,47 @@ func (na *NodeAllocator) syncNodeNetworkAnnotations(node *corev1.Node) error { } updatedSubnetsMap := map[string][]*net.IPNet{} - var validExistingSubnets, allocatedSubnets []*net.IPNet + var validExistingSubnets, allocatedSubnets, allocatedJoinSubnets []*net.IPNet + if na.hasJoinSubnetAllocation() { + var joinAddr []*net.IPNet + existingSubnets, err := util.ParseNodeGatewayRouterJoinAddrs(node, networkName) + if err != nil && !util.IsAnnotationNotSetError(err) { + // Log the error and try to allocate new subnets + klog.Warningf("Failed to get node %s join subnets annotations for network %s: %v", node.Name, networkName, err) + } + // Allocate the IP address(es) for the node Gateway router port connecting + // to the Join switch + nodeID := util.GetNodeID(node) + if nodeID == -1 { + // Don't consider this node as cluster-manager has not allocated node id yet. + return fmt.Errorf("failed to get node id for node - %s", node.Name) + } + + if config.IPv4Mode { + joinV4Addr, err := na.nodeGWRouterLRPIPv4Generator.GenerateIP(nodeID) + if err != nil { + return fmt.Errorf("failed to generate gateway router port IPv4 address for node %s : err - %w", node.Name, err) + } + joinAddr = append(joinAddr, joinV4Addr) + } + + if config.IPv6Mode { + joinV6Addr, err := na.nodeGWRouterLRPIPv6Generator.GenerateIP(nodeID) + if err != nil { + return fmt.Errorf("failed to generate gateway router port IPv6 address for node %s : err - %w", node.Name, err) + } + joinAddr = append(joinAddr, joinV6Addr) + } + // If the existing subnets weren't OK, or new ones were allocated, update the node annotation. + // This happens in a couple cases: + // 1) new node: no existing subnets and one or more new subnets were allocated + // 2) dual-stack/single-stack conversion: two existing subnets but only one will be valid, and no allocated subnets + // 3) bad subnet annotation: one more existing subnets will be invalid and might have allocated a correct one; let us reset it + lessIPNet := func(a, b net.IPNet) bool { return a.String() < b.String() } + if !cmp.Equal(existingSubnets, joinAddr, cmpopts.SortSlices(lessIPNet)) { + allocatedJoinSubnets = joinAddr + } + } if na.hasNodeSubnetAllocation() { existingSubnets, err := util.ParseNodeHostSubnetAnnotation(node, networkName) if err != nil && !util.IsAnnotationNotSetError(err) { @@ -322,8 +366,8 @@ func (na *NodeAllocator) syncNodeNetworkAnnotations(node *corev1.Node) error { } // Also update the node annotation if the networkID doesn't match - if len(updatedSubnetsMap) > 0 || networkID != types.NoNetworkID || newTunnelID != types.NoTunnelID { - err = na.updateNodeNetworkAnnotationsWithRetry(node.Name, updatedSubnetsMap, networkID, newTunnelID) + if len(updatedSubnetsMap) > 0 || networkID != types.NoNetworkID || len(allocatedJoinSubnets) > 0 || newTunnelID != types.NoTunnelID { + err = na.updateNodeNetworkAnnotationsWithRetry(node.Name, updatedSubnetsMap, networkID, newTunnelID, allocatedJoinSubnets) if err != nil { if errR := na.clusterSubnetAllocator.ReleaseNetworks(node.Name, allocatedSubnets...); errR != nil { klog.Warningf("Error releasing node %s subnets: %v", node.Name, errR) @@ -406,7 +450,7 @@ func (na *NodeAllocator) Sync(nodes []interface{}) error { } // updateNodeNetworkAnnotationsWithRetry will update the node's subnet annotation and network id annotation -func (na *NodeAllocator) updateNodeNetworkAnnotationsWithRetry(nodeName string, hostSubnetsMap map[string][]*net.IPNet, networkId, tunnelID int) error { +func (na *NodeAllocator) updateNodeNetworkAnnotationsWithRetry(nodeName string, hostSubnetsMap map[string][]*net.IPNet, networkId, tunnelID int, joinAddr []*net.IPNet) error { // Retry if it fails because of potential conflict which is transient. Return error in the // case of other errors (say temporary API server down), and it will be taken care of by the // retry mechanism. @@ -428,6 +472,11 @@ func (na *NodeAllocator) updateNodeNetworkAnnotationsWithRetry(nodeName string, networkName := na.netInfo.GetNetworkName() + cnode.Annotations, err = util.UpdateNodeGatewayRouterLRPAddrsAnnotation(cnode.Annotations, joinAddr, networkName) + if err != nil { + return fmt.Errorf("failed to update node %q annotation LRPAddrAnnotation %s: %w", + node.Name, util.JoinIPNets(joinAddr, ","), err) + } if networkId != types.NoNetworkID { cnode.Annotations, err = util.UpdateNetworkIDAnnotation(cnode.Annotations, networkName, networkId) if err != nil { @@ -472,7 +521,7 @@ func (na *NodeAllocator) Cleanup() error { hostSubnetsMap := map[string][]*net.IPNet{networkName: nil} // passing util.InvalidID deletes the network/tunnel id annotation for the network. - err = na.updateNodeNetworkAnnotationsWithRetry(node.Name, hostSubnetsMap, types.InvalidID, types.InvalidID) + err = na.updateNodeNetworkAnnotationsWithRetry(node.Name, hostSubnetsMap, types.InvalidID, types.InvalidID, nil) if err != nil { return fmt.Errorf("failed to clear node %q subnet annotation for network %s", node.Name, networkName) @@ -598,6 +647,11 @@ func (na *NodeAllocator) hasNodeSubnetAllocation() bool { return na.netInfo.TopologyType() == types.Layer3Topology || !na.netInfo.IsSecondary() } +func (na *NodeAllocator) hasJoinSubnetAllocation() bool { + // we allocate join subnets for L3/L2 primary user defined networks or default network + return na.netInfo.IsDefault() || (util.IsNetworkSegmentationSupportEnabled() && na.netInfo.IsPrimaryNetwork()) +} + func (na *NodeAllocator) markAllocatedNetworksForUnmanagedHONode(node *corev1.Node) error { hostSubnet, err := houtil.ParseHybridOverlayHostSubnet(node) if err != nil { diff --git a/go-controller/pkg/clustermanager/node/node_allocator_test.go b/go-controller/pkg/clustermanager/node/node_allocator_test.go index 37fee60d64..01064ff50b 100644 --- a/go-controller/pkg/clustermanager/node/node_allocator_test.go +++ b/go-controller/pkg/clustermanager/node/node_allocator_test.go @@ -1,7 +1,6 @@ package node import ( - "context" "fmt" "net" "reflect" @@ -11,13 +10,11 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/cache" ovncnitypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/cni/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" ovntest "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" @@ -291,7 +288,6 @@ func TestController_allocateNodeSubnets(t *testing.T) { na := &NodeAllocator{ netInfo: netInfo, clusterSubnetAllocator: NewSubnetAllocator(), - nodeLister: newFakeNodeLister([]*corev1.Node{}), } if err := na.Init(); err != nil { @@ -407,44 +403,3 @@ func newFakeNodeLister(nodes []*corev1.Node) v1.NodeLister { } return v1.NewNodeLister(indexer) } - -func TestController_CleanupStaleAnnotation(t *testing.T) { - // create a node with an annotation that shouldn't be changed and one that should be cleaned up. - newNode := &corev1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Name: "node1", - Annotations: map[string]string{"leave-me": "value", util.OVNNodeGRLRPAddrs: "remove-me"}, - }, - } - fakeClient := fake.NewClientset(newNode) - kube := &kube.Kube{ - KClient: fakeClient, - } - - netInfo, err := util.NewNetInfo( - &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: types.DefaultNetworkName}, - }, - ) - if err != nil { - t.Fatal(err) - } - - na := &NodeAllocator{ - nodeLister: newFakeNodeLister([]*corev1.Node{newNode}), - kube: kube, - netInfo: netInfo, - } - na.CleanupStaleAnnotation() - nodes, err := fakeClient.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if len(nodes.Items) != 1 { - t.Fatalf("Expected 1 node, got %d", len(nodes.Items)) - } - // check that unrelated annotation is not changed, and stale one is cleaned up - if !reflect.DeepEqual(nodes.Items[0].Annotations, map[string]string{"leave-me": "value"}) { - t.Fatalf("Expected annotation %s to be cleaned up, got %v", util.OVNNodeGRLRPAddrs, nodes.Items[0].Annotations) - } -} diff --git a/go-controller/pkg/clustermanager/pod/allocator_test.go b/go-controller/pkg/clustermanager/pod/allocator_test.go index 51bab90fc5..24aaafa242 100644 --- a/go-controller/pkg/clustermanager/pod/allocator_test.go +++ b/go-controller/pkg/clustermanager/pod/allocator_test.go @@ -82,7 +82,7 @@ type ipAllocatorStub struct { fullIPPool bool } -func (a *ipAllocatorStub) AddOrUpdateSubnet(_ subnet.SubnetConfig) error { +func (a *ipAllocatorStub) AddOrUpdateSubnet(string, []*net.IPNet, ...*net.IPNet) error { panic("not implemented") // TODO: Implement } diff --git a/go-controller/pkg/clustermanager/routeadvertisements/controller.go b/go-controller/pkg/clustermanager/routeadvertisements/controller.go index cffbb3425e..11f7eb79ab 100644 --- a/go-controller/pkg/clustermanager/routeadvertisements/controller.go +++ b/go-controller/pkg/clustermanager/routeadvertisements/controller.go @@ -593,13 +593,14 @@ func (c *Controller) generateFRRConfiguration( matchedNetworks sets.Set[string], ) (*frrtypes.FRRConfiguration, error) { routers := []frrtypes.Router{} + advertisements := sets.New(ra.Spec.Advertisements...) // go over the source routers for i, router := range source.Spec.BGP.Routers { targetVRF := ra.Spec.TargetVRF var matchedVRF, matchedNetwork string - var advertisePrefixes []string + var receivePrefixes, advertisePrefixes []string // We will use the router if: // - the router VRF matches the target VRF @@ -607,25 +608,33 @@ func (c *Controller) generateFRRConfiguration( // Prepare each scenario with a switch statement and check after that switch { case targetVRF == "auto" && router.VRF == "": - // match on default network/VRF, advertise node prefixes + // match on default network/VRF, advertise node prefixes and receive + // any prefix of default network. matchedVRF = "" matchedNetwork = types.DefaultNetworkName advertisePrefixes = selectedNetworks.hostNetworkSubnets[matchedNetwork] + receivePrefixes = selectedNetworks.networkSubnets[matchedNetwork] case targetVRF == "auto": - // match router.VRF to network.VRF, advertise node prefixes + // match router.VRF to network.VRF, advertise node prefixes and + // receive any prefix of the matched network matchedVRF = router.VRF matchedNetwork = selectedNetworks.networkVRFs[matchedVRF] advertisePrefixes = selectedNetworks.hostNetworkSubnets[matchedNetwork] + receivePrefixes = selectedNetworks.networkSubnets[matchedNetwork] case targetVRF == "": - // match on default network/VRF, advertise node prefixes + // match on default network/VRF, advertise node prefixes and + // receive any prefix of selected networks matchedVRF = "" matchedNetwork = types.DefaultNetworkName advertisePrefixes = selectedNetworks.hostSubnets + receivePrefixes = selectedNetworks.subnets default: - // match router.VRF to network.VRF, advertise node prefixes + // match router.VRF to network.VRF, advertise node prefixes and + // receive any prefix of selected networks matchedVRF = targetVRF matchedNetwork = selectedNetworks.networkVRFs[matchedVRF] advertisePrefixes = selectedNetworks.hostSubnets + receivePrefixes = selectedNetworks.subnets } if matchedVRF != router.VRF || len(advertisePrefixes) == 0 { // either this router VRF does not match the target VRF or we don't @@ -660,6 +669,7 @@ func (c *Controller) generateFRRConfiguration( isIPV6 := utilnet.IsIPv6String(neighbor.Address) advertisePrefixes := util.MatchAllIPNetsStringFamily(isIPV6, advertisePrefixes) + receivePrefixes := util.MatchAllIPNetsStringFamily(isIPV6, receivePrefixes) if len(advertisePrefixes) == 0 { continue } @@ -670,6 +680,22 @@ func (c *Controller) generateFRRConfiguration( Prefixes: advertisePrefixes, }, } + neighbor.ToReceive = frrtypes.Receive{ + Allowed: frrtypes.AllowedInPrefixes{ + Mode: frrtypes.AllowRestricted, + }, + } + if advertisements.Has(ratypes.PodNetwork) { + for _, prefix := range receivePrefixes { + neighbor.ToReceive.Allowed.Prefixes = append(neighbor.ToReceive.Allowed.Prefixes, + frrtypes.PrefixSelector{ + Prefix: prefix, + LE: selectedNetworks.prefixLength[prefix], + GE: selectedNetworks.prefixLength[prefix], + }, + ) + } + } targetRouter.Neighbors = append(targetRouter.Neighbors, neighbor) } if len(targetRouter.Neighbors) == 0 { @@ -925,18 +951,10 @@ func (c *Controller) updateRAStatus(ra *ratypes.RouteAdvertisements, hadUpdates return nil } - var updateStatus bool condition := meta.FindStatusCondition(ra.Status.Conditions, "Accepted") - switch { - case condition == nil: - fallthrough - case condition.ObservedGeneration != ra.Generation: - fallthrough - case (err == nil) != (condition.Status == metav1.ConditionTrue): - fallthrough - case hadUpdates: - updateStatus = true - } + updateStatus := hadUpdates || condition == nil || condition.ObservedGeneration != ra.Generation + updateStatus = updateStatus || err != nil + if !updateStatus { return nil } @@ -990,7 +1008,7 @@ func (c *Controller) getSelectedNADs(networkSelectors apitypes.NetworkSelectors) case apitypes.DefaultNetwork: // if we are selecting the default networkdefault network label, // make sure a NAD exists for it - nad, err := util.EnsureDefaultNetworkNAD(c.nadLister, c.nadClient) + nad, err := c.getOrCreateDefaultNetworkNAD() if err != nil { return nil, fmt.Errorf("failed to get/create default network NAD: %w", err) } @@ -1021,6 +1039,34 @@ func (c *Controller) getSelectedNADs(networkSelectors apitypes.NetworkSelectors) return selected, nil } +// getOrCreateDefaultNetworkNAD ensure that a well-known NAD exists for the +// default network in ovn-k namespace. +func (c *Controller) getOrCreateDefaultNetworkNAD() (*nadtypes.NetworkAttachmentDefinition, error) { + nad, err := c.nadLister.NetworkAttachmentDefinitions(config.Kubernetes.OVNConfigNamespace).Get(types.DefaultNetworkName) + if err != nil && !apierrors.IsNotFound(err) { + return nil, err + } + if nad != nil { + return nad, nil + } + return c.nadClient.K8sCniCncfIoV1().NetworkAttachmentDefinitions(config.Kubernetes.OVNConfigNamespace).Create( + context.Background(), + &nadtypes.NetworkAttachmentDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: types.DefaultNetworkName, + Namespace: config.Kubernetes.OVNConfigNamespace, + }, + Spec: nadtypes.NetworkAttachmentDefinitionSpec{ + Config: fmt.Sprintf("{\"cniVersion\": \"0.4.0\", \"name\": \"ovn-kubernetes\", \"type\": \"%s\"}", config.CNI.Plugin), + }, + }, + // note we don't set ourselves as field manager for this create as we + // want to process the resulting event that would otherwise be filtered + // out in nadNeedsUpdate + metav1.CreateOptions{}, + ) +} + // getEgressIPsByNodesByNetworks iterates all existing egress IPs that apply to // any of the provided networks and returns a "node -> network -> eips" // map. diff --git a/go-controller/pkg/clustermanager/routeadvertisements/controller_test.go b/go-controller/pkg/clustermanager/routeadvertisements/controller_test.go index c03c851808..03e9391888 100644 --- a/go-controller/pkg/clustermanager/routeadvertisements/controller_test.go +++ b/go-controller/pkg/clustermanager/routeadvertisements/controller_test.go @@ -47,7 +47,6 @@ type testRA struct { SelectsDefault bool AdvertisePods bool AdvertiseEgressIPs bool - Status *metav1.ConditionStatus } func (tra testRA) RouteAdvertisements() *ratypes.RouteAdvertisements { @@ -93,9 +92,6 @@ func (tra testRA) RouteAdvertisements() *ratypes.RouteAdvertisements { MatchLabels: tra.FRRConfigurationSelector, } } - if tra.Status != nil { - ra.Status.Conditions = []metav1.Condition{{Type: "Accepted", Status: *tra.Status}} - } return ra } @@ -152,6 +148,7 @@ type testNeighbor struct { ASN uint32 Address string DisableMP *bool + Receive []string Advertise []string } @@ -160,6 +157,11 @@ func (tn testNeighbor) Neighbor() frrapi.Neighbor { ASN: tn.ASN, Address: tn.Address, DisableMP: true, + ToReceive: frrapi.Receive{ + Allowed: frrapi.AllowedInPrefixes{ + Mode: frrapi.AllowRestricted, + }, + }, ToAdvertise: frrapi.Advertise{ Allowed: frrapi.AllowedOutPrefixes{ Mode: frrapi.AllowRestricted, @@ -170,6 +172,31 @@ func (tn testNeighbor) Neighbor() frrapi.Neighbor { if tn.DisableMP != nil { n.DisableMP = *tn.DisableMP } + for _, receive := range tn.Receive { + sep := strings.LastIndex(receive, "/") + if sep == -1 { + continue + } + if isLayer2 := strings.Count(receive, "/") == 1; isLayer2 { + n.ToReceive.Allowed.Prefixes = append(n.ToReceive.Allowed.Prefixes, + frrapi.PrefixSelector{ + Prefix: receive, + }, + ) + continue + } + + first := receive[:sep] + last := receive[sep+1:] + len := ovntest.MustAtoi(last) + n.ToReceive.Allowed.Prefixes = append(n.ToReceive.Allowed.Prefixes, + frrapi.PrefixSelector{ + Prefix: first, + GE: uint32(len), + LE: uint32(len), + }, + ) + } return n } @@ -402,7 +429,7 @@ func TestController_reconcile(t *testing.T) { NodeSelector: map[string]string{"kubernetes.io/hostname": "node"}, Routers: []*testRouter{ {ASN: 1, Prefixes: []string{"1.0.1.1/32", "1.1.0.0/24"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.0.1.1/32", "1.1.0.0/24"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.0.1.1/32", "1.1.0.0/24"}, Receive: []string{"1.1.0.0/16/24"}}, }}, }}, }, @@ -434,8 +461,8 @@ func TestController_reconcile(t *testing.T) { NodeSelector: map[string]string{"kubernetes.io/hostname": "node"}, Routers: []*testRouter{ {ASN: 1, Prefixes: []string{"1.0.1.1/32", "1.1.0.0/24", "fd01::/64", "fd03::ffff:100:101/128"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.0.1.1/32", "1.1.0.0/24"}}, - {ASN: 1, Address: "fd02::ffff:100:64", Advertise: []string{"fd01::/64", "fd03::ffff:100:101/128"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.0.1.1/32", "1.1.0.0/24"}, Receive: []string{"1.1.0.0/16/24"}}, + {ASN: 1, Address: "fd02::ffff:100:64", Advertise: []string{"fd01::/64", "fd03::ffff:100:101/128"}, Receive: []string{"fd01::/48/64"}}, }}, }}, }, @@ -472,7 +499,7 @@ func TestController_reconcile(t *testing.T) { NodeSelector: map[string]string{"kubernetes.io/hostname": "node"}, Routers: []*testRouter{ {ASN: 1, Prefixes: []string{"1.2.0.0/24", "1.3.0.0/24", "1.4.0.0/16", "1.5.0.0/16"}, Imports: []string{"black", "blue", "green", "red"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.2.0.0/24", "1.3.0.0/24", "1.4.0.0/16", "1.5.0.0/16"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.2.0.0/24", "1.3.0.0/24", "1.4.0.0/16", "1.5.0.0/16"}, Receive: []string{"1.2.0.0/16/24", "1.3.0.0/16/24", "1.4.0.0/16", "1.5.0.0/16"}}, }}, {ASN: 1, VRF: "black", Imports: []string{"default"}}, {ASN: 1, VRF: "blue", Imports: []string{"default"}}, @@ -605,7 +632,7 @@ func TestController_reconcile(t *testing.T) { NodeSelector: map[string]string{"kubernetes.io/hostname": "node"}, Routers: []*testRouter{ {ASN: 1, Prefixes: []string{"1.0.1.1/32", "1.1.0.0/24"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.0.1.1/32", "1.1.0.0/24"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.0.1.1/32", "1.1.0.0/24"}, Receive: []string{"1.1.0.0/16/24"}}, }}, }, }, @@ -713,13 +740,13 @@ func TestController_reconcile(t *testing.T) { NodeSelector: map[string]string{"kubernetes.io/hostname": "node1"}, Routers: []*testRouter{ {ASN: 1, Prefixes: []string{"1.1.1.0/24"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.1.1.0/24"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.1.1.0/24"}, Receive: []string{"1.1.0.0/16/24"}}, }}, {ASN: 1, VRF: "red", Prefixes: []string{"1.2.1.0/24"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.2.1.0/24"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.2.1.0/24"}, Receive: []string{"1.2.0.0/16/24"}}, }}, {ASN: 1, VRF: "green", Prefixes: []string{"1.4.0.0/16"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.4.0.0/16"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.4.0.0/16"}, Receive: []string{"1.4.0.0/16"}}, }}, }, }, @@ -729,7 +756,7 @@ func TestController_reconcile(t *testing.T) { NodeSelector: map[string]string{"kubernetes.io/hostname": "node2"}, Routers: []*testRouter{ {ASN: 1, Prefixes: []string{"1.1.2.0/24"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.1.2.0/24"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.1.2.0/24"}, Receive: []string{"1.1.0.0/16/24"}}, }}, }, }, @@ -739,48 +766,16 @@ func TestController_reconcile(t *testing.T) { NodeSelector: map[string]string{"kubernetes.io/hostname": "node2"}, Routers: []*testRouter{ {ASN: 1, VRF: "red", Prefixes: []string{"1.2.2.0/24"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.2.2.0/24"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.2.2.0/24"}, Receive: []string{"1.2.0.0/16/24"}}, }}, {ASN: 1, VRF: "green", Prefixes: []string{"1.4.0.0/16"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.4.0.0/16"}}, + {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.4.0.0/16"}, Receive: []string{"1.4.0.0/16"}}, }}, }, }, }, expectNADAnnotations: map[string]map[string]string{"default": {types.OvnRouteAdvertisementsKey: "[\"ra\"]"}, "red": {types.OvnRouteAdvertisementsKey: "[\"ra\"]"}}, }, - { - name: "reconciles RouteAdvertisements status even when no other updates are required", - ra: &testRA{Name: "ra", AdvertisePods: true, AdvertiseEgressIPs: true, SelectsDefault: true, Status: ptr.To(metav1.ConditionFalse)}, - frrConfigs: []*testFRRConfig{ - { - Name: "frrConfig", - Namespace: frrNamespace, - Routers: []*testRouter{ - {ASN: 1, Prefixes: []string{"1.1.1.0/24"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100"}, - }}, - }, - }, - { - Labels: map[string]string{types.OvnRouteAdvertisementsKey: "ra"}, - Annotations: map[string]string{types.OvnRouteAdvertisementsKey: "ra/frrConfig/node"}, - NodeSelector: map[string]string{"kubernetes.io/hostname": "node"}, - Routers: []*testRouter{ - {ASN: 1, Prefixes: []string{"1.0.1.1/32", "1.1.0.0/24"}, Neighbors: []*testNeighbor{ - {ASN: 1, Address: "1.0.0.100", Advertise: []string{"1.0.1.1/32", "1.1.0.0/24"}}, - }}, - }, - }, - }, - nads: []*testNAD{ - {Name: "default", Namespace: "ovn-kubernetes", Network: "default", Annotations: map[string]string{types.OvnRouteAdvertisementsKey: "[\"ra\"]"}}, - }, - nodes: []*testNode{{Name: "node", SubnetsAnnotation: "{\"default\":\"1.1.0.0/24\"}"}}, - eips: []*testEIP{{Name: "eip", EIPs: map[string]string{"node": "1.0.1.1"}}}, - reconcile: "ra", - expectAcceptedStatus: metav1.ConditionTrue, - }, { name: "fails to reconcile a secondary network", ra: &testRA{Name: "ra", AdvertisePods: true, NetworkSelector: map[string]string{"selected": "true"}}, @@ -1010,6 +1005,11 @@ func TestController_reconcile(t *testing.T) { c := NewController(nm.Interface(), wf, fakeClientset) + // prime the default network NAD + if defaultNAD == nil { + defaultNAD, err = c.getOrCreateDefaultNetworkNAD() + g.Expect(err).ToNot(gomega.HaveOccurred()) + } // prime the default network NAD namespace namespace := &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ @@ -1018,15 +1018,11 @@ func TestController_reconcile(t *testing.T) { } _, err = fakeClientset.KubeClient.CoreV1().Namespaces().Create(context.Background(), namespace, metav1.CreateOptions{}) g.Expect(err).ToNot(gomega.HaveOccurred()) - // prime the default network NAD - if defaultNAD == nil { - defaultNAD, err = util.EnsureDefaultNetworkNAD(c.nadLister, c.nadClient) - g.Expect(err).ToNot(gomega.HaveOccurred()) - // update it with the annotation that network manager would set - defaultNAD.Annotations = map[string]string{types.OvnNetworkNameAnnotation: types.DefaultNetworkName} - _, err = fakeClientset.NetworkAttchDefClient.K8sCniCncfIoV1().NetworkAttachmentDefinitions(defaultNAD.Namespace).Update(context.Background(), defaultNAD, metav1.UpdateOptions{}) - g.Expect(err).ToNot(gomega.HaveOccurred()) - } + + // update it with the annotation that network manager would set + defaultNAD.Annotations = map[string]string{types.OvnNetworkNameAnnotation: types.DefaultNetworkName} + _, err = fakeClientset.NetworkAttchDefClient.K8sCniCncfIoV1().NetworkAttachmentDefinitions(defaultNAD.Namespace).Update(context.Background(), defaultNAD, metav1.UpdateOptions{}) + g.Expect(err).ToNot(gomega.HaveOccurred()) err = wf.Start() g.Expect(err).ToNot(gomega.HaveOccurred()) @@ -1043,13 +1039,7 @@ func TestController_reconcile(t *testing.T) { ) err = nm.Start() - // some test cases start with a bad RA status, avoid asserting - // initial sync in this case as it will fail - if tt.ra == nil || tt.ra.Status == nil || *tt.ra.Status == metav1.ConditionTrue { - g.Expect(err).ToNot(gomega.HaveOccurred()) - } else { - g.Expect(err).To(gomega.HaveOccurred()) - } + g.Expect(err).ToNot(gomega.HaveOccurred()) // we just need the inital sync nm.Stop() diff --git a/go-controller/pkg/clustermanager/userdefinednetwork/controller.go b/go-controller/pkg/clustermanager/userdefinednetwork/controller.go index 10a1fee9dd..e8c1d74a03 100644 --- a/go-controller/pkg/clustermanager/userdefinednetwork/controller.go +++ b/go-controller/pkg/clustermanager/userdefinednetwork/controller.go @@ -15,7 +15,6 @@ import ( netv1lister "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/listers/k8s.cni.cncf.io/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" @@ -38,8 +37,6 @@ import ( userdefinednetworkscheme "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/userdefinednetwork/v1/apis/clientset/versioned/scheme" userdefinednetworkinformer "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/userdefinednetwork/v1/apis/informers/externalversions/userdefinednetwork/v1" userdefinednetworklister "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/userdefinednetwork/v1/apis/listers/userdefinednetwork/v1" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/networkmanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" ) @@ -74,8 +71,6 @@ type Controller struct { // trying to create an object with the same name. createNetworkLock sync.Mutex - networkManager networkmanager.Interface - udnClient userdefinednetworkclientset.Interface udnLister userdefinednetworklister.UserDefinedNetworkLister cudnLister userdefinednetworklister.ClusterUserDefinedNetworkLister @@ -88,6 +83,8 @@ type Controller struct { eventRecorder record.EventRecorder } +const defaultNetworkInUseCheckInterval = 1 * time.Minute + func New( nadClient netv1clientset.Interface, nadInfomer netv1infomer.NetworkAttachmentDefinitionInformer, @@ -95,7 +92,6 @@ func New( udnInformer userdefinednetworkinformer.UserDefinedNetworkInformer, cudnInformer userdefinednetworkinformer.ClusterUserDefinedNetworkInformer, renderNadFn RenderNetAttachDefManifest, - networkManager networkmanager.Interface, podInformer corev1informer.PodInformer, namespaceInformer corev1informer.NamespaceInformer, eventRecorder record.EventRecorder, @@ -103,17 +99,17 @@ func New( udnLister := udnInformer.Lister() cudnLister := cudnInformer.Lister() c := &Controller{ - nadClient: nadClient, - nadLister: nadInfomer.Lister(), - udnClient: udnClient, - udnLister: udnLister, - cudnLister: cudnLister, - renderNadFn: renderNadFn, - podInformer: podInformer, - namespaceInformer: namespaceInformer, - networkManager: networkManager, - namespaceTracker: map[string]sets.Set[string]{}, - eventRecorder: eventRecorder, + nadClient: nadClient, + nadLister: nadInfomer.Lister(), + udnClient: udnClient, + udnLister: udnLister, + cudnLister: cudnLister, + renderNadFn: renderNadFn, + podInformer: podInformer, + namespaceInformer: namespaceInformer, + networkInUseRequeueInterval: defaultNetworkInUseCheckInterval, + namespaceTracker: map[string]sets.Set[string]{}, + eventRecorder: eventRecorder, } udnCfg := &controller.ControllerConfig[userdefinednetworkv1.UserDefinedNetwork]{ RateLimiter: workqueue.DefaultTypedControllerRateLimiter[string](), @@ -153,12 +149,6 @@ func (c *Controller) Run() error { return fmt.Errorf("unable to start user-defined network controller: %v", err) } - if util.IsPreconfiguredUDNAddressesEnabled() { - if _, err := util.EnsureDefaultNetworkNAD(c.nadLister, c.nadClient); err != nil { - return fmt.Errorf("failed to ensure default network nad exists: %w", err) - } - } - return nil } @@ -387,8 +377,7 @@ func (c *Controller) reconcileUDN(key string) error { var networkInUse *networkInUseError if errors.As(syncErr, &networkInUse) { - // Call ReconcileRateLimited directly to ensure retries without the default limits - c.udnController.ReconcileRateLimited(key) + c.udnController.ReconcileAfter(key, c.networkInUseRequeueInterval) return updateStatusErr } @@ -400,33 +389,18 @@ func (c *Controller) syncUserDefinedNetwork(udn *userdefinednetworkv1.UserDefine return nil, nil } - var role, topology string - if udn.Spec.Layer2 != nil { - role = string(udn.Spec.Layer2.Role) - } else if udn.Spec.Layer3 != nil { - role = string(udn.Spec.Layer3.Role) - } - topology = string(udn.Spec.Topology) - if !udn.DeletionTimestamp.IsZero() { // udn is being deleted if controllerutil.ContainsFinalizer(udn, template.FinalizerUserDefinedNetwork) { if err := c.deleteNAD(udn, udn.Namespace); err != nil { return nil, fmt.Errorf("failed to delete NetworkAttachmentDefinition [%s/%s]: %w", udn.Namespace, udn.Name, err) } - // Ensure that the network controller is stopped(GetActiveNetwork returns nil) before allowing the UDN - // to be removed. - if c.networkManager.GetActiveNetwork(util.GenerateUDNNetworkName(udn.Namespace, udn.Name)) != nil { - return nil, &networkInUseError{err: fmt.Errorf("cannot remove UDN, controller for network %s is still running", util.GenerateUDNNetworkName(udn.Namespace, udn.Name))} - } - controllerutil.RemoveFinalizer(udn, template.FinalizerUserDefinedNetwork) udn, err := c.udnClient.K8sV1().UserDefinedNetworks(udn.Namespace).Update(context.Background(), udn, metav1.UpdateOptions{}) if err != nil { return nil, fmt.Errorf("failed to remove finalizer to UserDefinedNetwork: %w", err) } klog.Infof("Finalizer removed from UserDefinedNetworks [%s/%s]", udn.Namespace, udn.Name) - metrics.DecrementUDNCount(role, topology) } return nil, nil @@ -438,7 +412,6 @@ func (c *Controller) syncUserDefinedNetwork(udn *userdefinednetworkv1.UserDefine return nil, fmt.Errorf("failed to add finalizer to UserDefinedNetwork: %w", err) } klog.Infof("Added Finalizer to UserDefinedNetwork [%s/%s]", udn.Namespace, udn.Name) - metrics.IncrementUDNCount(role, topology) } return c.updateNAD(udn, udn.Namespace) @@ -451,34 +424,34 @@ func (c *Controller) updateUserDefinedNetworkStatus(udn *userdefinednetworkv1.Us networkCreatedCondition := newNetworkCreatedCondition(nad, syncError) - updated := meta.SetStatusCondition(&udn.Status.Conditions, *networkCreatedCondition) - if !updated { - return nil - } + conditions, updated := updateCondition(udn.Status.Conditions, networkCreatedCondition) - var err error - conditionsApply := make([]*metaapplyv1.ConditionApplyConfiguration, len(udn.Status.Conditions)) - for i, condition := range udn.Status.Conditions { - conditionsApply[i] = &metaapplyv1.ConditionApplyConfiguration{ - Type: &condition.Type, - Status: &condition.Status, - LastTransitionTime: &condition.LastTransitionTime, - Reason: &condition.Reason, - Message: &condition.Message, + if updated { + var err error + conditionsApply := make([]*metaapplyv1.ConditionApplyConfiguration, len(conditions)) + for i := range conditions { + conditionsApply[i] = &metaapplyv1.ConditionApplyConfiguration{ + Type: &conditions[i].Type, + Status: &conditions[i].Status, + LastTransitionTime: &conditions[i].LastTransitionTime, + Reason: &conditions[i].Reason, + Message: &conditions[i].Message, + } } - } - udnApplyConf := udnapplyconfkv1.UserDefinedNetwork(udn.Name, udn.Namespace). - WithStatus(udnapplyconfkv1.UserDefinedNetworkStatus(). - WithConditions(conditionsApply...)) - opts := metav1.ApplyOptions{FieldManager: "user-defined-network-controller"} - udn, err = c.udnClient.K8sV1().UserDefinedNetworks(udn.Namespace).ApplyStatus(context.Background(), udnApplyConf, opts) - if err != nil { - if apierrors.IsNotFound(err) { - return nil + udnApplyConf := udnapplyconfkv1.UserDefinedNetwork(udn.Name, udn.Namespace). + WithStatus(udnapplyconfkv1.UserDefinedNetworkStatus(). + WithConditions(conditionsApply...)) + opts := metav1.ApplyOptions{FieldManager: "user-defined-network-controller"} + udn, err = c.udnClient.K8sV1().UserDefinedNetworks(udn.Namespace).ApplyStatus(context.Background(), udnApplyConf, opts) + if err != nil { + if apierrors.IsNotFound(err) { + return nil + } + return fmt.Errorf("failed to update UserDefinedNetwork status: %w", err) } - return fmt.Errorf("failed to update UserDefinedNetwork status: %w", err) + klog.Infof("Updated status UserDefinedNetwork [%s/%s]", udn.Namespace, udn.Name) } - klog.Infof("Updated status UserDefinedNetwork [%s/%s]", udn.Namespace, udn.Name) + return nil } @@ -506,6 +479,21 @@ func newNetworkCreatedCondition(nad *netv1.NetworkAttachmentDefinition, syncErro return networkCreatedCondition } +func updateCondition(conditions []metav1.Condition, cond *metav1.Condition) ([]metav1.Condition, bool) { + if len(conditions) == 0 { + return append(conditions, *cond), true + } + + idx := slices.IndexFunc(conditions, func(c metav1.Condition) bool { + return (c.Type == cond.Type) && + (c.Status != cond.Status || c.Reason != cond.Reason || c.Message != cond.Message) + }) + if idx != -1 { + return slices.Replace(conditions, idx, idx+1, *cond), true + } + return conditions, false +} + func (c *Controller) cudnNeedUpdate(_ *userdefinednetworkv1.ClusterUserDefinedNetwork, _ *userdefinednetworkv1.ClusterUserDefinedNetwork) bool { return true } @@ -533,8 +521,7 @@ func (c *Controller) reconcileCUDN(key string) error { var networkInUse *networkInUseError if errors.As(syncErr, &networkInUse) { - // Call ReconcileRateLimited directly to ensure retries without the default limits - c.cudnController.ReconcileRateLimited(key) + c.cudnController.ReconcileAfter(key, c.networkInUseRequeueInterval) return updateStatusErr } @@ -552,16 +539,6 @@ func (c *Controller) syncClusterUDN(cudn *userdefinednetworkv1.ClusterUserDefine cudnName := cudn.Name affectedNamespaces := c.namespaceTracker[cudnName] - var role, topology string - if cudn.Spec.Network.Layer2 != nil { - role = string(cudn.Spec.Network.Layer2.Role) - } else if cudn.Spec.Network.Layer3 != nil { - role = string(cudn.Spec.Network.Layer3.Role) - } else if cudn.Spec.Network.Localnet != nil { - role = string(cudn.Spec.Network.Localnet.Role) - } - topology = string(cudn.Spec.Network.Topology) - if !cudn.DeletionTimestamp.IsZero() { if controllerutil.ContainsFinalizer(cudn, template.FinalizerUserDefinedNetwork) { var errs []error @@ -578,12 +555,6 @@ func (c *Controller) syncClusterUDN(cudn *userdefinednetworkv1.ClusterUserDefine return nil, errors.Join(errs...) } - // Ensure that the network controller is stopped(GetActiveNetwork returns nil) before allowing the cUDN - // to be removed. - if c.networkManager.GetActiveNetwork(util.GenerateCUDNNetworkName(cudn.Name)) != nil { - return nil, &networkInUseError{err: fmt.Errorf("cannot remove cluster UDN, controller for network %s is still running", util.GenerateCUDNNetworkName(cudn.Name))} - } - var err error controllerutil.RemoveFinalizer(cudn, template.FinalizerUserDefinedNetwork) cudn, err = c.udnClient.K8sV1().ClusterUserDefinedNetworks().Update(context.Background(), cudn, metav1.UpdateOptions{}) @@ -593,7 +564,6 @@ func (c *Controller) syncClusterUDN(cudn *userdefinednetworkv1.ClusterUserDefine } klog.Infof("Finalizer removed from ClusterUserDefinedNetwork %q", cudn.Name) delete(c.namespaceTracker, cudnName) - metrics.DecrementCUDNCount(role, topology) } return nil, nil @@ -611,7 +581,6 @@ func (c *Controller) syncClusterUDN(cudn *userdefinednetworkv1.ClusterUserDefine return nil, fmt.Errorf("failed to add finalizer to ClusterUserDefinedNetwork %q: %w", cudnName, err) } klog.Infof("Added Finalizer to ClusterUserDefinedNetwork %q", cudnName) - metrics.IncrementCUDNCount(role, topology) } selectedNamespaces, err := c.getSelectedNamespaces(cudn.Spec.NamespaceSelector) @@ -673,18 +642,18 @@ func (c *Controller) updateClusterUDNStatus(cudn *userdefinednetworkv1.ClusterUs networkCreatedCondition := newClusterNetworCreatedCondition(nads, syncError) - updated := meta.SetStatusCondition(&cudn.Status.Conditions, networkCreatedCondition) + conditions, updated := updateCondition(cudn.Status.Conditions, networkCreatedCondition) if !updated { return nil } - conditionsApply := make([]*metaapplyv1.ConditionApplyConfiguration, len(cudn.Status.Conditions)) - for i, condition := range cudn.Status.Conditions { + conditionsApply := make([]*metaapplyv1.ConditionApplyConfiguration, len(conditions)) + for i := range conditions { conditionsApply[i] = &metaapplyv1.ConditionApplyConfiguration{ - Type: &condition.Type, - Status: &condition.Status, - LastTransitionTime: &condition.LastTransitionTime, - Reason: &condition.Reason, - Message: &condition.Message, + Type: &conditions[i].Type, + Status: &conditions[i].Status, + LastTransitionTime: &conditions[i].LastTransitionTime, + Reason: &conditions[i].Reason, + Message: &conditions[i].Message, } } var err error @@ -705,7 +674,7 @@ func (c *Controller) updateClusterUDNStatus(cudn *userdefinednetworkv1.ClusterUs return nil } -func newClusterNetworCreatedCondition(nads []netv1.NetworkAttachmentDefinition, syncError error) metav1.Condition { +func newClusterNetworCreatedCondition(nads []netv1.NetworkAttachmentDefinition, syncError error) *metav1.Condition { var namespaces []string for _, nad := range nads { namespaces = append(namespaces, nad.Namespace) @@ -713,7 +682,7 @@ func newClusterNetworCreatedCondition(nads []netv1.NetworkAttachmentDefinition, affectedNamespaces := strings.Join(namespaces, ", ") now := metav1.Now() - condition := metav1.Condition{ + condition := &metav1.Condition{ Type: conditionTypeNetworkCreated, Status: metav1.ConditionTrue, Reason: "NetworkAttachmentDefinitionCreated", diff --git a/go-controller/pkg/clustermanager/userdefinednetwork/controller_helper.go b/go-controller/pkg/clustermanager/userdefinednetwork/controller_helper.go index 735b0afea2..50c74ec286 100644 --- a/go-controller/pkg/clustermanager/userdefinednetwork/controller_helper.go +++ b/go-controller/pkg/clustermanager/userdefinednetwork/controller_helper.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "reflect" - "strings" netv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" @@ -77,24 +76,12 @@ func (c *Controller) updateNAD(obj client.Object, namespace string) (*netv1.Netw return nil, fmt.Errorf("foreign NetworkAttachmentDefinition with the desired name already exist [%s/%s]", nadCopy.Namespace, nadCopy.Name) } - // NAD update path, need to merge internal (k8s.ovn.org) current annotations with desired - for k, v := range nadCopy.Annotations { - if strings.HasPrefix(k, types.OvnK8sPrefix) { - if desiredNAD.Annotations == nil { - desiredNAD.Annotations = make(map[string]string) - } - desiredNAD.Annotations[k] = v - } - } - - if reflect.DeepEqual(nadCopy.Spec.Config, desiredNAD.Spec.Config) && reflect.DeepEqual(nadCopy.ObjectMeta.Labels, desiredNAD.ObjectMeta.Labels) && - reflect.DeepEqual(desiredNAD.Annotations, nadCopy.Annotations) { + if reflect.DeepEqual(nadCopy.Spec.Config, desiredNAD.Spec.Config) && reflect.DeepEqual(nadCopy.ObjectMeta.Labels, desiredNAD.ObjectMeta.Labels) { return nadCopy, nil } nadCopy.Spec.Config = desiredNAD.Spec.Config nadCopy.ObjectMeta.Labels = desiredNAD.ObjectMeta.Labels - nadCopy.Annotations = desiredNAD.Annotations updatedNAD, err := c.nadClient.K8sCniCncfIoV1().NetworkAttachmentDefinitions(nadCopy.Namespace).Update(context.Background(), nadCopy, metav1.UpdateOptions{}) if err != nil { return nil, fmt.Errorf("failed to update NetworkAttachmentDefinition: %w", err) diff --git a/go-controller/pkg/clustermanager/userdefinednetwork/controller_test.go b/go-controller/pkg/clustermanager/userdefinednetwork/controller_test.go index 08791e9bf4..0953df8381 100644 --- a/go-controller/pkg/clustermanager/userdefinednetwork/controller_test.go +++ b/go-controller/pkg/clustermanager/userdefinednetwork/controller_test.go @@ -26,8 +26,6 @@ import ( udnclient "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/userdefinednetwork/v1/apis/clientset/versioned" udnfakeclient "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/userdefinednetwork/v1/apis/clientset/versioned/fake" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/networkmanager" - nmtest "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing/networkmanager" ovntypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" @@ -61,11 +59,9 @@ var _ = Describe("User Defined Network Controller", func() { Expect(err).NotTo(HaveOccurred()) Expect(f.Start()).To(Succeed()) - networkManager, err := networkmanager.NewForCluster(&nmtest.FakeControllerManager{}, f, cs, nil) - Expect(err).NotTo(HaveOccurred()) return New(cs.NetworkAttchDefClient, f.NADInformer(), cs.UserDefinedNetworkClient, f.UserDefinedNetworkInformer(), f.ClusterUserDefinedNetworkInformer(), - renderNADStub, networkManager.Interface(), f.PodCoreInformer(), f.NamespaceInformer(), nil, + renderNADStub, f.PodCoreInformer(), f.NamespaceInformer(), nil, ) } @@ -445,63 +441,6 @@ var _ = Describe("User Defined Network Controller", func() { } }) - It("should update NAD annotations and preserve internal OVNK annotations on UDN update", func() { - testNamespaces := []string{"red", "blue"} - var objs []runtime.Object - for _, nsName := range testNamespaces { - objs = append(objs, testNamespace(nsName)) - } - cudn := testClusterUDN("test", testNamespaces...) - cudn.Spec.Network = udnv1.NetworkSpec{Topology: udnv1.NetworkTopologyLayer2, Layer2: &udnv1.Layer2Config{ - Subnets: udnv1.DualStackCIDRs{"10.10.10.0/24"}, - }} - cudn.Annotations = map[string]string{"foo": "bar"} - - objs = append(objs, cudn) - networkName := ovntypes.CUDNPrefix + cudn.Name - expectedNsNADs := map[string]*netv1.NetworkAttachmentDefinition{} - for _, nsName := range testNamespaces { - nad := testClusterUdnNAD(cudn.Name, nsName) - nadName := nsName + "/" + cudn.Name - nad.Spec.Config = `{"cniVersion":"1.0.0","name":"` + networkName + `","netAttachDefName":"` + nadName + `","role":"","subnets":"10.10.10.0/24","topology":"layer2","type":"ovn-k8s-cni-overlay"}` - nad.Annotations = map[string]string{ - "foo": "bar", - ovntypes.OvnNetworkNameAnnotation: networkName, - ovntypes.OvnNetworkIDAnnotation: "6", - } - expectedNsNADs[nsName] = nad.DeepCopy() - objs = append(objs, nad) - } - - c = newTestController(template.RenderNetAttachDefManifest, objs...) - Expect(c.Run()).To(Succeed()) - - By("updating CUDN with a new annotation") - cudn, err := cs.UserDefinedNetworkClient.K8sV1().ClusterUserDefinedNetworks().Get(context.Background(), cudn.Name, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred()) - updatedCUDN := cudn.DeepCopy() - updatedCUDN.Annotations = map[string]string{"foo2": "bar2"} - _, err = cs.UserDefinedNetworkClient.K8sV1().ClusterUserDefinedNetworks().Update(context.Background(), updatedCUDN, metav1.UpdateOptions{}) - Expect(err).NotTo(HaveOccurred()) - - for testNamespace, expectedNAD := range expectedNsNADs { - expectedNAD.Annotations = map[string]string{ - "foo2": "bar2", - ovntypes.OvnNetworkNameAnnotation: networkName, - ovntypes.OvnNetworkIDAnnotation: "6", - } - - Eventually(func(g Gomega) { - actualNAD, err := cs.NetworkAttchDefClient.K8sCniCncfIoV1(). - NetworkAttachmentDefinitions(testNamespace). - Get(context.Background(), cudn.Name, metav1.GetOptions{}) - g.Expect(err).NotTo(HaveOccurred()) - g.Expect(actualNAD).To(Equal(expectedNAD), "NAD should exist, have updated "+ - "annotations, and preserve internal annotations") - }).Should(Succeed()) - } - }) - When("CR exist, and few connected & disconnected namespaces", func() { const ( cudnName = "global-network" diff --git a/go-controller/pkg/clustermanager/userdefinednetwork/nad.go b/go-controller/pkg/clustermanager/userdefinednetwork/nad.go index fc01b670bc..7c3267def5 100644 --- a/go-controller/pkg/clustermanager/userdefinednetwork/nad.go +++ b/go-controller/pkg/clustermanager/userdefinednetwork/nad.go @@ -3,7 +3,6 @@ package userdefinednetwork import ( "encoding/json" "fmt" - "slices" netv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" @@ -32,8 +31,6 @@ func NetAttachDefNotInUse(nad *netv1.NetworkAttachmentDefinition, pods []*corev1 } } if len(connectedPods) > 0 { - // Sort the connected pods to ensure a consistent error - slices.Sort(connectedPods) return fmt.Errorf("network in use by the following pods: %v", connectedPods) } return nil diff --git a/go-controller/pkg/clustermanager/userdefinednetwork/template/net-attach-def-template.go b/go-controller/pkg/clustermanager/userdefinednetwork/template/net-attach-def-template.go index c18cad708d..0b3aa61194 100644 --- a/go-controller/pkg/clustermanager/userdefinednetwork/template/net-attach-def-template.go +++ b/go-controller/pkg/clustermanager/userdefinednetwork/template/net-attach-def-template.go @@ -72,7 +72,6 @@ func RenderNetAttachDefManifest(obj client.Object, targetNamespace string) (*net Name: obj.GetName(), OwnerReferences: []metav1.OwnerReference{ownerRef}, Labels: renderNADLabels(obj), - Annotations: renderNADAnnotations(obj), Finalizers: []string{FinalizerUserDefinedNetwork}, }, Spec: *nadSpec, @@ -110,26 +109,11 @@ func renderNADLabels(obj client.Object) map[string]string { return labels } -// renderNADAnnotations copies annotations from UDN to corresponding NAD -func renderNADAnnotations(obj client.Object) map[string]string { - udnAnnotations := obj.GetAnnotations() - annotations := make(map[string]string) - for k, v := range udnAnnotations { - if !strings.HasPrefix(k, types.OvnK8sPrefix) { - annotations[k] = v - } - } - if len(annotations) == 0 { - return nil - } - return annotations -} - func validateTopology(spec SpecGetter) error { if spec.GetTopology() == userdefinednetworkv1.NetworkTopologyLayer3 && spec.GetLayer3() == nil || spec.GetTopology() == userdefinednetworkv1.NetworkTopologyLayer2 && spec.GetLayer2() == nil || spec.GetTopology() == userdefinednetworkv1.NetworkTopologyLocalnet && spec.GetLocalnet() == nil { - return config.NewTopologyConfigMismatchError(string(spec.GetTopology())) + return fmt.Errorf("topology %[1]s is specified but %[1]s config is nil", spec.GetTopology()) } return nil } @@ -158,21 +142,16 @@ func renderCNINetworkConfig(networkName, nadName string, spec SpecGetter) (map[s return nil, err } if ipamEnabled(cfg.IPAM) && len(cfg.Subnets) == 0 { - return nil, config.NewSubnetsRequiredError() + return nil, fmt.Errorf("subnets is required with ipam.mode is Enabled or unset") } if !ipamEnabled(cfg.IPAM) && len(cfg.Subnets) > 0 { - return nil, config.NewSubnetsMustBeUnsetError() + return nil, fmt.Errorf("subnets must be unset when ipam.mode is Disabled") } netConfSpec.Role = strings.ToLower(string(cfg.Role)) netConfSpec.MTU = int(cfg.MTU) netConfSpec.AllowPersistentIPs = cfg.IPAM != nil && cfg.IPAM.Lifecycle == userdefinednetworkv1.IPAMLifecyclePersistent netConfSpec.Subnets = cidrString(cfg.Subnets) - if util.IsPreconfiguredUDNAddressesEnabled() { - netConfSpec.ReservedSubnets = cidrString(cfg.ReservedSubnets) - netConfSpec.InfrastructureSubnets = cidrString(cfg.InfrastructureSubnets) - netConfSpec.DefaultGatewayIPs = ipString(cfg.DefaultGatewayIPs) - } netConfSpec.JoinSubnet = cidrString(renderJoinSubnets(cfg.Role, cfg.JoinSubnets)) case userdefinednetworkv1.NetworkTopologyLocalnet: cfg := spec.GetLocalnet() @@ -230,21 +209,9 @@ func renderCNINetworkConfig(networkName, nadName string, spec SpecGetter) (map[s if len(netConfSpec.ExcludeSubnets) > 0 { cniNetConf["excludeSubnets"] = netConfSpec.ExcludeSubnets } - if netConfSpec.VLANID != 0 { cniNetConf["vlanID"] = netConfSpec.VLANID } - if util.IsPreconfiguredUDNAddressesEnabled() { - if len(netConfSpec.ReservedSubnets) > 0 { - cniNetConf["reservedSubnets"] = netConfSpec.ReservedSubnets - } - if len(netConfSpec.InfrastructureSubnets) > 0 { - cniNetConf["infrastructureSubnets"] = netConfSpec.InfrastructureSubnets - } - if len(netConfSpec.DefaultGatewayIPs) > 0 { - cniNetConf["defaultGatewayIPs"] = netConfSpec.DefaultGatewayIPs - } - } return cniNetConf, nil } @@ -268,7 +235,7 @@ func validateIPAM(ipam *userdefinednetworkv1.IPAMConfig) error { return nil } if ipam.Lifecycle == userdefinednetworkv1.IPAMLifecyclePersistent && !ipamEnabled(ipam) { - return config.NewIPAMLifecycleNotSupportedError() + return fmt.Errorf("lifecycle Persistent is only supported when ipam.mode is Enabled") } return nil } @@ -313,14 +280,6 @@ func cidrString[T cidr](subnets T) string { return strings.Join(cidrs, ",") } -func ipString(ips userdefinednetworkv1.DualStackIPs) string { - var ipStrings []string - for _, ip := range ips { - ipStrings = append(ipStrings, string(ip)) - } - return strings.Join(ipStrings, ",") -} - func GetSpec(obj client.Object) SpecGetter { switch o := obj.(type) { case *userdefinednetworkv1.UserDefinedNetwork: diff --git a/go-controller/pkg/clustermanager/userdefinednetwork/template/net-attach-def-template_test.go b/go-controller/pkg/clustermanager/userdefinednetwork/template/net-attach-def-template_test.go index c24b56503e..ab0593e210 100644 --- a/go-controller/pkg/clustermanager/userdefinednetwork/template/net-attach-def-template_test.go +++ b/go-controller/pkg/clustermanager/userdefinednetwork/template/net-attach-def-template_test.go @@ -9,24 +9,16 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" udnv1 "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/userdefinednetwork/v1" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) var _ = Describe("NetAttachDefTemplate", func() { - - // before each test, set the IPv4Mode and IPv6Mode to true - BeforeEach(func() { - config.IPv4Mode = true - config.IPv6Mode = true - }) - DescribeTable("should fail to render NAD spec given", - func(spec *udnv1.UserDefinedNetworkSpec, expectedError string) { + func(spec *udnv1.UserDefinedNetworkSpec) { _, err := RenderNADSpec("foo", "bar", spec) - Expect(err).To(MatchError(ContainSubstring(expectedError))) + Expect(err).To(HaveOccurred()) }, Entry("invalid layer2 subnets", &udnv1.UserDefinedNetworkSpec{ @@ -35,7 +27,6 @@ var _ = Describe("NetAttachDefTemplate", func() { Subnets: udnv1.DualStackCIDRs{"abc"}, }, }, - config.NewCIDRNotProperlyFormattedError("abc").Error(), ), Entry("invalid layer3 cluster-subnet", &udnv1.UserDefinedNetworkSpec{ @@ -44,7 +35,6 @@ var _ = Describe("NetAttachDefTemplate", func() { Subnets: []udnv1.Layer3Subnet{{CIDR: "!", HostSubnet: 16}}, }, }, - config.NewInvalidCIDRAddressError().Error(), ), Entry("invalid layer3 host-subnet mask", &udnv1.UserDefinedNetworkSpec{ @@ -55,7 +45,6 @@ var _ = Describe("NetAttachDefTemplate", func() { }, }, }, - config.NewHostSubnetMaskError(24, 24).Error(), // -1 is not a valid host subnet mask, it's converted to 24 ), Entry("layer3 host-subnet mask is smaller then cluster-subnet mask", &udnv1.UserDefinedNetworkSpec{ @@ -66,7 +55,6 @@ var _ = Describe("NetAttachDefTemplate", func() { }, }, }, - config.NewHostSubnetMaskError(16, 24).Error(), ), Entry("layer3 host-subnet mask equal to cluster-subnet mask", &udnv1.UserDefinedNetworkSpec{ @@ -77,7 +65,16 @@ var _ = Describe("NetAttachDefTemplate", func() { }, }, }, - config.NewHostSubnetMaskError(24, 24).Error(), + ), + Entry("layer3 host-subnet mask is smaller then cluster-subnet mask", + &udnv1.UserDefinedNetworkSpec{ + Topology: udnv1.NetworkTopologyLayer3, + Layer3: &udnv1.Layer3Config{ + Subnets: []udnv1.Layer3Subnet{ + {CIDR: "10.10.0.0/16", HostSubnet: 8}, + }, + }, + }, ), Entry("invalid layer3 host-subnet; IPv4 mask is bigger then 32", &udnv1.UserDefinedNetworkSpec{ @@ -88,98 +85,102 @@ var _ = Describe("NetAttachDefTemplate", func() { }, }, }, - config.NewInvalidIPv4HostSubnetError().Error(), ), - Entry("invalid layer2 join subnets", + Entry("invalid join subnets", &udnv1.UserDefinedNetworkSpec{ Topology: udnv1.NetworkTopologyLayer2, Layer2: &udnv1.Layer2Config{ Role: udnv1.NetworkRolePrimary, - Subnets: udnv1.DualStackCIDRs{"10.10.0.0/24"}, JoinSubnets: udnv1.DualStackCIDRs{"abc"}, }, }, - config.NewCIDRNotProperlyFormattedError("abc").Error(), ), - Entry("invalid layer2 dual-stack join subnets, invalid IPv4 CIDR", + Entry("invalid dual-stack join subnets, invalid IPv4 CIDR", &udnv1.UserDefinedNetworkSpec{ Topology: udnv1.NetworkTopologyLayer2, Layer2: &udnv1.Layer2Config{ Role: udnv1.NetworkRolePrimary, - Subnets: udnv1.DualStackCIDRs{"10.10.0.0/24"}, - JoinSubnets: udnv1.DualStackCIDRs{"fd50::0/125", "!"}, + JoinSubnets: udnv1.DualStackCIDRs{"!", "fd50::0/125"}, }, }, - config.NewCIDRNotProperlyFormattedError("!").Error(), ), - Entry("invalid layer2 dual-stack join subnets, invalid IPv6 CIDR", + Entry("invalid dual-stack join subnets, invalid IPv6 CIDR", &udnv1.UserDefinedNetworkSpec{ Topology: udnv1.NetworkTopologyLayer2, Layer2: &udnv1.Layer2Config{ Role: udnv1.NetworkRolePrimary, - Subnets: udnv1.DualStackCIDRs{"10.10.0.0/24"}, JoinSubnets: udnv1.DualStackCIDRs{"10.10.0.0/24", "!"}, }, }, - config.NewCIDRNotProperlyFormattedError("!").Error(), ), - // The validation for max number of subnets is moved to the CRD validation, - // no need to test it here. + Entry("invalid dual-stack join subnets, multiple valid IPv4 CIDRs", + &udnv1.UserDefinedNetworkSpec{ + Topology: udnv1.NetworkTopologyLayer2, + Layer2: &udnv1.Layer2Config{ + Role: udnv1.NetworkRolePrimary, + JoinSubnets: udnv1.DualStackCIDRs{"10.10.0.0/24", "10.20.0.0/24", "10.30.0.0/24"}, + }, + }, + ), + Entry("invalid dual-stack join subnets, multiple valid IPv6 CIDRs", + &udnv1.UserDefinedNetworkSpec{ + Topology: udnv1.NetworkTopologyLayer2, + Layer2: &udnv1.Layer2Config{ + Role: udnv1.NetworkRolePrimary, + JoinSubnets: udnv1.DualStackCIDRs{"fd40::0/125", "fd10::0/125", "fd50::0/125"}, + }, + }, + ), + Entry("invalid dual-stack join subnets, multiple valid IPv4 & IPv6 CIDRs", + &udnv1.UserDefinedNetworkSpec{ + Topology: udnv1.NetworkTopologyLayer2, + Layer2: &udnv1.Layer2Config{ + Role: udnv1.NetworkRolePrimary, + JoinSubnets: udnv1.DualStackCIDRs{"fd40::0/125", "10.10.0.0/24", "fd50::0/125", "10.20.0.0/24"}, + }, + }, + ), Entry("invalid join subnets, overlapping with cluster-default join-subnet, IPv4", &udnv1.UserDefinedNetworkSpec{ Topology: udnv1.NetworkTopologyLayer2, Layer2: &udnv1.Layer2Config{ Role: udnv1.NetworkRolePrimary, - Subnets: udnv1.DualStackCIDRs{"10.10.0.0/24"}, JoinSubnets: udnv1.DualStackCIDRs{"100.64.10.0/24"}, }, }, - config.NewSubnetOverlapError( - config.ConfigSubnet{SubnetType: config.UserDefinedJoinSubnet, Subnet: util.MustParseCIDR("100.64.10.0/24")}, - config.ConfigSubnet{SubnetType: config.ConfigSubnetJoin, Subnet: util.MustParseCIDR("100.64.0.0/16")}).Error(), ), Entry("invalid join subnets, overlapping with cluster-default join-subnet, IPv6", &udnv1.UserDefinedNetworkSpec{ Topology: udnv1.NetworkTopologyLayer2, Layer2: &udnv1.Layer2Config{ Role: udnv1.NetworkRolePrimary, - Subnets: udnv1.DualStackCIDRs{"10.10.0.0/24"}, JoinSubnets: udnv1.DualStackCIDRs{"fd98::4/127"}, }, }, - config.NewSubnetOverlapError( - config.ConfigSubnet{SubnetType: config.UserDefinedJoinSubnet, Subnet: util.MustParseCIDR("fd98::4/127")}, - config.ConfigSubnet{SubnetType: config.ConfigSubnetJoin, Subnet: util.MustParseCIDR("fd98::/64")}).Error(), ), Entry("invalid join subnets, overlapping with cluster-default join-subnet, dual-stack", &udnv1.UserDefinedNetworkSpec{ Topology: udnv1.NetworkTopologyLayer2, Layer2: &udnv1.Layer2Config{ Role: udnv1.NetworkRolePrimary, - Subnets: udnv1.DualStackCIDRs{"10.10.0.0/24"}, JoinSubnets: udnv1.DualStackCIDRs{"100.64.10.0/24", "fd98::4/127"}, }, }, - config.NewSubnetOverlapError( - config.ConfigSubnet{SubnetType: config.UserDefinedJoinSubnet, Subnet: util.MustParseCIDR("100.64.10.0/24")}, - config.ConfigSubnet{SubnetType: config.ConfigSubnetJoin, Subnet: util.MustParseCIDR("100.64.0.0/16")}).Error(), ), ) DescribeTable("should fail to render NAD manifest, given", - func(obj client.Object, expectedError string) { + func(obj client.Object) { _, err := RenderNetAttachDefManifest(obj, "test") - Expect(err).To(MatchError(ContainSubstring(expectedError))) + Expect(err).To(HaveOccurred()) }, Entry("UDN, invalid topology: topology layer2 & layer3 config", &udnv1.UserDefinedNetwork{Spec: udnv1.UserDefinedNetworkSpec{ Topology: udnv1.NetworkTopologyLayer2, Layer3: &udnv1.Layer3Config{}}}, - config.NewTopologyConfigMismatchError(string(udnv1.NetworkTopologyLayer2)).Error(), ), Entry("UDN, invalid topology: topology layer3 & layer2 config", &udnv1.UserDefinedNetwork{Spec: udnv1.UserDefinedNetworkSpec{ Topology: udnv1.NetworkTopologyLayer3, Layer2: &udnv1.Layer2Config{}}}, - config.NewTopologyConfigMismatchError(string(udnv1.NetworkTopologyLayer3)).Error(), ), Entry("UDN, invalid IPAM config: IPAM lifecycle & disabled ipam mode", &udnv1.UserDefinedNetwork{Spec: udnv1.UserDefinedNetworkSpec{ @@ -193,7 +194,6 @@ var _ = Describe("NetAttachDefTemplate", func() { }, }, }}, - config.NewIPAMLifecycleNotSupportedError().Error(), ), Entry("UDN, invalid IPAM config: IPAM enabled & no subnet", &udnv1.UserDefinedNetwork{Spec: udnv1.UserDefinedNetworkSpec{ @@ -206,7 +206,6 @@ var _ = Describe("NetAttachDefTemplate", func() { }, }, }}, - config.NewSubnetsRequiredError().Error(), ), Entry("UDN, invalid IPAM config: IPAM disabled & subnet", &udnv1.UserDefinedNetwork{Spec: udnv1.UserDefinedNetworkSpec{ @@ -219,57 +218,39 @@ var _ = Describe("NetAttachDefTemplate", func() { }, }, }}, - config.NewSubnetsMustBeUnsetError().Error(), ), Entry("CUDN, invalid topology: topology layer2 & layer3 config", &udnv1.ClusterUserDefinedNetwork{Spec: udnv1.ClusterUserDefinedNetworkSpec{Network: udnv1.NetworkSpec{ Topology: udnv1.NetworkTopologyLayer2, Layer3: &udnv1.Layer3Config{}}}}, - config.NewTopologyConfigMismatchError(string(udnv1.NetworkTopologyLayer2)).Error(), ), Entry("CUDN, invalid topology: topology layer2 & localnet config", &udnv1.ClusterUserDefinedNetwork{Spec: udnv1.ClusterUserDefinedNetworkSpec{Network: udnv1.NetworkSpec{ Topology: udnv1.NetworkTopologyLayer2, Localnet: &udnv1.LocalnetConfig{}}}}, - config.NewTopologyConfigMismatchError(string(udnv1.NetworkTopologyLayer2)).Error(), ), Entry("CUDN, invalid topology: topology layer3 & layer2 config", &udnv1.ClusterUserDefinedNetwork{Spec: udnv1.ClusterUserDefinedNetworkSpec{Network: udnv1.NetworkSpec{ Topology: udnv1.NetworkTopologyLayer3, Layer2: &udnv1.Layer2Config{}}}}, - config.NewTopologyConfigMismatchError(string(udnv1.NetworkTopologyLayer3)).Error(), ), Entry("CUDN, invalid topology: topology layer3 & localnet config", &udnv1.ClusterUserDefinedNetwork{Spec: udnv1.ClusterUserDefinedNetworkSpec{Network: udnv1.NetworkSpec{ Topology: udnv1.NetworkTopologyLayer3, Localnet: &udnv1.LocalnetConfig{}}}}, - config.NewTopologyConfigMismatchError(string(udnv1.NetworkTopologyLayer3)).Error(), ), Entry("CUDN, invalid topology: topology localnet & layer2 config", &udnv1.ClusterUserDefinedNetwork{Spec: udnv1.ClusterUserDefinedNetworkSpec{Network: udnv1.NetworkSpec{ Topology: udnv1.NetworkTopologyLocalnet, Layer2: &udnv1.Layer2Config{}}}}, - config.NewTopologyConfigMismatchError(string(udnv1.NetworkTopologyLocalnet)).Error(), ), Entry("CUDN, invalid topology: topology localnet & layer3 config", &udnv1.ClusterUserDefinedNetwork{Spec: udnv1.ClusterUserDefinedNetworkSpec{Network: udnv1.NetworkSpec{ Topology: udnv1.NetworkTopologyLocalnet, Layer3: &udnv1.Layer3Config{}}}}, - config.NewTopologyConfigMismatchError(string(udnv1.NetworkTopologyLocalnet)).Error(), - ), - Entry("CUDN, localnet: IPv4 excludeSubnets not in range of subnets", - &udnv1.ClusterUserDefinedNetwork{Spec: udnv1.ClusterUserDefinedNetworkSpec{Network: udnv1.NetworkSpec{ - Topology: udnv1.NetworkTopologyLocalnet, - Localnet: &udnv1.LocalnetConfig{Role: udnv1.NetworkRoleSecondary, PhysicalNetworkName: "localnet1", - Subnets: udnv1.DualStackCIDRs{"192.168.0.0/16", "2001:dbb::/64"}, - ExcludeSubnets: []udnv1.CIDR{"192.200.0.0/30"}, - }, - }}}, - config.NewExcludedSubnetNotContainedError("192.200.0.0/30").Error(), ), - Entry("CUDN, localnet: IPv6 excludeSubnets not in range of subnets", + Entry("CUDN, localnet: excludeSubnets not in range of subnets", &udnv1.ClusterUserDefinedNetwork{Spec: udnv1.ClusterUserDefinedNetworkSpec{Network: udnv1.NetworkSpec{ Topology: udnv1.NetworkTopologyLocalnet, Localnet: &udnv1.LocalnetConfig{Role: udnv1.NetworkRoleSecondary, PhysicalNetworkName: "localnet1", Subnets: udnv1.DualStackCIDRs{"192.168.0.0/16", "2001:dbb::/64"}, - ExcludeSubnets: []udnv1.CIDR{"2001:aaa::/127"}, + ExcludeSubnets: []udnv1.CIDR{"192.200.0.0/30", "2001:aaa::/127", "192.300.0.1/32", "2001:bbb::1/120"}, }, }}}, - config.NewExcludedSubnetNotContainedError("2001:aaa::/127").Error(), ), ) @@ -295,8 +276,7 @@ var _ = Describe("NetAttachDefTemplate", func() { func(testSpec udnv1.UserDefinedNetworkSpec, expectedNadNetConf string) { testUdn := &udnv1.UserDefinedNetwork{ ObjectMeta: metav1.ObjectMeta{Namespace: "mynamespace", Name: "test-net", UID: "1", - Annotations: map[string]string{"testAnnotation": "test", "k8s.ovn.org/testAnnotation": "test"}, - Labels: map[string]string{"testLabel": "test"}}, + Labels: map[string]string{"testLabel": "test"}}, Spec: testSpec, } testNs := "mynamespace" @@ -311,7 +291,6 @@ var _ = Describe("NetAttachDefTemplate", func() { expectedNAD := &netv1.NetworkAttachmentDefinition{ ObjectMeta: metav1.ObjectMeta{ Name: "test-net", - Annotations: map[string]string{"testAnnotation": "test"}, Labels: map[string]string{"k8s.ovn.org/user-defined-network": "", "testLabel": "test"}, OwnerReferences: []metav1.OwnerReference{ownerRef}, Finalizers: []string{"k8s.ovn.org/user-defined-network-protection"}, diff --git a/go-controller/pkg/clustermanager/zone_cluster_controller.go b/go-controller/pkg/clustermanager/zone_cluster_controller.go index 41452e9c80..3ba0b785b8 100644 --- a/go-controller/pkg/clustermanager/zone_cluster_controller.go +++ b/go-controller/pkg/clustermanager/zone_cluster_controller.go @@ -212,7 +212,7 @@ func (zcc *zoneClusterController) syncNodeIDs(nodes []interface{}) error { return fmt.Errorf("spurious object in syncNodes: %v", nodeObj) } - nodeID, _ := util.GetNodeID(node) + nodeID := util.GetNodeID(node) if nodeID != util.InvalidNodeID { klog.Infof("Node %s has the id %d set", node.Name, nodeID) if err := zcc.nodeIDAllocator.ReserveID(node.Name, nodeID); err != nil { @@ -359,6 +359,9 @@ func (h *zoneClusterControllerEventHandler) AreResourcesEqual(obj1, obj2 interfa if util.NodeIDAnnotationChanged(node1, node2) { return false, nil } + if util.NodeGatewayRouterLRPAddrsAnnotationChanged(node1, node2) { + return false, nil + } if util.NodeTransitSwitchPortAddrAnnotationChanged(node1, node2) { return false, nil } diff --git a/go-controller/pkg/cni/cni.go b/go-controller/pkg/cni/cni.go index 41e0329f64..faf800d52e 100644 --- a/go-controller/pkg/cni/cni.go +++ b/go-controller/pkg/cni/cni.go @@ -8,10 +8,10 @@ import ( "time" current "github.com/containernetworking/cni/pkg/types/100" + v1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - corev1listers "k8s.io/client-go/listers/core/v1" "k8s.io/klog/v2" utilnet "k8s.io/utils/net" @@ -115,32 +115,6 @@ func (pr *PodRequest) cmdAdd(kubeAuth *KubeAPIAuth, clientset *ClientSet, networ return pr.cmdAddWithGetCNIResultFunc(kubeAuth, clientset, getCNIResult, networkManager, ovsClient) } -// primaryDPUReady makes sure previous annotation condition is ready, then if primary UDN interface is needed and it is -// in the DPU-HOST/DPU setup, checks if DPU connection annotations for primary UDN interface are ready. -func (pr *PodRequest) primaryDPUReady(primaryUDN *udn.UserDefinedPrimaryNetwork, k kube.Interface, podLister corev1listers.PodLister, annotCondFn podAnnotWaitCond) podAnnotWaitCond { - return func(pod *corev1.Pod, nadName string) (*util.PodAnnotation, bool, error) { - // First, check the original annotation condition - annotation, isReady, err := annotCondFn(pod, nadName) - if err != nil || !isReady { - return annotation, isReady, err - } - // primaryUDNPodRequest would be nil if no primary UDN interface is needed - primaryUDNPodRequest := pr.buildPrimaryUDNPodRequest(primaryUDN) - // DPU-Host: add DPU connection-details annotation to allow DPU performs the needed primary UDN interface plumbing. - if config.OvnKubeNode.Mode == types.NodeModeDPUHost && - primaryUDNPodRequest != nil && primaryUDNPodRequest.CNIConf.DeviceID != "" { - netdevName := primaryUDN.NetworkDevice() - if err := primaryUDNPodRequest.addDPUConnectionDetailsAnnot(k, podLister, netdevName); err != nil { - return annotation, false, err - } - // Check if DPU status annotation is ready (passing nil as we've already checked annotation) - return isDPUReady(nil, primaryUDN.NADName())(pod, nadName) - } - // Non-DPU case: proceed normally - return annotation, true, nil - } -} - func (pr *PodRequest) cmdAddWithGetCNIResultFunc( kubeAuth *KubeAPIAuth, clientset *ClientSet, @@ -172,7 +146,7 @@ func (pr *PodRequest) cmdAddWithGetCNIResultFunc( if err = pr.addDPUConnectionDetailsAnnot(kubecli, clientset.podLister, netdevName); err != nil { return nil, err } - // Defer default-network DPU readiness gating so the primary UDN annotation/DPU readiness can progress in parallel when present. + annotCondFn = isDPUReady } // In the case of SmartNIC (CX5), we store the netdevname in the representor's // OVS interface's external_id column. This is done in ConfigureInterface(). @@ -180,34 +154,14 @@ func (pr *PodRequest) cmdAddWithGetCNIResultFunc( // Get the IP address and MAC address of the pod // for DPU, ensure connection-details is present - primaryUDN := udn.NewPrimaryNetwork(networkManager, clientset.nadLister) + primaryUDN := udn.NewPrimaryNetwork(networkManager) if util.IsNetworkSegmentationSupportEnabled() { - annotCondFn = primaryUDN.WaitForPrimaryAnnotationFn(annotCondFn) - // checks for primary UDN network's DPU connections status - annotCondFn = pr.primaryDPUReady(primaryUDN, kubecli, clientset.podLister, annotCondFn) - } - - // now checks for default network's DPU connection status - if config.OvnKubeNode.Mode == types.NodeModeDPUHost { - if pr.CNIConf.DeviceID != "" { - annotCondFn = isDPUReady(annotCondFn, pr.nadName) - } + annotCondFn = primaryUDN.WaitForPrimaryAnnotationFn(podName, namespace, annotCondFn) } pod, annotations, podNADAnnotation, err := GetPodWithAnnotations(pr.ctx, clientset, namespace, podName, pr.nadName, annotCondFn) if err != nil { return nil, fmt.Errorf("failed to get pod annotation: %v", err) } - - var primaryUDNPodInfo *PodInterfaceInfo - primaryUDNPodRequest := pr.buildPrimaryUDNPodRequest(primaryUDN) - if primaryUDNPodRequest != nil { - primaryUDNPodInfo, err = primaryUDNPodRequest.buildPodInterfaceInfo(annotations, primaryUDN.Annotation(), primaryUDN.NetworkDevice()) - if err != nil { - return nil, err - } - klog.V(4).Infof("Pod %s/%s primaryUDN podRequest %v podInfo %v", namespace, podName, primaryUDNPodRequest, primaryUDNPodInfo) - } - if err = pr.checkOrUpdatePodUID(pod); err != nil { return nil, err } @@ -221,6 +175,9 @@ func (pr *PodRequest) cmdAddWithGetCNIResultFunc( response := &Response{KubeAuth: kubeAuth} if !config.UnprivilegedMode { + //TODO: There is nothing technical to run this at unprivileged mode but + // we will tackle that later on. + netName := pr.netName if pr.CNIConf.PhysicalNetworkName != "" { netName = pr.CNIConf.PhysicalNetworkName @@ -237,46 +194,38 @@ func (pr *PodRequest) cmdAddWithGetCNIResultFunc( if err != nil { return nil, err } - if primaryUDNPodRequest != nil { - err = primaryUDNCmdAddGetCNIResultFunc(response.Result, getCNIResultFn, primaryUDNPodRequest, clientset, primaryUDNPodInfo) + if primaryUDN.Found() { + primaryUDNPodRequest := pr.buildPrimaryUDNPodRequest(pod, primaryUDN) + primaryUDNPodInfo, err := primaryUDNPodRequest.buildPodInterfaceInfo(annotations, primaryUDN.Annotation(), primaryUDN.NetworkDevice()) + if err != nil { + return nil, err + } + primaryUDNResult, err := getCNIResultFn(primaryUDNPodRequest, clientset, primaryUDNPodInfo) if err != nil { return nil, err } + + response.Result.Routes = append(response.Result.Routes, primaryUDNResult.Routes...) + numOfInitialIPs := len(response.Result.IPs) + numOfInitialIfaces := len(response.Result.Interfaces) + response.Result.Interfaces = append(response.Result.Interfaces, primaryUDNResult.Interfaces...) + response.Result.IPs = append(response.Result.IPs, primaryUDNResult.IPs...) + + // Offset the index of the default network IPs to correctly point to the default network interfaces + for i := numOfInitialIPs; i < len(response.Result.IPs); i++ { + ifaceIPConfig := response.Result.IPs[i].Copy() + if response.Result.IPs[i].Interface != nil { + response.Result.IPs[i].Interface = current.Int(*ifaceIPConfig.Interface + numOfInitialIfaces) + } + } } } else { response.PodIFInfo = podInterfaceInfo - if primaryUDNPodRequest != nil { - response.PrimaryUDNPodInfo = primaryUDNPodInfo - response.PrimaryUDNPodReq = primaryUDNPodRequest - } } return response, nil } -func primaryUDNCmdAddGetCNIResultFunc(result *current.Result, getCNIResultFn getCNIResultFunc, primaryUDNPodRequest *PodRequest, - clientset PodInfoGetter, primaryUDNPodInfo *PodInterfaceInfo) error { - primaryUDNResult, err := getCNIResultFn(primaryUDNPodRequest, clientset, primaryUDNPodInfo) - if err != nil { - return err - } - - result.Routes = append(result.Routes, primaryUDNResult.Routes...) - numOfInitialIPs := len(result.IPs) - numOfInitialIfaces := len(result.Interfaces) - result.Interfaces = append(result.Interfaces, primaryUDNResult.Interfaces...) - result.IPs = append(result.IPs, primaryUDNResult.IPs...) - - // Offset the index of the default network IPs to correctly point to the default network interfaces - for i := numOfInitialIPs; i < len(result.IPs); i++ { - ifaceIPConfig := result.IPs[i].Copy() - if result.IPs[i].Interface != nil { - result.IPs[i].Interface = current.Int(*ifaceIPConfig.Interface + numOfInitialIfaces) - } - } - return nil -} - func (pr *PodRequest) cmdDel(clientset *ClientSet) (*Response, error) { // assume success case, return an empty Result response := &Response{} @@ -452,38 +401,30 @@ func getCNIResult(pr *PodRequest, getter PodInfoGetter, podInterfaceInfo *PodInt }, nil } -// buildPrimaryUDNPodRequest returns PodRequest for primary UDN interface, -// it returns nil if primary UDN is not requested on the Pod func (pr *PodRequest) buildPrimaryUDNPodRequest( + pod *corev1.Pod, primaryUDN *udn.UserDefinedPrimaryNetwork, ) *PodRequest { - if !primaryUDN.Found() { - // if primary UDN interface is not needed, return nil - return nil - } - deviceID, deviceInfo, isVFIO := primaryUDN.NetworkDeviceInfo() req := &PodRequest{ Command: pr.Command, - PodNamespace: pr.PodNamespace, - PodName: pr.PodName, - PodUID: pr.PodUID, + PodNamespace: pod.Namespace, + PodName: pod.Name, + PodUID: string(pod.UID), SandboxID: pr.SandboxID, Netns: pr.Netns, IfName: primaryUDN.InterfaceName(), CNIConf: &ovncnitypes.NetConf{ // primary UDN MTU will be taken from config.Default.MTU // if not specified at the NAD - MTU: primaryUDN.MTU(), - DeviceID: deviceID, + MTU: primaryUDN.MTU(), }, timestamp: time.Now(), - IsVFIO: isVFIO, + IsVFIO: pr.IsVFIO, netName: primaryUDN.NetworkName(), nadName: primaryUDN.NADName(), - deviceInfo: *deviceInfo, + deviceInfo: v1.DeviceInfo{}, } - - req.ctx, req.cancel = context.WithCancel(pr.ctx) + req.ctx, req.cancel = context.WithTimeout(context.Background(), 2*time.Minute) return req } diff --git a/go-controller/pkg/cni/cni_dpu_test.go b/go-controller/pkg/cni/cni_dpu_test.go index 4ff79027eb..076909bf63 100644 --- a/go-controller/pkg/cni/cni_dpu_test.go +++ b/go-controller/pkg/cni/cni_dpu_test.go @@ -5,7 +5,6 @@ import ( "time" cnitypes "github.com/containernetworking/cni/pkg/types" - nadapi "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -44,11 +43,10 @@ var _ = Describe("cni_dpu tests", func() { NetConf: cnitypes.NetConf{}, DeviceID: "", }, - timestamp: time.Time{}, - IsVFIO: false, - netName: ovntypes.DefaultNetworkName, - nadName: ovntypes.DefaultNetworkName, - deviceInfo: nadapi.DeviceInfo{}, + timestamp: time.Time{}, + IsVFIO: false, + netName: ovntypes.DefaultNetworkName, + nadName: ovntypes.DefaultNetworkName, } pod = &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ diff --git a/go-controller/pkg/cni/cni_test.go b/go-controller/pkg/cni/cni_test.go index 309ea23eff..778c83c03c 100644 --- a/go-controller/pkg/cni/cni_test.go +++ b/go-controller/pkg/cni/cni_test.go @@ -8,9 +8,11 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types" current "github.com/containernetworking/cni/pkg/types/100" + nadv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/kubernetes/fake" "github.com/ovn-kubernetes/libovsdb/client" @@ -18,7 +20,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/cni/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/networkmanager" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing" libovsdbtest "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing/libovsdb" v1nadmocks "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing/mocks/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/listers/k8s.cni.cncf.io/v1" v1mocks "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing/mocks/k8s.io/client-go/listers/core/v1" @@ -95,7 +96,6 @@ var _ = Describe("Network Segmentation", func() { nadLister = v1nadmocks.NetworkAttachmentDefinitionLister{} clientSet = &ClientSet{ podLister: &podLister, - nadLister: &nadLister, kclient: fakeClientset, } kubeAuth = &KubeAPIAuth{ @@ -222,20 +222,28 @@ var _ = Describe("Network Segmentation", func() { Name: pr.PodName, Namespace: pr.PodNamespace, Annotations: map[string]string{ - "k8s.ovn.org/pod-networks": `{"default":{"ip_addresses":["100.10.10.3/24","fd44::33/64"],"mac_address":"0a:58:fd:98:00:01", "role":"infrastructure-locked"}, "foo-ns/meganet":{"ip_addresses":["10.10.10.30/24","fd10::3/64"],"mac_address":"02:03:04:05:06:07", "role":"primary"}}`, + "k8s.ovn.org/pod-networks": `{"default":{"ip_addresses":["100.10.10.3/24","fd44::33/64"],"mac_address":"0a:58:fd:98:00:01", "role":"infrastructure-locked"}, "meganet":{"ip_addresses":["10.10.10.30/24","fd10::3/64"],"mac_address":"02:03:04:05:06:07", "role":"primary"}}`, }, }, } - nadMegaNet := testing.GenerateNADWithConfig("meganet", namespace, dummyPrimaryUDNConfig(namespace, "meganet")) + nad := &nadv1.NetworkAttachmentDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: nadName, + Namespace: namespace, + }, + Spec: nadv1.NetworkAttachmentDefinitionSpec{ + Config: dummyPrimaryUDNConfig(namespace, nadName), + }, + } nadNamespaceLister := &v1nadmocks.NetworkAttachmentDefinitionNamespaceLister{} + nadNamespaceLister.On("List", labels.Everything()).Return([]*nadv1.NetworkAttachmentDefinition{nad}, nil) nadLister.On("NetworkAttachmentDefinitions", "foo-ns").Return(nadNamespaceLister) - nadNamespaceLister.On("Get", "meganet").Return(nadMegaNet, nil) - nadNetwork, err := util.ParseNADInfo(nadMegaNet) + nadNetwork, err := util.ParseNADInfo(nad) Expect(err).NotTo(HaveOccurred()) fakeNetworkManager = &testnm.FakeNetworkManager{ PrimaryNetworks: make(map[string]util.NetInfo), } - fakeNetworkManager.PrimaryNetworks[nadMegaNet.Namespace] = nadNetwork + fakeNetworkManager.PrimaryNetworks[nad.Namespace] = nadNetwork getCNIResultStub = dummyGetCNIResult }) diff --git a/go-controller/pkg/cni/cniserver.go b/go-controller/pkg/cni/cniserver.go index 19378f4483..17b888dd63 100644 --- a/go-controller/pkg/cni/cniserver.go +++ b/go-controller/pkg/cni/cniserver.go @@ -11,7 +11,6 @@ import ( "time" "github.com/gorilla/mux" - nadv1Listers "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/listers/k8s.cni.cncf.io/v1" "k8s.io/client-go/kubernetes" corev1listers "k8s.io/client-go/listers/core/v1" @@ -59,23 +58,17 @@ func NewCNIServer( networkManager networkmanager.Interface, ovsClient client.Client, ) (*Server, error) { - var nadLister nadv1Listers.NetworkAttachmentDefinitionLister - if config.OvnKubeNode.Mode == types.NodeModeDPU { return nil, fmt.Errorf("unsupported ovnkube-node mode for CNI server: %s", config.OvnKubeNode.Mode) } router := mux.NewRouter() - if util.IsNetworkSegmentationSupportEnabled() { - nadLister = factory.NADInformer().Lister() - } s := &Server{ Server: http.Server{ Handler: router, }, clientSet: &ClientSet{ - nadLister: nadLister, podLister: corev1listers.NewPodLister(factory.LocalPodInformer().GetIndexer()), kclient: kclient, }, diff --git a/go-controller/pkg/cni/cnishim.go b/go-controller/pkg/cni/cnishim.go index 6a815e19b1..5f104e8c64 100644 --- a/go-controller/pkg/cni/cnishim.go +++ b/go-controller/pkg/cni/cnishim.go @@ -262,16 +262,6 @@ func (p *Plugin) CmdAdd(args *skel.CmdArgs) error { klog.Error(err.Error()) return err } - if response.PrimaryUDNPodInfo != nil { - primaryUDNPodRequest := response.PrimaryUDNPodReq - primaryUDNPodRequest.ctx, primaryUDNPodRequest.cancel = context.WithCancel(pr.ctx) - defer primaryUDNPodRequest.cancel() - err = primaryUDNCmdAddGetCNIResultFunc(result, getCNIResult, primaryUDNPodRequest, clientset, response.PrimaryUDNPodInfo) - if err != nil { - klog.Error(err.Error()) - return err - } - } } return types.PrintResult(result, conf.CNIVersion) diff --git a/go-controller/pkg/cni/types.go b/go-controller/pkg/cni/types.go index 332898ac03..7a20787d73 100644 --- a/go-controller/pkg/cni/types.go +++ b/go-controller/pkg/cni/types.go @@ -8,7 +8,6 @@ import ( current "github.com/containernetworking/cni/pkg/types/100" nadapi "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" - nadv1Listers "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/listers/k8s.cni.cncf.io/v1" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes" @@ -97,11 +96,9 @@ type CNIRequestMetrics struct { // Response sent to the OVN CNI plugin by the Server type Response struct { - Result *current.Result - PodIFInfo *PodInterfaceInfo - PrimaryUDNPodInfo *PodInterfaceInfo - PrimaryUDNPodReq *PodRequest - KubeAuth *KubeAPIAuth + Result *current.Result + PodIFInfo *PodInterfaceInfo + KubeAuth *KubeAPIAuth } func (response *Response) Marshal() ([]byte, error) { @@ -184,7 +181,6 @@ type ClientSet struct { PodInfoGetter kclient kubernetes.Interface podLister corev1listers.PodLister - nadLister nadv1Listers.NetworkAttachmentDefinitionLister } func NewClientSet(kclient kubernetes.Interface, podLister corev1listers.PodLister) *ClientSet { diff --git a/go-controller/pkg/cni/types/types.go b/go-controller/pkg/cni/types/types.go index 1813dccf83..88b8f6a83d 100644 --- a/go-controller/pkg/cni/types/types.go +++ b/go-controller/pkg/cni/types/types.go @@ -24,25 +24,17 @@ type NetConf struct { NADName string `json:"netAttachDefName,omitempty"` // Network MTU MTU int `json:"mtu,omitempty"` - // comma-separated subnet cidr + // comma-seperated subnet cidr // for secondary layer3 network, eg. 10.128.0.0/14/23 // for layer2 and localnet network, eg. 10.1.130.0/24 Subnets string `json:"subnets,omitempty"` - // comma-separated list of subnets, to be excluded from being allocated for Pod + // comma-seperated list of IPs, expressed in the form of subnets, to be excluded from being allocated for Pod // valid for layer2 and localnet network topology // eg. "10.1.130.0/27, 10.1.130.122/32" ExcludeSubnets string `json:"excludeSubnets,omitempty"` - // comma-separated list of subnets, to be reserved for static IP assignment - // valid for layer2 topology only - // eg. "10.1.130.0/27, 10.1.130.122/32" - ReservedSubnets string `json:"reservedSubnets,omitempty"` - // comma-separated list of subnets, to be reserved for OVN-Kubernetes internal network infrastructure - // valid for layer2 network topology with primary role only - // eg. "10.1.130.0/30, 10.1.130.64/30" - InfrastructureSubnets string `json:"infrastructureSubnets,omitempty"` // join subnet cidr is required for supporting // services and ingress for user defined networks - // in case of dualstack cluster, please do a comma-separated list + // in case of dualstack cluster, please do a comma-seperated list // expected format: // 1) V4 single stack: "v4CIDR" (eg: "100.65.0.0/16") // 2) V6 single stack: "v6CIDR" (eg: "fd99::/64") @@ -50,15 +42,6 @@ type NetConf struct { // valid for UDN layer3/layer2 network topology // default value: 100.65.0.0/16,fd99::/64 if not provided JoinSubnet string `json:"joinSubnet,omitempty"` - // comma-separated list of default gateway IPs for layer2 primary networks - // in case of dualstack cluster, please do a comma-separated list - // expected format: - // 1) V4 single stack: "10.128.0.1" - // 2) V6 single stack: "2001:db8::1" - // 3) dualstack: "10.128.0.1,2001:db8::1" - // valid for layer2 primary network topology only - // when omitted, the .1 address from the subnet is used - DefaultGatewayIPs string `json:"defaultGatewayIPs,omitempty"` // VLANID, valid in localnet topology network only VLANID int `json:"vlanID,omitempty"` // AllowPersistentIPs is valid on both localnet / layer topologies. diff --git a/go-controller/pkg/cni/udn/primary_network.go b/go-controller/pkg/cni/udn/primary_network.go index c751a6cbda..c51e90a3dc 100644 --- a/go-controller/pkg/cni/udn/primary_network.go +++ b/go-controller/pkg/cni/udn/primary_network.go @@ -2,14 +2,7 @@ package udn import ( "fmt" - "strings" - nadapi "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" - nadv1Listers "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/listers/k8s.cni.cncf.io/v1" - nadutils "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/utils" - - corev1 "k8s.io/api/core/v1" - "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/networkmanager" @@ -17,37 +10,18 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" ) -// wait on a certain pod annotation related condition. in case of non-nil error, -// return error to abort the retry attempt -type podAnnotWaitCond = func(*corev1.Pod, string) (*util.PodAnnotation, bool, error) - -const resourceNameAnnot = "k8s.v1.cni.cncf.io/resourceName" +// wait on a certain pod annotation related condition +type podAnnotWaitCond = func(map[string]string, string) (*util.PodAnnotation, bool) type UserDefinedPrimaryNetwork struct { networkManager networkmanager.Interface - nadLister nadv1Listers.NetworkAttachmentDefinitionLister annotation *util.PodAnnotation - - // the pod's UDN primary network, and its associated NAD name and the resourceName defined in the NAD - activeNetwork util.NetInfo - nadName string - resourceName string - - // the pod's UDN primary interface's device information (when UDN's resourceName is defined) - // deviceInfo is extra device information stored by SRIOV device plugin in /var/run/k8s.cni.cncf.io/devinfo/dp - deviceInfo *nadapi.DeviceInfo - // deviceID is either a PCI address or an Auxiliary address (format .., i.e. mlx5_core.sf.2) of the VF assigned to the pod - deviceID string - // netdevName is the linux network device name (such as enps0) when the VF device is bound to a kernel driver - netdevName string - // isVFIO indicates if the VF device is bound to the VFIO driver, exposing direct device access to userspace applications or virtual machines - isVFIO bool + activeNetwork util.NetInfo } -func NewPrimaryNetwork(networkManager networkmanager.Interface, nadLister nadv1Listers.NetworkAttachmentDefinitionLister) *UserDefinedPrimaryNetwork { +func NewPrimaryNetwork(networkManager networkmanager.Interface) *UserDefinedPrimaryNetwork { return &UserDefinedPrimaryNetwork{ networkManager: networkManager, - nadLister: nadLister, } } @@ -56,11 +30,8 @@ func (p *UserDefinedPrimaryNetwork) InterfaceName() string { } func (p *UserDefinedPrimaryNetwork) NetworkDevice() string { - return p.netdevName -} - -func (p *UserDefinedPrimaryNetwork) NetworkDeviceInfo() (string, *nadapi.DeviceInfo, bool) { - return p.deviceID, p.deviceInfo, p.isVFIO + // TODO: Support for non VFIO devices like SRIOV have to be implemented + return "" } func (p *UserDefinedPrimaryNetwork) Annotation() *util.PodAnnotation { @@ -75,7 +46,14 @@ func (p *UserDefinedPrimaryNetwork) NetworkName() string { } func (p *UserDefinedPrimaryNetwork) NADName() string { - return p.nadName + if p.activeNetwork == nil || p.activeNetwork.IsDefault() { + return "" + } + nads := p.activeNetwork.GetNADs() + if len(nads) < 1 { + return "" + } + return nads[0] } func (p *UserDefinedPrimaryNetwork) MTU() int { @@ -86,38 +64,38 @@ func (p *UserDefinedPrimaryNetwork) MTU() int { } func (p *UserDefinedPrimaryNetwork) Found() bool { - // if the primary UDN interface is not VF backed, its deviceInfo is empty but not nil. - return p.annotation != nil && p.activeNetwork != nil && p.deviceInfo != nil + return p.annotation != nil && p.activeNetwork != nil } -func (p *UserDefinedPrimaryNetwork) WaitForPrimaryAnnotationFn(annotCondFn podAnnotWaitCond) podAnnotWaitCond { - return func(pod *corev1.Pod, nadName string) (*util.PodAnnotation, bool, error) { - annotation, isReady, err := annotCondFn(pod, nadName) - if err != nil || !isReady { - return annotation, isReady, err +func (p *UserDefinedPrimaryNetwork) WaitForPrimaryAnnotationFn(podName, namespace string, annotCondFn podAnnotWaitCond) podAnnotWaitCond { + return func(annotations map[string]string, nadName string) (*util.PodAnnotation, bool) { + annotation, isReady := annotCondFn(annotations, nadName) + if annotation == nil { + return nil, false } - isReady, err = p.ensure(pod, nadName, annotation) - if err == nil && isReady { - return annotation, isReady, err + if err := p.ensure(namespace, annotations, nadName, annotation); err != nil { + klog.Errorf("Failed ensuring user defined primary network for pod '%s/%s': %v", namespace, podName, err) + return nil, false } - return nil, false, err + return annotation, isReady } } -func (p *UserDefinedPrimaryNetwork) ensure(pod *corev1.Pod, nadName string, annotation *util.PodAnnotation) (bool, error) { +func (p *UserDefinedPrimaryNetwork) Ensure(namespace string, annotations map[string]string, nadName string) error { + return p.ensure(namespace, annotations, nadName, nil /* parse annotation */) +} + +func (p *UserDefinedPrimaryNetwork) ensure(namespace string, annotations map[string]string, nadName string, annotation *util.PodAnnotation) error { // non default network is not related to primary UDNs if nadName != types.DefaultNetworkName { - return true, nil + return nil } if annotation == nil { var err error - annotation, err = util.UnmarshalPodAnnotation(pod.Annotations, nadName) + annotation, err = util.UnmarshalPodAnnotation(annotations, nadName) if err != nil { - if util.IsAnnotationNotSetError(err) { - return false, nil - } - return false, err + return fmt.Errorf("failed looking for ovn pod annotations: %w", err) } } @@ -129,19 +107,16 @@ func (p *UserDefinedPrimaryNetwork) ensure(pod *corev1.Pod, nadName string, anno // If default network is the primary there is nothing else to do if annotation.Role == types.NetworkRolePrimary { - return true, nil + return nil } - ready, err := p.ensureAnnotation(pod) - if !ready || err != nil { - return ready, err + if err := p.ensureAnnotation(annotations); err != nil { + return fmt.Errorf("failed looking for primary network annotation: %w", err) } - err = p.ensureActiveNetwork(pod.Namespace) - if err != nil { - return false, err + if err := p.ensureActiveNetwork(namespace); err != nil { + return fmt.Errorf("failed ensuring primary network for namespace: %q: %w", namespace, err) } - err = p.ensureNetworkDevice(pod) - return err == nil, err + return nil } func (p *UserDefinedPrimaryNetwork) ensureActiveNetwork(namespace string) error { @@ -155,98 +130,30 @@ func (p *UserDefinedPrimaryNetwork) ensureActiveNetwork(namespace string) error if activeNetwork.IsDefault() { return fmt.Errorf("missing primary user defined network NAD for namespace '%s'", namespace) } - p.activeNetwork = activeNetwork return nil } -func (p *UserDefinedPrimaryNetwork) ensureAnnotation(pod *corev1.Pod) (bool, error) { +func (p *UserDefinedPrimaryNetwork) ensureAnnotation(annotations map[string]string) error { if p.annotation != nil { - return true, nil + return nil } - annotations := pod.GetAnnotations() podNetworks, err := util.UnmarshalPodAnnotationAllNetworks(annotations) if err != nil { - return false, err + return err } - for nadFullName, podNetwork := range podNetworks { + for nadName, podNetwork := range podNetworks { if podNetwork.Role != types.NetworkRolePrimary { continue } - annotation, err := util.UnmarshalPodAnnotation(annotations, nadFullName) - if err != nil { - if util.IsAnnotationNotSetError(err) { - return false, nil - } - return false, err - } - // To support for non VFIO devices like SRIOV, get the primary UDN's resource name - nadNamespace, nadName, err := cache.SplitMetaNamespaceKey(nadFullName) + p.annotation, err = util.UnmarshalPodAnnotation(annotations, nadName) if err != nil { - return false, fmt.Errorf("invalid NAD name %s", nadFullName) + return err } - nad, err := p.nadLister.NetworkAttachmentDefinitions(nadNamespace).Get(nadName) - if err != nil { - return false, fmt.Errorf("failed to get primary UDN's network-attachment-definition %s: %v", nadFullName, err) - } - p.annotation = annotation - p.nadName = nadFullName - p.resourceName = nad.Annotations[resourceNameAnnot] - klog.Infof("Primary UDN for pod %s/%s NAD %s resource %s", pod.Namespace, pod.Name, p.nadName, p.resourceName) - - return true, nil - } - return false, nil -} - -func (p *UserDefinedPrimaryNetwork) ensureNetworkDevice(pod *corev1.Pod) error { - // everything has already been set, no need to retry - if p.deviceInfo != nil && (p.resourceName == "" || p.isVFIO || p.netdevName != "") { - return nil + break } - // this UDN primary network interface does not request specific device - if p.resourceName == "" { - p.deviceInfo = &nadapi.DeviceInfo{} - return nil + if p.annotation == nil { + return fmt.Errorf("missing network annotation with primary role '%+v'", annotations) } - deviceID, err := GetPodPrimaryUDNDeviceID(pod, p.resourceName) - if err != nil { - return fmt.Errorf("failed to get primary UDN device ID for pod %s/%s resource %s: %v", - pod.Namespace, pod.Name, p.resourceName, err) - } - if util.IsPCIDeviceName(deviceID) { - // DeviceID is a PCI address - p.isVFIO = util.GetSriovnetOps().IsVfPciVfioBound(deviceID) - } else if util.IsAuxDeviceName(deviceID) { - // DeviceID is an Auxiliary device name - .. - chunks := strings.Split(deviceID, ".") - if chunks[1] != "sf" { - return fmt.Errorf("primary UDN's device info for pod %s/%s resource %s deviceID %s: only SF auxiliary devices are supported", - pod.Namespace, pod.Name, p.resourceName, deviceID) - } - } else { - return fmt.Errorf("primary UDN's device info for pod %s/%s resource %s deviceID %s: unexpected PCI or Auxiliary device name", - pod.Namespace, pod.Name, p.resourceName, deviceID) - } - p.deviceID = deviceID - - deviceInfo, err := nadutils.LoadDeviceInfoFromDP(p.resourceName, deviceID) - if err != nil { - return fmt.Errorf("failed to load primary UDN's device info for pod %s/%s resource %s deviceID %s: %w", - pod.Namespace, pod.Name, p.resourceName, deviceID, err) - } - p.deviceInfo = deviceInfo - - if !p.isVFIO { - netdevName, err := util.GetNetdevNameFromDeviceId(deviceID, *deviceInfo) - if err != nil { - return fmt.Errorf("failed to get primary UDN's netdev name for pod %s/%s resource %s deviceID %s: %w", - pod.Namespace, pod.Name, p.resourceName, deviceID, err) - } - p.netdevName = netdevName - } - - klog.Infof("Primary UDN %s for pod %s/%s NAD %s resource %s deviceID %s deviceInfo %v netdevName %v isVFIO %v", - p.activeNetwork.GetNetworkName(), pod.Namespace, pod.Name, p.nadName, p.resourceName, deviceID, p.deviceInfo, p.netdevName, p.isVFIO) return nil } diff --git a/go-controller/pkg/cni/udn/primary_network_test.go b/go-controller/pkg/cni/udn/primary_network_test.go index c2831cf8d1..e8ae809c72 100644 --- a/go-controller/pkg/cni/udn/primary_network_test.go +++ b/go-controller/pkg/cni/udn/primary_network_test.go @@ -1,12 +1,11 @@ package udn import ( - "fmt" "testing" nadapi "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" - corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/labels" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" ovntest "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing" @@ -22,24 +21,14 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { config.OVNKubernetesFeature.EnableMultiNetwork = true config.OVNKubernetesFeature.EnableNetworkSegmentation = true - namespace := "ns1" - nadName := "nad1" - wrongNadName := "nad2" - pod := &corev1.Pod{} - pod.Namespace = namespace - pod.Annotations = map[string]string{ - "k8s.ovn.org/pod-networks": `{"ns1/nad1": { - "role": "primary", - "mac_address": "0a:58:fd:98:00:01" - }}`, - } tests := []struct { description string + namespace string nadName string annotationFromFn *util.PodAnnotation isReadyFromFn bool - pod *corev1.Pod + annotations map[string]string nads []*nadapi.NetworkAttachmentDefinition getActiveNetworkError error expectedIsReady bool @@ -48,7 +37,6 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { expectedNADName string expectedNetworkName string expectedMTU int - expectedError error }{ { description: "With non default nad should be ready", @@ -57,7 +45,6 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { Role: types.NetworkRoleSecondary, }, isReadyFromFn: true, - pod: &corev1.Pod{}, expectedIsReady: true, expectedAnnotation: &util.PodAnnotation{ Role: types.NetworkRoleSecondary, @@ -68,7 +55,6 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { nadName: types.DefaultNetworkName, annotationFromFn: nil, isReadyFromFn: true, - pod: &corev1.Pod{}, expectedAnnotation: nil, expectedIsReady: false, }, @@ -79,7 +65,6 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { Role: types.NetworkRolePrimary, }, isReadyFromFn: true, - pod: &corev1.Pod{}, expectedAnnotation: &util.PodAnnotation{ Role: types.NetworkRolePrimary, }, @@ -92,7 +77,6 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { Role: "", }, isReadyFromFn: true, - pod: &corev1.Pod{}, expectedAnnotation: &util.PodAnnotation{ Role: types.NetworkRolePrimary, }, @@ -106,23 +90,23 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { Role: types.NetworkRoleInfrastructure, }, isReadyFromFn: true, - pod: &corev1.Pod{}, expectedIsReady: false, }, { description: "With primary network annotation and missing active network should return not ready", + namespace: "ns1", nadName: types.DefaultNetworkName, annotationFromFn: &util.PodAnnotation{ Role: types.NetworkRoleInfrastructure, }, - nads: []*nadapi.NetworkAttachmentDefinition{ - ovntest.GenerateNAD("blue", wrongNadName, namespace, - types.Layer2Topology, "10.100.200.0/24", types.NetworkRolePrimary), + isReadyFromFn: true, + annotations: map[string]string{ + "k8s.ovn.org/pod-networks": `{"ns1/nad1": { + "role": "primary", + "mac_address": "0a:58:fd:98:00:01" + }}`, }, - isReadyFromFn: true, - pod: pod, expectedIsReady: false, - expectedError: fmt.Errorf("failed to get primary UDN's network-attachment-definition %s/%s: not found", namespace, nadName), }, { description: "With missing primary network annotation and active network should return not ready", @@ -131,29 +115,34 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { Role: types.NetworkRoleInfrastructure, }, isReadyFromFn: true, - pod: &corev1.Pod{}, nads: []*nadapi.NetworkAttachmentDefinition{ - ovntest.GenerateNAD("blue", nadName, namespace, + ovntest.GenerateNAD("blue", "nad1", "ns1", types.Layer2Topology, "10.100.200.0/24", types.NetworkRolePrimary), }, expectedIsReady: false, }, { description: "With primary network annotation and active network should return ready", + namespace: "ns1", nadName: types.DefaultNetworkName, annotationFromFn: &util.PodAnnotation{ Role: types.NetworkRoleInfrastructure, }, isReadyFromFn: true, - pod: pod, + annotations: map[string]string{ + "k8s.ovn.org/pod-networks": `{"ns1/nad1": { + "role": "primary", + "mac_address": "0a:58:fd:98:00:01" + }}`, + }, nads: []*nadapi.NetworkAttachmentDefinition{ - ovntest.GenerateNAD("blue", nadName, namespace, + ovntest.GenerateNAD("blue", "nad1", "ns1", types.Layer2Topology, "10.100.200.0/24", types.NetworkRolePrimary), }, expectedIsReady: true, expectedFound: true, expectedNetworkName: "blue", - expectedNADName: util.GetNADName(namespace, nadName), + expectedNADName: "ns1/nad1", expectedAnnotation: &util.PodAnnotation{ Role: types.NetworkRoleInfrastructure, }, @@ -161,20 +150,26 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { }, { description: "With primary network annotation and active network and no MTU should return ready with default MTU", + namespace: "ns1", nadName: types.DefaultNetworkName, annotationFromFn: &util.PodAnnotation{ Role: types.NetworkRoleInfrastructure, }, isReadyFromFn: true, - pod: pod, + annotations: map[string]string{ + "k8s.ovn.org/pod-networks": `{"ns1/nad1": { + "role": "primary", + "mac_address": "0a:58:fd:98:00:01" + }}`, + }, nads: []*nadapi.NetworkAttachmentDefinition{ - ovntest.GenerateNADWithoutMTU("blue", nadName, namespace, + ovntest.GenerateNADWithoutMTU("blue", "nad1", "ns1", types.Layer2Topology, "10.100.200.0/24", types.NetworkRolePrimary), }, expectedIsReady: true, expectedFound: true, expectedNetworkName: "blue", - expectedNADName: util.GetNADName(namespace, nadName), + expectedNADName: "ns1/nad1", expectedAnnotation: &util.PodAnnotation{ Role: types.NetworkRoleInfrastructure, }, @@ -189,16 +184,10 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { config.IPv6Mode = true nadLister := v1nadmocks.NetworkAttachmentDefinitionLister{} nadNamespaceLister := v1nadmocks.NetworkAttachmentDefinitionNamespaceLister{} - if tt.nads != nil { - nadLister.On("NetworkAttachmentDefinitions", tt.pod.Namespace).Return(&nadNamespaceLister) - if tt.expectedNADName != "" { - nadNamespaceLister.On("Get", nadName).Return(tt.nads[0], nil) - } else { - nadNamespaceLister.On("Get", nadName).Return(nil, fmt.Errorf("not found")) - } - } - waitCond := func(*corev1.Pod, string) (*util.PodAnnotation, bool, error) { - return tt.annotationFromFn, tt.isReadyFromFn, nil + nadLister.On("NetworkAttachmentDefinitions", tt.namespace).Return(&nadNamespaceLister) + nadNamespaceLister.On("List", labels.Everything()).Return(tt.nads, nil) + waitCond := func(map[string]string, string) (*util.PodAnnotation, bool) { + return tt.annotationFromFn, tt.isReadyFromFn } fakeNetworkManager := &networkmanager.FakeNetworkManager{ @@ -216,18 +205,13 @@ func TestWaitForPrimaryAnnotationFn(t *testing.T) { } } - userDefinedPrimaryNetwork := NewPrimaryNetwork(fakeNetworkManager, &nadLister) - obtainedAnnotation, obtainedIsReady, err := userDefinedPrimaryNetwork.WaitForPrimaryAnnotationFn( - waitCond)(tt.pod, tt.nadName) + userDefinedPrimaryNetwork := NewPrimaryNetwork(fakeNetworkManager) + obtainedAnnotation, obtainedIsReady := userDefinedPrimaryNetwork.WaitForPrimaryAnnotationFn( + "testPod", tt.namespace, waitCond)(tt.annotations, tt.nadName) obtainedFound := userDefinedPrimaryNetwork.Found() obtainedNetworkName := userDefinedPrimaryNetwork.NetworkName() obtainedNADName := userDefinedPrimaryNetwork.NADName() obtainedMTU := userDefinedPrimaryNetwork.MTU() - if tt.expectedError == nil { - g.Expect(err).ToNot(HaveOccurred(), "should not return error") - } else { - g.Expect(err).To(MatchError(tt.expectedError.Error()), "should return expected error") - } g.Expect(obtainedIsReady).To(Equal(tt.expectedIsReady), "should return expected readiness") g.Expect(obtainedFound).To(Equal(tt.expectedFound), "should return expected found flag") g.Expect(obtainedNetworkName).To(Equal(tt.expectedNetworkName), "should return expected network name") diff --git a/go-controller/pkg/cni/udn/resource.go b/go-controller/pkg/cni/udn/resource.go deleted file mode 100644 index 3fe8eb2255..0000000000 --- a/go-controller/pkg/cni/udn/resource.go +++ /dev/null @@ -1,41 +0,0 @@ -package udn - -import ( - "fmt" - - "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/kubeletclient" - "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types" - - corev1 "k8s.io/api/core/v1" - "k8s.io/klog/v2" -) - -func getPodResourceInfo(pod *corev1.Pod, resourceName string) (*types.ResourceInfo, error) { - podDesc := fmt.Sprintf("%s/%s", pod.Namespace, pod.Name) - ck, err := kubeletclient.GetResourceClient("") - if err != nil { - return nil, fmt.Errorf("failed to get a ResourceClient instance get resource info for pod %s: %v", podDesc, err) - } - resourceMap, err := ck.GetPodResourceMap(pod) - if err != nil { - return nil, fmt.Errorf("failed to get resources allocated for pod %s from ResourceClient: %v", podDesc, err) - } - entry, ok := resourceMap[resourceName] - if !ok { - return nil, fmt.Errorf("failed to get resources allocated for pod %s: no resources for resource %s", podDesc, resourceName) - } - klog.V(5).Infof("ResourceMap for pod %s resource %s: %+v", podDesc, resourceName, entry) - return entry, nil -} - -// GetPodPrimaryUDNDeviceID gets last deviceId of the specified resources allocated for the given Pod -func GetPodPrimaryUDNDeviceID(pod *corev1.Pod, resourceName string) (string, error) { - entry, err := getPodResourceInfo(pod, resourceName) - if err != nil { - return "", err - } - if len(entry.DeviceIDs) == 0 { - return "", fmt.Errorf("no device IDs found for pod %s/%s, resource %s", pod.Namespace, pod.Name, resourceName) - } - return entry.DeviceIDs[len(entry.DeviceIDs)-1], nil -} diff --git a/go-controller/pkg/cni/utils.go b/go-controller/pkg/cni/utils.go index 2f063c6aea..8ba91a5586 100644 --- a/go-controller/pkg/cni/utils.go +++ b/go-controller/pkg/cni/utils.go @@ -16,44 +16,27 @@ import ( ) // wait on a certain pod annotation related condition -// return error to abort the retry attempt -type podAnnotWaitCond = func(*corev1.Pod, string) (*util.PodAnnotation, bool, error) +type podAnnotWaitCond = func(map[string]string, string) (*util.PodAnnotation, bool) // isOvnReady is a wait condition for OVN master to set pod-networks annotation -func isOvnReady(pod *corev1.Pod, nadName string) (*util.PodAnnotation, bool, error) { - podNADAnnotation, err := util.UnmarshalPodAnnotation(pod.Annotations, nadName) - if err != nil { - if util.IsAnnotationNotSetError(err) { - return nil, false, nil - } - return nil, false, err - } - return podNADAnnotation, true, nil +func isOvnReady(podAnnotation map[string]string, nadName string) (*util.PodAnnotation, bool) { + podNADAnnotation, err := util.UnmarshalPodAnnotation(podAnnotation, nadName) + return podNADAnnotation, err == nil } // isDPUReady is a wait condition which waits for OVN master to set pod-networks annotation and // ovnkube running on DPU to set connection-status pod annotation and its status is Ready -func isDPUReady(annotCondFn podAnnotWaitCond, nadName string) podAnnotWaitCond { - return func(pod *corev1.Pod, nad string) (annotation *util.PodAnnotation, ready bool, err error) { - if annotCondFn != nil { - annotation, ready, err = annotCondFn(pod, nad) - if err != nil || !ready { - return - } - } - // check DPU connection status of the given nad name - status, err := util.UnmarshalPodDPUConnStatus(pod.Annotations, nadName) - if err != nil { - if util.IsAnnotationNotSetError(err) { - return annotation, false, nil +func isDPUReady(podAnnotation map[string]string, nadName string) (*util.PodAnnotation, bool) { + podNADAnnotation, ready := isOvnReady(podAnnotation, nadName) + if ready { + // check DPU connection status + if status, err := util.UnmarshalPodDPUConnStatus(podAnnotation, nadName); err == nil { + if status.Status == util.DPUConnectionStatusReady { + return podNADAnnotation, true } - return annotation, false, err - } - if status.Status == util.DPUConnectionStatusReady { - return annotation, true, nil } - return annotation, false, fmt.Errorf("DPU plumb failed: connection status is %v", status.Status) } + return nil, false } // getPod tries to read a Pod object from the informer cache, or if the pod @@ -102,10 +85,8 @@ func GetPodWithAnnotations(ctx context.Context, getter PodInfoGetter, } // drop through to try again } else if pod != nil { - podNADAnnotation, ready, err := annotCond(pod, nadName) - if err != nil { - return nil, nil, nil, err - } else if ready { + podNADAnnotation, ready := annotCond(pod.Annotations, nadName) + if ready { return pod, pod.Annotations, podNADAnnotation, nil } } diff --git a/go-controller/pkg/cni/utils_test.go b/go-controller/pkg/cni/utils_test.go index 60f5d4d0af..d6f2c470e6 100644 --- a/go-controller/pkg/cni/utils_test.go +++ b/go-controller/pkg/cni/utils_test.go @@ -53,15 +53,7 @@ func newFakeClientSet(pod *corev1.Pod, podNamespaceLister *mocks.PodNamespaceLis var _ = Describe("CNI Utils tests", func() { var defaultPodAnnotation string - var pod *corev1.Pod - - const ( - namespace = "some-ns" - podName = "some-pod" - ) - BeforeEach(func() { - pod = newPod(namespace, podName, nil) defaultPodAnnotation = `{ "default":{"ip_addresses":["192.168.2.3/24"], "mac_address":"0a:58:c0:a8:02:03", @@ -74,15 +66,13 @@ var _ = Describe("CNI Utils tests", func() { Context("isOvnReady", func() { It("Returns true if OVN pod network annotation exists", func() { podAnnot := map[string]string{util.OvnPodAnnotationName: defaultPodAnnotation} - pod.Annotations = podAnnot - _, ready, _ := isOvnReady(pod, ovntypes.DefaultNetworkName) + _, ready := isOvnReady(podAnnot, ovntypes.DefaultNetworkName) Expect(ready).To(BeTrue()) }) It("Returns false if OVN pod network annotation does not exist", func() { podAnnot := map[string]string{} - pod.Annotations = podAnnot - _, ready, _ := isOvnReady(pod, ovntypes.DefaultNetworkName) + _, ready := isOvnReady(podAnnot, ovntypes.DefaultNetworkName) Expect(ready).To(BeFalse()) }) }) @@ -92,9 +82,7 @@ var _ = Describe("CNI Utils tests", func() { podAnnot := map[string]string{ util.OvnPodAnnotationName: defaultPodAnnotation, util.DPUConnectionStatusAnnot: `{"Status":"Ready"}`} - pod.Annotations = podAnnot - _, ready, err := isDPUReady(nil, ovntypes.DefaultNetworkName)(pod, ovntypes.DefaultNetworkName) - Expect(err).ToNot(HaveOccurred()) + _, ready := isDPUReady(podAnnot, ovntypes.DefaultNetworkName) Expect(ready).To(BeTrue()) }) @@ -102,9 +90,7 @@ var _ = Describe("CNI Utils tests", func() { podAnnot := map[string]string{ util.OvnPodAnnotationName: defaultPodAnnotation, util.DPUConnectionStatusAnnot: `{"Status":"NotReady"}`} - pod.Annotations = podAnnot - _, ready, err := isDPUReady(nil, ovntypes.DefaultNetworkName)(pod, ovntypes.DefaultNetworkName) - Expect(err).To(HaveOccurred()) + _, ready := isDPUReady(podAnnot, ovntypes.DefaultNetworkName) Expect(ready).To(BeFalse()) }) @@ -112,34 +98,35 @@ var _ = Describe("CNI Utils tests", func() { podAnnot := map[string]string{ util.OvnPodAnnotationName: defaultPodAnnotation, util.DPUConnectionStatusAnnot: `{"Foo":"Bar"}`} - pod.Annotations = podAnnot - _, ready, err := isDPUReady(nil, ovntypes.DefaultNetworkName)(pod, ovntypes.DefaultNetworkName) - Expect(err).To(HaveOccurred()) + _, ready := isDPUReady(podAnnot, ovntypes.DefaultNetworkName) Expect(ready).To(BeFalse()) }) It("Returns false if dpu.connection-status is not present", func() { podAnnot := map[string]string{util.OvnPodAnnotationName: defaultPodAnnotation} - pod.Annotations = podAnnot - _, ready, err := isDPUReady(nil, ovntypes.DefaultNetworkName)(pod, ovntypes.DefaultNetworkName) - Expect(err).ToNot(HaveOccurred()) + _, ready := isDPUReady(podAnnot, ovntypes.DefaultNetworkName) Expect(ready).To(BeFalse()) }) - It("Returns false if OVN pod annotation is empty", func() { + It("Returns false if OVN pod-networks is not present", func() { podAnnot := map[string]string{} - pod.Annotations = podAnnot - _, ready, err := isDPUReady(nil, ovntypes.DefaultNetworkName)(pod, ovntypes.DefaultNetworkName) - Expect(err).ToNot(HaveOccurred()) + _, ready := isDPUReady(podAnnot, ovntypes.DefaultNetworkName) Expect(ready).To(BeFalse()) }) }) Context("GetPodWithAnnotations", func() { var podNamespaceLister mocks.PodNamespaceLister + var pod *corev1.Pod + + const ( + namespace = "some-ns" + podName = "some-pod" + ) BeforeEach(func() { podNamespaceLister = mocks.PodNamespaceLister{} + pod = newPod(namespace, podName, nil) }) It("Returns Pod annotation if annotation condition is met", func() { @@ -148,11 +135,11 @@ var _ = Describe("CNI Utils tests", func() { ctx, cancelFunc := context.WithTimeout(context.Background(), 20*time.Millisecond) defer cancelFunc() - cond := func(pod *corev1.Pod, _ string) (*util.PodAnnotation, bool, error) { - if _, ok := pod.Annotations["foo"]; ok { - return nil, true, nil + cond := func(podAnnotation map[string]string, _ string) (*util.PodAnnotation, bool) { + if _, ok := podAnnotation["foo"]; ok { + return nil, true } - return nil, false, nil + return nil, false } clientset := newFakeClientSet(pod, &podNamespaceLister) @@ -167,8 +154,8 @@ var _ = Describe("CNI Utils tests", func() { It("Returns with Error if context is canceled", func() { ctx, cancelFunc := context.WithCancel(context.Background()) - cond := func(*corev1.Pod, string) (*util.PodAnnotation, bool, error) { - return nil, false, nil + cond := func(map[string]string, string) (*util.PodAnnotation, bool) { + return nil, false } go func() { @@ -188,12 +175,12 @@ var _ = Describe("CNI Utils tests", func() { defer cancelFunc() calledOnce := false - cond := func(*corev1.Pod, string) (*util.PodAnnotation, bool, error) { + cond := func(map[string]string, string) (*util.PodAnnotation, bool) { if calledOnce { - return nil, true, nil + return nil, true } calledOnce = true - return nil, false, nil + return nil, false } clientset := newFakeClientSet(pod, &podNamespaceLister) @@ -207,8 +194,8 @@ var _ = Describe("CNI Utils tests", func() { ctx, cancelFunc := context.WithTimeout(context.Background(), 1*time.Second) defer cancelFunc() - cond := func(*corev1.Pod, string) (*util.PodAnnotation, bool, error) { - return nil, false, nil + cond := func(map[string]string, string) (*util.PodAnnotation, bool) { + return nil, false } clientset := newFakeClientSet(pod, &podNamespaceLister) @@ -224,17 +211,17 @@ var _ = Describe("CNI Utils tests", func() { defer cancelFunc() calledOnce := false - cond := func(*corev1.Pod, string) (*util.PodAnnotation, bool, error) { + cond := func(map[string]string, string) (*util.PodAnnotation, bool) { if calledOnce { - return nil, true, nil + return nil, true } calledOnce = true - return nil, false, nil + return nil, false } clientset := newFakeClientSet(pod, &podNamespaceLister) - podNamespaceLister.On("Get", mock.AnythingOfType("string")).Return(nil, apierrors.NewNotFound(corev1.Resource("pod"), podName)) + podNamespaceLister.On("Get", mock.AnythingOfType("string")).Return(nil, apierrors.NewNotFound(corev1.Resource("pod"), name)) _, _, _, err := GetPodWithAnnotations(ctx, clientset, namespace, podName, ovntypes.DefaultNetworkName, cond) Expect(err).ToNot(HaveOccurred()) }) @@ -243,13 +230,13 @@ var _ = Describe("CNI Utils tests", func() { ctx, cancelFunc := context.WithTimeout(context.Background(), 1*time.Second) defer cancelFunc() - cond := func(*corev1.Pod, string) (*util.PodAnnotation, bool, error) { - return nil, false, nil + cond := func(map[string]string, string) (*util.PodAnnotation, bool) { + return nil, false } clientset := newFakeClientSet(nil, &podNamespaceLister) - podNamespaceLister.On("Get", mock.AnythingOfType("string")).Return(nil, apierrors.NewNotFound(corev1.Resource("pod"), podName)) + podNamespaceLister.On("Get", mock.AnythingOfType("string")).Return(nil, apierrors.NewNotFound(corev1.Resource("pod"), name)) _, _, _, err := GetPodWithAnnotations(ctx, clientset, namespace, podName, ovntypes.DefaultNetworkName, cond) Expect(err).To(HaveOccurred()) Expect(err.Error()).To(ContainSubstring("timed out waiting for pod after 1s")) diff --git a/go-controller/pkg/config/config.go b/go-controller/pkg/config/config.go index 877d64fdfe..89757b864b 100644 --- a/go-controller/pkg/config/config.go +++ b/go-controller/pkg/config/config.go @@ -53,7 +53,7 @@ var ( // ovn-kubernetes build date BuildDate = "" // ovn-kubernetes version, to be changed with every release - Version = "1.1.0" + Version = "1.0.0" // version of the go runtime used to compile ovn-kubernetes GoVersion = runtime.Version() // os and architecture used to build ovn-kubernetes @@ -134,7 +134,6 @@ var ( // OVNKubernetesFeatureConfig holds OVN-Kubernetes feature enhancement config file parameters and command-line overrides OVNKubernetesFeature = OVNKubernetesFeatureConfig{ EgressIPReachabiltyTotalTimeout: 1, - AdvertisedUDNIsolationMode: AdvertisedUDNIsolationModeStrict, } // OvnNorth holds northbound OVN database client and server authentication and location details @@ -435,9 +434,6 @@ type OVNKubernetesFeatureConfig struct { EnableServiceTemplateSupport bool `gcfg:"enable-svc-template-support"` EnableObservability bool `gcfg:"enable-observability"` EnableNetworkQoS bool `gcfg:"enable-network-qos"` - // This feature requires a kernel fix https://github.com/torvalds/linux/commit/7f3287db654395f9c5ddd246325ff7889f550286 - // to work on a kind cluster. Flag allows to disable it for current CI, will be turned on when github runners have this fix. - AdvertisedUDNIsolationMode string `gcfg:"advertised-udn-isolation-mode"` } // GatewayMode holds the node gateway mode @@ -452,13 +448,6 @@ const ( GatewayModeLocal GatewayMode = "local" ) -const ( - // AdvertisedUDNIsolationModeStrict pod isolation across advertised UDN networks is enabled. - AdvertisedUDNIsolationModeStrict = "strict" - // AdvertisedUDNIsolationModeLoose pod isolation across advertised UDN networks is disabled. - AdvertisedUDNIsolationModeLoose = "loose" -) - // GatewayConfig holds node gateway-related parsed config file parameters and command-line overrides type GatewayConfig struct { // Mode is the gateway mode; if may be either empty (disabled), "shared", or "local" @@ -509,7 +498,7 @@ type GatewayConfig struct { // EphemeralPortRange is the range of ports used by egress SNAT operations in OVN. Specifically for NAT where // the source IP of the NAT will be a shared Node IP address. If unset, the value will be determined by sysctl lookup // for the kernel's ephemeral range: net.ipv4.ip_local_port_range. Format is "-". - EphemeralPortRange string `gcfg:"ephemeral-port-range"` + EphemeralPortRange string `gfcg:"ephemeral-port-range"` } // OvnAuthConfig holds client authentication and location details for @@ -1113,12 +1102,6 @@ var OVNK8sFeatureFlags = []cli.Flag{ Destination: &cliConfig.OVNKubernetesFeature.EnableRouteAdvertisements, Value: OVNKubernetesFeature.EnableRouteAdvertisements, }, - &cli.StringFlag{ - Name: "advertised-udn-isolation-mode", - Usage: "Configure to use pod isolation for BGP advertised UDN networks. Valid values are 'strict' or 'loose'.", - Destination: &cliConfig.OVNKubernetesFeature.AdvertisedUDNIsolationMode, - Value: OVNKubernetesFeature.AdvertisedUDNIsolationMode, - }, &cli.BoolFlag{ Name: "enable-stateless-netpol", Usage: "Configure to use stateless network policy feature with ovn-kubernetes.", @@ -2031,10 +2014,6 @@ func buildOVNKubernetesFeatureConfig(cli, file *config) error { if err := overrideFields(&OVNKubernetesFeature, &cli.OVNKubernetesFeature, &savedOVNKubernetesFeature); err != nil { return err } - if OVNKubernetesFeature.AdvertisedUDNIsolationMode != AdvertisedUDNIsolationModeStrict && OVNKubernetesFeature.AdvertisedUDNIsolationMode != AdvertisedUDNIsolationModeLoose { - return fmt.Errorf("invalid advertised-udn-isolation-mode %q: expect one of %s or %s", - OVNKubernetesFeature.AdvertisedUDNIsolationMode, AdvertisedUDNIsolationModeStrict, AdvertisedUDNIsolationModeLoose) - } return nil } diff --git a/go-controller/pkg/config/config_test.go b/go-controller/pkg/config/config_test.go index c5a032c92c..39e7fa41bc 100644 --- a/go-controller/pkg/config/config_test.go +++ b/go-controller/pkg/config/config_test.go @@ -229,7 +229,6 @@ enable-multi-networkpolicy=false enable-network-segmentation=false enable-preconfigured-udn-addresses=false enable-route-advertisements=false -advertised-udn-isolation-mode=strict enable-interconnect=false enable-multi-external-gateway=false enable-admin-network-policy=false @@ -347,7 +346,6 @@ var _ = Describe("Config Operations", func() { gomega.Expect(OVNKubernetesFeature.EnableMultiExternalGateway).To(gomega.BeFalse()) gomega.Expect(OVNKubernetesFeature.EnableAdminNetworkPolicy).To(gomega.BeFalse()) gomega.Expect(OVNKubernetesFeature.EnablePersistentIPs).To(gomega.BeFalse()) - gomega.Expect(OVNKubernetesFeature.AdvertisedUDNIsolationMode).To(gomega.Equal(AdvertisedUDNIsolationModeStrict)) for _, a := range []OvnAuthConfig{OvnNorth, OvnSouth} { gomega.Expect(a.Scheme).To(gomega.Equal(OvnDBSchemeUnix)) @@ -603,7 +601,6 @@ var _ = Describe("Config Operations", func() { "enable-network-segmentation=true", "enable-preconfigured-udn-addresses=true", "enable-route-advertisements=true", - "advertised-udn-isolation-mode=loose", "enable-interconnect=true", "enable-multi-external-gateway=true", "enable-admin-network-policy=true", @@ -695,7 +692,6 @@ var _ = Describe("Config Operations", func() { gomega.Expect(OVNKubernetesFeature.EnableNetworkSegmentation).To(gomega.BeTrue()) gomega.Expect(OVNKubernetesFeature.EnablePreconfiguredUDNAddresses).To(gomega.BeTrue()) gomega.Expect(OVNKubernetesFeature.EnableRouteAdvertisements).To(gomega.BeTrue()) - gomega.Expect(OVNKubernetesFeature.AdvertisedUDNIsolationMode).To(gomega.Equal(AdvertisedUDNIsolationModeLoose)) gomega.Expect(OVNKubernetesFeature.EnableInterconnect).To(gomega.BeTrue()) gomega.Expect(OVNKubernetesFeature.EnableMultiExternalGateway).To(gomega.BeTrue()) gomega.Expect(OVNKubernetesFeature.EnableAdminNetworkPolicy).To(gomega.BeTrue()) @@ -804,7 +800,6 @@ var _ = Describe("Config Operations", func() { gomega.Expect(OVNKubernetesFeature.EnableNetworkSegmentation).To(gomega.BeTrue()) gomega.Expect(OVNKubernetesFeature.EnablePreconfiguredUDNAddresses).To(gomega.BeTrue()) gomega.Expect(OVNKubernetesFeature.EnableRouteAdvertisements).To(gomega.BeTrue()) - gomega.Expect(OVNKubernetesFeature.AdvertisedUDNIsolationMode).To(gomega.Equal(AdvertisedUDNIsolationModeLoose)) gomega.Expect(OVNKubernetesFeature.EnableMultiNetworkPolicy).To(gomega.BeTrue()) gomega.Expect(OVNKubernetesFeature.EnableInterconnect).To(gomega.BeTrue()) gomega.Expect(OVNKubernetesFeature.EnableMultiExternalGateway).To(gomega.BeTrue()) @@ -881,7 +876,6 @@ var _ = Describe("Config Operations", func() { "-enable-network-segmentation=true", "-enable-preconfigured-udn-addresses=true", "-enable-route-advertisements=true", - "-advertised-udn-isolation-mode=loose", "-enable-interconnect=true", "-enable-multi-external-gateway=true", "-enable-admin-network-policy=true", @@ -1599,24 +1593,6 @@ foo=bar gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - It("rejects a config with invalid advertised-udn-isolation-mode", func() { - err := os.WriteFile(cfgFile.Name(), []byte(`[ovnkubernetesfeature] -advertised-udn-isolation-mode=foo -`), 0o644) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - app.Action = func(ctx *cli.Context) error { - _, err := InitConfig(ctx, kexec.New(), nil) - gomega.Expect(err).To(gomega.MatchError( - gomega.ContainSubstring("invalid advertised-udn-isolation-mode \"foo\": expect one of strict or loose")), - ) - return nil - } - cliArgs := []string{app.Name, "-config-file=" + cfgFile.Name()} - err = app.Run(cliArgs) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - It("rejects a config with invalid syntax", func() { err := os.WriteFile(cfgFile.Name(), []byte(`[default] mtu=1234 diff --git a/go-controller/pkg/config/errors.go b/go-controller/pkg/config/errors.go deleted file mode 100644 index 9666a455da..0000000000 --- a/go-controller/pkg/config/errors.go +++ /dev/null @@ -1,120 +0,0 @@ -package config - -import "fmt" - -type ValidationErrorType string - -const ( - ErrCIDRNotProperlyFormatted ValidationErrorType = "CIDRNotProperlyFormatted" - ErrInvalidCIDRAddress ValidationErrorType = "InvalidCIDRAddress" - ErrHostSubnetMask ValidationErrorType = "HostSubnetMask" - ErrInvalidIPv4HostSubnet ValidationErrorType = "InvalidIPv4HostSubnet" - ErrSubnetOverlap ValidationErrorType = "SubnetOverlap" - ErrExcludedSubnetNotContained ValidationErrorType = "ExcludedSubnetNotContained" - ErrReservedSubnetNotContained ValidationErrorType = "ReservedSubnetNotContained" - ErrInfrastructureSubnetNotContained ValidationErrorType = "InfrastructureSubnetNotContained" - ErrTopologyConfigMismatch ValidationErrorType = "TopologyConfigMismatch" - ErrIPAMLifecycleNotSupported ValidationErrorType = "IPAMLifecycleNotSupported" - ErrSubnetsRequired ValidationErrorType = "SubnetsRequired" - ErrSubnetsMustBeUnset ValidationErrorType = "SubnetsMustBeUnset" -) - -type ValidationError struct { - Type ValidationErrorType - Message string -} - -func (e *ValidationError) Error() string { - return e.Message -} - -// CIDR Validation Errors -func NewCIDRNotProperlyFormattedError(cidr string) *ValidationError { - return &ValidationError{ - Type: ErrCIDRNotProperlyFormatted, - Message: fmt.Sprintf("CIDR %q not properly formatted", cidr), - } -} - -func NewInvalidCIDRAddressError() *ValidationError { - return &ValidationError{ - Type: ErrInvalidCIDRAddress, - Message: "invalid CIDR address", - } -} - -// Subnet Validation Errors -func NewHostSubnetMaskError(hostSubnetLength, clusterSubnetLength int) *ValidationError { - return &ValidationError{ - Type: ErrHostSubnetMask, - Message: fmt.Sprintf("cannot use a host subnet length mask shorter than or equal to the cluster subnet mask. "+ - "host subnet length: %d, cluster subnet length: %d", hostSubnetLength, clusterSubnetLength), - } -} - -func NewInvalidIPv4HostSubnetError() *ValidationError { - return &ValidationError{ - Type: ErrInvalidIPv4HostSubnet, - Message: "invalid host subnet, IPv4 subnet must be < 32", - } -} - -func NewSubnetOverlapError(a, b ConfigSubnet) *ValidationError { - return &ValidationError{ - Type: ErrSubnetOverlap, - Message: fmt.Sprintf("%s %q overlaps %s %q", - a.SubnetType, a.Subnet.String(), - b.SubnetType, b.Subnet.String()), - } -} - -func NewExcludedSubnetNotContainedError(excludeSubnet interface{}) *ValidationError { - return &ValidationError{ - Type: ErrExcludedSubnetNotContained, - Message: fmt.Sprintf("the provided network subnets do not contain excluded subnets %v", excludeSubnet), - } -} - -func NewReservedSubnetNotContainedError(reservedSubnet interface{}) *ValidationError { - return &ValidationError{ - Type: ErrReservedSubnetNotContained, - Message: fmt.Sprintf("the provided network subnets do not contain reserved subnets %v", reservedSubnet), - } -} - -func NewInfrastructureSubnetNotContainedError(infrastructureSubnet interface{}) *ValidationError { - return &ValidationError{ - Type: ErrInfrastructureSubnetNotContained, - Message: fmt.Sprintf("the provided network subnets do not contain infrastructure subnets %v", infrastructureSubnet), - } -} - -// Topology Validation Errors -func NewTopologyConfigMismatchError(topology string) *ValidationError { - return &ValidationError{ - Type: ErrTopologyConfigMismatch, - Message: fmt.Sprintf("topology %[1]s is specified but %[1]s config is nil", topology), - } -} - -// IPAM Validation Errors -func NewIPAMLifecycleNotSupportedError() *ValidationError { - return &ValidationError{ - Type: ErrIPAMLifecycleNotSupported, - Message: "lifecycle Persistent is only supported when ipam.mode is Enabled", - } -} - -func NewSubnetsRequiredError() *ValidationError { - return &ValidationError{ - Type: ErrSubnetsRequired, - Message: "subnets is required with ipam.mode is Enabled or unset", - } -} - -func NewSubnetsMustBeUnsetError() *ValidationError { - return &ValidationError{ - Type: ErrSubnetsMustBeUnset, - Message: "subnets must be unset when ipam.mode is Disabled", - } -} diff --git a/go-controller/pkg/config/utils.go b/go-controller/pkg/config/utils.go index 20f4e0b35c..f0f0ff1a6b 100644 --- a/go-controller/pkg/config/utils.go +++ b/go-controller/pkg/config/utils.go @@ -62,7 +62,7 @@ func ParseClusterSubnetEntriesWithDefaults(clusterSubnetCmd string, ipv4HostLeng splitClusterEntry := strings.Split(clusterEntry, "/") if len(splitClusterEntry) < 2 || len(splitClusterEntry) > 3 { - return nil, NewCIDRNotProperlyFormattedError(clusterEntry) + return nil, fmt.Errorf("CIDR %q not properly formatted", clusterEntry) } var err error @@ -78,7 +78,7 @@ func ParseClusterSubnetEntriesWithDefaults(clusterSubnetCmd string, ipv4HostLeng entryMaskLength, _ := parsedClusterEntry.CIDR.Mask.Size() if len(splitClusterEntry) == 3 { if !hostLengthAllowed { - return nil, NewCIDRNotProperlyFormattedError(clusterEntry) + return nil, fmt.Errorf("CIDR %q not properly formatted", clusterEntry) } tmp, err := strconv.Atoi(splitClusterEntry[2]) if err != nil { @@ -100,11 +100,12 @@ func ParseClusterSubnetEntriesWithDefaults(clusterSubnetCmd string, ipv4HostLeng } if !ipv6 && parsedClusterEntry.HostSubnetLength > 32 { - return nil, NewInvalidIPv4HostSubnetError() + return nil, fmt.Errorf("invalid host subnet, IPv4 subnet must be < 32") } if parsedClusterEntry.HostSubnetLength <= entryMaskLength { - return nil, NewHostSubnetMaskError(parsedClusterEntry.HostSubnetLength, entryMaskLength) + return nil, fmt.Errorf("cannot use a host subnet length mask shorter than or equal to the cluster subnet mask. "+ + "host subnet length: %d, cluster subnet length: %d", parsedClusterEntry.HostSubnetLength, entryMaskLength) } } @@ -215,7 +216,9 @@ func (cs *ConfigSubnets) CheckForOverlaps() error { for j := 0; j < i; j++ { sj := cs.Subnets[j] if si.Subnet.Contains(sj.Subnet.IP) || sj.Subnet.Contains(si.Subnet.IP) { - return NewSubnetOverlapError(si, sj) + return fmt.Errorf("illegal network configuration: %s %q overlaps %s %q", + si.SubnetType, si.Subnet.String(), + sj.SubnetType, sj.Subnet.String()) } } } diff --git a/go-controller/pkg/controller/controller.go b/go-controller/pkg/controller/controller.go index f486981bdd..6980c3ee6d 100644 --- a/go-controller/pkg/controller/controller.go +++ b/go-controller/pkg/controller/controller.go @@ -27,7 +27,6 @@ const ( // to reconcile through its Reconcile method type Reconciler interface { Reconcile(key string) - ReconcileRateLimited(key string) ReconcileAfter(key string, duration time.Duration) addHandler() error startWorkers() error @@ -273,10 +272,6 @@ func (c *controller[T]) Reconcile(key string) { c.queue.Add(key) } -func (c *controller[T]) ReconcileRateLimited(key string) { - c.queue.AddRateLimited(key) -} - func (c *controller[T]) ReconcileAfter(key string, duration time.Duration) { c.queue.AddAfter(key, duration) } diff --git a/go-controller/pkg/controllermanager/controller_manager.go b/go-controller/pkg/controllermanager/controller_manager.go index 55aaec6831..27db274d05 100644 --- a/go-controller/pkg/controllermanager/controller_manager.go +++ b/go-controller/pkg/controllermanager/controller_manager.go @@ -2,7 +2,6 @@ package controllermanager import ( "context" - "errors" "fmt" "sync" "time" @@ -196,15 +195,15 @@ func (cm *ControllerManager) CleanupStaleNetworks(validNetworks ...util.NetInfo) } } - // Remove stale subnets from the advertised networks address set used for isolation - // NOTE: network reconciliation will take care of removing the subnets for existing networks that are no longer - // advertised. - addressSetFactory := addressset.NewOvnAddressSetFactory(cm.nbClient, config.IPv4Mode, config.IPv6Mode) - advertisedSubnets, err := addressSetFactory.GetAddressSet(ovn.GetAdvertisedNetworkSubnetsAddressSetDBIDs()) - if err != nil && !errors.Is(err, libovsdbclient.ErrNotFound) { - return fmt.Errorf("failed to get advertised subnets addresset %s: %w", ovn.GetAdvertisedNetworkSubnetsAddressSetDBIDs(), err) - } - if advertisedSubnets != nil { + if util.IsRouteAdvertisementsEnabled() { + // Remove stale subnets from the advertised networks address set used for isolation + // NOTE: network reconciliation will take care of removing the subnets for existing networks that are no longer + // advertised. + addressSetFactory := addressset.NewOvnAddressSetFactory(cm.nbClient, config.IPv4Mode, config.IPv6Mode) + advertisedSubnets, err := addressSetFactory.GetAddressSet(ovn.GetAdvertisedNetworkSubnetsAddressSetDBIDs()) + if err != nil { + return fmt.Errorf("failed to get advertised subnets addresset %s: %w", ovn.GetAdvertisedNetworkSubnetsAddressSetDBIDs(), err) + } v4AdvertisedSubnets, v6AdvertisedSubnets := advertisedSubnets.GetAddresses() var invalidSubnets []string for _, subnet := range append(v4AdvertisedSubnets, v6AdvertisedSubnets...) { diff --git a/go-controller/pkg/controllermanager/node_controller_manager.go b/go-controller/pkg/controllermanager/node_controller_manager.go index 94fbf18fd2..aca81d30f7 100644 --- a/go-controller/pkg/controllermanager/node_controller_manager.go +++ b/go-controller/pkg/controllermanager/node_controller_manager.go @@ -60,7 +60,7 @@ func (ncm *NodeControllerManager) NewNetworkController(nInfo util.NetInfo) (netw // Pass a shallow clone of the watch factory, this allows multiplexing // informers for secondary networks. return node.NewSecondaryNodeNetworkController(ncm.newCommonNetworkControllerInfo(ncm.watchFactory.(*factory.WatchFactory).ShallowClone()), - nInfo, ncm.networkManager.Interface(), ncm.vrfManager, ncm.ruleManager, ncm.defaultNodeNetworkController.Gateway) + nInfo, ncm.vrfManager, ncm.ruleManager, ncm.defaultNodeNetworkController.Gateway) } return nil, fmt.Errorf("topology type %s not supported", topoType) } diff --git a/go-controller/pkg/crd/userdefinednetwork/v1/apis/applyconfiguration/userdefinednetwork/v1/layer2config.go b/go-controller/pkg/crd/userdefinednetwork/v1/apis/applyconfiguration/userdefinednetwork/v1/layer2config.go index cde4b5ed04..0b70145a87 100644 --- a/go-controller/pkg/crd/userdefinednetwork/v1/apis/applyconfiguration/userdefinednetwork/v1/layer2config.go +++ b/go-controller/pkg/crd/userdefinednetwork/v1/apis/applyconfiguration/userdefinednetwork/v1/layer2config.go @@ -24,14 +24,11 @@ import ( // Layer2ConfigApplyConfiguration represents a declarative configuration of the Layer2Config type for use // with apply. type Layer2ConfigApplyConfiguration struct { - Role *userdefinednetworkv1.NetworkRole `json:"role,omitempty"` - MTU *int32 `json:"mtu,omitempty"` - Subnets *userdefinednetworkv1.DualStackCIDRs `json:"subnets,omitempty"` - ReservedSubnets []userdefinednetworkv1.CIDR `json:"reservedSubnets,omitempty"` - InfrastructureSubnets []userdefinednetworkv1.CIDR `json:"infrastructureSubnets,omitempty"` - DefaultGatewayIPs *userdefinednetworkv1.DualStackIPs `json:"defaultGatewayIPs,omitempty"` - JoinSubnets *userdefinednetworkv1.DualStackCIDRs `json:"joinSubnets,omitempty"` - IPAM *IPAMConfigApplyConfiguration `json:"ipam,omitempty"` + Role *userdefinednetworkv1.NetworkRole `json:"role,omitempty"` + MTU *int32 `json:"mtu,omitempty"` + Subnets *userdefinednetworkv1.DualStackCIDRs `json:"subnets,omitempty"` + JoinSubnets *userdefinednetworkv1.DualStackCIDRs `json:"joinSubnets,omitempty"` + IPAM *IPAMConfigApplyConfiguration `json:"ipam,omitempty"` } // Layer2ConfigApplyConfiguration constructs a declarative configuration of the Layer2Config type for use with @@ -64,34 +61,6 @@ func (b *Layer2ConfigApplyConfiguration) WithSubnets(value userdefinednetworkv1. return b } -// WithReservedSubnets adds the given value to the ReservedSubnets field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ReservedSubnets field. -func (b *Layer2ConfigApplyConfiguration) WithReservedSubnets(values ...userdefinednetworkv1.CIDR) *Layer2ConfigApplyConfiguration { - for i := range values { - b.ReservedSubnets = append(b.ReservedSubnets, values[i]) - } - return b -} - -// WithInfrastructureSubnets adds the given value to the InfrastructureSubnets field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the InfrastructureSubnets field. -func (b *Layer2ConfigApplyConfiguration) WithInfrastructureSubnets(values ...userdefinednetworkv1.CIDR) *Layer2ConfigApplyConfiguration { - for i := range values { - b.InfrastructureSubnets = append(b.InfrastructureSubnets, values[i]) - } - return b -} - -// WithDefaultGatewayIPs sets the DefaultGatewayIPs field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DefaultGatewayIPs field is set to the value of the last call. -func (b *Layer2ConfigApplyConfiguration) WithDefaultGatewayIPs(value userdefinednetworkv1.DualStackIPs) *Layer2ConfigApplyConfiguration { - b.DefaultGatewayIPs = &value - return b -} - // WithJoinSubnets sets the JoinSubnets field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the JoinSubnets field is set to the value of the last call. diff --git a/go-controller/pkg/crd/userdefinednetwork/v1/shared.go b/go-controller/pkg/crd/userdefinednetwork/v1/shared.go index 9787415ddc..b3a32b1888 100644 --- a/go-controller/pkg/crd/userdefinednetwork/v1/shared.go +++ b/go-controller/pkg/crd/userdefinednetwork/v1/shared.go @@ -91,17 +91,6 @@ type Layer3Subnet struct { // +kubebuilder:validation:XValidation:rule="!has(self.ipam) || !has(self.ipam.mode) || self.ipam.mode != 'Disabled' || self.role == 'Secondary'", message="Disabled ipam.mode is only supported for Secondary network" // +kubebuilder:validation:XValidation:rule="!has(self.joinSubnets) || has(self.role) && self.role == 'Primary'", message="JoinSubnets is only supported for Primary network" // +kubebuilder:validation:XValidation:rule="!has(self.subnets) || !has(self.mtu) || !self.subnets.exists_one(i, isCIDR(i) && cidr(i).ip().family() == 6) || self.mtu >= 1280", message="MTU should be greater than or equal to 1280 when IPv6 subnet is used" -// +kubebuilder:validation:XValidation:rule="!has(self.defaultGatewayIPs) || has(self.role) && self.role == 'Primary'", message="defaultGatewayIPs is only supported for Primary network" -// +kubebuilder:validation:XValidation:rule="!has(self.defaultGatewayIPs) || self.defaultGatewayIPs.all(ip, self.subnets.exists(subnet, cidr(subnet).containsIP(ip)))", message="defaultGatewayIPs must belong to one of the subnets specified in the subnets field" -// +kubebuilder:validation:XValidation:rule="!has(self.defaultGatewayIPs) || size(self.defaultGatewayIPs) == size(self.subnets)", message="defaultGatewayIPs must be specified for all IP families" -// +kubebuilder:validation:XValidation:rule="!has(self.reservedSubnets) || has(self.subnets)", message="reservedSubnets must be unset when subnets is unset" -// +kubebuilder:validation:XValidation:rule="!has(self.reservedSubnets) || has(self.role) && self.role == 'Primary'", message="reservedSubnets is only supported for Primary network" -// +kubebuilder:validation:XValidation:rule="!has(self.infrastructureSubnets) || has(self.subnets)", message="infrastructureSubnets must be unset when subnets is unset" -// +kubebuilder:validation:XValidation:rule="!has(self.infrastructureSubnets) || has(self.role) && self.role == 'Primary'", message="infrastructureSubnets is only supported for Primary network" -// +kubebuilder:validation:XValidation:rule="!has(self.infrastructureSubnets) || !has(self.defaultGatewayIPs) || self.defaultGatewayIPs.all(ip, self.infrastructureSubnets.exists(subnet, cidr(subnet).containsIP(ip)))", message="defaultGatewayIPs have to belong to infrastructureSubnets" -// +kubebuilder:validation:XValidation:rule="!has(self.reservedSubnets) || self.reservedSubnets.all(e, self.subnets.exists(s, cidr(s).containsCIDR(cidr(e))))",message="reservedSubnets must be subnetworks of the networks specified in the subnets field",fieldPath=".reservedSubnets" -// +kubebuilder:validation:XValidation:rule="!has(self.infrastructureSubnets) || self.infrastructureSubnets.all(e, self.subnets.exists(s, cidr(s).containsCIDR(cidr(e))))",message="infrastructureSubnets must be subnetworks of the networks specified in the subnets field",fieldPath=".infrastructureSubnets" -// +kubebuilder:validation:XValidation:rule="!has(self.infrastructureSubnets) || !has(self.reservedSubnets) || self.infrastructureSubnets.all(infra, !self.reservedSubnets.exists(reserved, cidr(infra).containsCIDR(reserved) || cidr(reserved).containsCIDR(infra)))", message="infrastructureSubnets and reservedSubnets must not overlap" type Layer2Config struct { // Role describes the network role in the pod. // @@ -130,43 +119,6 @@ type Layer2Config struct { // +optional Subnets DualStackCIDRs `json:"subnets,omitempty"` - // reservedSubnets specifies a list of CIDRs reserved for static IP assignment, excluded from automatic allocation. - // reservedSubnets is optional. When omitted, all IP addresses in `subnets` are available for automatic assignment. - // IPs from these ranges can still be requested through static IP assignment. - // Each item should be in range of the specified CIDR(s) in `subnets`. - // The maximum number of entries allowed is 25. - // The format should match standard CIDR notation (for example, "10.128.0.0/16"). - // This field must be omitted if `subnets` is unset or `ipam.mode` is `Disabled`. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=25 - ReservedSubnets []CIDR `json:"reservedSubnets,omitempty"` - - // infrastructureSubnets specifies a list of internal CIDR ranges that OVN-Kubernetes will reserve for internal network infrastructure. - // Any IP addresses within these ranges cannot be assigned to workloads. - // When omitted, OVN-Kubernetes will automatically allocate IP addresses from `subnets` for its infrastructure needs. - // When there are not enough available IPs in the provided infrastructureSubnets, OVN-Kubernetes will automatically allocate IP addresses from subnets for its infrastructure needs. - // When `reservedSubnets` is also specified the CIDRs cannot overlap. - // When `defaultGatewayIPs` is also specified, the default gateway IPs must belong to one of the infrastructure subnet CIDRs. - // Each item should be in range of the specified CIDR(s) in `subnets`. - // The maximum number of entries allowed is 4. - // The format should match standard CIDR notation (for example, "10.128.0.0/16"). - // This field must be omitted if `subnets` is unset or `ipam.mode` is `Disabled`. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=4 - InfrastructureSubnets []CIDR `json:"infrastructureSubnets,omitempty"` - - // defaultGatewayIPs specifies the default gateway IP used in the internal OVN topology. - // - // Dual-stack clusters may set 2 IPs (one for each IP family), otherwise only 1 IP is allowed. - // This field is only allowed for "Primary" network. - // It is not recommended to set this field without explicit need and understanding of the OVN network topology. - // When omitted, an IP from the subnets field is used. - // - // +optional - DefaultGatewayIPs DualStackIPs `json:"defaultGatewayIPs,omitempty"` - // JoinSubnets are used inside the OVN network topology. // // Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed. @@ -235,11 +187,3 @@ type CIDR string // +kubebuilder:validation:MaxItems=2 // +kubebuilder:validation:XValidation:rule="size(self) != 2 || !isCIDR(self[0]) || !isCIDR(self[1]) || cidr(self[0]).ip().family() != cidr(self[1]).ip().family()", message="When 2 CIDRs are set, they must be from different IP families" type DualStackCIDRs []CIDR - -// +kubebuilder:validation:XValidation:rule="isIP(self)", message="IP is invalid" -type IP string - -// +kubebuilder:validation:MinItems=1 -// +kubebuilder:validation:MaxItems=2 -// +kubebuilder:validation:XValidation:rule="size(self) != 2 || !isIP(self[0]) || !isIP(self[1]) || ip(self[0]).family() != ip(self[1]).family()", message="When 2 IPs are set, they must be from different IP families" -type DualStackIPs []IP diff --git a/go-controller/pkg/crd/userdefinednetwork/v1/zz_generated.deepcopy.go b/go-controller/pkg/crd/userdefinednetwork/v1/zz_generated.deepcopy.go index 0d0809a677..2ec5e6b77b 100644 --- a/go-controller/pkg/crd/userdefinednetwork/v1/zz_generated.deepcopy.go +++ b/go-controller/pkg/crd/userdefinednetwork/v1/zz_generated.deepcopy.go @@ -163,26 +163,6 @@ func (in DualStackCIDRs) DeepCopy() DualStackCIDRs { return *out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in DualStackIPs) DeepCopyInto(out *DualStackIPs) { - { - in := &in - *out = make(DualStackIPs, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DualStackIPs. -func (in DualStackIPs) DeepCopy() DualStackIPs { - if in == nil { - return nil - } - out := new(DualStackIPs) - in.DeepCopyInto(out) - return *out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IPAMConfig) DeepCopyInto(out *IPAMConfig) { *out = *in @@ -207,21 +187,6 @@ func (in *Layer2Config) DeepCopyInto(out *Layer2Config) { *out = make(DualStackCIDRs, len(*in)) copy(*out, *in) } - if in.ReservedSubnets != nil { - in, out := &in.ReservedSubnets, &out.ReservedSubnets - *out = make([]CIDR, len(*in)) - copy(*out, *in) - } - if in.InfrastructureSubnets != nil { - in, out := &in.InfrastructureSubnets, &out.InfrastructureSubnets - *out = make([]CIDR, len(*in)) - copy(*out, *in) - } - if in.DefaultGatewayIPs != nil { - in, out := &in.DefaultGatewayIPs, &out.DefaultGatewayIPs - *out = make(DualStackIPs, len(*in)) - copy(*out, *in) - } if in.JoinSubnets != nil { in, out := &in.JoinSubnets, &out.JoinSubnets *out = make(DualStackCIDRs, len(*in)) diff --git a/go-controller/pkg/factory/factory.go b/go-controller/pkg/factory/factory.go index 4c7b0c6618..b3277ea9cf 100644 --- a/go-controller/pkg/factory/factory.go +++ b/go-controller/pkg/factory/factory.go @@ -527,113 +527,153 @@ func NewOVNKubeControllerWatchFactory(ovnClientset *util.OVNKubeControllerClient // Start starts the factory and begins processing events func (wf *WatchFactory) Start() error { - start := time.Now() klog.Info("Starting watch factory") wf.iFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.iFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.iFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } if config.OVNKubernetesFeature.EnableAdminNetworkPolicy && wf.anpFactory != nil { wf.anpFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.anpFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.anpFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if config.OVNKubernetesFeature.EnableEgressIP && wf.eipFactory != nil { wf.eipFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.eipFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.eipFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if config.OVNKubernetesFeature.EnableEgressFirewall && wf.efFactory != nil { wf.efFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.efFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.efFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } if config.OVNKubernetesFeature.EnableDNSNameResolver && wf.dnsFactory != nil { wf.dnsFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.dnsFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.dnsFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } } if util.PlatformTypeIsEgressIPCloudProvider() && wf.cpipcFactory != nil { wf.cpipcFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.cpipcFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.cpipcFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if config.OVNKubernetesFeature.EnableEgressQoS && wf.egressQoSFactory != nil { wf.egressQoSFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.egressQoSFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.egressQoSFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if util.IsMultiNetworkPoliciesSupportEnabled() && wf.mnpFactory != nil { wf.mnpFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.mnpFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.mnpFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if config.OVNKubernetesFeature.EnableEgressService && wf.egressServiceFactory != nil { wf.egressServiceFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.egressServiceFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.egressServiceFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if config.OVNKubernetesFeature.EnableMultiExternalGateway && wf.apbRouteFactory != nil { wf.apbRouteFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.apbRouteFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.apbRouteFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if wf.ipamClaimsFactory != nil { wf.ipamClaimsFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.ipamClaimsFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.ipamClaimsFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if wf.nadFactory != nil { wf.nadFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.nadFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.nadFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if config.OVNKubernetesFeature.EnableNetworkQoS && wf.networkQoSFactory != nil { wf.networkQoSFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.networkQoSFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.networkQoSFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if util.IsNetworkSegmentationSupportEnabled() && wf.udnFactory != nil { wf.udnFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.udnFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.udnFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if wf.raFactory != nil { wf.raFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.raFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.raFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } if wf.frrFactory != nil { wf.frrFactory.Start(wf.stopChan) - if err := waitForCacheSyncWithTimeout(wf.frrFactory, wf.stopChan); err != nil { - return err + for oType, synced := range waitForCacheSyncWithTimeout(wf.frrFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } + } + } + + if config.OVNKubernetesFeature.EnableNetworkQoS && wf.networkQoSFactory != nil { + wf.networkQoSFactory.Start(wf.stopChan) + for oType, synced := range waitForCacheSyncWithTimeout(wf.networkQoSFactory, wf.stopChan) { + if !synced { + return fmt.Errorf("error in syncing cache for %v informer", oType) + } } } - klog.Infof("Watch Factory start up complete, took: %s", time.Since(start)) + return nil } @@ -1879,18 +1919,10 @@ type waitForCacheSyncer interface { WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool } -func waitForCacheSyncWithTimeout(factory waitForCacheSyncer, stopCh <-chan struct{}) error { - // Give some small amount of time for sync. It helps significantly reduce unit tests time. +func waitForCacheSyncWithTimeout(factory waitForCacheSyncer, stopCh <-chan struct{}) map[reflect.Type]bool { + // Give some small time for sync. It helps significantly reduce unit tests time time.Sleep(5 * time.Millisecond) - - for oType, synced := range factory.WaitForCacheSync(util.GetChildStopChanWithTimeout(stopCh, types.InformerSyncTimeout)) { - if !synced { - return fmt.Errorf("error in syncing cache for %v informer", oType) - } else { - klog.Infof("%s informer cache synced successfully", oType) - } - } - return nil + return factory.WaitForCacheSync(util.GetChildStopChanWithTimeout(stopCh, types.InformerSyncTimeout)) } // getEndpointSliceSelector returns an EndpointSlice selector function used in watchers. diff --git a/go-controller/pkg/generator/udn/join_ips.go b/go-controller/pkg/generator/udn/join_ips.go deleted file mode 100644 index 945799d245..0000000000 --- a/go-controller/pkg/generator/udn/join_ips.go +++ /dev/null @@ -1,90 +0,0 @@ -package udn - -import ( - "fmt" - "net" - - corev1 "k8s.io/api/core/v1" - utilnet "k8s.io/utils/net" - - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - ipgenerator "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/ip" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" -) - -func GetGWRouterIPv4(node *corev1.Node, netInfo util.NetInfo) (net.IP, error) { - gwRouterIPs, err := GetGWRouterIPs(node, netInfo) - if err != nil { - return nil, err - } - var gwRouterIPv4 net.IP - for _, gwRouterIP := range gwRouterIPs { - if utilnet.IsIPv4(gwRouterIP.IP) { - gwRouterIPv4 = gwRouterIP.IP - break - } - } - if gwRouterIPv4 == nil { - return nil, fmt.Errorf("failed to find an IPv4 address for gateway router in node: %s, net: %s", - node.Name, netInfo.GetNetworkName()) - } - return gwRouterIPv4, nil -} - -func GetGWRouterIPv6(node *corev1.Node, netInfo util.NetInfo) (net.IP, error) { - gwRouterIPs, err := GetGWRouterIPs(node, netInfo) - if err != nil { - return nil, err - } - var gwRouterIPv6 net.IP - for _, gwRouterIP := range gwRouterIPs { - if utilnet.IsIPv6(gwRouterIP.IP) { - gwRouterIPv6 = gwRouterIP.IP - break - } - } - if gwRouterIPv6 == nil { - return nil, fmt.Errorf("failed to find an IPv6 address for gateway router in node: %s, net: %s", - node.Name, netInfo.GetNetworkName()) - } - return gwRouterIPv6, nil -} - -// TODO this can be moved to netInfo to avoid instantiating the same IPGenerator -func GetGWRouterIPs(node *corev1.Node, netInfo util.NetInfo) ([]*net.IPNet, error) { - var gwRouterAddrs []*net.IPNet - // we allocate join subnets for L3/L2 primary user defined networks or default network - if !(netInfo.IsDefault() || (util.IsNetworkSegmentationSupportEnabled() && netInfo.IsPrimaryNetwork())) { - return gwRouterAddrs, nil - } - // Allocate the IP address(es) for the node Gateway router port connecting - // to the Join switch - nodeID, err := util.GetNodeID(node) - if err != nil { - // Don't consider this node as cluster-manager has not allocated node id yet. - return nil, fmt.Errorf("failed to generate gateway router port address for node %s: %w", node.Name, err) - } - if config.IPv4Mode { - gwRouterAddr, err := getGWRouterIP(netInfo.JoinSubnetV4().String(), nodeID) - if err != nil { - return nil, fmt.Errorf("failed to generate gateway router port ipv4 address for node %s : err - %w", node.Name, err) - } - gwRouterAddrs = append(gwRouterAddrs, gwRouterAddr) - } - if config.IPv6Mode { - gwRouterAddr, err := getGWRouterIP(netInfo.JoinSubnetV6().String(), nodeID) - if err != nil { - return nil, fmt.Errorf("failed to generate gateway router port ipv6 address for node %s : err - %w", node.Name, err) - } - gwRouterAddrs = append(gwRouterAddrs, gwRouterAddr) - } - return gwRouterAddrs, nil -} - -func getGWRouterIP(subnet string, nodeID int) (*net.IPNet, error) { - nodeGWRouterLRPIPGenerator, err := ipgenerator.NewIPGenerator(subnet) - if err != nil { - return nil, fmt.Errorf("error creating IP Generator for subnet %s: %w", subnet, err) - } - return nodeGWRouterLRPIPGenerator.GenerateIP(nodeID) -} diff --git a/go-controller/pkg/kubevirt/pod.go b/go-controller/pkg/kubevirt/pod.go index 8cde9d713e..901d28ca74 100644 --- a/go-controller/pkg/kubevirt/pod.go +++ b/go-controller/pkg/kubevirt/pod.go @@ -16,7 +16,6 @@ import ( libovsdbclient "github.com/ovn-kubernetes/libovsdb/client" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" libovsdbops "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/ops" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb" @@ -521,14 +520,19 @@ func (r *DefaultGatewayReconciler) ReconcileIPv4AfterLiveMigration(liveMigration return err } - lrpJoinAddress, err := udn.GetGWRouterIPv4(targetNode, r.netInfo) + lrpJoinAddress, err := util.ParseNodeGatewayRouterJoinNetwork(targetNode, r.netInfo.GetNetworkName()) if err != nil { return err } - lrpMAC := util.IPAddrToHWAddr(lrpJoinAddress) + lrpJoinIPv4, _, err := net.ParseCIDR(lrpJoinAddress.IPv4) + if err != nil { + return err + } + + lrpMAC := util.IPAddrToHWAddr(lrpJoinIPv4) for _, subnet := range r.netInfo.Subnets() { - gwIP := r.netInfo.GetNodeGatewayIP(subnet.CIDR).IP.To4() + gwIP := util.GetNodeGatewayIfAddr(subnet.CIDR).IP.To4() if gwIP == nil { continue } @@ -577,7 +581,7 @@ func (r *DefaultGatewayReconciler) ReconcileIPv6AfterLiveMigration(liveMigration // skip the target node since this is the proper gateway continue } - nodeJoinAddrs, err := udn.GetGWRouterIPs(node, r.netInfo) + nodeJoinAddrs, err := util.ParseNodeGatewayRouterJoinAddrs(node, r.netInfo.GetNetworkName()) if err != nil { return ovntypes.NewSuppressedError(fmt.Errorf("failed parsing join addresss from node %q and network %q to reconcile ipv6 gateway: %w", node.Name, r.netInfo.GetNetworkName(), err)) } @@ -593,7 +597,7 @@ func (r *DefaultGatewayReconciler) ReconcileIPv6AfterLiveMigration(liveMigration if err != nil { return fmt.Errorf("failed fetching node %q to reconcile ipv6 gateway: %w", liveMigration.TargetPod.Spec.NodeName, err) } - targetNodeJoinAddrs, err := udn.GetGWRouterIPs(targetNode, r.netInfo) + targetNodeJoinAddrs, err := util.ParseNodeGatewayRouterJoinAddrs(targetNode, r.netInfo.GetNetworkName()) if err != nil { return ovntypes.NewSuppressedError(fmt.Errorf("failed parsing join addresss from live migration target node %q and network %q to reconcile ipv6 gateway: %w", targetNode.Name, r.netInfo.GetNetworkName(), err)) } diff --git a/go-controller/pkg/kubevirt/router.go b/go-controller/pkg/kubevirt/router.go index 779bac1ead..ed4a5dfab2 100644 --- a/go-controller/pkg/kubevirt/router.go +++ b/go-controller/pkg/kubevirt/router.go @@ -12,7 +12,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" libovsdbops "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/ops" libovsdbutil "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/util" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb" @@ -100,7 +99,7 @@ func EnsureLocalZonePodAddressesToNodeRoute(watchFactory *factory.WatchFactory, if err != nil { return fmt.Errorf("failed getting to list node %q for pod %s/%s: %w", pod.Spec.NodeName, pod.Namespace, pod.Name, err) } - gatewayIPs, err := udn.GetGWRouterIPs(node, &util.DefaultNetInfo{}) + gatewayIPs, err := util.ParseNodeGatewayRouterJoinAddrs(node, types.DefaultNetworkName) if err != nil { return fmt.Errorf("failed to get default network gateway router join IPs for node %q: %w", node.Name, err) } diff --git a/go-controller/pkg/libovsdb/ops/portbinding.go b/go-controller/pkg/libovsdb/ops/portbinding.go new file mode 100644 index 0000000000..0267a794c0 --- /dev/null +++ b/go-controller/pkg/libovsdb/ops/portbinding.go @@ -0,0 +1,53 @@ +package ops + +import ( + "fmt" + + libovsdbclient "github.com/ovn-kubernetes/libovsdb/client" + + "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/sbdb" +) + +// UpdatePortBindingSetChassis sets the chassis column of the 'portBinding' row so that the OVN thinks that +// the port binding 'portBinding' is bound on the chassis. Ideally its ovn-controller which claims/binds +// a port binding. But for a remote chassis, we have to bind it as we created the remote chassis +// record for the remote zone nodes. +// TODO (numans) remove this function once OVN supports binding a port binding for a remote +// chassis. +func UpdatePortBindingSetChassis(sbClient libovsdbclient.Client, portBinding *sbdb.PortBinding, chassis *sbdb.Chassis) error { + ch, err := GetChassis(sbClient, chassis) + if err != nil { + return fmt.Errorf("failed to get chassis id %s(%s), error: %v", chassis.Name, chassis.Hostname, err) + } + portBinding.Chassis = &ch.UUID + + opModel := operationModel{ + Model: portBinding, + OnModelUpdates: []interface{}{&portBinding.Chassis}, + ErrNotFound: true, + BulkOp: false, + } + + m := newModelClient(sbClient) + _, err = m.CreateOrUpdate(opModel) + return err +} + +// GetPortBinding looks up a portBinding in SBDB +func GetPortBinding(sbClient libovsdbclient.Client, portBinding *sbdb.PortBinding) (*sbdb.PortBinding, error) { + found := []*sbdb.PortBinding{} + opModel := operationModel{ + Model: portBinding, + ExistingResult: &found, + ErrNotFound: true, + BulkOp: false, + } + + m := newModelClient(sbClient) + err := m.Lookup(opModel) + if err != nil { + return nil, err + } + + return found[0], nil +} diff --git a/go-controller/pkg/libovsdb/ops/router.go b/go-controller/pkg/libovsdb/ops/router.go index 5f0ce594d4..18b3931a1f 100644 --- a/go-controller/pkg/libovsdb/ops/router.go +++ b/go-controller/pkg/libovsdb/ops/router.go @@ -932,11 +932,6 @@ func RemoveLoadBalancersFromLogicalRouterOps(nbClient libovsdbclient.Client, ops return ops, err } -func getNATMutableFields(nat *nbdb.NAT) []interface{} { - return []interface{}{&nat.Type, &nat.ExternalIP, &nat.LogicalIP, &nat.LogicalPort, &nat.ExternalMAC, - &nat.ExternalIDs, &nat.Match, &nat.Options, &nat.ExternalPortRange, &nat.GatewayPort, &nat.Priority} -} - func buildNAT( natType nbdb.NATType, externalIP string, @@ -1040,7 +1035,7 @@ func BuildDNATAndSNATWithMatch( // isEquivalentNAT checks if the `searched` NAT is equivalent to `existing`. // Returns true if the UUID is set in `searched` and matches the UUID of `existing`. // Otherwise, perform the following checks: -// - Compare the Type. +// - Compare the Type and Match fields. // - Compare ExternalIP if it is set in `searched`. // - Compare LogicalIP if the Type in `searched` is SNAT. // - Compare LogicalPort if it is set in `searched`. @@ -1055,6 +1050,10 @@ func isEquivalentNAT(existing *nbdb.NAT, searched *nbdb.NAT) bool { return false } + if searched.Match != existing.Match { + return false + } + // Compare externalIP if it's not empty. if searched.ExternalIP != "" && searched.ExternalIP != existing.ExternalIP { return false @@ -1157,7 +1156,7 @@ func CreateOrUpdateNATsOps(nbClient libovsdbclient.Client, ops []ovsdb.Operation } opModel := operationModel{ Model: inputNat, - OnModelUpdates: getNATMutableFields(inputNat), + OnModelUpdates: onModelUpdatesAllNonDefault(), ErrNotFound: false, BulkOp: false, DoAfter: func() { router.Nat = append(router.Nat, inputNat.UUID) }, @@ -1285,7 +1284,7 @@ func UpdateNATOps(nbClient libovsdbclient.Client, ops []ovsdb.Operation, nats .. opModel := []operationModel{ { Model: nat, - OnModelUpdates: getNATMutableFields(nat), + OnModelUpdates: onModelUpdatesAllNonDefault(), ErrNotFound: true, BulkOp: false, }, diff --git a/go-controller/pkg/libovsdb/util/switch.go b/go-controller/pkg/libovsdb/util/switch.go index 3c2bf0b59b..c3b1eb9e02 100644 --- a/go-controller/pkg/libovsdb/util/switch.go +++ b/go-controller/pkg/libovsdb/util/switch.go @@ -25,7 +25,7 @@ var updateNodeSwitchLock sync.Mutex // is added to the logical switch's exclude_ips. This prevents ovn-northd log // spam about duplicate IP addresses. // See https://github.com/ovn-org/ovn-kubernetes/pull/779 -func UpdateNodeSwitchExcludeIPs(nbClient libovsdbclient.Client, mgmtIfName, switchName, nodeName string, subnet, mgmtIfAddr *net.IPNet) error { +func UpdateNodeSwitchExcludeIPs(nbClient libovsdbclient.Client, mgmtIfName, switchName, nodeName string, subnet *net.IPNet) error { if utilnet.IsIPv6CIDR(subnet) { // We don't exclude any IPs in IPv6 return nil @@ -55,6 +55,7 @@ func UpdateNodeSwitchExcludeIPs(nbClient libovsdbclient.Client, mgmtIfName, swit return fmt.Errorf("failed to get hybrid overlay port for node %s error: %v", nodeName, err) } + mgmtIfAddr := util.GetNodeManagementIfAddr(subnet) hybridOverlayIfAddr := util.GetNodeHybridOverlayIfAddr(subnet) klog.V(5).Infof("haveMP %v haveHO %v ManagementPortAddress %v HybridOverlayAddressOA %v", haveManagementPort, haveHybridOverlayPort, mgmtIfAddr, hybridOverlayIfAddr) diff --git a/go-controller/pkg/libovsdb/util/switch_test.go b/go-controller/pkg/libovsdb/util/switch_test.go index 9420c93383..cac6047ac2 100644 --- a/go-controller/pkg/libovsdb/util/switch_test.go +++ b/go-controller/pkg/libovsdb/util/switch_test.go @@ -268,12 +268,12 @@ func TestUpdateNodeSwitchExcludeIPs(t *testing.T) { var e error if tc.setCfgHybridOvlyEnabled { config.HybridOverlay.Enabled = true - if e = UpdateNodeSwitchExcludeIPs(nbClient, ovnutil.GetK8sMgmtIntfName(nodeName), nodeName, nodeName, ipnet, ovnutil.GetNodeManagementIfAddr(ipnet)); e != nil { + if e = UpdateNodeSwitchExcludeIPs(nbClient, ovnutil.GetK8sMgmtIntfName(nodeName), nodeName, nodeName, ipnet); e != nil { t.Fatal(fmt.Errorf("failed to update NodeSwitchExcludeIPs with Hybrid Overlay enabled err: %v", e)) } config.HybridOverlay.Enabled = false } else { - if e = UpdateNodeSwitchExcludeIPs(nbClient, ovnutil.GetK8sMgmtIntfName(nodeName), nodeName, nodeName, ipnet, ovnutil.GetNodeManagementIfAddr(ipnet)); e != nil { + if e = UpdateNodeSwitchExcludeIPs(nbClient, ovnutil.GetK8sMgmtIntfName(nodeName), nodeName, nodeName, ipnet); e != nil { t.Fatal(fmt.Errorf("failed to update NodeSwitchExcludeIPs with Hybrid Overlay disabled err: %v", e)) } diff --git a/go-controller/pkg/metrics/cluster_manager.go b/go-controller/pkg/metrics/cluster_manager.go index 711d4dc026..f97a338b89 100644 --- a/go-controller/pkg/metrics/cluster_manager.go +++ b/go-controller/pkg/metrics/cluster_manager.go @@ -91,28 +91,6 @@ var metricEgressIPRebalanceCount = prometheus.NewCounter(prometheus.CounterOpts{ /** EgressIP metrics recorded from cluster-manager ends**/ -var metricUDNCount = prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: types.MetricOvnkubeNamespace, - Subsystem: types.MetricOvnkubeSubsystemClusterManager, - Name: "user_defined_networks", - Help: "The total number of UserDefinedNetworks in the cluster"}, - []string{ - "role", - "topology", - }, -) - -var metricCUDNCount = prometheus.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: types.MetricOvnkubeNamespace, - Subsystem: types.MetricOvnkubeSubsystemClusterManager, - Name: "cluster_user_defined_networks", - Help: "The total number of ClusterUserDefinedNetworks in the cluster"}, - []string{ - "role", - "topology", - }, -) - // RegisterClusterManagerBase registers ovnkube cluster manager base metrics with the Prometheus registry. // This function should only be called once. func RegisterClusterManagerBase() { @@ -152,8 +130,6 @@ func RegisterClusterManagerFunctional() { prometheus.MustRegister(metricEgressIPRebalanceCount) prometheus.MustRegister(metricEgressIPCount) } - prometheus.MustRegister(metricUDNCount) - prometheus.MustRegister(metricCUDNCount) if err := prometheus.Register(MetricResourceRetryFailuresCount); err != nil { if _, ok := err.(prometheus.AlreadyRegisteredError); !ok { panic(err) @@ -189,23 +165,3 @@ func RecordEgressIPRebalance(count int) { func RecordEgressIPCount(count float64) { metricEgressIPCount.Set(count) } - -// IncrementUDNCount increments the number of UserDefinedNetworks of the given type -func IncrementUDNCount(role, topology string) { - metricUDNCount.WithLabelValues(role, topology).Inc() -} - -// DecrementUDNCount decrements the number of UserDefinedNetworks of the given type -func DecrementUDNCount(role, topology string) { - metricUDNCount.WithLabelValues(role, topology).Dec() -} - -// IncrementCUDNCount increments the number of ClusterUserDefinedNetworks of the given type -func IncrementCUDNCount(role, topology string) { - metricCUDNCount.WithLabelValues(role, topology).Inc() -} - -// DecrementCUDNCount decrements the number of ClusterUserDefinedNetworks of the given type -func DecrementCUDNCount(role, topology string) { - metricCUDNCount.WithLabelValues(role, topology).Dec() -} diff --git a/go-controller/pkg/nbdb/load_balancer.go b/go-controller/pkg/nbdb/load_balancer.go index 553bc48dda..8bddd25f4a 100644 --- a/go-controller/pkg/nbdb/load_balancer.go +++ b/go-controller/pkg/nbdb/load_balancer.go @@ -13,17 +13,15 @@ type ( ) var ( - LoadBalancerProtocolTCP LoadBalancerProtocol = "tcp" - LoadBalancerProtocolUDP LoadBalancerProtocol = "udp" - LoadBalancerProtocolSCTP LoadBalancerProtocol = "sctp" - LoadBalancerSelectionFieldsEthSrc LoadBalancerSelectionFields = "eth_src" - LoadBalancerSelectionFieldsEthDst LoadBalancerSelectionFields = "eth_dst" - LoadBalancerSelectionFieldsIPSrc LoadBalancerSelectionFields = "ip_src" - LoadBalancerSelectionFieldsIPDst LoadBalancerSelectionFields = "ip_dst" - LoadBalancerSelectionFieldsIpv6Src LoadBalancerSelectionFields = "ipv6_src" - LoadBalancerSelectionFieldsIpv6Dst LoadBalancerSelectionFields = "ipv6_dst" - LoadBalancerSelectionFieldsTpSrc LoadBalancerSelectionFields = "tp_src" - LoadBalancerSelectionFieldsTpDst LoadBalancerSelectionFields = "tp_dst" + LoadBalancerProtocolTCP LoadBalancerProtocol = "tcp" + LoadBalancerProtocolUDP LoadBalancerProtocol = "udp" + LoadBalancerProtocolSCTP LoadBalancerProtocol = "sctp" + LoadBalancerSelectionFieldsEthSrc LoadBalancerSelectionFields = "eth_src" + LoadBalancerSelectionFieldsEthDst LoadBalancerSelectionFields = "eth_dst" + LoadBalancerSelectionFieldsIPSrc LoadBalancerSelectionFields = "ip_src" + LoadBalancerSelectionFieldsIPDst LoadBalancerSelectionFields = "ip_dst" + LoadBalancerSelectionFieldsTpSrc LoadBalancerSelectionFields = "tp_src" + LoadBalancerSelectionFieldsTpDst LoadBalancerSelectionFields = "tp_dst" ) // LoadBalancer defines an object in Load_Balancer table diff --git a/go-controller/pkg/nbdb/logical_router_policy.go b/go-controller/pkg/nbdb/logical_router_policy.go index 377ef213d0..51b29ea706 100644 --- a/go-controller/pkg/nbdb/logical_router_policy.go +++ b/go-controller/pkg/nbdb/logical_router_policy.go @@ -15,7 +15,6 @@ var ( LogicalRouterPolicyActionAllow LogicalRouterPolicyAction = "allow" LogicalRouterPolicyActionDrop LogicalRouterPolicyAction = "drop" LogicalRouterPolicyActionReroute LogicalRouterPolicyAction = "reroute" - LogicalRouterPolicyActionJump LogicalRouterPolicyAction = "jump" ) // LogicalRouterPolicy defines an object in Logical_Router_Policy table @@ -23,9 +22,7 @@ type LogicalRouterPolicy struct { UUID string `ovsdb:"_uuid"` Action LogicalRouterPolicyAction `ovsdb:"action"` BFDSessions []string `ovsdb:"bfd_sessions"` - Chain *string `ovsdb:"chain"` ExternalIDs map[string]string `ovsdb:"external_ids"` - JumpChain *string `ovsdb:"jump_chain"` Match string `ovsdb:"match"` Nexthop *string `ovsdb:"nexthop"` Nexthops []string `ovsdb:"nexthops"` @@ -69,28 +66,6 @@ func equalLogicalRouterPolicyBFDSessions(a, b []string) bool { return true } -func (a *LogicalRouterPolicy) GetChain() *string { - return a.Chain -} - -func copyLogicalRouterPolicyChain(a *string) *string { - if a == nil { - return nil - } - b := *a - return &b -} - -func equalLogicalRouterPolicyChain(a, b *string) bool { - if (a == nil) != (b == nil) { - return false - } - if a == b { - return true - } - return *a == *b -} - func (a *LogicalRouterPolicy) GetExternalIDs() map[string]string { return a.ExternalIDs } @@ -121,28 +96,6 @@ func equalLogicalRouterPolicyExternalIDs(a, b map[string]string) bool { return true } -func (a *LogicalRouterPolicy) GetJumpChain() *string { - return a.JumpChain -} - -func copyLogicalRouterPolicyJumpChain(a *string) *string { - if a == nil { - return nil - } - b := *a - return &b -} - -func equalLogicalRouterPolicyJumpChain(a, b *string) bool { - if (a == nil) != (b == nil) { - return false - } - if a == b { - return true - } - return *a == *b -} - func (a *LogicalRouterPolicy) GetMatch() string { return a.Match } @@ -234,9 +187,7 @@ func (a *LogicalRouterPolicy) GetPriority() int { func (a *LogicalRouterPolicy) DeepCopyInto(b *LogicalRouterPolicy) { *b = *a b.BFDSessions = copyLogicalRouterPolicyBFDSessions(a.BFDSessions) - b.Chain = copyLogicalRouterPolicyChain(a.Chain) b.ExternalIDs = copyLogicalRouterPolicyExternalIDs(a.ExternalIDs) - b.JumpChain = copyLogicalRouterPolicyJumpChain(a.JumpChain) b.Nexthop = copyLogicalRouterPolicyNexthop(a.Nexthop) b.Nexthops = copyLogicalRouterPolicyNexthops(a.Nexthops) b.Options = copyLogicalRouterPolicyOptions(a.Options) @@ -261,9 +212,7 @@ func (a *LogicalRouterPolicy) Equals(b *LogicalRouterPolicy) bool { return a.UUID == b.UUID && a.Action == b.Action && equalLogicalRouterPolicyBFDSessions(a.BFDSessions, b.BFDSessions) && - equalLogicalRouterPolicyChain(a.Chain, b.Chain) && equalLogicalRouterPolicyExternalIDs(a.ExternalIDs, b.ExternalIDs) && - equalLogicalRouterPolicyJumpChain(a.JumpChain, b.JumpChain) && a.Match == b.Match && equalLogicalRouterPolicyNexthop(a.Nexthop, b.Nexthop) && equalLogicalRouterPolicyNexthops(a.Nexthops, b.Nexthops) && diff --git a/go-controller/pkg/nbdb/logical_router_static_route.go b/go-controller/pkg/nbdb/logical_router_static_route.go index ceccb8ac78..205741626c 100644 --- a/go-controller/pkg/nbdb/logical_router_static_route.go +++ b/go-controller/pkg/nbdb/logical_router_static_route.go @@ -8,36 +8,25 @@ import "github.com/ovn-kubernetes/libovsdb/model" const LogicalRouterStaticRouteTable = "Logical_Router_Static_Route" type ( - LogicalRouterStaticRoutePolicy = string - LogicalRouterStaticRouteSelectionFields = string + LogicalRouterStaticRoutePolicy = string ) var ( - LogicalRouterStaticRoutePolicySrcIP LogicalRouterStaticRoutePolicy = "src-ip" - LogicalRouterStaticRoutePolicyDstIP LogicalRouterStaticRoutePolicy = "dst-ip" - LogicalRouterStaticRouteSelectionFieldsEthSrc LogicalRouterStaticRouteSelectionFields = "eth_src" - LogicalRouterStaticRouteSelectionFieldsEthDst LogicalRouterStaticRouteSelectionFields = "eth_dst" - LogicalRouterStaticRouteSelectionFieldsIPProto LogicalRouterStaticRouteSelectionFields = "ip_proto" - LogicalRouterStaticRouteSelectionFieldsIPSrc LogicalRouterStaticRouteSelectionFields = "ip_src" - LogicalRouterStaticRouteSelectionFieldsIPDst LogicalRouterStaticRouteSelectionFields = "ip_dst" - LogicalRouterStaticRouteSelectionFieldsIpv6Src LogicalRouterStaticRouteSelectionFields = "ipv6_src" - LogicalRouterStaticRouteSelectionFieldsIpv6Dst LogicalRouterStaticRouteSelectionFields = "ipv6_dst" - LogicalRouterStaticRouteSelectionFieldsTpSrc LogicalRouterStaticRouteSelectionFields = "tp_src" - LogicalRouterStaticRouteSelectionFieldsTpDst LogicalRouterStaticRouteSelectionFields = "tp_dst" + LogicalRouterStaticRoutePolicySrcIP LogicalRouterStaticRoutePolicy = "src-ip" + LogicalRouterStaticRoutePolicyDstIP LogicalRouterStaticRoutePolicy = "dst-ip" ) // LogicalRouterStaticRoute defines an object in Logical_Router_Static_Route table type LogicalRouterStaticRoute struct { - UUID string `ovsdb:"_uuid"` - BFD *string `ovsdb:"bfd"` - ExternalIDs map[string]string `ovsdb:"external_ids"` - IPPrefix string `ovsdb:"ip_prefix"` - Nexthop string `ovsdb:"nexthop"` - Options map[string]string `ovsdb:"options"` - OutputPort *string `ovsdb:"output_port"` - Policy *LogicalRouterStaticRoutePolicy `ovsdb:"policy"` - RouteTable string `ovsdb:"route_table"` - SelectionFields []LogicalRouterStaticRouteSelectionFields `ovsdb:"selection_fields"` + UUID string `ovsdb:"_uuid"` + BFD *string `ovsdb:"bfd"` + ExternalIDs map[string]string `ovsdb:"external_ids"` + IPPrefix string `ovsdb:"ip_prefix"` + Nexthop string `ovsdb:"nexthop"` + Options map[string]string `ovsdb:"options"` + OutputPort *string `ovsdb:"output_port"` + Policy *LogicalRouterStaticRoutePolicy `ovsdb:"policy"` + RouteTable string `ovsdb:"route_table"` } func (a *LogicalRouterStaticRoute) GetUUID() string { @@ -182,34 +171,6 @@ func (a *LogicalRouterStaticRoute) GetRouteTable() string { return a.RouteTable } -func (a *LogicalRouterStaticRoute) GetSelectionFields() []LogicalRouterStaticRouteSelectionFields { - return a.SelectionFields -} - -func copyLogicalRouterStaticRouteSelectionFields(a []LogicalRouterStaticRouteSelectionFields) []LogicalRouterStaticRouteSelectionFields { - if a == nil { - return nil - } - b := make([]LogicalRouterStaticRouteSelectionFields, len(a)) - copy(b, a) - return b -} - -func equalLogicalRouterStaticRouteSelectionFields(a, b []LogicalRouterStaticRouteSelectionFields) bool { - if (a == nil) != (b == nil) { - return false - } - if len(a) != len(b) { - return false - } - for i, v := range a { - if b[i] != v { - return false - } - } - return true -} - func (a *LogicalRouterStaticRoute) DeepCopyInto(b *LogicalRouterStaticRoute) { *b = *a b.BFD = copyLogicalRouterStaticRouteBFD(a.BFD) @@ -217,7 +178,6 @@ func (a *LogicalRouterStaticRoute) DeepCopyInto(b *LogicalRouterStaticRoute) { b.Options = copyLogicalRouterStaticRouteOptions(a.Options) b.OutputPort = copyLogicalRouterStaticRouteOutputPort(a.OutputPort) b.Policy = copyLogicalRouterStaticRoutePolicy(a.Policy) - b.SelectionFields = copyLogicalRouterStaticRouteSelectionFields(a.SelectionFields) } func (a *LogicalRouterStaticRoute) DeepCopy() *LogicalRouterStaticRoute { @@ -244,8 +204,7 @@ func (a *LogicalRouterStaticRoute) Equals(b *LogicalRouterStaticRoute) bool { equalLogicalRouterStaticRouteOptions(a.Options, b.Options) && equalLogicalRouterStaticRouteOutputPort(a.OutputPort, b.OutputPort) && equalLogicalRouterStaticRoutePolicy(a.Policy, b.Policy) && - a.RouteTable == b.RouteTable && - equalLogicalRouterStaticRouteSelectionFields(a.SelectionFields, b.SelectionFields) + a.RouteTable == b.RouteTable } func (a *LogicalRouterStaticRoute) EqualsModel(b model.Model) bool { diff --git a/go-controller/pkg/nbdb/logical_switch_port.go b/go-controller/pkg/nbdb/logical_switch_port.go index 87994fdc72..b211672bff 100644 --- a/go-controller/pkg/nbdb/logical_switch_port.go +++ b/go-controller/pkg/nbdb/logical_switch_port.go @@ -21,7 +21,6 @@ type LogicalSwitchPort struct { Name string `ovsdb:"name"` Options map[string]string `ovsdb:"options"` ParentName *string `ovsdb:"parent_name"` - Peer *string `ovsdb:"peer"` PortSecurity []string `ovsdb:"port_security"` Tag *int `ovsdb:"tag"` TagRequest *int `ovsdb:"tag_request"` @@ -285,28 +284,6 @@ func equalLogicalSwitchPortParentName(a, b *string) bool { return *a == *b } -func (a *LogicalSwitchPort) GetPeer() *string { - return a.Peer -} - -func copyLogicalSwitchPortPeer(a *string) *string { - if a == nil { - return nil - } - b := *a - return &b -} - -func equalLogicalSwitchPortPeer(a, b *string) bool { - if (a == nil) != (b == nil) { - return false - } - if a == b { - return true - } - return *a == *b -} - func (a *LogicalSwitchPort) GetPortSecurity() []string { return a.PortSecurity } @@ -417,7 +394,6 @@ func (a *LogicalSwitchPort) DeepCopyInto(b *LogicalSwitchPort) { b.MirrorRules = copyLogicalSwitchPortMirrorRules(a.MirrorRules) b.Options = copyLogicalSwitchPortOptions(a.Options) b.ParentName = copyLogicalSwitchPortParentName(a.ParentName) - b.Peer = copyLogicalSwitchPortPeer(a.Peer) b.PortSecurity = copyLogicalSwitchPortPortSecurity(a.PortSecurity) b.Tag = copyLogicalSwitchPortTag(a.Tag) b.TagRequest = copyLogicalSwitchPortTagRequest(a.TagRequest) @@ -452,7 +428,6 @@ func (a *LogicalSwitchPort) Equals(b *LogicalSwitchPort) bool { a.Name == b.Name && equalLogicalSwitchPortOptions(a.Options, b.Options) && equalLogicalSwitchPortParentName(a.ParentName, b.ParentName) && - equalLogicalSwitchPortPeer(a.Peer, b.Peer) && equalLogicalSwitchPortPortSecurity(a.PortSecurity, b.PortSecurity) && equalLogicalSwitchPortTag(a.Tag, b.Tag) && equalLogicalSwitchPortTagRequest(a.TagRequest, b.TagRequest) && diff --git a/go-controller/pkg/nbdb/model.go b/go-controller/pkg/nbdb/model.go index 07ca7e0e97..9fbe25db4f 100644 --- a/go-controller/pkg/nbdb/model.go +++ b/go-controller/pkg/nbdb/model.go @@ -52,7 +52,7 @@ func FullDatabaseModel() (model.ClientDBModel, error) { var schema = `{ "name": "OVN_Northbound", - "version": "7.11.0", + "version": "7.6.0", "tables": { "ACL": { "columns": { @@ -819,8 +819,6 @@ var schema = `{ "eth_dst", "ip_src", "ip_dst", - "ipv6_src", - "ipv6_dst", "tp_src", "tp_dst" ] @@ -1028,8 +1026,7 @@ var schema = `{ [ "allow", "drop", - "reroute", - "jump" + "reroute" ] ] } @@ -1046,15 +1043,6 @@ var schema = `{ "max": "unlimited" } }, - "chain": { - "type": { - "key": { - "type": "string" - }, - "min": 0, - "max": 1 - } - }, "external_ids": { "type": { "key": { @@ -1067,15 +1055,6 @@ var schema = `{ "max": "unlimited" } }, - "jump_chain": { - "type": { - "key": { - "type": "string" - }, - "min": 0, - "max": 1 - } - }, "match": { "type": "string" }, @@ -1208,7 +1187,7 @@ var schema = `{ "key": { "type": "string" }, - "min": 0, + "min": 1, "max": "unlimited" } }, @@ -1322,29 +1301,6 @@ var schema = `{ }, "route_table": { "type": "string" - }, - "selection_fields": { - "type": { - "key": { - "type": "string", - "enum": [ - "set", - [ - "eth_src", - "eth_dst", - "ip_proto", - "ip_src", - "ip_dst", - "ipv6_src", - "ipv6_dst", - "tp_src", - "tp_dst" - ] - ] - }, - "min": 0, - "max": "unlimited" - } } } }, @@ -1576,15 +1532,6 @@ var schema = `{ "max": 1 } }, - "peer": { - "type": { - "key": { - "type": "string" - }, - "min": 0, - "max": 1 - } - }, "port_security": { "type": { "key": { @@ -2145,9 +2092,6 @@ var schema = `{ "ssl_ciphers": { "type": "string" }, - "ssl_ciphersuites": { - "type": "string" - }, "ssl_protocols": { "type": "string" } diff --git a/go-controller/pkg/nbdb/ssl.go b/go-controller/pkg/nbdb/ssl.go index 0f01efc978..847ea8c362 100644 --- a/go-controller/pkg/nbdb/ssl.go +++ b/go-controller/pkg/nbdb/ssl.go @@ -16,7 +16,6 @@ type SSL struct { ExternalIDs map[string]string `ovsdb:"external_ids"` PrivateKey string `ovsdb:"private_key"` SSLCiphers string `ovsdb:"ssl_ciphers"` - SSLCiphersuites string `ovsdb:"ssl_ciphersuites"` SSLProtocols string `ovsdb:"ssl_protocols"` } @@ -74,10 +73,6 @@ func (a *SSL) GetSSLCiphers() string { return a.SSLCiphers } -func (a *SSL) GetSSLCiphersuites() string { - return a.SSLCiphersuites -} - func (a *SSL) GetSSLProtocols() string { return a.SSLProtocols } @@ -110,7 +105,6 @@ func (a *SSL) Equals(b *SSL) bool { equalSSLExternalIDs(a.ExternalIDs, b.ExternalIDs) && a.PrivateKey == b.PrivateKey && a.SSLCiphers == b.SSLCiphers && - a.SSLCiphersuites == b.SSLCiphersuites && a.SSLProtocols == b.SSLProtocols } diff --git a/go-controller/pkg/networkmanager/api.go b/go-controller/pkg/networkmanager/api.go index 79f131da71..e069f27535 100644 --- a/go-controller/pkg/networkmanager/api.go +++ b/go-controller/pkg/networkmanager/api.go @@ -39,11 +39,6 @@ type Interface interface { // GetNetwork returns the network of the given name or nil if unknown GetNetwork(name string) util.NetInfo - // GetActiveNetwork returns the NetInfo currently held by the controller for the given network. - // This may differ from the NetInfo returned by GetNetwork which reflects the API state. - // Returns nil if there is no running controller for the provided network. - GetActiveNetwork(network string) util.NetInfo - // DoWithLock takes care of locking and unlocking while iterating over all role primary user defined networks. DoWithLock(f func(network util.NetInfo) error) error GetActiveNetworkNamespaces(networkName string) ([]string, error) @@ -209,11 +204,4 @@ func (nm defaultNetworkManager) GetActiveNetworkNamespaces(_ string) ([]string, return []string{"default"}, nil } -func (nm defaultNetworkManager) GetActiveNetwork(network string) util.NetInfo { - if network != types.DefaultNetworkName { - return nil - } - return &util.DefaultNetInfo{} -} - var def Controller = &defaultNetworkManager{} diff --git a/go-controller/pkg/networkmanager/nad_controller.go b/go-controller/pkg/networkmanager/nad_controller.go index 78c0fea60e..a212566ce1 100644 --- a/go-controller/pkg/networkmanager/nad_controller.go +++ b/go-controller/pkg/networkmanager/nad_controller.go @@ -669,13 +669,3 @@ func (c *nadController) handleNetworkID(old util.NetInfo, new util.MutableNetInf return nil } - -func (c *nadController) GetActiveNetwork(network string) util.NetInfo { - c.RLock() - defer c.RUnlock() - state := c.networkController.getNetworkState(network) - if state == nil { - return nil - } - return state.controller -} diff --git a/go-controller/pkg/node/base_node_network_controller_dpu.go b/go-controller/pkg/node/base_node_network_controller_dpu.go index 26de1386c1..59530ecf16 100644 --- a/go-controller/pkg/node/base_node_network_controller_dpu.go +++ b/go-controller/pkg/node/base_node_network_controller_dpu.go @@ -103,9 +103,6 @@ func (bnnc *BaseNodeNetworkController) watchPodsDPU() (*factory.Handler, error) netName := bnnc.GetNetworkName() return bnnc.watchFactory.AddPodHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { - var activeNetwork util.NetInfo - var err error - pod := obj.(*corev1.Pod) klog.V(5).Infof("Add for Pod: %s/%s for network %s", pod.Namespace, pod.Name, netName) if util.PodWantsHostNetwork(pod) { @@ -116,15 +113,7 @@ func (bnnc *BaseNodeNetworkController) watchPodsDPU() (*factory.Handler, error) // For default network, NAD name is DefaultNetworkName. nadToDPUCDMap := map[string]*util.DPUConnectionDetails{} if bnnc.IsSecondary() { - if bnnc.IsPrimaryNetwork() { - activeNetwork, err = bnnc.networkManager.GetActiveNetworkForNamespace(pod.Namespace) - if err != nil { - klog.Errorf("Failed looking for the active network for namespace %s: %v", pod.Namespace, err) - return - } - } - - on, networkMap, err := util.GetPodNADToNetworkMappingWithActiveNetwork(pod, bnnc.GetNetInfo(), activeNetwork) + on, networkMap, err := util.GetPodNADToNetworkMapping(pod, bnnc.GetNetInfo()) if err != nil || !on { if err != nil { // configuration error, no need to retry, do not return error diff --git a/go-controller/pkg/node/base_node_network_controller_dpu_test.go b/go-controller/pkg/node/base_node_network_controller_dpu_test.go index d372d49777..cd9457708e 100644 --- a/go-controller/pkg/node/base_node_network_controller_dpu_test.go +++ b/go-controller/pkg/node/base_node_network_controller_dpu_test.go @@ -118,7 +118,7 @@ var _ = Describe("Node DPU tests", func() { apbExternalRouteClient := adminpolicybasedrouteclient.NewSimpleClientset() factoryMock = factorymocks.NodeWatchFactory{} cnnci := newCommonNodeNetworkControllerInfo(nil, &kubeMock, apbExternalRouteClient, &factoryMock, nil, "", routeManager) - dnnc = newDefaultNodeNetworkController(cnnci, nil, nil, routeManager, nil, nil) + dnnc = newDefaultNodeNetworkController(cnnci, nil, nil, routeManager, nil) podInformer = coreinformermocks.PodInformer{} podNamespaceLister = v1mocks.PodNamespaceLister{} @@ -190,7 +190,7 @@ var _ = Describe("Node DPU tests", func() { It("Fails if GetPCIFromDeviceName fails", func() { sriovnetOpsMock.On("GetVfRepresentorDPU", "0", "9").Return(vfRep, nil) sriovnetOpsMock.On("GetPCIFromDeviceName", vfRep).Return("", fmt.Errorf("could not find PCI Address")) - podNamespaceLister.On("Get", mock.AnythingOfType("string")).Return(&pod, nil) + podNamespaceLister.On("Get", mock.AnythingOfType("string")).Return(pod, nil) // call addRepPort() err := dnnc.addRepPort(&pod, &scd, ifInfo, clientset) diff --git a/go-controller/pkg/node/bridgeconfig/bridgeconfig.go b/go-controller/pkg/node/bridgeconfig/bridgeconfig.go deleted file mode 100644 index c8b4ac647e..0000000000 --- a/go-controller/pkg/node/bridgeconfig/bridgeconfig.go +++ /dev/null @@ -1,565 +0,0 @@ -package bridgeconfig - -import ( - "fmt" - "net" - "strings" - "sync" - "sync/atomic" - - corev1 "k8s.io/api/core/v1" - "k8s.io/klog/v2" - - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/egressip" - nodetypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types" - nodeutil "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/util" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" -) - -// BridgeUDNConfiguration holds the patchport and ctMark -// information for a given network -type BridgeUDNConfiguration struct { - PatchPort string - OfPortPatch string - MasqCTMark string - PktMark string - V4MasqIPs *udn.MasqueradeIPs - V6MasqIPs *udn.MasqueradeIPs - Subnets []config.CIDRNetworkEntry - NodeSubnets []*net.IPNet - Advertised atomic.Bool - ManagementIPs []*net.IPNet -} - -func (netConfig *BridgeUDNConfiguration) ShallowCopy() *BridgeUDNConfiguration { - copy := &BridgeUDNConfiguration{ - PatchPort: netConfig.PatchPort, - OfPortPatch: netConfig.OfPortPatch, - MasqCTMark: netConfig.MasqCTMark, - PktMark: netConfig.PktMark, - V4MasqIPs: netConfig.V4MasqIPs, - V6MasqIPs: netConfig.V6MasqIPs, - Subnets: netConfig.Subnets, - NodeSubnets: netConfig.NodeSubnets, - } - copy.Advertised.Store(netConfig.Advertised.Load()) - return copy -} - -func (netConfig *BridgeUDNConfiguration) IsDefaultNetwork() bool { - return netConfig.MasqCTMark == nodetypes.CtMarkOVN -} - -func (netConfig *BridgeUDNConfiguration) setOfPatchPort() error { - ofportPatch, stderr, err := util.GetOVSOfPort("get", "Interface", netConfig.PatchPort, "ofport") - if err != nil { - return fmt.Errorf("failed while waiting on patch port %q to be created by ovn-controller and "+ - "while getting ofport. stderr: %v, error: %v", netConfig.PatchPort, stderr, err) - } - netConfig.OfPortPatch = ofportPatch - return nil -} - -type BridgeConfiguration struct { - mutex sync.Mutex - - // variables that are only set on creation and never changed - // don't require mutex lock to read - nodeName string - bridgeName string - uplinkName string - gwIface string - gwIfaceRep string - interfaceID string - - // variables that can be updated (read/write access should be done with mutex held) - ofPortHost string - ips []*net.IPNet - macAddress net.HardwareAddr - ofPortPhys string - netConfig map[string]*BridgeUDNConfiguration - eipMarkIPs *egressip.MarkIPsCache -} - -func NewBridgeConfiguration(intfName, nodeName, - physicalNetworkName string, - nodeSubnets, gwIPs []*net.IPNet, - advertised bool) (*BridgeConfiguration, error) { - var intfRep string - var err error - isGWAcclInterface := false - gwIntf := intfName - - defaultNetConfig := &BridgeUDNConfiguration{ - MasqCTMark: nodetypes.CtMarkOVN, - Subnets: config.Default.ClusterSubnets, - NodeSubnets: nodeSubnets, - } - for _, subnet := range nodeSubnets { - defaultNetConfig.ManagementIPs = append(defaultNetConfig.ManagementIPs, util.GetNodeManagementIfAddr(subnet)) - } - res := BridgeConfiguration{ - nodeName: nodeName, - netConfig: map[string]*BridgeUDNConfiguration{ - types.DefaultNetworkName: defaultNetConfig, - }, - eipMarkIPs: egressip.NewMarkIPsCache(), - } - res.netConfig[types.DefaultNetworkName].Advertised.Store(advertised) - - if config.Gateway.GatewayAcceleratedInterface != "" { - // Try to get representor for the specified gateway device. - // If function succeeds, then it is either a valid switchdev VF or SF, and we can use this accelerated device - // for node IP, Host Ofport for Openflow etc. - // If failed - error for improper configuration option - intfRep, err = getRepresentor(config.Gateway.GatewayAcceleratedInterface) - if err != nil { - return nil, fmt.Errorf("gateway accelerated interface %s is not valid: %w", config.Gateway.GatewayAcceleratedInterface, err) - } - gwIntf = config.Gateway.GatewayAcceleratedInterface - isGWAcclInterface = true - klog.Infof("For gateway accelerated interface %s representor: %s", config.Gateway.GatewayAcceleratedInterface, intfRep) - } else { - intfRep, err = getRepresentor(gwIntf) - if err == nil { - isGWAcclInterface = true - } - } - - if isGWAcclInterface { - bridgeName, _, err := util.RunOVSVsctl("port-to-br", intfRep) - if err != nil { - return nil, fmt.Errorf("failed to find bridge that has port %s: %w", intfRep, err) - } - link, err := util.GetNetLinkOps().LinkByName(gwIntf) - if err != nil { - return nil, fmt.Errorf("failed to get netdevice link for %s: %w", gwIntf, err) - } - uplinkName, err := util.GetNicName(bridgeName) - if err != nil { - return nil, fmt.Errorf("failed to find nic name for bridge %s: %w", bridgeName, err) - } - res.bridgeName = bridgeName - res.uplinkName = uplinkName - res.gwIfaceRep = intfRep - res.gwIface = gwIntf - res.macAddress = link.Attrs().HardwareAddr - } else if bridgeName, _, err := util.RunOVSVsctl("port-to-br", intfName); err == nil { - // This is an OVS bridge's internal port - uplinkName, err := util.GetNicName(bridgeName) - if err != nil { - return nil, fmt.Errorf("failed to find nic name for bridge %s: %w", bridgeName, err) - } - res.bridgeName = bridgeName - res.gwIface = bridgeName - res.uplinkName = uplinkName - gwIntf = bridgeName - } else if _, _, err := util.RunOVSVsctl("br-exists", intfName); err != nil { - // This is not a OVS bridge. We need to create a OVS bridge - // and add cluster.GatewayIntf as a port of that bridge. - bridgeName, err := util.NicToBridge(intfName) - if err != nil { - return nil, fmt.Errorf("nicToBridge failed for %s: %w", intfName, err) - } - res.bridgeName = bridgeName - res.gwIface = bridgeName - res.uplinkName = intfName - gwIntf = bridgeName - } else { - // gateway interface is an OVS bridge - uplinkName, err := getIntfName(intfName) - if err != nil { - if config.Gateway.Mode == config.GatewayModeLocal && config.Gateway.AllowNoUplink { - klog.Infof("Could not find uplink for %s, setup gateway bridge with no uplink port, egress IP and egress GW will not work", intfName) - } else { - return nil, fmt.Errorf("failed to find intfName for %s: %w", intfName, err) - } - } else { - res.uplinkName = uplinkName - } - res.bridgeName = intfName - res.gwIface = intfName - } - // Now, we get IP addresses for the bridge - if len(gwIPs) > 0 { - // use gwIPs if provided - res.ips = gwIPs - } else { - // get IP addresses from OVS bridge. If IP does not exist, - // error out. - res.ips, err = nodeutil.GetNetworkInterfaceIPAddresses(gwIntf) - if err != nil { - return nil, fmt.Errorf("failed to get interface details for %s: %w", gwIntf, err) - } - } - - if !isGWAcclInterface { // We do not have an accelerated device for Gateway interface - res.macAddress, err = util.GetOVSPortMACAddress(gwIntf) - if err != nil { - return nil, fmt.Errorf("failed to get MAC address for ovs port %s: %w", gwIntf, err) - } - } - - res.interfaceID, err = bridgedGatewayNodeSetup(nodeName, res.bridgeName, physicalNetworkName) - if err != nil { - return nil, fmt.Errorf("failed to set up shared interface gateway: %v", err) - } - - // the name of the patch port created by ovn-controller is of the form - // patch--to-br-int - defaultNetConfig.PatchPort = (&util.DefaultNetInfo{}).GetNetworkScopedPatchPortName(res.bridgeName, nodeName) - - // for DPU we use the host MAC address for the Gateway configuration - if config.OvnKubeNode.Mode == types.NodeModeDPU { - hostRep, err := util.GetDPUHostInterface(res.bridgeName) - if err != nil { - return nil, err - } - res.macAddress, err = util.GetSriovnetOps().GetRepresentorPeerMacAddress(hostRep) - if err != nil { - return nil, err - } - } - - // If gwIface is set, then accelerated GW interface is present and we use it. Else use external bridge instead. - if res.gwIface == "" { - res.gwIface = res.bridgeName - } - - return &res, nil -} - -func (b *BridgeConfiguration) GetGatewayIface() string { - return b.gwIface -} - -func (b *BridgeConfiguration) GetGatewayIfaceRep() string { - return b.gwIfaceRep -} - -// UpdateInterfaceIPAddresses sets and returns the bridge's current ips -func (b *BridgeConfiguration) UpdateInterfaceIPAddresses(node *corev1.Node) ([]*net.IPNet, error) { - b.mutex.Lock() - defer b.mutex.Unlock() - ifAddrs, err := nodeutil.GetNetworkInterfaceIPAddresses(b.GetGatewayIface()) - if err != nil { - return nil, err - } - - // For DPU, here we need to use the DPU host's IP address which is the tenant cluster's - // host internal IP address instead of the DPU's external bridge IP address. - if config.OvnKubeNode.Mode == types.NodeModeDPU { - nodeIfAddr, err := util.GetNodePrimaryDPUHostAddrAnnotation(node) - if err != nil { - return nil, err - } - // For DPU mode, we only support IPv4 for now. - nodeAddrStr := nodeIfAddr.IPv4 - - nodeAddr, _, err := net.ParseCIDR(nodeAddrStr) - if err != nil { - return nil, fmt.Errorf("failed to parse node IP address. %v", nodeAddrStr) - } - ifAddrs, err = nodeutil.GetDPUHostPrimaryIPAddresses(nodeAddr, ifAddrs) - if err != nil { - return nil, err - } - } - - b.ips = ifAddrs - return ifAddrs, nil -} - -// GetPortConfigurations returns a slice of Network port configurations along with the -// uplinkName and physical port's ofport value -func (b *BridgeConfiguration) GetPortConfigurations() ([]*BridgeUDNConfiguration, string, string) { - b.mutex.Lock() - defer b.mutex.Unlock() - var netConfigs []*BridgeUDNConfiguration - for _, netConfig := range b.netConfig { - netConfigs = append(netConfigs, netConfig.ShallowCopy()) - } - return netConfigs, b.uplinkName, b.ofPortPhys -} - -// AddNetworkConfig adds the patchport and ctMark value for the provided netInfo into the bridge configuration cache -func (b *BridgeConfiguration) AddNetworkConfig(nInfo util.NetInfo, nodeSubnets, mgmtIPs []*net.IPNet, masqCTMark, pktMark uint, v6MasqIPs, v4MasqIPs *udn.MasqueradeIPs) error { - b.mutex.Lock() - defer b.mutex.Unlock() - - netName := nInfo.GetNetworkName() - patchPort := nInfo.GetNetworkScopedPatchPortName(b.bridgeName, b.nodeName) - - _, found := b.netConfig[netName] - if !found { - netConfig := &BridgeUDNConfiguration{ - PatchPort: patchPort, - MasqCTMark: fmt.Sprintf("0x%x", masqCTMark), - PktMark: fmt.Sprintf("0x%x", pktMark), - V4MasqIPs: v4MasqIPs, - V6MasqIPs: v6MasqIPs, - ManagementIPs: mgmtIPs, - Subnets: nInfo.Subnets(), - NodeSubnets: nodeSubnets, - } - netConfig.Advertised.Store(util.IsPodNetworkAdvertisedAtNode(nInfo, b.nodeName)) - - b.netConfig[netName] = netConfig - } else { - klog.Warningf("Trying to update bridge config for network %s which already"+ - "exists in cache...networks are not mutable...ignoring update", nInfo.GetNetworkName()) - } - return nil -} - -// DelNetworkConfig deletes the provided netInfo from the bridge configuration cache -func (b *BridgeConfiguration) DelNetworkConfig(nInfo util.NetInfo) { - b.mutex.Lock() - defer b.mutex.Unlock() - - delete(b.netConfig, nInfo.GetNetworkName()) -} - -func (b *BridgeConfiguration) GetNetworkConfig(networkName string) *BridgeUDNConfiguration { - b.mutex.Lock() - defer b.mutex.Unlock() - return b.netConfig[networkName] -} - -// GetActiveNetworkBridgeConfigCopy returns a shallow copy of the network configuration corresponding to the -// provided netInfo. -// -// NOTE: if the network configuration can't be found or if the network is not patched by OVN -// yet this returns nil. -func (b *BridgeConfiguration) GetActiveNetworkBridgeConfigCopy(networkName string) *BridgeUDNConfiguration { - b.mutex.Lock() - defer b.mutex.Unlock() - - if netConfig, found := b.netConfig[networkName]; found && netConfig.OfPortPatch != "" { - return netConfig.ShallowCopy() - } - return nil -} - -// must be called with mutex held -func (b *BridgeConfiguration) patchedNetConfigs() []*BridgeUDNConfiguration { - result := make([]*BridgeUDNConfiguration, 0, len(b.netConfig)) - for _, netConfig := range b.netConfig { - if netConfig.OfPortPatch == "" { - continue - } - result = append(result, netConfig) - } - return result -} - -// IsGatewayReady checks if patch ports of every netConfig are present. -// used by gateway on newGateway readyFunc -func (b *BridgeConfiguration) IsGatewayReady() bool { - b.mutex.Lock() - defer b.mutex.Unlock() - for _, netConfig := range b.netConfig { - ready := gatewayReady(netConfig.PatchPort) - if !ready { - return false - } - } - return true -} - -func (b *BridgeConfiguration) SetOfPorts() error { - b.mutex.Lock() - defer b.mutex.Unlock() - // Get ofport of patchPort - for _, netConfig := range b.netConfig { - if err := netConfig.setOfPatchPort(); err != nil { - return fmt.Errorf("error setting bridge openflow ports for network with patchport %v: err: %v", netConfig.PatchPort, err) - } - } - - if b.uplinkName != "" { - // Get ofport of physical interface - ofportPhys, stderr, err := util.GetOVSOfPort("get", "interface", b.uplinkName, "ofport") - if err != nil { - return fmt.Errorf("failed to get ofport of %s, stderr: %q, error: %v", - b.uplinkName, stderr, err) - } - b.ofPortPhys = ofportPhys - } - - // Get ofport representing the host. That is, host representor port in case of DPUs, ovsLocalPort otherwise. - if config.OvnKubeNode.Mode == types.NodeModeDPU { - var stderr string - hostRep, err := util.GetDPUHostInterface(b.bridgeName) - if err != nil { - return err - } - - b.ofPortHost, stderr, err = util.RunOVSVsctl("get", "interface", hostRep, "ofport") - if err != nil { - return fmt.Errorf("failed to get ofport of host interface %s, stderr: %q, error: %v", - hostRep, stderr, err) - } - } else { - var err error - if b.gwIfaceRep != "" { - b.ofPortHost, _, err = util.RunOVSVsctl("get", "interface", b.gwIfaceRep, "ofport") - if err != nil { - return fmt.Errorf("failed to get ofport of bypass rep %s, error: %v", b.gwIfaceRep, err) - } - } else { - b.ofPortHost = nodetypes.OvsLocalPort - } - } - - return nil -} - -func (b *BridgeConfiguration) GetIPs() []*net.IPNet { - b.mutex.Lock() - defer b.mutex.Unlock() - return b.ips -} - -func (b *BridgeConfiguration) GetBridgeName() string { - return b.bridgeName -} - -func (b *BridgeConfiguration) GetUplinkName() string { - return b.uplinkName -} - -func (b *BridgeConfiguration) GetMAC() net.HardwareAddr { - b.mutex.Lock() - defer b.mutex.Unlock() - return b.macAddress -} - -func (b *BridgeConfiguration) SetMAC(macAddr net.HardwareAddr) { - b.mutex.Lock() - defer b.mutex.Unlock() - b.macAddress = macAddr -} - -func (b *BridgeConfiguration) SetNetworkOfPatchPort(netName string) error { - b.mutex.Lock() - defer b.mutex.Unlock() - - netConfig, found := b.netConfig[netName] - if !found { - return fmt.Errorf("failed to find network %s configuration on bridge %s", netName, b.bridgeName) - } - return netConfig.setOfPatchPort() -} - -func (b *BridgeConfiguration) GetInterfaceID() string { - return b.interfaceID -} - -func (b *BridgeConfiguration) GetOfPortHost() string { - b.mutex.Lock() - defer b.mutex.Unlock() - return b.ofPortHost -} - -func (b *BridgeConfiguration) GetEIPMarkIPs() *egressip.MarkIPsCache { - b.mutex.Lock() - defer b.mutex.Unlock() - return b.eipMarkIPs -} - -func (b *BridgeConfiguration) SetEIPMarkIPs(eipMarkIPs *egressip.MarkIPsCache) { - b.mutex.Lock() - defer b.mutex.Unlock() - b.eipMarkIPs = eipMarkIPs -} - -func gatewayReady(patchPort string) bool { - // Get ofport of patchPort - ofport, _, err := util.GetOVSOfPort("--if-exists", "get", "interface", patchPort, "ofport") - if err != nil || len(ofport) == 0 { - return false - } - klog.Info("Gateway is ready") - return true -} - -func getIntfName(gatewayIntf string) (string, error) { - // The given (or autodetected) interface is an OVS bridge and this could be - // created by us using util.NicToBridge() or it was pre-created by the user. - - // Is intfName a port of gatewayIntf? - intfName, err := util.GetNicName(gatewayIntf) - if err != nil { - return "", err - } - _, stderr, err := util.RunOVSVsctl("get", "interface", intfName, "ofport") - if err != nil { - return "", fmt.Errorf("failed to get ofport of %s, stderr: %q, error: %v", - intfName, stderr, err) - } - return intfName, nil -} - -// bridgedGatewayNodeSetup enables forwarding on bridge interface, sets up the physical network name mappings for the bridge, -// and returns an ifaceID created from the bridge name and the node name -func bridgedGatewayNodeSetup(nodeName, bridgeName, physicalNetworkName string) (string, error) { - // IPv6 forwarding is enabled globally - if config.IPv4Mode { - // we use forward slash as path separator to allow dotted bridgeName e.g. foo.200 - stdout, stderr, err := util.RunSysctl("-w", fmt.Sprintf("net/ipv4/conf/%s/forwarding=1", bridgeName)) - // systctl output enforces dot as path separator - if err != nil || stdout != fmt.Sprintf("net.ipv4.conf.%s.forwarding = 1", strings.ReplaceAll(bridgeName, ".", "/")) { - return "", fmt.Errorf("could not set the correct forwarding value for interface %s: stdout: %v, stderr: %v, err: %v", - bridgeName, stdout, stderr, err) - } - } - - // ovn-bridge-mappings maps a physical network name to a local ovs bridge - // that provides connectivity to that network. It is in the form of physnet1:br1,physnet2:br2. - // Note that there may be multiple ovs bridge mappings, be sure not to override - // the mappings for the other physical network - stdout, stderr, err := util.RunOVSVsctl("--if-exists", "get", "Open_vSwitch", ".", - "external_ids:ovn-bridge-mappings") - if err != nil { - return "", fmt.Errorf("failed to get ovn-bridge-mappings stderr:%s (%v)", stderr, err) - } - // skip the existing mapping setting for the specified physicalNetworkName - mapString := "" - bridgeMappings := strings.Split(stdout, ",") - for _, bridgeMapping := range bridgeMappings { - m := strings.Split(bridgeMapping, ":") - if network := m[0]; network != physicalNetworkName { - if len(mapString) != 0 { - mapString += "," - } - mapString += bridgeMapping - } - } - if len(mapString) != 0 { - mapString += "," - } - mapString += physicalNetworkName + ":" + bridgeName - - _, stderr, err = util.RunOVSVsctl("set", "Open_vSwitch", ".", - fmt.Sprintf("external_ids:ovn-bridge-mappings=%s", mapString)) - if err != nil { - return "", fmt.Errorf("failed to set ovn-bridge-mappings for ovs bridge %s"+ - ", stderr:%s (%v)", bridgeName, stderr, err) - } - - ifaceID := bridgeName + "_" + nodeName - return ifaceID, nil -} - -func getRepresentor(intfName string) (string, error) { - deviceID, err := util.GetDeviceIDFromNetdevice(intfName) - if err != nil { - return "", err - } - - return util.GetFunctionRepresentorName(deviceID) -} diff --git a/go-controller/pkg/node/bridgeconfig/bridgeconfig_testutil.go b/go-controller/pkg/node/bridgeconfig/bridgeconfig_testutil.go deleted file mode 100644 index 8395baf06d..0000000000 --- a/go-controller/pkg/node/bridgeconfig/bridgeconfig_testutil.go +++ /dev/null @@ -1,139 +0,0 @@ -package bridgeconfig - -import ( - "fmt" - "net" - "strings" - - net2 "k8s.io/utils/net" - - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestDefaultBridgeConfig() *BridgeConfiguration { - defaultNetConfig := &BridgeUDNConfiguration{ - OfPortPatch: "patch-breth0_ov", - } - return &BridgeConfiguration{ - netConfig: map[string]*BridgeUDNConfiguration{ - types.DefaultNetworkName: defaultNetConfig, - }, - } -} - -func TestBridgeConfig(brName string) *BridgeConfiguration { - return &BridgeConfiguration{ - bridgeName: brName, - gwIface: brName, - } -} - -func (b *BridgeConfiguration) GetNetConfigLen() int { - b.mutex.Lock() - defer b.mutex.Unlock() - return len(b.netConfig) -} - -func CheckUDNSvcIsolationOVSFlows(flows []string, netConfig *BridgeUDNConfiguration, netName string, svcCIDR *net.IPNet, expectedNFlows int) { - By(fmt.Sprintf("Checking UDN %s service isolation flows for %s; expected %d flows", - netName, svcCIDR.String(), expectedNFlows)) - - var mgmtMasqIP string - var protoPrefix string - if net2.IsIPv4CIDR(svcCIDR) { - mgmtMasqIP = netConfig.V4MasqIPs.ManagementPort.IP.String() - protoPrefix = "ip" - } else { - mgmtMasqIP = netConfig.V6MasqIPs.ManagementPort.IP.String() - protoPrefix = "ip6" - } - - var nFlows int - for _, flow := range flows { - if strings.Contains(flow, fmt.Sprintf("priority=200, table=2, %s, %s_src=%s, actions=drop", - protoPrefix, protoPrefix, mgmtMasqIP)) { - nFlows++ - } - } - - Expect(nFlows).To(Equal(expectedNFlows)) -} - -func CheckAdvertisedUDNSvcIsolationOVSFlows(flows []string, netConfig *BridgeUDNConfiguration, netName string, svcCIDR *net.IPNet, expectedNFlows int) { - By(fmt.Sprintf("Checking advertised UDN %s service isolation flows for %s; expected %d flows", - netName, svcCIDR.String(), expectedNFlows)) - - var matchingIPFamilySubnet *net.IPNet - var protoPrefix string - var udnAdvertisedSubnets []*net.IPNet - var err error - for _, clusterEntry := range netConfig.Subnets { - udnAdvertisedSubnets = append(udnAdvertisedSubnets, clusterEntry.CIDR) - } - if net2.IsIPv4CIDR(svcCIDR) { - matchingIPFamilySubnet, err = util.MatchFirstIPNetFamily(false, udnAdvertisedSubnets) - Expect(err).ToNot(HaveOccurred()) - protoPrefix = "ip" - } else { - matchingIPFamilySubnet, err = util.MatchFirstIPNetFamily(true, udnAdvertisedSubnets) - Expect(err).ToNot(HaveOccurred()) - protoPrefix = "ip6" - } - - var nFlows int - for _, flow := range flows { - if strings.Contains(flow, fmt.Sprintf("priority=200, table=2, %s, %s_src=%s, actions=drop", - protoPrefix, protoPrefix, matchingIPFamilySubnet)) { - nFlows++ - } - if strings.Contains(flow, fmt.Sprintf("priority=550, in_port=LOCAL, %s, %s_src=%s, %s_dst=%s, actions=ct(commit,zone=64001,table=2)", - protoPrefix, protoPrefix, matchingIPFamilySubnet, protoPrefix, svcCIDR)) { - nFlows++ - } - } - - Expect(nFlows).To(Equal(expectedNFlows)) -} - -func CheckDefaultSvcIsolationOVSFlows(flows []string, defaultConfig *BridgeUDNConfiguration, ofPortHost, bridgeMAC string, svcCIDR *net.IPNet) { - By(fmt.Sprintf("Checking default service isolation flows for %s", svcCIDR.String())) - - var masqIP string - var masqSubnet string - var protoPrefix string - if net2.IsIPv4CIDR(svcCIDR) { - protoPrefix = "ip" - masqIP = config.Gateway.MasqueradeIPs.V4HostMasqueradeIP.String() - masqSubnet = config.Gateway.V4MasqueradeSubnet - } else { - protoPrefix = "ip6" - masqIP = config.Gateway.MasqueradeIPs.V6HostMasqueradeIP.String() - masqSubnet = config.Gateway.V6MasqueradeSubnet - } - - var nTable0DefaultFlows int - var nTable0UDNMasqFlows int - var nTable2Flows int - for _, flow := range flows { - if strings.Contains(flow, fmt.Sprintf("priority=500, in_port=%s, %s, %s_dst=%s, actions=ct(commit,zone=%d,nat(src=%s),table=2)", - ofPortHost, protoPrefix, protoPrefix, svcCIDR, config.Default.HostMasqConntrackZone, - masqIP)) { - nTable0DefaultFlows++ - } else if strings.Contains(flow, fmt.Sprintf("priority=550, in_port=%s, %s, %s_src=%s, %s_dst=%s, actions=ct(commit,zone=%d,table=2)", - ofPortHost, protoPrefix, protoPrefix, masqSubnet, protoPrefix, svcCIDR, config.Default.HostMasqConntrackZone)) { - nTable0UDNMasqFlows++ - } else if strings.Contains(flow, fmt.Sprintf("priority=100, table=2, actions=set_field:%s->eth_dst,output:%s", - bridgeMAC, defaultConfig.OfPortPatch)) { - nTable2Flows++ - } - } - - Expect(nTable0DefaultFlows).To(Equal(1)) - Expect(nTable0UDNMasqFlows).To(Equal(1)) - Expect(nTable2Flows).To(Equal(1)) -} diff --git a/go-controller/pkg/node/bridgeconfig/bridgeflows.go b/go-controller/pkg/node/bridgeconfig/bridgeflows.go deleted file mode 100644 index 8a858c30e9..0000000000 --- a/go-controller/pkg/node/bridgeconfig/bridgeflows.go +++ /dev/null @@ -1,1003 +0,0 @@ -package bridgeconfig - -import ( - "fmt" - "net" - - "k8s.io/klog/v2" - utilnet "k8s.io/utils/net" - - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - nodetypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types" - nodeutil "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/util" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" -) - -func (b *BridgeConfiguration) DefaultBridgeFlows(hostSubnets []*net.IPNet, extraIPs []net.IP) ([]string, error) { - b.mutex.Lock() - defer b.mutex.Unlock() - dftFlows, err := b.flowsForDefaultBridge(extraIPs) - if err != nil { - return nil, err - } - dftCommonFlows, err := b.commonFlows(hostSubnets) - if err != nil { - return nil, err - } - return append(dftFlows, dftCommonFlows...), nil -} - -func (b *BridgeConfiguration) ExternalBridgeFlows(hostSubnets []*net.IPNet) ([]string, error) { - b.mutex.Lock() - defer b.mutex.Unlock() - return b.commonFlows(hostSubnets) -} - -// must be called with bridge.mutex held -func (b *BridgeConfiguration) flowsForDefaultBridge(extraIPs []net.IP) ([]string, error) { - // CAUTION: when adding new flows where the in_port is ofPortPatch and the out_port is ofPortPhys, ensure - // that dl_src is included in match criteria! - - ofPortPhys := b.ofPortPhys - bridgeMacAddress := b.macAddress.String() - ofPortHost := b.ofPortHost - bridgeIPs := b.ips - - var dftFlows []string - // 14 bytes of overhead for ethernet header (does not include VLAN) - maxPktLength := getMaxFrameLength() - - strip_vlan := "" - mod_vlan_id := "" - match_vlan := "" - if config.Gateway.VLANID != 0 { - strip_vlan = "strip_vlan," - match_vlan = fmt.Sprintf("dl_vlan=%d,", config.Gateway.VLANID) - mod_vlan_id = fmt.Sprintf("mod_vlan_vid:%d,", config.Gateway.VLANID) - } - - if config.IPv4Mode { - // table0, Geneve packets coming from external. Skip conntrack and go directly to host - // if dest mac is the shared mac send directly to host. - if ofPortPhys != "" { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=205, in_port=%s, dl_dst=%s, udp, udp_dst=%d, "+ - "actions=output:%s", nodetypes.DefaultOpenFlowCookie, ofPortPhys, bridgeMacAddress, config.Default.EncapPort, - ofPortHost)) - // perform NORMAL action otherwise. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=200, in_port=%s, udp, udp_dst=%d, "+ - "actions=NORMAL", nodetypes.DefaultOpenFlowCookie, ofPortPhys, config.Default.EncapPort)) - - // table0, Geneve packets coming from LOCAL/Host OFPort. Skip conntrack and go directly to external - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=200, in_port=%s, udp, udp_dst=%d, "+ - "actions=output:%s", nodetypes.DefaultOpenFlowCookie, ofPortHost, config.Default.EncapPort, ofPortPhys)) - } - physicalIP, err := util.MatchFirstIPNetFamily(false, bridgeIPs) - if err != nil { - return nil, fmt.Errorf("unable to determine IPv4 physical IP of host: %v", err) - } - for _, netConfig := range b.patchedNetConfigs() { - // table 0, SVC Hairpin from OVN destined to local host, DNAT and go to table 4 - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ip, ip_dst=%s, ip_src=%s,"+ - "actions=ct(commit,zone=%d,nat(dst=%s),table=4)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, config.Gateway.MasqueradeIPs.V4HostMasqueradeIP.String(), physicalIP.IP, - config.Default.HostMasqConntrackZone, physicalIP.IP)) - } - - // table 0, hairpin from OVN destined to local host (but an additional node IP), send to table 4 - for _, ip := range extraIPs { - if ip.To4() == nil { - continue - } - // not needed for the physical IP - if ip.Equal(physicalIP.IP) { - continue - } - - // not needed for special masquerade IP - if ip.Equal(config.Gateway.MasqueradeIPs.V4HostMasqueradeIP) { - continue - } - - for _, netConfig := range b.patchedNetConfigs() { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ip, ip_dst=%s, ip_src=%s,"+ - "actions=ct(commit,zone=%d,table=4)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, ip.String(), physicalIP.IP, - config.Default.HostMasqConntrackZone)) - } - } - - // table 0, Reply SVC traffic from Host -> OVN, unSNAT and goto table 5 - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ip, ip_dst=%s,"+ - "actions=ct(zone=%d,nat,table=5)", - nodetypes.DefaultOpenFlowCookie, ofPortHost, config.Gateway.MasqueradeIPs.V4OVNMasqueradeIP.String(), config.Default.OVNMasqConntrackZone)) - } - if config.IPv6Mode { - if ofPortPhys != "" { - // table0, Geneve packets coming from external. Skip conntrack and go directly to host - // if dest mac is the shared mac send directly to host. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=205, in_port=%s, dl_dst=%s, udp6, udp_dst=%d, "+ - "actions=output:%s", nodetypes.DefaultOpenFlowCookie, ofPortPhys, bridgeMacAddress, config.Default.EncapPort, - ofPortHost)) - // perform NORMAL action otherwise. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=200, in_port=%s, udp6, udp_dst=%d, "+ - "actions=NORMAL", nodetypes.DefaultOpenFlowCookie, ofPortPhys, config.Default.EncapPort)) - - // table0, Geneve packets coming from LOCAL. Skip conntrack and send to external - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=200, in_port=%s, udp6, udp_dst=%d, "+ - "actions=output:%s", nodetypes.DefaultOpenFlowCookie, nodetypes.OvsLocalPort, config.Default.EncapPort, ofPortPhys)) - } - - physicalIP, err := util.MatchFirstIPNetFamily(true, bridgeIPs) - if err != nil { - return nil, fmt.Errorf("unable to determine IPv6 physical IP of host: %v", err) - } - // table 0, SVC Hairpin from OVN destined to local host, DNAT to host, send to table 4 - for _, netConfig := range b.patchedNetConfigs() { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ipv6, ipv6_dst=%s, ipv6_src=%s,"+ - "actions=ct(commit,zone=%d,nat(dst=%s),table=4)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, config.Gateway.MasqueradeIPs.V6HostMasqueradeIP.String(), physicalIP.IP, - config.Default.HostMasqConntrackZone, physicalIP.IP)) - } - - // table 0, hairpin from OVN destined to local host (but an additional node IP), send to table 4 - for _, ip := range extraIPs { - if ip.To4() != nil { - continue - } - // not needed for the physical IP - if ip.Equal(physicalIP.IP) { - continue - } - - // not needed for special masquerade IP - if ip.Equal(config.Gateway.MasqueradeIPs.V6HostMasqueradeIP) { - continue - } - - for _, netConfig := range b.patchedNetConfigs() { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ipv6, ipv6_dst=%s, ipv6_src=%s,"+ - "actions=ct(commit,zone=%d,table=4)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, ip.String(), physicalIP.IP, - config.Default.HostMasqConntrackZone)) - } - } - - // table 0, Reply SVC traffic from Host -> OVN, unSNAT and goto table 5 - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ipv6, ipv6_dst=%s,"+ - "actions=ct(zone=%d,nat,table=5)", - nodetypes.DefaultOpenFlowCookie, ofPortHost, config.Gateway.MasqueradeIPs.V6OVNMasqueradeIP.String(), config.Default.OVNMasqConntrackZone)) - } - - var protoPrefix, masqIP, masqSubnet string - - // table 0, packets coming from Host -> Service - for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { - if utilnet.IsIPv4CIDR(svcCIDR) { - protoPrefix = "ip" - masqIP = config.Gateway.MasqueradeIPs.V4HostMasqueradeIP.String() - masqSubnet = config.Gateway.V4MasqueradeSubnet - } else { - protoPrefix = "ipv6" - masqIP = config.Gateway.MasqueradeIPs.V6HostMasqueradeIP.String() - masqSubnet = config.Gateway.V6MasqueradeSubnet - } - - // table 0, Host (default network) -> OVN towards SVC, SNAT to special IP. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=500, in_port=%s, %s, %s_dst=%s, "+ - "actions=ct(commit,zone=%d,nat(src=%s),table=2)", - nodetypes.DefaultOpenFlowCookie, ofPortHost, protoPrefix, protoPrefix, - svcCIDR, config.Default.HostMasqConntrackZone, masqIP)) - - if util.IsNetworkSegmentationSupportEnabled() { - // table 0, Host (UDNs) -> OVN towards SVC, SNAT to special IP. - // For packets originating from UDN, commit without NATing, those - // have already been SNATed to the masq IP of the UDN. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=550, in_port=%s, %s, %s_src=%s, %s_dst=%s, "+ - "actions=ct(commit,zone=%d,table=2)", - nodetypes.DefaultOpenFlowCookie, ofPortHost, protoPrefix, protoPrefix, - masqSubnet, protoPrefix, svcCIDR, config.Default.HostMasqConntrackZone)) - if util.IsRouteAdvertisementsEnabled() { - // If the UDN is advertised then instead of matching on the masqSubnet - // we match on the UDNPodSubnet itself and we also don't SNAT to 169.254.0.2 - // sample flow: cookie=0xdeff105, duration=1472.742s, table=0, n_packets=9, n_bytes=666, priority=550 - // ip,in_port=LOCAL,nw_src=103.103.0.0/16,nw_dst=10.96.0.0/16 actions=ct(commit,table=2,zone=64001) - for _, netConfig := range b.patchedNetConfigs() { - if netConfig.IsDefaultNetwork() { - continue - } - if netConfig.Advertised.Load() { - var udnAdvertisedSubnets []*net.IPNet - for _, clusterEntry := range netConfig.Subnets { - udnAdvertisedSubnets = append(udnAdvertisedSubnets, clusterEntry.CIDR) - } - // Filter subnets based on the clusterIP service family - // NOTE: We don't support more than 1 subnet CIDR of same family type; we only pick the first one - matchingIPFamilySubnet, err := util.MatchFirstIPNetFamily(utilnet.IsIPv6CIDR(svcCIDR), udnAdvertisedSubnets) - if err != nil { - klog.Infof("Unable to determine UDN subnet for the provided family isIPV6: %t, %v", utilnet.IsIPv6CIDR(svcCIDR), err) - continue - } - - // Use the filtered subnet for the flow compute instead of the masqueradeIP - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=550, in_port=%s, %s, %s_src=%s, %s_dst=%s, "+ - "actions=ct(commit,zone=%d,table=2)", - nodetypes.DefaultOpenFlowCookie, ofPortHost, protoPrefix, protoPrefix, - matchingIPFamilySubnet.String(), protoPrefix, svcCIDR, config.Default.HostMasqConntrackZone)) - } - } - } - } - - masqDst := masqIP - if util.IsNetworkSegmentationSupportEnabled() { - // In UDN match on the whole masquerade subnet to handle replies from UDN enabled services - masqDst = masqSubnet - } - for _, netConfig := range b.patchedNetConfigs() { - // table 0, Reply hairpin traffic to host, coming from OVN, unSNAT - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=500, in_port=%s, %s, %s_src=%s, %s_dst=%s,"+ - "actions=ct(zone=%d,nat,table=3)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, protoPrefix, protoPrefix, svcCIDR, - protoPrefix, masqDst, config.Default.HostMasqConntrackZone)) - // table 0, Reply traffic coming from OVN to outside, drop it if the DNAT wasn't done either - // at the GR load balancer or switch load balancer. It means the correct port wasn't provided. - // nodeCIDR->serviceCIDR traffic flow is internal and it shouldn't be carried to outside the cluster - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=115, in_port=%s, %s, %s_dst=%s,"+ - "actions=drop", nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, protoPrefix, protoPrefix, svcCIDR)) - } - } - - // table 0, add IP fragment reassembly flows, only needed in SGW mode with - // physical interface attached to bridge - if config.Gateway.Mode == config.GatewayModeShared && ofPortPhys != "" { - reassemblyFlows := generateIPFragmentReassemblyFlow(ofPortPhys) - dftFlows = append(dftFlows, reassemblyFlows...) - } - if ofPortPhys != "" { - for _, netConfig := range b.patchedNetConfigs() { - var actions string - if config.Gateway.Mode != config.GatewayModeLocal || config.Gateway.DisablePacketMTUCheck { - actions = fmt.Sprintf("output:%s", netConfig.OfPortPatch) - } else { - // packets larger than known acceptable MTU need to go to kernel for - // potential fragmentation - // introduced specifically for replies to egress traffic not routed - // through the host - actions = fmt.Sprintf("check_pkt_larger(%d)->reg0[0],resubmit(,11)", maxPktLength) - } - - if config.IPv4Mode { - // table 1, established and related connections in zone 64000 with ct_mark CtMarkOVN go to OVN - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, table=1, ip, ct_state=+trk+est, ct_mark=%s, "+ - "actions=%s", nodetypes.DefaultOpenFlowCookie, netConfig.MasqCTMark, actions)) - - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, table=1, ip, ct_state=+trk+rel, ct_mark=%s, "+ - "actions=%s", nodetypes.DefaultOpenFlowCookie, netConfig.MasqCTMark, actions)) - - } - - if config.IPv6Mode { - // table 1, established and related connections in zone 64000 with ct_mark CtMarkOVN go to OVN - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, table=1, ipv6, ct_state=+trk+est, ct_mark=%s, "+ - "actions=%s", nodetypes.DefaultOpenFlowCookie, netConfig.MasqCTMark, actions)) - - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, table=1, ipv6, ct_state=+trk+rel, ct_mark=%s, "+ - "actions=%s", nodetypes.DefaultOpenFlowCookie, netConfig.MasqCTMark, actions)) - } - } - if config.IPv4Mode { - // table 1, established and related connections in zone 64000 with ct_mark CtMarkHost go to host - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, table=1, %s ip, ct_state=+trk+est, ct_mark=%s, "+ - "actions=%soutput:%s", - nodetypes.DefaultOpenFlowCookie, match_vlan, nodetypes.CtMarkHost, strip_vlan, ofPortHost)) - - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, table=1, %s ip, ct_state=+trk+rel, ct_mark=%s, "+ - "actions=%soutput:%s", - nodetypes.DefaultOpenFlowCookie, match_vlan, nodetypes.CtMarkHost, strip_vlan, ofPortHost)) - - } - if config.IPv6Mode { - // table 1, established and related connections in zone 64000 with ct_mark CtMarkHost go to host - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, table=1, %s ip6, ct_state=+trk+est, ct_mark=%s, "+ - "actions=%soutput:%s", - nodetypes.DefaultOpenFlowCookie, match_vlan, nodetypes.CtMarkHost, strip_vlan, ofPortHost)) - - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, table=1, %s ip6, ct_state=+trk+rel, ct_mark=%s, "+ - "actions=%soutput:%s", - nodetypes.DefaultOpenFlowCookie, match_vlan, nodetypes.CtMarkHost, strip_vlan, ofPortHost)) - - } - - // table 1, we check to see if this dest mac is the shared mac, if so send to host - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=10, table=1, %s dl_dst=%s, actions=%soutput:%s", - nodetypes.DefaultOpenFlowCookie, match_vlan, bridgeMacAddress, strip_vlan, ofPortHost)) - } - - defaultNetConfig := b.netConfig[types.DefaultNetworkName] - - // table 2, dispatch from Host -> OVN - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, table=2, "+ - "actions=set_field:%s->eth_dst,%soutput:%s", nodetypes.DefaultOpenFlowCookie, - bridgeMacAddress, mod_vlan_id, defaultNetConfig.OfPortPatch)) - - // table 2, priority 200, dispatch from UDN -> Host -> OVN. These packets have - // already been SNATed to the UDN's masquerade IP or have been marked with the UDN's packet mark. - if config.IPv4Mode { - for _, netConfig := range b.patchedNetConfigs() { - if netConfig.IsDefaultNetwork() { - continue - } - if util.IsRouteAdvertisementsEnabled() && netConfig.Advertised.Load() { - var udnAdvertisedSubnets []*net.IPNet - for _, clusterEntry := range netConfig.Subnets { - udnAdvertisedSubnets = append(udnAdvertisedSubnets, clusterEntry.CIDR) - } - // Filter subnets based on the clusterIP service family - // NOTE: We don't support more than 1 subnet CIDR of same family type; we only pick the first one - matchingIPFamilySubnet, err := util.MatchFirstIPNetFamily(false, udnAdvertisedSubnets) - if err != nil { - klog.Infof("Unable to determine IPV4 UDN subnet for the provided family isIPV6: %v", err) - continue - } - // In addition to the masqueradeIP based flows, we also need the podsubnet based flows for - // advertised networks since UDN pod to clusterIP is unSNATed and we need this traffic to be taken into - // the correct patch port of it's own network where it's a deadend if the clusterIP is not part of - // that UDN network and works if it is part of the UDN network. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=200, table=2, ip, ip_src=%s, "+ - "actions=drop", - nodetypes.DefaultOpenFlowCookie, matchingIPFamilySubnet.String())) - } - // Drop traffic coming from the masquerade IP or the UDN subnet(for advertised UDNs) to ensure that - // isolation between networks is enforced. This handles the case where a pod on the UDN subnet is sending traffic to - // a service in another UDN. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=200, table=2, ip, ip_src=%s, "+ - "actions=drop", - nodetypes.DefaultOpenFlowCookie, netConfig.V4MasqIPs.ManagementPort.IP.String())) - - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=250, table=2, ip, pkt_mark=%s, "+ - "actions=set_field:%s->eth_dst,output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.PktMark, - bridgeMacAddress, netConfig.OfPortPatch)) - } - } - - if config.IPv6Mode { - for _, netConfig := range b.patchedNetConfigs() { - if netConfig.IsDefaultNetwork() { - continue - } - if util.IsRouteAdvertisementsEnabled() && netConfig.Advertised.Load() { - var udnAdvertisedSubnets []*net.IPNet - for _, clusterEntry := range netConfig.Subnets { - udnAdvertisedSubnets = append(udnAdvertisedSubnets, clusterEntry.CIDR) - } - // Filter subnets based on the clusterIP service family - // NOTE: We don't support more than 1 subnet CIDR of same family type; we only pick the first one - matchingIPFamilySubnet, err := util.MatchFirstIPNetFamily(true, udnAdvertisedSubnets) - if err != nil { - klog.Infof("Unable to determine IPV6 UDN subnet for the provided family isIPV6: %v", err) - continue - } - - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=200, table=2, ip6, ipv6_src=%s, "+ - "actions=drop", - nodetypes.DefaultOpenFlowCookie, matchingIPFamilySubnet.String())) - } - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=200, table=2, ip6, ipv6_src=%s, "+ - "actions=drop", - nodetypes.DefaultOpenFlowCookie, netConfig.V6MasqIPs.ManagementPort.IP.String())) - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=250, table=2, ip6, pkt_mark=%s, "+ - "actions=set_field:%s->eth_dst,output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.PktMark, - bridgeMacAddress, netConfig.OfPortPatch)) - } - } - - // table 3, dispatch from OVN -> Host - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, table=3, %s "+ - "actions=move:NXM_OF_ETH_DST[]->NXM_OF_ETH_SRC[],set_field:%s->eth_dst,%soutput:%s", - nodetypes.DefaultOpenFlowCookie, match_vlan, bridgeMacAddress, strip_vlan, ofPortHost)) - - // table 4, hairpinned pkts that need to go from OVN -> Host - // We need to SNAT and masquerade OVN GR IP, send to table 3 for dispatch to Host - if config.IPv4Mode { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, table=4,ip,"+ - "actions=ct(commit,zone=%d,nat(src=%s),table=3)", - nodetypes.DefaultOpenFlowCookie, config.Default.OVNMasqConntrackZone, config.Gateway.MasqueradeIPs.V4OVNMasqueradeIP.String())) - } - if config.IPv6Mode { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, table=4,ipv6, "+ - "actions=ct(commit,zone=%d,nat(src=%s),table=3)", - nodetypes.DefaultOpenFlowCookie, config.Default.OVNMasqConntrackZone, config.Gateway.MasqueradeIPs.V6OVNMasqueradeIP.String())) - } - // table 5, Host Reply traffic to hairpinned svc, need to unDNAT, send to table 2 - if config.IPv4Mode { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, table=5, ip, "+ - "actions=ct(commit,zone=%d,nat,table=2)", - nodetypes.DefaultOpenFlowCookie, config.Default.HostMasqConntrackZone)) - } - if config.IPv6Mode { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, table=5, ipv6, "+ - "actions=ct(commit,zone=%d,nat,table=2)", - nodetypes.DefaultOpenFlowCookie, config.Default.HostMasqConntrackZone)) - } - return dftFlows, nil -} - -// getMaxFrameLength returns the maximum frame size (ignoring VLAN header) that a gateway can handle -func getMaxFrameLength() int { - return config.Default.MTU + 14 -} - -// generateIPFragmentReassemblyFlow adds flows in table 0 that send packets to a -// specific conntrack zone for reassembly with the same priority as node port -// flows that match on L4 fields. After reassembly packets are reinjected to -// table 0 again. This requires a conntrack immplementation that reassembles -// fragments. This reqreuiment is met for the kernel datapath with the netfilter -// module loaded. This reqreuiment is not met for the userspace datapath. -func generateIPFragmentReassemblyFlow(ofPortPhys string) []string { - flows := make([]string, 0, 2) - if config.IPv4Mode { - flows = append(flows, - fmt.Sprintf("cookie=%s, priority=110, table=0, in_port=%s, ip, nw_frag=yes, actions=ct(table=0,zone=%d)", - nodetypes.DefaultOpenFlowCookie, - ofPortPhys, - config.Default.ReassemblyConntrackZone, - ), - ) - } - if config.IPv6Mode { - flows = append(flows, - fmt.Sprintf("cookie=%s, priority=110, table=0, in_port=%s, ipv6, nw_frag=yes, actions=ct(table=0,zone=%d)", - nodetypes.DefaultOpenFlowCookie, - ofPortPhys, - config.Default.ReassemblyConntrackZone, - ), - ) - } - - return flows -} - -// must be called with bridge.mutex held -func (b *BridgeConfiguration) commonFlows(hostSubnets []*net.IPNet) ([]string, error) { - // CAUTION: when adding new flows where the in_port is ofPortPatch and the out_port is ofPortPhys, ensure - // that dl_src is included in match criteria! - ofPortPhys := b.ofPortPhys - bridgeMacAddress := b.macAddress.String() - ofPortHost := b.ofPortHost - bridgeIPs := b.ips - - var dftFlows []string - - strip_vlan := "" - match_vlan := "" - mod_vlan_id := "" - if config.Gateway.VLANID != 0 { - strip_vlan = "strip_vlan," - match_vlan = fmt.Sprintf("dl_vlan=%d,", config.Gateway.VLANID) - mod_vlan_id = fmt.Sprintf("mod_vlan_vid:%d,", config.Gateway.VLANID) - } - - if ofPortPhys != "" { - // table 0, we check to see if this dest mac is the shared mac, if so flood to all ports - actions := "" - for _, netConfig := range b.patchedNetConfigs() { - actions += "output:" + netConfig.OfPortPatch + "," - } - - actions += strip_vlan + "NORMAL" - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=10, table=0, %s dl_dst=%s, actions=%s", - nodetypes.DefaultOpenFlowCookie, match_vlan, bridgeMacAddress, actions)) - } - - // table 0, check packets coming from OVN have the correct mac address. Low priority flows that are a catch all - // for non-IP packets that would normally be forwarded with NORMAL action (table 0, priority 0 flow). - for _, netConfig := range b.patchedNetConfigs() { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=10, table=0, in_port=%s, dl_src=%s, actions=output:NORMAL", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress)) - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=9, table=0, in_port=%s, actions=drop", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch)) - } - - if config.IPv4Mode { - physicalIP, err := util.MatchFirstIPNetFamily(false, bridgeIPs) - if err != nil { - return nil, fmt.Errorf("unable to determine IPv4 physical IP of host: %v", err) - } - if ofPortPhys != "" { - for _, netConfig := range b.patchedNetConfigs() { - // table0, packets coming from egressIP pods that have mark 1008 on them - // will be SNAT-ed a final time into nodeIP to maintain consistency in traffic even if the GR - // SNATs these into egressIP prior to reaching external bridge. - // egressService pods will also undergo this SNAT to nodeIP since these features are tied - // together at the OVN policy level on the distributed router. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=105, in_port=%s, dl_src=%s, ip, pkt_mark=%s "+ - "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)),output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, nodetypes.OvnKubeNodeSNATMark, - config.Default.ConntrackZone, physicalIP.IP, netConfig.MasqCTMark, ofPortPhys)) - - // table 0, packets coming from egressIP pods only from user defined networks. If an egressIP is assigned to - // this node, then all networks get a flow even if no pods on that network were selected for by this egressIP. - if util.IsNetworkSegmentationSupportEnabled() && config.OVNKubernetesFeature.EnableInterconnect && - config.Gateway.Mode != config.GatewayModeDisabled && b.eipMarkIPs != nil { - if netConfig.MasqCTMark != nodetypes.CtMarkOVN { - for mark, eip := range b.eipMarkIPs.GetIPv4() { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=105, in_port=%s, dl_src=%s, ip, pkt_mark=%d, "+ - "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)), output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, mark, - config.Default.ConntrackZone, eip, netConfig.MasqCTMark, ofPortPhys)) - } - } - } - - // table 0, packets coming from pods headed externally. Commit connections with ct_mark CtMarkOVN - // so that reverse direction goes back to the pods. - if netConfig.IsDefaultNetwork() { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, in_port=%s, dl_src=%s, ip, "+ - "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, config.Default.ConntrackZone, - netConfig.MasqCTMark, ofPortPhys)) - - // Allow (a) OVN->host traffic on the same node - // (b) host->host traffic on the same node - if config.Gateway.Mode == config.GatewayModeShared || config.Gateway.Mode == config.GatewayModeLocal { - dftFlows = append(dftFlows, hostNetworkNormalActionFlows(netConfig, bridgeMacAddress, hostSubnets, false)...) - } - } else { - // for UDN we additionally SNAT the packet from masquerade IP -> node IP - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, in_port=%s, dl_src=%s, ip, ip_src=%s, "+ - "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)), output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, netConfig.V4MasqIPs.GatewayRouter.IP, config.Default.ConntrackZone, - physicalIP.IP, netConfig.MasqCTMark, ofPortPhys)) - } - } - - // table 0, packets coming from host Commit connections with ct_mark CtMarkHost - // so that reverse direction goes back to the host. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, in_port=%s, ip, "+ - "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), %soutput:%s", - nodetypes.DefaultOpenFlowCookie, ofPortHost, config.Default.ConntrackZone, nodetypes.CtMarkHost, mod_vlan_id, ofPortPhys)) - } - if config.Gateway.Mode == config.GatewayModeLocal { - for _, netConfig := range b.patchedNetConfigs() { - // table 0, any packet coming from OVN send to host in LGW mode, host will take care of sending it outside if needed. - // exceptions are traffic for egressIP and egressGW features and ICMP related traffic which will hit the priority 100 flow instead of this. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=175, in_port=%s, tcp, nw_src=%s, "+ - "actions=ct(table=4,zone=%d)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=175, in_port=%s, udp, nw_src=%s, "+ - "actions=ct(table=4,zone=%d)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=175, in_port=%s, sctp, nw_src=%s, "+ - "actions=ct(table=4,zone=%d)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) - // We send BFD traffic coming from OVN to outside directly using a higher priority flow - if ofPortPhys != "" { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=650, table=0, in_port=%s, dl_src=%s, udp, tp_dst=3784, actions=output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, ofPortPhys)) - } - } - } - - if ofPortPhys != "" { - // table 0, packets coming from external or other localnet ports. Send it through conntrack and - // resubmit to table 1 to know the state and mark of the connection. - // Note, there are higher priority rules that take care of traffic coming from LOCAL and OVN ports. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=50, ip, actions=ct(zone=%d, nat, table=1)", - nodetypes.DefaultOpenFlowCookie, config.Default.ConntrackZone)) - } - } - - if config.IPv6Mode { - physicalIP, err := util.MatchFirstIPNetFamily(true, bridgeIPs) - if err != nil { - return nil, fmt.Errorf("unable to determine IPv6 physical IP of host: %v", err) - } - if ofPortPhys != "" { - for _, netConfig := range b.patchedNetConfigs() { - // table0, packets coming from egressIP pods that have mark 1008 on them - // will be DNAT-ed a final time into nodeIP to maintain consistency in traffic even if the GR - // DNATs these into egressIP prior to reaching external bridge. - // egressService pods will also undergo this SNAT to nodeIP since these features are tied - // together at the OVN policy level on the distributed router. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=105, in_port=%s, dl_src=%s, ipv6, pkt_mark=%s "+ - "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)),output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, nodetypes.OvnKubeNodeSNATMark, - config.Default.ConntrackZone, physicalIP.IP, netConfig.MasqCTMark, ofPortPhys)) - - // table 0, packets coming from egressIP pods only from user defined networks. If an egressIP is assigned to - // this node, then all networks get a flow even if no pods on that network were selected for by this egressIP. - if util.IsNetworkSegmentationSupportEnabled() && config.OVNKubernetesFeature.EnableInterconnect && - config.Gateway.Mode != config.GatewayModeDisabled && b.eipMarkIPs != nil { - if netConfig.MasqCTMark != nodetypes.CtMarkOVN { - for mark, eip := range b.eipMarkIPs.GetIPv6() { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=105, in_port=%s, dl_src=%s, ipv6, pkt_mark=%d, "+ - "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)), output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, mark, - config.Default.ConntrackZone, eip, netConfig.MasqCTMark, ofPortPhys)) - } - } - } - - // table 0, packets coming from pods headed externally. Commit connections with ct_mark CtMarkOVN - // so that reverse direction goes back to the pods. - if netConfig.IsDefaultNetwork() { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, in_port=%s, dl_src=%s, ipv6, "+ - "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, config.Default.ConntrackZone, netConfig.MasqCTMark, ofPortPhys)) - - // Allow (a) OVN->host traffic on the same node - // (b) host->host traffic on the same node - if config.Gateway.Mode == config.GatewayModeShared || config.Gateway.Mode == config.GatewayModeLocal { - dftFlows = append(dftFlows, hostNetworkNormalActionFlows(netConfig, bridgeMacAddress, hostSubnets, true)...) - } - } else { - // for UDN we additionally SNAT the packet from masquerade IP -> node IP - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, in_port=%s, dl_src=%s, ipv6, ipv6_src=%s, "+ - "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)), output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, netConfig.V6MasqIPs.GatewayRouter.IP, config.Default.ConntrackZone, - physicalIP.IP, netConfig.MasqCTMark, ofPortPhys)) - } - } - - // table 0, packets coming from host. Commit connections with ct_mark CtMarkHost - // so that reverse direction goes back to the host. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=100, in_port=%s, ipv6, "+ - "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), %soutput:%s", - nodetypes.DefaultOpenFlowCookie, ofPortHost, config.Default.ConntrackZone, nodetypes.CtMarkHost, mod_vlan_id, ofPortPhys)) - - } - if config.Gateway.Mode == config.GatewayModeLocal { - for _, netConfig := range b.patchedNetConfigs() { - // table 0, any packet coming from OVN send to host in LGW mode, host will take care of sending it outside if needed. - // exceptions are traffic for egressIP and egressGW features and ICMP related traffic which will hit the priority 100 flow instead of this. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=175, in_port=%s, tcp6, ipv6_src=%s, "+ - "actions=ct(table=4,zone=%d)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=175, in_port=%s, udp6, ipv6_src=%s, "+ - "actions=ct(table=4,zone=%d)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=175, in_port=%s, sctp6, ipv6_src=%s, "+ - "actions=ct(table=4,zone=%d)", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) - if ofPortPhys != "" { - // We send BFD traffic coming from OVN to outside directly using a higher priority flow - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=650, table=0, in_port=%s, dl_src=%s, udp6, tp_dst=3784, actions=output:%s", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, bridgeMacAddress, ofPortPhys)) - } - } - } - if ofPortPhys != "" { - // table 0, packets coming from external. Send it through conntrack and - // resubmit to table 1 to know the state and mark of the connection. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=50, in_port=%s, ipv6, "+ - "actions=ct(zone=%d, nat, table=1)", nodetypes.DefaultOpenFlowCookie, ofPortPhys, config.Default.ConntrackZone)) - } - } - if ofPortPhys != "" { - defaultNetConfig := b.netConfig[types.DefaultNetworkName] - // table 0, Ingress/Egress flows for MEG enabled pods and advertised UDNs - // priority 300: Ingress traffic to MEG pods and advertised UDNs - // priority 301: Ingress traffic to node management traffic - // priority 104: Egress traffic from advertised UDNs or MEG enabled pods - // priority 103: For egressIP, drop packets coming from pods from other nodes headed externally that were not SNATed. - // example flows in SGW mode EIP enabled: - // table=0, n_packets=0, n_bytes=0, priority=300,ip,in_port=eth0,nw_dst= actions=output:4 - // table=0, n_packets=0, n_bytes=0, priority=301,ip,in_port=eth0,nw_dst= actions=output:LOCAL - // table=0, n_packets=0, n_bytes=0, priority=104,ip,in_port=4,dl_src=02:42:ac:12:00:03,nw_src= actions=output:eth0 - // table=0, n_packets=0, n_bytes=0, priority=103,ip,in_port=4,nw_src= actions=drop - // example flows in LGW mode EIP enabled: - // table=0, n_packets=0, n_bytes=0, priority=300,ip,in_port=eth0,nw_dst= actions=output:LOCAL - // table=0, n_packets=0, n_bytes=0, priority=104,ip,in_port=LOCAL,dl_src=02:42:ac:12:00:03,nw_src= actions=output:eth0 - // table=0, n_packets=0, n_bytes=0, priority=103,ip,in_port=4,nw_src= actions=drop - // example flows in SGW mode EIP disabled: - // table=0, n_packets=0, n_bytes=0, priority=300,ip,in_port=eth0,nw_dst= actions=output:4 - // table=0, n_packets=0, n_bytes=0, priority=301,ip,in_port=eth0,nw_dst= actions=output:LOCAL - // table=0, n_packets=0, n_bytes=0, priority=104,ip,in_port=4,dl_src=02:42:ac:12:00:03,nw_src= actions=output:eth0 - // example flows in LGW mode EIP disabled: - // table=0, n_packets=0, n_bytes=0, priority=300,ip,in_port=eth0,nw_dst= actions=output:LOCAL - // table=0, n_packets=0, n_bytes=0, priority=104,ip,in_port=LOCAL,dl_src=02:42:ac:12:00:03,nw_src= actions=output:eth0 - for _, netConfig := range b.patchedNetConfigs() { - isNetworkAdvertised := netConfig.Advertised.Load() - // disableSNATMultipleGWs only applies to default network - disableSNATMultipleGWs := netConfig.IsDefaultNetwork() && config.Gateway.DisableSNATMultipleGWs - - if config.OVNKubernetesFeature.EnableEgressIP { - // Due to the fact that ovn-controllers on different nodes apply the changes independently, - // there is a chance that the pod traffic will reach the egress node before it configures the SNAT flows. - // Drop pod traffic that is not SNATed - for _, clusterEntry := range netConfig.Subnets { - cidr := clusterEntry.CIDR - ipv := getIPv(cidr) - // table 0, drop packets coming from pods headed externally that were not SNATed. - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=103, in_port=%s, %s, %s_src=%s, actions=drop", - nodetypes.DefaultOpenFlowCookie, netConfig.OfPortPatch, ipv, ipv, cidr)) - } - } - // skip if MEG is disabled for the default network - // and the network (default or UDN) is not advertised - if !disableSNATMultipleGWs && !isNetworkAdvertised { - continue - } - output := netConfig.OfPortPatch - input := netConfig.OfPortPatch - isAdvertisedLGW := isNetworkAdvertised && config.Gateway.Mode == config.GatewayModeLocal - if isAdvertisedLGW { - // except if advertised through BGP, go to kernel - // TODO: MEG enabled pods should still go through the patch port - // but holding this until - // https://issues.redhat.com/browse/FDP-646 is fixed, for now we - // are assuming MEG & BGP are not used together - output = nodetypes.OvsLocalPort - input = nodetypes.OvsLocalPort - } - for _, subnet := range netConfig.NodeSubnets { - ipv := getIPv(subnet) - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=300, table=0, in_port=%s, %s, %s_dst=%s, "+ - "actions=output:%s", - nodetypes.DefaultOpenFlowCookie, ofPortPhys, ipv, ipv, subnet, output)) - // except node management traffic - mgmtIP, err := util.MatchFirstIPNetFamily(utilnet.IsIPv6CIDR(subnet), netConfig.ManagementIPs) - if err != nil { - return nil, fmt.Errorf("failed to find the management IP matching the IP family of the subnet %q", subnet) - } - - if mgmtIP == nil { - return nil, fmt.Errorf("unable to determine management IP for subnet %s", subnet.String()) - } - if config.Gateway.Mode != config.GatewayModeLocal { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=301, table=0, in_port=%s, %s, %s_dst=%s, "+ - "actions=output:%s", - nodetypes.DefaultOpenFlowCookie, ofPortPhys, ipv, ipv, mgmtIP.IP, nodetypes.OvsLocalPort), - ) - } - - if (disableSNATMultipleGWs && config.OVNKubernetesFeature.EnableEgressIP) || isNetworkAdvertised { - // MEG and advertised UDN networks requires that local pod traffic can leave the node without SNAT. - // We match on the pod subnets and forward the traffic to the physical interface. - // Select priority 104 for the scenario when both EgressIP and advertised UDN are active: - // 1. Override egressIP drop flows (priority 103) - // 2. Still allow egressIP flows at priority 105 - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=104, in_port=%s, dl_src=%s, %s, %s_src=%s, "+ - "actions=output:%s", - nodetypes.DefaultOpenFlowCookie, input, bridgeMacAddress, ipv, ipv, subnet, ofPortPhys)) - } - } - } - - // table 1, we check to see if this dest mac is the shared mac, if so send to host - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=10, table=1, %s dl_dst=%s, actions=%soutput:%s", - nodetypes.DefaultOpenFlowCookie, match_vlan, bridgeMacAddress, strip_vlan, ofPortHost)) - - if config.IPv6Mode { - // REMOVEME(trozet) when https://bugzilla.kernel.org/show_bug.cgi?id=11797 is resolved - // must flood icmpv6 Route Advertisement and Neighbor Advertisement traffic as it fails to create a CT entry - for _, icmpType := range []int{types.RouteAdvertisementICMPType, types.NeighborAdvertisementICMPType} { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=14, table=1,icmp6,icmpv6_type=%d actions=FLOOD", - nodetypes.DefaultOpenFlowCookie, icmpType)) - } - if ofPortPhys != "" { - // We send BFD traffic both on the host and in ovn - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=13, table=1, in_port=%s, udp6, tp_dst=3784, actions=output:%s,output:%s", - nodetypes.DefaultOpenFlowCookie, ofPortPhys, defaultNetConfig.OfPortPatch, ofPortHost)) - } - } - - if config.IPv4Mode { - if ofPortPhys != "" { - // We send BFD traffic both on the host and in ovn - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=13, table=1, in_port=%s, udp, tp_dst=3784, actions=output:%s,output:%s", - nodetypes.DefaultOpenFlowCookie, ofPortPhys, defaultNetConfig.OfPortPatch, ofPortHost)) - } - } - - // packets larger than known acceptable MTU need to go to kernel for - // potential fragmentation - // introduced specifically for replies to egress traffic not routed - // through the host - if config.Gateway.Mode == config.GatewayModeLocal && !config.Gateway.DisablePacketMTUCheck { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=10, table=11, reg0=0x1, "+ - "actions=output:%s", nodetypes.DefaultOpenFlowCookie, ofPortHost)) - - // Send UDN destined traffic to right patch port - for _, netConfig := range b.patchedNetConfigs() { - if netConfig.MasqCTMark != nodetypes.CtMarkOVN { - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=5, table=11, ct_mark=%s, "+ - "actions=output:%s", nodetypes.DefaultOpenFlowCookie, netConfig.MasqCTMark, netConfig.OfPortPatch)) - } - } - - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=1, table=11, "+ - "actions=output:%s", nodetypes.DefaultOpenFlowCookie, defaultNetConfig.OfPortPatch)) - } - - // table 1, all other connections do normal processing - dftFlows = append(dftFlows, - fmt.Sprintf("cookie=%s, priority=0, table=1, actions=output:NORMAL", nodetypes.DefaultOpenFlowCookie)) - } - - return dftFlows, nil -} - -func (b *BridgeConfiguration) PMTUDDropFlows(ipAddrs []string) []string { - b.mutex.Lock() - defer b.mutex.Unlock() - var flows []string - if config.Gateway.Mode != config.GatewayModeShared { - return nil - } - for _, addr := range ipAddrs { - for _, netConfig := range b.patchedNetConfigs() { - flows = append(flows, - nodeutil.GenerateICMPFragmentationFlow(addr, nodetypes.OutputPortDrop, netConfig.OfPortPatch, nodetypes.PmtudOpenFlowCookie, 700)) - } - } - - return flows -} - -func getIPv(ipnet *net.IPNet) string { - prefix := "ip" - if utilnet.IsIPv6CIDR(ipnet) { - prefix = "ipv6" - } - return prefix -} - -// hostNetworkNormalActionFlows returns the flows that allow IP{v4,v6} traffic: -// a. from pods in the OVN network to pods in a localnet network, on the same node -// b. from pods on the host to pods in a localnet network, on the same node -// when the localnet is mapped to breth0. -// The expected srcMAC is the MAC address of breth0 and the expected hostSubnets is the host subnets found on the node -// primary interface. -func hostNetworkNormalActionFlows(netConfig *BridgeUDNConfiguration, srcMAC string, hostSubnets []*net.IPNet, isV6 bool) []string { - var flows []string - var ipFamily, ipFamilyDest string - - if isV6 { - ipFamily = "ipv6" - ipFamilyDest = "ipv6_dst" - } else { - ipFamily = "ip" - ipFamilyDest = "nw_dst" - } - - formatFlow := func(inPort, destIP, ctMark string) string { - // Matching IP traffic will be handled by the bridge instead of being output directly - // to the NIC by the existing flow at prio=100. - flowTemplate := "cookie=%s, priority=102, in_port=%s, dl_src=%s, %s, %s=%s, " + - "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), output:NORMAL" - return fmt.Sprintf(flowTemplate, - nodetypes.DefaultOpenFlowCookie, - inPort, - srcMAC, - ipFamily, - ipFamilyDest, - destIP, - config.Default.ConntrackZone, - ctMark) - } - - // Traffic path (a): OVN->localnet for shared gw mode - if config.Gateway.Mode == config.GatewayModeShared { - for _, hostSubnet := range hostSubnets { - if utilnet.IsIPv6(hostSubnet.IP) != isV6 { - continue - } - flows = append(flows, formatFlow(netConfig.OfPortPatch, hostSubnet.String(), netConfig.MasqCTMark)) - } - } - - // Traffic path (a): OVN->localnet for local gw mode - // Traffic path (b): host->localnet for both gw modes - for _, hostSubnet := range hostSubnets { - if utilnet.IsIPv6(hostSubnet.IP) != isV6 { - continue - } - flows = append(flows, formatFlow(nodetypes.OvsLocalPort, hostSubnet.String(), nodetypes.CtMarkHost)) - } - - if isV6 { - // IPv6 neighbor discovery uses ICMPv6 messages sent to a special destination (ff02::1:ff00:0/104) - // that is unrelated to the host subnets matched in the prio=102 flow above. - // Allow neighbor discovery by matching against ICMP type and ingress port. - formatICMPFlow := func(inPort, ctMark string, icmpType int) string { - icmpFlowTemplate := "cookie=%s, priority=102, in_port=%s, dl_src=%s, icmp6, icmpv6_type=%d, " + - "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), output:NORMAL" - return fmt.Sprintf(icmpFlowTemplate, - nodetypes.DefaultOpenFlowCookie, - inPort, - srcMAC, - icmpType, - config.Default.ConntrackZone, - ctMark) - } - - for _, icmpType := range []int{types.NeighborSolicitationICMPType, types.NeighborAdvertisementICMPType} { - // Traffic path (a) for ICMP: OVN-> localnet for shared gw mode - if config.Gateway.Mode == config.GatewayModeShared { - flows = append(flows, - formatICMPFlow(netConfig.OfPortPatch, netConfig.MasqCTMark, icmpType)) - } - - // Traffic path (a) for ICMP: OVN->localnet for local gw mode - // Traffic path (b) for ICMP: host->localnet for both gw modes - flows = append(flows, formatICMPFlow(nodetypes.OvsLocalPort, nodetypes.CtMarkHost, icmpType)) - } - } - return flows -} diff --git a/go-controller/pkg/node/controllers/egressip/egressip_test.go b/go-controller/pkg/node/controllers/egressip/egressip_test.go index 7de412fdc2..b8a0a6d6a1 100644 --- a/go-controller/pkg/node/controllers/egressip/egressip_test.go +++ b/go-controller/pkg/node/controllers/egressip/egressip_test.go @@ -29,6 +29,7 @@ import ( "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/tools/cache" utiliptables "k8s.io/kubernetes/pkg/util/iptables" + kexec "k8s.io/utils/exec" utilnet "k8s.io/utils/net" ovnconfig "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" @@ -169,8 +170,8 @@ func setupFakeNode(nodeInitialConfig nodeConfig) (ns.NetNS, error) { } } // adding IPTable rules - ipTableV4Client := utiliptables.New(utiliptables.ProtocolIPv4) - ipTableV6Client := utiliptables.New(utiliptables.ProtocolIPv6) + ipTableV4Client := utiliptables.New(kexec.New(), utiliptables.ProtocolIPv4) + ipTableV6Client := utiliptables.New(kexec.New(), utiliptables.ProtocolIPv6) var ipTableClient utiliptables.Interface for _, iptableRule := range nodeInitialConfig.iptableRules { if len(iptableRule.Args) != 0 { diff --git a/go-controller/pkg/node/default_node_network_controller.go b/go-controller/pkg/node/default_node_network_controller.go index eb44f638d4..51dc1571e1 100644 --- a/go-controller/pkg/node/default_node_network_controller.go +++ b/go-controller/pkg/node/default_node_network_controller.go @@ -45,7 +45,6 @@ import ( nodenft "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/nftables" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/ovspinning" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/routemanager" - nodetypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn/controller/apbroute" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn/healthcheck" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/retry" @@ -72,9 +71,6 @@ type BaseNodeNetworkController struct { // network information util.ReconcilableNetInfo - // networkManager used for getting network information - networkManager networkmanager.Interface - // podNADToDPUCDMap tracks the NAD/DPU_ConnectionDetails mapping for all NADs that each pod requests. // Key is pod.UUID; value is nadToDPUCDMap (of map[string]*util.DPUConnectionDetails). Key of nadToDPUCDMap // is nadName; value is DPU_ConnectionDetails when VF representor is successfully configured for that @@ -129,6 +125,8 @@ type DefaultNodeNetworkController struct { apbExternalRouteNodeController *apbroute.ExternalGatewayNodeController + networkManager networkmanager.Interface + cniServer *cni.Server udnHostIsolationManager *UDNHostIsolationManager @@ -140,13 +138,12 @@ type DefaultNodeNetworkController struct { } func newDefaultNodeNetworkController(cnnci *CommonNodeNetworkControllerInfo, stopChan chan struct{}, - wg *sync.WaitGroup, routeManager *routemanager.Controller, networkManager networkmanager.Interface, ovsClient client.Client) *DefaultNodeNetworkController { + wg *sync.WaitGroup, routeManager *routemanager.Controller, ovsClient client.Client) *DefaultNodeNetworkController { c := &DefaultNodeNetworkController{ BaseNodeNetworkController: BaseNodeNetworkController{ CommonNodeNetworkControllerInfo: *cnnci, ReconcilableNetInfo: &util.DefaultNetInfo{}, - networkManager: networkManager, stopChan: stopChan, wg: wg, }, @@ -166,7 +163,7 @@ func NewDefaultNodeNetworkController(cnnci *CommonNodeNetworkControllerInfo, net var err error stopChan := make(chan struct{}) wg := &sync.WaitGroup{} - nc := newDefaultNodeNetworkController(cnnci, stopChan, wg, cnnci.routeManager, networkManager, ovsClient) + nc := newDefaultNodeNetworkController(cnnci, stopChan, wg, cnnci.routeManager, ovsClient) if len(config.Kubernetes.HealthzBindAddress) != 0 { klog.Infof("Enable node proxy healthz server on %s", config.Kubernetes.HealthzBindAddress) @@ -186,9 +183,11 @@ func NewDefaultNodeNetworkController(cnnci *CommonNodeNetworkControllerInfo, net return nil, err } + nc.networkManager = networkManager + nc.initRetryFrameworkForNode() - err = setupRemoteNodeNFTSets() + err = setupPMTUDNFTSets() if err != nil { return nil, fmt.Errorf("failed to setup PMTUD nftables sets: %w", err) } @@ -607,59 +606,6 @@ func handleNetdevResources(resourceName string) (string, error) { return netdevice, nil } -// configureMgmtPortNetdevFromResource uses device plugin resources to determine and set -// the management port netdevice if a DP resource name is provided via configuration. -func configureMgmtPortNetdevFromResource() error { - if config.OvnKubeNode.MgmtPortDPResourceName == "" { - return nil - } - if err := handleDevicePluginResources(); err != nil { - return err - } - netdevice, err := handleNetdevResources(config.OvnKubeNode.MgmtPortDPResourceName) - if err != nil { - return err - } - if config.OvnKubeNode.MgmtPortNetdev != "" { - klog.Warningf("MgmtPortNetdev is set explicitly (%s), overriding with resource...", - config.OvnKubeNode.MgmtPortNetdev) - } - config.OvnKubeNode.MgmtPortNetdev = netdevice - klog.V(5).Infof("Using MgmtPortNetdev (Netdev %s) passed via resource %s", - config.OvnKubeNode.MgmtPortNetdev, config.OvnKubeNode.MgmtPortDPResourceName) - return nil -} - -// Resolve gateway interface from PCI address when configured as "derive-from-mgmt-port" -// configureGatewayInterfaceFromMgmtPort resolves and sets the gateway interface derived -// from the management port's PF when `config.Gateway.Interface` is set to derive-from-mgmt-port. -func configureGatewayInterfaceFromMgmtPort() error { - if config.Gateway.Interface != types.DeriveFromMgmtPort { - return nil - } - netdevName, err := getManagementPortNetDev(config.OvnKubeNode.MgmtPortNetdev) - if err != nil { - return err - } - pciAddr, err := util.GetSriovnetOps().GetPciFromNetDevice(netdevName) - if err != nil { - return err - } - pfPciAddr, err := util.GetSriovnetOps().GetPfPciFromVfPci(pciAddr) - if err != nil { - return err - } - netdevs, err := util.GetSriovnetOps().GetNetDevicesFromPci(pfPciAddr) - if err != nil { - return err - } - if len(netdevs) == 0 { - return fmt.Errorf("no netdevs found for pci address %s", pfPciAddr) - } - config.Gateway.Interface = netdevs[0] - return nil -} - func exportManagementPortAnnotation(netdevName string, nodeAnnotator kube.Annotator) error { klog.Infof("Exporting management port annotation for netdev '%v'", netdevName) deviceID, err := util.GetDeviceIDFromNetdevice(netdevName) @@ -980,17 +926,6 @@ func (nc *DefaultNodeNetworkController) Init(ctx context.Context) error { nodeAnnotator := kube.NewNodeAnnotator(nc.Kube, node.Name) - // Use the device from environment when the DP resource name is specified. - if err := configureMgmtPortNetdevFromResource(); err != nil { - return err - } - - if config.OvnKubeNode.Mode == types.NodeModeDPUHost { - if err := configureGatewayInterfaceFromMgmtPort(); err != nil { - return err - } - } - // Setup management ports nc.mgmtPortController, err = createNodeManagementPortController( node, @@ -1029,12 +964,8 @@ func (nc *DefaultNodeNetworkController) Init(ctx context.Context) error { // First part of gateway initialization. It will be completed by (nc *DefaultNodeNetworkController) Start() if config.OvnKubeNode.Mode != types.NodeModeDPUHost { - // IPv6 is not supported in DPU enabled nodes, error out if ovnkube is not set in IPv4 mode - if config.IPv6Mode && config.OvnKubeNode.Mode == types.NodeModeDPU { - return fmt.Errorf("IPv6 mode is not supported on a DPU enabled node") - } // Initialize gateway for OVS internal port or representor management port - gw, err := nc.initGatewayPreStart(subnets, nodeAnnotator, nc.mgmtPortController) + gw, err := nc.initGatewayPreStart(subnets, nodeAnnotator, nc.mgmtPortController, nodeAddr) if err != nil { return err } @@ -1075,9 +1006,59 @@ func (nc *DefaultNodeNetworkController) Start(ctx context.Context) error { nodeAnnotator := kube.NewNodeAnnotator(nc.Kube, node.Name) waiter := newStartupWaiter() + // Use the device from environment when the DP resource name is specified. + if config.OvnKubeNode.MgmtPortDPResourceName != "" { + if err := handleDevicePluginResources(); err != nil { + return err + } + + netdevice, err := handleNetdevResources(config.OvnKubeNode.MgmtPortDPResourceName) + if err != nil { + return err + } + + if config.OvnKubeNode.MgmtPortNetdev != "" { + klog.Warningf("MgmtPortNetdev is set explicitly (%s), overriding with resource...", + config.OvnKubeNode.MgmtPortNetdev) + } + config.OvnKubeNode.MgmtPortNetdev = netdevice + klog.V(5).Infof("Using MgmtPortNetdev (Netdev %s) passed via resource %s", + config.OvnKubeNode.MgmtPortNetdev, config.OvnKubeNode.MgmtPortDPResourceName) + } + // Complete gateway initialization if config.OvnKubeNode.Mode == types.NodeModeDPUHost { - err = nc.initGatewayDPUHost(nc.nodeAddress, nodeAnnotator) + // Resolve gateway interface from PCI address when configured as "derive-from-mgmt-port" + // This performs the following steps: + // Get the management port network device name + // Retrieve the PCI address of the management port device + // Get the Physical Function (PF) PCI address from the Virtual Function (VF) PCI address + // Retrieve all network devices associated with the PF PCI address + // Select the first available network device as the gateway interface + if config.Gateway.Interface == types.DeriveFromMgmtPort { + netdevName, err := getManagementPortNetDev(config.OvnKubeNode.MgmtPortNetdev) + if err != nil { + return err + } + pciAddr, err := util.GetSriovnetOps().GetPciFromNetDevice(netdevName) + if err != nil { + return err + } + pfPciAddr, err := util.GetSriovnetOps().GetPfPciFromVfPci(pciAddr) + if err != nil { + return err + } + netdevs, err := util.GetSriovnetOps().GetNetDevicesFromPci(pfPciAddr) + if err != nil { + return err + } + if len(netdevs) == 0 { + return fmt.Errorf("no netdevs found for pci address %s", pfPciAddr) + } + netdevName = netdevs[0] + config.Gateway.Interface = netdevName + } + err = nc.initGatewayDPUHost(nc.nodeAddress) if err != nil { return err } @@ -1339,7 +1320,7 @@ func (nc *DefaultNodeNetworkController) Start(ctx context.Context) error { if config.OVNKubernetesFeature.EnableEgressService { wf := nc.watchFactory.(*factory.WatchFactory) - c, err := egressservice.NewController(nc.stopChan, nodetypes.OvnKubeNodeSNATMark, nc.name, + c, err := egressservice.NewController(nc.stopChan, ovnKubeNodeSNATMark, nc.name, wf.EgressServiceInformer(), wf.ServiceInformer(), wf.EndpointSliceInformer()) if err != nil { return err @@ -1529,34 +1510,25 @@ func (nc *DefaultNodeNetworkController) WatchNodes() error { func (nc *DefaultNodeNetworkController) addOrUpdateNode(node *corev1.Node) error { var nftElems []*knftables.Element var addrs []string + for _, address := range node.Status.Addresses { + if address.Type != corev1.NodeInternalIP { + continue + } + nodeIP := net.ParseIP(address.Address) + if nodeIP == nil { + continue + } - // Use GetNodeAddresses to get all node IPs (including current node for openflow) - ipsv4, ipsv6, err := util.GetNodeAddresses(config.IPv4Mode, config.IPv6Mode, node) - if err != nil { - return fmt.Errorf("failed to get node addresses for node %q: %w", node.Name, err) - } - - // Process IPv4 addresses - for _, nodeIP := range ipsv4 { addrs = append(addrs, nodeIP.String()) klog.Infof("Adding remote node %q, IP: %s to PMTUD blocking rules", node.Name, nodeIP) - // Only add to nftables if this is remote node - if node.Name != nc.name { + if utilnet.IsIPv4(nodeIP) { nftElems = append(nftElems, &knftables.Element{ - Set: types.NFTRemoteNodeIPsv4, + Set: types.NFTNoPMTUDRemoteNodeIPsv4, Key: []string{nodeIP.String()}, }) - } - } - - // Process IPv6 addresses - for _, nodeIP := range ipsv6 { - addrs = append(addrs, nodeIP.String()) - klog.Infof("Adding remote node %q, IP: %s to PMTUD blocking rules", node.Name, nodeIP) - // Only add to nftables if this is remote node - if node.Name != nc.name { + } else { nftElems = append(nftElems, &knftables.Element{ - Set: types.NFTRemoteNodeIPsv6, + Set: types.NFTNoPMTUDRemoteNodeIPsv6, Key: []string{nodeIP.String()}, }) } @@ -1580,12 +1552,12 @@ func removePMTUDNodeNFTRules(nodeIPs []net.IP) error { // Remove IPs from NFT sets if utilnet.IsIPv4(nodeIP) { nftElems = append(nftElems, &knftables.Element{ - Set: types.NFTRemoteNodeIPsv4, + Set: types.NFTNoPMTUDRemoteNodeIPsv4, Key: []string{nodeIP.String()}, }) } else { nftElems = append(nftElems, &knftables.Element{ - Set: types.NFTRemoteNodeIPsv6, + Set: types.NFTNoPMTUDRemoteNodeIPsv6, Key: []string{nodeIP.String()}, }) } @@ -1601,18 +1573,18 @@ func removePMTUDNodeNFTRules(nodeIPs []net.IP) error { func (nc *DefaultNodeNetworkController) deleteNode(node *corev1.Node) { gw := nc.Gateway.(*gateway) gw.openflowManager.deleteFlowsByKey(getPMTUDKey(node.Name)) - - // Use GetNodeAddresses to get node IPs - ipsv4, ipsv6, err := util.GetNodeAddresses(config.IPv4Mode, config.IPv6Mode, node) - if err != nil { - klog.Errorf("Failed to get node addresses for node %q: %v", node.Name, err) - return + ipsToRemove := make([]net.IP, 0) + for _, address := range node.Status.Addresses { + if address.Type != corev1.NodeInternalIP { + continue + } + nodeIP := net.ParseIP(address.Address) + if nodeIP == nil { + continue + } + ipsToRemove = append(ipsToRemove, nodeIP) } - ipsToRemove := make([]net.IP, 0, len(ipsv4)+len(ipsv6)) - ipsToRemove = append(ipsToRemove, ipsv4...) - ipsToRemove = append(ipsToRemove, ipsv6...) - klog.Infof("Deleting NFT elements for node: %s", node.Name) if err := removePMTUDNodeNFTRules(ipsToRemove); err != nil { klog.Errorf("Failed to delete nftables rules for PMTUD blocking for node %q: %v", node.Name, err) @@ -1633,34 +1605,33 @@ func (nc *DefaultNodeNetworkController) syncNodes(objs []interface{}) error { if node.Name == nc.name { continue } + for _, address := range node.Status.Addresses { + if address.Type != corev1.NodeInternalIP { + continue + } + nodeIP := net.ParseIP(address.Address) + if nodeIP == nil { + continue + } - // Use GetNodeAddresses to get node IPs - ipsv4, ipsv6, err := util.GetNodeAddresses(config.IPv4Mode, config.IPv6Mode, node) - if err != nil { - klog.Errorf("Failed to get node addresses for node %q: %v", node.Name, err) - continue - } - - // Process IPv4 addresses - for _, nodeIP := range ipsv4 { - keepNFTSetElemsV4 = append(keepNFTSetElemsV4, &knftables.Element{ - Set: types.NFTRemoteNodeIPsv4, - Key: []string{nodeIP.String()}, - }) - } - - // Process IPv6 addresses - for _, nodeIP := range ipsv6 { - keepNFTSetElemsV6 = append(keepNFTSetElemsV6, &knftables.Element{ - Set: types.NFTRemoteNodeIPsv6, - Key: []string{nodeIP.String()}, - }) + // Remove IPs from NFT sets + if utilnet.IsIPv4(nodeIP) { + keepNFTSetElemsV4 = append(keepNFTSetElemsV4, &knftables.Element{ + Set: types.NFTNoPMTUDRemoteNodeIPsv4, + Key: []string{nodeIP.String()}, + }) + } else { + keepNFTSetElemsV6 = append(keepNFTSetElemsV6, &knftables.Element{ + Set: types.NFTNoPMTUDRemoteNodeIPsv6, + Key: []string{nodeIP.String()}, + }) + } } } - if err := recreateNFTSet(types.NFTRemoteNodeIPsv4, keepNFTSetElemsV4); err != nil { + if err := recreateNFTSet(types.NFTNoPMTUDRemoteNodeIPsv4, keepNFTSetElemsV4); err != nil { errors = append(errors, err) } - if err := recreateNFTSet(types.NFTRemoteNodeIPsv6, keepNFTSetElemsV6); err != nil { + if err := recreateNFTSet(types.NFTNoPMTUDRemoteNodeIPsv6, keepNFTSetElemsV6); err != nil { errors = append(errors, err) } diff --git a/go-controller/pkg/node/default_node_network_controller_test.go b/go-controller/pkg/node/default_node_network_controller_test.go index 50c4ab2769..875b0da694 100644 --- a/go-controller/pkg/node/default_node_network_controller_test.go +++ b/go-controller/pkg/node/default_node_network_controller_test.go @@ -22,7 +22,6 @@ import ( adminpolicybasedrouteclient "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/adminpolicybasedroute/v1/apis/clientset/versioned/fake" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube/mocks" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/bridgeconfig" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/managementport" nodenft "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/nftables" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/routemanager" @@ -38,18 +37,18 @@ import ( const v4PMTUDNFTRules = ` add table inet ovn-kubernetes -add rule inet ovn-kubernetes no-pmtud ip daddr @remote-node-ips-v4 meta l4proto icmp icmp type 3 icmp code 4 counter drop +add rule inet ovn-kubernetes no-pmtud ip daddr @no-pmtud-remote-node-ips-v4 meta l4proto icmp icmp type 3 icmp code 4 counter drop add chain inet ovn-kubernetes no-pmtud { type filter hook output priority 0 ; comment "Block egress needs frag/packet too big to remote k8s nodes" ; } -add set inet ovn-kubernetes remote-node-ips-v4 { type ipv4_addr ; comment "Block egress ICMP needs frag to remote Kubernetes nodes" ; } -add set inet ovn-kubernetes remote-node-ips-v6 { type ipv6_addr ; comment "Block egress ICMPv6 packet too big to remote Kubernetes nodes" ; } +add set inet ovn-kubernetes no-pmtud-remote-node-ips-v4 { type ipv4_addr ; comment "Block egress ICMP needs frag to remote Kubernetes nodes" ; } +add set inet ovn-kubernetes no-pmtud-remote-node-ips-v6 { type ipv6_addr ; comment "Block egress ICMPv6 packet too big to remote Kubernetes nodes" ; } ` const v6PMTUDNFTRules = ` add table inet ovn-kubernetes -add rule inet ovn-kubernetes no-pmtud meta l4proto icmpv6 icmpv6 type 2 icmpv6 code 0 ip6 daddr @remote-node-ips-v6 counter drop +add rule inet ovn-kubernetes no-pmtud meta l4proto icmpv6 icmpv6 type 2 icmpv6 code 0 ip6 daddr @no-pmtud-remote-node-ips-v6 counter drop add chain inet ovn-kubernetes no-pmtud { type filter hook output priority 0 ; comment "Block egress needs frag/packet too big to remote k8s nodes" ; } -add set inet ovn-kubernetes remote-node-ips-v4 { type ipv4_addr ; comment "Block egress ICMP needs frag to remote Kubernetes nodes" ; } -add set inet ovn-kubernetes remote-node-ips-v6 { type ipv6_addr ; comment "Block egress ICMPv6 packet too big to remote Kubernetes nodes" ; } +add set inet ovn-kubernetes no-pmtud-remote-node-ips-v4 { type ipv4_addr ; comment "Block egress ICMP needs frag to remote Kubernetes nodes" ; } +add set inet ovn-kubernetes no-pmtud-remote-node-ips-v6 { type ipv6_addr ; comment "Block egress ICMPv6 packet too big to remote Kubernetes nodes" ; } ` var _ = Describe("Node", func() { @@ -755,9 +754,6 @@ var _ = Describe("Node", func() { node := corev1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: nodeName, - Annotations: map[string]string{ - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", nodeIP+"/24"), - }, }, Status: corev1.NodeStatus{ Addresses: []corev1.NodeAddress{ @@ -772,9 +768,6 @@ var _ = Describe("Node", func() { otherNode := corev1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: remoteNodeName, - Annotations: map[string]string{ - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", otherNodeIP+"/24"), - }, }, Status: corev1.NodeStatus{ Addresses: []corev1.NodeAddress{ @@ -810,16 +803,23 @@ var _ = Describe("Node", func() { Expect(err).NotTo(HaveOccurred()) routeManager := routemanager.NewController() cnnci := NewCommonNodeNetworkControllerInfo(kubeFakeClient, fakeClient.AdminPolicyRouteClient, wf, nil, nodeName, routeManager) - nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil, nil) + nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil) nc.initRetryFrameworkForNode() - err = setupRemoteNodeNFTSets() + err = setupPMTUDNFTSets() Expect(err).NotTo(HaveOccurred()) err = setupPMTUDNFTChain() Expect(err).NotTo(HaveOccurred()) + defaultNetConfig := &bridgeUDNConfiguration{ + ofPortPatch: "patch-breth0_ov", + } nc.Gateway = &gateway{ openflowManager: &openflowManager{ - flowCache: map[string][]string{}, - defaultBridge: bridgeconfig.TestDefaultBridgeConfig(), + flowCache: map[string][]string{}, + defaultBridge: &bridgeConfiguration{ + netConfig: map[string]*bridgeUDNConfiguration{ + types.DefaultNetworkName: defaultNetConfig, + }, + }, }, } @@ -836,7 +836,7 @@ var _ = Describe("Node", func() { err = nc.WatchNodes() Expect(err).NotTo(HaveOccurred()) nftRules := v4PMTUDNFTRules + ` -add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.254.61 } +add element inet ovn-kubernetes no-pmtud-remote-node-ips-v4 { 169.254.254.61 } ` err = nodenft.MatchNFTRules(nftRules, nft.Dump()) Expect(err).NotTo(HaveOccurred()) @@ -866,9 +866,6 @@ add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.254.61 } node := corev1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: nodeName, - Annotations: map[string]string{ - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", nodeIP+"/24"), - }, }, Status: corev1.NodeStatus{ Addresses: []corev1.NodeAddress{ @@ -883,9 +880,6 @@ add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.254.61 } otherNode := corev1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: remoteNodeName, - Annotations: map[string]string{ - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", otherSubnetNodeIP+"/24"), - }, }, Status: corev1.NodeStatus{ Addresses: []corev1.NodeAddress{ @@ -921,16 +915,23 @@ add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.254.61 } Expect(err).NotTo(HaveOccurred()) routeManager := routemanager.NewController() cnnci := NewCommonNodeNetworkControllerInfo(kubeFakeClient, fakeClient.AdminPolicyRouteClient, wf, nil, nodeName, routeManager) - nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil, nil) + nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil) nc.initRetryFrameworkForNode() - err = setupRemoteNodeNFTSets() + err = setupPMTUDNFTSets() Expect(err).NotTo(HaveOccurred()) err = setupPMTUDNFTChain() Expect(err).NotTo(HaveOccurred()) + defaultNetConfig := &bridgeUDNConfiguration{ + ofPortPatch: "patch-breth0_ov", + } nc.Gateway = &gateway{ openflowManager: &openflowManager{ - flowCache: map[string][]string{}, - defaultBridge: bridgeconfig.TestDefaultBridgeConfig(), + flowCache: map[string][]string{}, + defaultBridge: &bridgeConfiguration{ + netConfig: map[string]*bridgeUDNConfiguration{ + types.DefaultNetworkName: defaultNetConfig, + }, + }, }, } @@ -947,7 +948,7 @@ add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.254.61 } err = nc.WatchNodes() Expect(err).NotTo(HaveOccurred()) nftRules := v4PMTUDNFTRules + ` -add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.253.61 } +add element inet ovn-kubernetes no-pmtud-remote-node-ips-v4 { 169.254.253.61 } ` err = nodenft.MatchNFTRules(nftRules, nft.Dump()) Expect(err).NotTo(HaveOccurred()) @@ -1019,9 +1020,6 @@ add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.253.61 } node := corev1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: nodeName, - Annotations: map[string]string{ - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", nodeIP+"/64"), - }, }, Status: corev1.NodeStatus{ Addresses: []corev1.NodeAddress{ @@ -1036,9 +1034,6 @@ add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.253.61 } otherNode := corev1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: remoteNodeName, - Annotations: map[string]string{ - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", otherNodeIP+"/64"), - }, }, Status: corev1.NodeStatus{ Addresses: []corev1.NodeAddress{ @@ -1074,16 +1069,23 @@ add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.253.61 } Expect(err).NotTo(HaveOccurred()) routeManager := routemanager.NewController() cnnci := NewCommonNodeNetworkControllerInfo(kubeFakeClient, fakeClient.AdminPolicyRouteClient, wf, nil, nodeName, routeManager) - nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil, nil) + nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil) nc.initRetryFrameworkForNode() - err = setupRemoteNodeNFTSets() + err = setupPMTUDNFTSets() Expect(err).NotTo(HaveOccurred()) err = setupPMTUDNFTChain() Expect(err).NotTo(HaveOccurred()) + defaultNetConfig := &bridgeUDNConfiguration{ + ofPortPatch: "patch-breth0_ov", + } nc.Gateway = &gateway{ openflowManager: &openflowManager{ - flowCache: map[string][]string{}, - defaultBridge: bridgeconfig.TestDefaultBridgeConfig(), + flowCache: map[string][]string{}, + defaultBridge: &bridgeConfiguration{ + netConfig: map[string]*bridgeUDNConfiguration{ + types.DefaultNetworkName: defaultNetConfig, + }, + }, }, } @@ -1100,7 +1102,7 @@ add element inet ovn-kubernetes remote-node-ips-v4 { 169.254.253.61 } err = nc.WatchNodes() Expect(err).NotTo(HaveOccurred()) nftRules := v6PMTUDNFTRules + ` -add element inet ovn-kubernetes remote-node-ips-v6 { 2001:db8:1::4 } +add element inet ovn-kubernetes no-pmtud-remote-node-ips-v6 { 2001:db8:1::4 } ` err = nodenft.MatchNFTRules(nftRules, nft.Dump()) Expect(err).NotTo(HaveOccurred()) @@ -1129,9 +1131,6 @@ add element inet ovn-kubernetes remote-node-ips-v6 { 2001:db8:1::4 } node := corev1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: nodeName, - Annotations: map[string]string{ - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", nodeIP+"/64"), - }, }, Status: corev1.NodeStatus{ Addresses: []corev1.NodeAddress{ @@ -1146,9 +1145,6 @@ add element inet ovn-kubernetes remote-node-ips-v6 { 2001:db8:1::4 } otherNode := corev1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: remoteNodeName, - Annotations: map[string]string{ - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", otherSubnetNodeIP+"/64"), - }, }, Status: corev1.NodeStatus{ Addresses: []corev1.NodeAddress{ @@ -1184,16 +1180,23 @@ add element inet ovn-kubernetes remote-node-ips-v6 { 2001:db8:1::4 } Expect(err).NotTo(HaveOccurred()) routeManager := routemanager.NewController() cnnci := NewCommonNodeNetworkControllerInfo(kubeFakeClient, fakeClient.AdminPolicyRouteClient, wf, nil, nodeName, routeManager) - nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil, nil) + nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil) nc.initRetryFrameworkForNode() - err = setupRemoteNodeNFTSets() + err = setupPMTUDNFTSets() Expect(err).NotTo(HaveOccurred()) err = setupPMTUDNFTChain() Expect(err).NotTo(HaveOccurred()) + defaultNetConfig := &bridgeUDNConfiguration{ + ofPortPatch: "patch-breth0_ov", + } nc.Gateway = &gateway{ openflowManager: &openflowManager{ - flowCache: map[string][]string{}, - defaultBridge: bridgeconfig.TestDefaultBridgeConfig(), + flowCache: map[string][]string{}, + defaultBridge: &bridgeConfiguration{ + netConfig: map[string]*bridgeUDNConfiguration{ + types.DefaultNetworkName: defaultNetConfig, + }, + }, }, } @@ -1210,7 +1213,7 @@ add element inet ovn-kubernetes remote-node-ips-v6 { 2001:db8:1::4 } err = nc.WatchNodes() Expect(err).NotTo(HaveOccurred()) nftRules := v6PMTUDNFTRules + ` -add element inet ovn-kubernetes remote-node-ips-v6 { 2002:db8:1::4 } +add element inet ovn-kubernetes no-pmtud-remote-node-ips-v6 { 2002:db8:1::4 } ` err = nodenft.MatchNFTRules(nftRules, nft.Dump()) Expect(err).NotTo(HaveOccurred()) @@ -1345,16 +1348,23 @@ add element inet ovn-kubernetes remote-node-ips-v6 { 2002:db8:1::4 } Expect(err).NotTo(HaveOccurred()) routeManager := routemanager.NewController() cnnci := NewCommonNodeNetworkControllerInfo(kubeFakeClient, fakeClient.AdminPolicyRouteClient, wf, nil, nodeName, routeManager) - nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil, nil) + nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil) nc.initRetryFrameworkForNode() - err = setupRemoteNodeNFTSets() + err = setupPMTUDNFTSets() Expect(err).NotTo(HaveOccurred()) err = setupPMTUDNFTChain() Expect(err).NotTo(HaveOccurred()) + defaultNetConfig := &bridgeUDNConfiguration{ + ofPortPatch: "patch-breth0_ov", + } nc.Gateway = &gateway{ openflowManager: &openflowManager{ - flowCache: map[string][]string{}, - defaultBridge: bridgeconfig.TestDefaultBridgeConfig(), + flowCache: map[string][]string{}, + defaultBridge: &bridgeConfiguration{ + netConfig: map[string]*bridgeUDNConfiguration{ + types.DefaultNetworkName: defaultNetConfig, + }, + }, }, } @@ -1466,16 +1476,23 @@ add element inet ovn-kubernetes remote-node-ips-v6 { 2002:db8:1::4 } Expect(err).NotTo(HaveOccurred()) routeManager := routemanager.NewController() cnnci := NewCommonNodeNetworkControllerInfo(kubeFakeClient, fakeClient.AdminPolicyRouteClient, wf, nil, nodeName, routeManager) - nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil, nil) + nc = newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil) nc.initRetryFrameworkForNode() - err = setupRemoteNodeNFTSets() + err = setupPMTUDNFTSets() Expect(err).NotTo(HaveOccurred()) err = setupPMTUDNFTChain() Expect(err).NotTo(HaveOccurred()) + defaultNetConfig := &bridgeUDNConfiguration{ + ofPortPatch: "patch-breth0_ov", + } nc.Gateway = &gateway{ openflowManager: &openflowManager{ - flowCache: map[string][]string{}, - defaultBridge: bridgeconfig.TestDefaultBridgeConfig(), + flowCache: map[string][]string{}, + defaultBridge: &bridgeConfiguration{ + netConfig: map[string]*bridgeUDNConfiguration{ + types.DefaultNetworkName: defaultNetConfig, + }, + }, }, } diff --git a/go-controller/pkg/node/egress_service_test.go b/go-controller/pkg/node/egress_service_test.go index ca44ac311d..bb4e57f5ca 100644 --- a/go-controller/pkg/node/egress_service_test.go +++ b/go-controller/pkg/node/egress_service_test.go @@ -19,7 +19,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/controllers/egressservice" nodenft "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/nftables" - nodetypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types" ovntest "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing" util "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util/mocks" @@ -300,7 +299,7 @@ var _ = Describe("Egress Service Operations", func() { c, err := egressservice.NewController( stopChan, - nodetypes.OvnKubeNodeSNATMark, + ovnKubeNodeSNATMark, "node", wf.EgressServiceInformer(), wf.ServiceInformer(), @@ -406,7 +405,7 @@ add element inet ovn-kubernetes egress-service-snat-v4 { 10.128.0.4 comment "nam c, err := egressservice.NewController( stopChan, - nodetypes.OvnKubeNodeSNATMark, + ovnKubeNodeSNATMark, "node", wf.EgressServiceInformer(), wf.ServiceInformer(), @@ -611,7 +610,7 @@ add element inet ovn-kubernetes egress-service-snat-v4 { 10.128.0.3 comment "nam c, err := egressservice.NewController( stopChan, - nodetypes.OvnKubeNodeSNATMark, + ovnKubeNodeSNATMark, "node", wf.EgressServiceInformer(), wf.ServiceInformer(), @@ -806,7 +805,7 @@ add element inet ovn-kubernetes egress-service-snat-v4 { 10.128.0.11 comment "na c, err := egressservice.NewController( stopChan, - nodetypes.OvnKubeNodeSNATMark, + ovnKubeNodeSNATMark, "node", wf.EgressServiceInformer(), wf.ServiceInformer(), @@ -965,7 +964,7 @@ add element inet ovn-kubernetes egress-service-snat-v4 { 10.128.0.11 comment "na c, err := egressservice.NewController( stopChan, - nodetypes.OvnKubeNodeSNATMark, + ovnKubeNodeSNATMark, "node", wf.EgressServiceInformer(), wf.ServiceInformer(), diff --git a/go-controller/pkg/node/egressip/gateway_egressip_suite_test.go b/go-controller/pkg/node/egressip/gateway_egressip_suite_test.go deleted file mode 100644 index d9d627c882..0000000000 --- a/go-controller/pkg/node/egressip/gateway_egressip_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package egressip - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestNodeSuite(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Node Gateway EgressIP Suite") -} diff --git a/go-controller/pkg/node/gateway.go b/go-controller/pkg/node/gateway.go index 35267261f2..db1bcae279 100644 --- a/go-controller/pkg/node/gateway.go +++ b/go-controller/pkg/node/gateway.go @@ -17,8 +17,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/informer" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/bridgeconfig" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/egressip" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/retry" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" @@ -51,7 +49,7 @@ type gateway struct { nodePortWatcher informer.ServiceAndEndpointsEventHandler openflowManager *openflowManager nodeIPManager *addressManager - bridgeEIPAddrManager *egressip.BridgeEIPAddrManager + bridgeEIPAddrManager *bridgeEIPAddrManager initFunc func() error readyFunc func() (bool, error) @@ -60,8 +58,6 @@ type gateway struct { watchFactory *factory.WatchFactory // used for retry stopChan <-chan struct{} wg *sync.WaitGroup - - nextHops []net.IP } func (g *gateway) AddService(svc *corev1.Service) error { @@ -237,7 +233,7 @@ func (g *gateway) AddEgressIP(eip *egressipv1.EgressIP) error { if !util.IsNetworkSegmentationSupportEnabled() || !config.OVNKubernetesFeature.EnableInterconnect || config.Gateway.Mode == config.GatewayModeDisabled { return nil } - isSyncRequired, err := g.bridgeEIPAddrManager.AddEgressIP(eip) + isSyncRequired, err := g.bridgeEIPAddrManager.addEgressIP(eip) if err != nil { return err } @@ -253,7 +249,7 @@ func (g *gateway) UpdateEgressIP(oldEIP, newEIP *egressipv1.EgressIP) error { if !util.IsNetworkSegmentationSupportEnabled() || !config.OVNKubernetesFeature.EnableInterconnect || config.Gateway.Mode == config.GatewayModeDisabled { return nil } - isSyncRequired, err := g.bridgeEIPAddrManager.UpdateEgressIP(oldEIP, newEIP) + isSyncRequired, err := g.bridgeEIPAddrManager.updateEgressIP(oldEIP, newEIP) if err != nil { return err } @@ -269,7 +265,7 @@ func (g *gateway) DeleteEgressIP(eip *egressipv1.EgressIP) error { if !util.IsNetworkSegmentationSupportEnabled() || !config.OVNKubernetesFeature.EnableInterconnect || config.Gateway.Mode == config.GatewayModeDisabled { return nil } - isSyncRequired, err := g.bridgeEIPAddrManager.DeleteEgressIP(eip) + isSyncRequired, err := g.bridgeEIPAddrManager.deleteEgressIP(eip) if err != nil { return err } @@ -285,7 +281,7 @@ func (g *gateway) SyncEgressIP(eips []interface{}) error { if !util.IsNetworkSegmentationSupportEnabled() || !config.OVNKubernetesFeature.EnableInterconnect || config.Gateway.Mode == config.GatewayModeDisabled { return nil } - if err := g.bridgeEIPAddrManager.SyncEgressIP(eips); err != nil { + if err := g.bridgeEIPAddrManager.syncEgressIP(eips); err != nil { return err } if err := g.Reconcile(); err != nil { @@ -358,14 +354,14 @@ func setupUDPAggregationUplink(ifname string) error { func gatewayInitInternal(nodeName, gwIntf, egressGatewayIntf string, gwNextHops []net.IP, nodeSubnets, gwIPs []*net.IPNet, advertised bool, nodeAnnotator kube.Annotator) ( - *bridgeconfig.BridgeConfiguration, *bridgeconfig.BridgeConfiguration, error) { - gatewayBridge, err := bridgeconfig.NewBridgeConfiguration(gwIntf, nodeName, types.PhysicalNetworkName, nodeSubnets, gwIPs, advertised) + *bridgeConfiguration, *bridgeConfiguration, error) { + gatewayBridge, err := bridgeForInterface(gwIntf, nodeName, types.PhysicalNetworkName, nodeSubnets, gwIPs, gwNextHops, advertised) if err != nil { return nil, nil, fmt.Errorf("bridge for interface failed for %s: %w", gwIntf, err) } - var egressGWBridge *bridgeconfig.BridgeConfiguration + var egressGWBridge *bridgeConfiguration if egressGatewayIntf != "" { - egressGWBridge, err = bridgeconfig.NewBridgeConfiguration(egressGatewayIntf, nodeName, types.PhysicalNetworkExGwName, nodeSubnets, nil, false) + egressGWBridge, err = bridgeForInterface(egressGatewayIntf, nodeName, types.PhysicalNetworkExGwName, nodeSubnets, nil, nil, false) if err != nil { return nil, nil, fmt.Errorf("bridge for interface failed for %s: %w", egressGatewayIntf, err) } @@ -384,7 +380,7 @@ func gatewayInitInternal(nodeName, gwIntf, egressGatewayIntf string, gwNextHops "IP fragmentation or large TCP/UDP payloads may not be forwarded correctly.") enableGatewayMTU = false } else { - chkPktLengthSupported, err := util.DetectCheckPktLengthSupport(gatewayBridge.GetBridgeName()) + chkPktLengthSupported, err := util.DetectCheckPktLengthSupport(gatewayBridge.bridgeName) if err != nil { return nil, nil, err } @@ -418,9 +414,9 @@ func gatewayInitInternal(nodeName, gwIntf, egressGatewayIntf string, gwNextHops } if config.Default.EnableUDPAggregation { - err = setupUDPAggregationUplink(gatewayBridge.GetUplinkName()) + err = setupUDPAggregationUplink(gatewayBridge.uplinkName) if err == nil && egressGWBridge != nil { - err = setupUDPAggregationUplink(egressGWBridge.GetUplinkName()) + err = setupUDPAggregationUplink(egressGWBridge.uplinkName) } if err != nil { klog.Warningf("Could not enable UDP packet aggregation on uplink interface (aggregation will be disabled): %v", err) @@ -428,44 +424,53 @@ func gatewayInitInternal(nodeName, gwIntf, egressGatewayIntf string, gwNextHops } } - // Set static FDB entry for sharedGW MAC. - // If `GatewayIfaceRep` port is present, use it instead of LOCAL (bridge name). - gwport := gatewayBridge.GetBridgeName() // Default is LOCAL port for the bridge. - if repPort := gatewayBridge.GetGatewayIfaceRep(); repPort != "" { // We have an accelerated switchdev device for GW. - gwport = repPort - } - - if err := util.SetStaticFDBEntry(gatewayBridge.GetBridgeName(), gwport, gatewayBridge.GetMAC()); err != nil { + // Set static FDB entry for LOCAL port + if err := util.SetStaticFDBEntry(gatewayBridge.bridgeName, gatewayBridge.bridgeName, gatewayBridge.macAddress); err != nil { return nil, nil, err } l3GwConfig := util.L3GatewayConfig{ Mode: config.Gateway.Mode, ChassisID: chassisID, - BridgeID: gatewayBridge.GetBridgeName(), - InterfaceID: gatewayBridge.GetInterfaceID(), - MACAddress: gatewayBridge.GetMAC(), - IPAddresses: gatewayBridge.GetIPs(), + BridgeID: gatewayBridge.bridgeName, + InterfaceID: gatewayBridge.interfaceID, + MACAddress: gatewayBridge.macAddress, + IPAddresses: gatewayBridge.ips, NextHops: gwNextHops, NodePortEnable: config.Gateway.NodeportEnable, VLANID: &config.Gateway.VLANID, } if egressGWBridge != nil { - l3GwConfig.EgressGWInterfaceID = egressGWBridge.GetInterfaceID() - l3GwConfig.EgressGWMACAddress = egressGWBridge.GetMAC() - l3GwConfig.EgressGWIPAddresses = egressGWBridge.GetIPs() + l3GwConfig.EgressGWInterfaceID = egressGWBridge.interfaceID + l3GwConfig.EgressGWMACAddress = egressGWBridge.macAddress + l3GwConfig.EgressGWIPAddresses = egressGWBridge.ips } err = util.SetL3GatewayConfig(nodeAnnotator, &l3GwConfig) return gatewayBridge, egressGWBridge, err } +func gatewayReady(patchPort string) (bool, error) { + // Get ofport of patchPort + ofport, _, err := util.GetOVSOfPort("--if-exists", "get", "interface", patchPort, "ofport") + if err != nil || len(ofport) == 0 { + return false, nil + } + klog.Info("Gateway is ready") + return true, nil +} + func (g *gateway) GetGatewayBridgeIface() string { return g.openflowManager.getDefaultBridgeName() } func (g *gateway) GetGatewayIface() string { - return g.openflowManager.defaultBridge.GetGatewayIface() + return g.openflowManager.defaultBridge.gwIface +} + +// getMaxFrameLength returns the maximum frame size (ignoring VLAN header) that a gateway can handle +func getMaxFrameLength() int { + return config.Default.MTU + 14 } // SetDefaultGatewayBridgeMAC updates the mac address for the OFM used to render flows with @@ -475,11 +480,11 @@ func (g *gateway) SetDefaultGatewayBridgeMAC(macAddr net.HardwareAddr) { } func (g *gateway) SetDefaultPodNetworkAdvertised(isPodNetworkAdvertised bool) { - g.openflowManager.defaultBridge.GetNetworkConfig(types.DefaultNetworkName).Advertised.Store(isPodNetworkAdvertised) + g.openflowManager.defaultBridge.netConfig[types.DefaultNetworkName].advertised.Store(isPodNetworkAdvertised) } func (g *gateway) GetDefaultPodNetworkAdvertised() bool { - return g.openflowManager.defaultBridge.GetNetworkConfig(types.DefaultNetworkName).Advertised.Load() + return g.openflowManager.defaultBridge.netConfig[types.DefaultNetworkName].advertised.Load() } // Reconcile handles triggering updates to different components of a gateway, like OFM, Services @@ -527,9 +532,208 @@ func (g *gateway) addAllServices() []error { func (g *gateway) updateSNATRules() error { subnets := util.IPsToNetworkIPs(g.nodeIPManager.mgmtPort.GetAddresses()...) - if config.Gateway.Mode != config.GatewayModeLocal { - return delLocalGatewayPodSubnetNFTRules() + if g.GetDefaultPodNetworkAdvertised() || config.Gateway.Mode != config.GatewayModeLocal { + return delLocalGatewayPodSubnetNATRules(subnets...) + } + + return addLocalGatewayPodSubnetNATRules(subnets...) +} + +type bridgeConfiguration struct { + sync.Mutex + nodeName string + bridgeName string + uplinkName string + gwIface string + gwIfaceRep string + ips []*net.IPNet + interfaceID string + macAddress net.HardwareAddr + ofPortPhys string + ofPortHost string + netConfig map[string]*bridgeUDNConfiguration + eipMarkIPs *markIPsCache + nextHops []net.IP +} + +// updateInterfaceIPAddresses sets and returns the bridge's current ips +func (b *bridgeConfiguration) updateInterfaceIPAddresses(node *corev1.Node) ([]*net.IPNet, error) { + b.Lock() + defer b.Unlock() + ifAddrs, err := getNetworkInterfaceIPAddresses(b.gwIface) + if err != nil { + return nil, err + } + + // For DPU, here we need to use the DPU host's IP address which is the tenant cluster's + // host internal IP address instead of the DPU's external bridge IP address. + if config.OvnKubeNode.Mode == types.NodeModeDPU { + nodeAddrStr, err := util.GetNodePrimaryIP(node) + if err != nil { + return nil, err + } + nodeAddr := net.ParseIP(nodeAddrStr) + if nodeAddr == nil { + return nil, fmt.Errorf("failed to parse node IP address. %v", nodeAddrStr) + } + ifAddrs, err = getDPUHostPrimaryIPAddresses(nodeAddr, ifAddrs) + if err != nil { + return nil, err + } + } + + b.ips = ifAddrs + return ifAddrs, nil +} + +func bridgeForInterface(intfName, nodeName, + physicalNetworkName string, + nodeSubnets, gwIPs []*net.IPNet, + gwNextHops []net.IP, + advertised bool) (*bridgeConfiguration, error) { + var intfRep string + var err error + isGWAcclInterface := false + gwIntf := intfName + + defaultNetConfig := &bridgeUDNConfiguration{ + masqCTMark: ctMarkOVN, + subnets: config.Default.ClusterSubnets, + nodeSubnets: nodeSubnets, + } + res := bridgeConfiguration{ + nodeName: nodeName, + netConfig: map[string]*bridgeUDNConfiguration{ + types.DefaultNetworkName: defaultNetConfig, + }, + eipMarkIPs: newMarkIPsCache(), + } + if len(gwNextHops) > 0 { + res.nextHops = gwNextHops + } + res.netConfig[types.DefaultNetworkName].advertised.Store(advertised) + + if config.Gateway.GatewayAcceleratedInterface != "" { + // Try to get representor for the specified gateway device. + // If function succeeds, then it is either a valid switchdev VF or SF, and we can use this accelerated device + // for node IP, Host Ofport for Openflow etc. + // If failed - error for improper configuration option + intfRep, err = getRepresentor(config.Gateway.GatewayAcceleratedInterface) + if err != nil { + return nil, fmt.Errorf("gateway accelerated interface %s is not valid: %w", config.Gateway.GatewayAcceleratedInterface, err) + } + gwIntf = config.Gateway.GatewayAcceleratedInterface + isGWAcclInterface = true + klog.Infof("For gateway accelerated interface %s representor: %s", config.Gateway.GatewayAcceleratedInterface, intfRep) + } else { + intfRep, err = getRepresentor(gwIntf) + if err == nil { + isGWAcclInterface = true + } + } + + if isGWAcclInterface { + bridgeName, _, err := util.RunOVSVsctl("port-to-br", intfRep) + if err != nil { + return nil, fmt.Errorf("failed to find bridge that has port %s: %w", intfRep, err) + } + link, err := util.GetNetLinkOps().LinkByName(gwIntf) + if err != nil { + return nil, fmt.Errorf("failed to get netdevice link for %s: %w", gwIntf, err) + } + uplinkName, err := util.GetNicName(bridgeName) + if err != nil { + return nil, fmt.Errorf("failed to find nic name for bridge %s: %w", bridgeName, err) + } + res.bridgeName = bridgeName + res.uplinkName = uplinkName + res.gwIfaceRep = intfRep + res.gwIface = gwIntf + res.macAddress = link.Attrs().HardwareAddr + } else if bridgeName, _, err := util.RunOVSVsctl("port-to-br", intfName); err == nil { + // This is an OVS bridge's internal port + uplinkName, err := util.GetNicName(bridgeName) + if err != nil { + return nil, fmt.Errorf("failed to find nic name for bridge %s: %w", bridgeName, err) + } + res.bridgeName = bridgeName + res.gwIface = bridgeName + res.uplinkName = uplinkName + gwIntf = bridgeName + } else if _, _, err := util.RunOVSVsctl("br-exists", intfName); err != nil { + // This is not a OVS bridge. We need to create a OVS bridge + // and add cluster.GatewayIntf as a port of that bridge. + bridgeName, err := util.NicToBridge(intfName) + if err != nil { + return nil, fmt.Errorf("nicToBridge failed for %s: %w", intfName, err) + } + res.bridgeName = bridgeName + res.gwIface = bridgeName + res.uplinkName = intfName + gwIntf = bridgeName + } else { + // gateway interface is an OVS bridge + uplinkName, err := getIntfName(intfName) + if err != nil { + if config.Gateway.Mode == config.GatewayModeLocal && config.Gateway.AllowNoUplink { + klog.Infof("Could not find uplink for %s, setup gateway bridge with no uplink port, egress IP and egress GW will not work", intfName) + } else { + return nil, fmt.Errorf("failed to find intfName for %s: %w", intfName, err) + } + } else { + res.uplinkName = uplinkName + } + res.bridgeName = intfName + res.gwIface = intfName + } + // Now, we get IP addresses for the bridge + if len(gwIPs) > 0 { + // use gwIPs if provided + res.ips = gwIPs + } else { + // get IP addresses from OVS bridge. If IP does not exist, + // error out. + res.ips, err = getNetworkInterfaceIPAddresses(gwIntf) + if err != nil { + return nil, fmt.Errorf("failed to get interface details for %s: %w", gwIntf, err) + } + } + + if !isGWAcclInterface { // We do not have an accelerated device for Gateway interface + res.macAddress, err = util.GetOVSPortMACAddress(gwIntf) + if err != nil { + return nil, fmt.Errorf("failed to get MAC address for ovs port %s: %w", gwIntf, err) + } + } + + res.interfaceID, err = bridgedGatewayNodeSetup(nodeName, res.bridgeName, physicalNetworkName) + if err != nil { + return nil, fmt.Errorf("failed to set up shared interface gateway: %v", err) + } + + // the name of the patch port created by ovn-controller is of the form + // patch--to-br-int + defaultNetConfig.patchPort = (&util.DefaultNetInfo{}).GetNetworkScopedPatchPortName(res.bridgeName, nodeName) + + // for DPU we use the host MAC address for the Gateway configuration + if config.OvnKubeNode.Mode == types.NodeModeDPU { + hostRep, err := util.GetDPUHostInterface(res.bridgeName) + if err != nil { + return nil, err + } + res.macAddress, err = util.GetSriovnetOps().GetRepresentorPeerMacAddress(hostRep) + if err != nil { + return nil, err + } + } + return &res, nil +} + +func getRepresentor(intfName string) (string, error) { + deviceID, err := util.GetDeviceIDFromNetdevice(intfName) + if err != nil { + return "", err } - return addOrUpdateLocalGatewayPodSubnetNFTRules(g.GetDefaultPodNetworkAdvertised(), subnets...) + return util.GetFunctionRepresentorName(deviceID) } diff --git a/go-controller/pkg/node/egressip/gateway_egressip.go b/go-controller/pkg/node/gateway_egressip.go similarity index 91% rename from go-controller/pkg/node/egressip/gateway_egressip.go rename to go-controller/pkg/node/gateway_egressip.go index 38bd2b058e..13e41c4542 100644 --- a/go-controller/pkg/node/egressip/gateway_egressip.go +++ b/go-controller/pkg/node/gateway_egressip.go @@ -1,4 +1,4 @@ -package egressip +package node import ( "encoding/json" @@ -75,15 +75,15 @@ func (e markIPs) containsIP(ip net.IP) bool { return false } -type MarkIPsCache struct { +type markIPsCache struct { mu sync.Mutex hasSyncOnce bool markToIPs markIPs IPToMark map[string]int } -func NewMarkIPsCache() *MarkIPsCache { - return &MarkIPsCache{ +func newMarkIPsCache() *markIPsCache { + return &markIPsCache{ mu: sync.Mutex{}, markToIPs: markIPs{ v4: make(map[int]string), @@ -93,7 +93,7 @@ func NewMarkIPsCache() *MarkIPsCache { } } -func (mic *MarkIPsCache) IsIPPresent(ip net.IP) bool { +func (mic *markIPsCache) IsIPPresent(ip net.IP) bool { mic.mu.Lock() defer mic.mu.Unlock() if ip == nil { @@ -103,7 +103,7 @@ func (mic *MarkIPsCache) IsIPPresent(ip net.IP) bool { return isFound } -func (mic *MarkIPsCache) insertMarkIP(pktMark util.EgressIPMark, ip net.IP) { +func (mic *markIPsCache) insertMarkIP(pktMark util.EgressIPMark, ip net.IP) { mic.mu.Lock() defer mic.mu.Unlock() if ip == nil { @@ -113,7 +113,7 @@ func (mic *MarkIPsCache) insertMarkIP(pktMark util.EgressIPMark, ip net.IP) { mic.IPToMark[ip.String()] = pktMark.ToInt() } -func (mic *MarkIPsCache) deleteMarkIP(pktMark util.EgressIPMark, ip net.IP) { +func (mic *markIPsCache) deleteMarkIP(pktMark util.EgressIPMark, ip net.IP) { mic.mu.Lock() defer mic.mu.Unlock() if ip == nil { @@ -123,7 +123,7 @@ func (mic *MarkIPsCache) deleteMarkIP(pktMark util.EgressIPMark, ip net.IP) { delete(mic.IPToMark, ip.String()) } -func (mic *MarkIPsCache) replaceAll(markIPs markIPs) { +func (mic *markIPsCache) replaceAll(markIPs markIPs) { mic.mu.Lock() mic.markToIPs = markIPs for mark, ipv4 := range markIPs.v4 { @@ -135,7 +135,7 @@ func (mic *MarkIPsCache) replaceAll(markIPs markIPs) { mic.mu.Unlock() } -func (mic *MarkIPsCache) GetIPv4() map[int]string { +func (mic *markIPsCache) GetIPv4() map[int]string { mic.mu.Lock() defer mic.mu.Unlock() dupe := make(map[int]string) @@ -148,7 +148,7 @@ func (mic *MarkIPsCache) GetIPv4() map[int]string { return dupe } -func (mic *MarkIPsCache) GetIPv6() map[int]string { +func (mic *markIPsCache) GetIPv6() map[int]string { mic.mu.Lock() defer mic.mu.Unlock() dupe := make(map[int]string) @@ -161,19 +161,19 @@ func (mic *MarkIPsCache) GetIPv6() map[int]string { return dupe } -func (mic *MarkIPsCache) HasSyncdOnce() bool { +func (mic *markIPsCache) HasSyncdOnce() bool { mic.mu.Lock() defer mic.mu.Unlock() return mic.hasSyncOnce } -func (mic *MarkIPsCache) setSyncdOnce() { +func (mic *markIPsCache) setSyncdOnce() { mic.mu.Lock() mic.hasSyncOnce = true mic.mu.Unlock() } -type BridgeEIPAddrManager struct { +type bridgeEIPAddrManager struct { nodeName string bridgeName string nodeAnnotationMu sync.Mutex @@ -182,18 +182,18 @@ type BridgeEIPAddrManager struct { nodeLister corev1listers.NodeLister kube kube.Interface addrManager *linkmanager.Controller - cache *MarkIPsCache + cache *markIPsCache } -// NewBridgeEIPAddrManager manages EgressIP IPs that must be added to ovs bridges to support EgressIP feature for user +// newBridgeEIPAddrManager manages EgressIP IPs that must be added to ovs bridges to support EgressIP feature for user // defined networks. It saves the assigned IPs to its respective Node annotation in-order to understand which IPs it assigned // prior to restarting. // It provides the assigned IPs info node IP handler. Node IP handler must not consider assigned EgressIP IPs as possible node IPs. // Openflow manager must generate the SNAT openflow conditional on packet marks and therefore needs access to EIP IPs and associated packet marks. -// BridgeEIPAddrManager must be able to force Openflow manager to resync if EgressIP assignment for the node changes. -func NewBridgeEIPAddrManager(nodeName, bridgeName string, linkManager *linkmanager.Controller, - kube kube.Interface, eIPInformer egressipinformers.EgressIPInformer, nodeInformer corev1informers.NodeInformer) *BridgeEIPAddrManager { - return &BridgeEIPAddrManager{ +// bridgeEIPAddrManager must be able to force Openflow manager to resync if EgressIP assignment for the node changes. +func newBridgeEIPAddrManager(nodeName, bridgeName string, linkManager *linkmanager.Controller, + kube kube.Interface, eIPInformer egressipinformers.EgressIPInformer, nodeInformer corev1informers.NodeInformer) *bridgeEIPAddrManager { + return &bridgeEIPAddrManager{ nodeName: nodeName, // k8 node name bridgeName: bridgeName, // bridge name for which EIP IPs are managed nodeAnnotationMu: sync.Mutex{}, // mu for updating Node annotation @@ -202,15 +202,15 @@ func NewBridgeEIPAddrManager(nodeName, bridgeName string, linkManager *linkmanag nodeLister: nodeInformer.Lister(), kube: kube, addrManager: linkManager, - cache: NewMarkIPsCache(), // cache to store pkt mark -> EIP IP. + cache: newMarkIPsCache(), // cache to store pkt mark -> EIP IP. } } -func (g *BridgeEIPAddrManager) GetCache() *MarkIPsCache { +func (g *bridgeEIPAddrManager) GetCache() *markIPsCache { return g.cache } -func (g *BridgeEIPAddrManager) AddEgressIP(eip *egressipv1.EgressIP) (bool, error) { +func (g *bridgeEIPAddrManager) addEgressIP(eip *egressipv1.EgressIP) (bool, error) { var isUpdated bool if !util.IsEgressIPMarkSet(eip.Annotations) { return isUpdated, nil @@ -237,7 +237,7 @@ func (g *BridgeEIPAddrManager) AddEgressIP(eip *egressipv1.EgressIP) (bool, erro return isUpdated, nil } -func (g *BridgeEIPAddrManager) UpdateEgressIP(oldEIP, newEIP *egressipv1.EgressIP) (bool, error) { +func (g *bridgeEIPAddrManager) updateEgressIP(oldEIP, newEIP *egressipv1.EgressIP) (bool, error) { var isUpdated bool // at most, one status item for this node will be found. for _, oldStatus := range oldEIP.Status.Items { @@ -293,7 +293,7 @@ func (g *BridgeEIPAddrManager) UpdateEgressIP(oldEIP, newEIP *egressipv1.EgressI return isUpdated, nil } -func (g *BridgeEIPAddrManager) DeleteEgressIP(eip *egressipv1.EgressIP) (bool, error) { +func (g *bridgeEIPAddrManager) deleteEgressIP(eip *egressipv1.EgressIP) (bool, error) { var isUpdated bool if !util.IsEgressIPMarkSet(eip.Annotations) { return isUpdated, nil @@ -322,7 +322,7 @@ func (g *BridgeEIPAddrManager) DeleteEgressIP(eip *egressipv1.EgressIP) (bool, e return isUpdated, nil } -func (g *BridgeEIPAddrManager) SyncEgressIP(objs []interface{}) error { +func (g *bridgeEIPAddrManager) syncEgressIP(objs []interface{}) error { // caller must synchronise annotIPs, err := g.getAnnotationIPs() if err != nil { @@ -380,7 +380,7 @@ func (g *BridgeEIPAddrManager) SyncEgressIP(objs []interface{}) error { // addIPToAnnotation adds an address to the collection of existing addresses stored in the nodes annotation. Caller // may repeat addition of addresses without care for duplicate addresses being added. -func (g *BridgeEIPAddrManager) addIPToAnnotation(candidateIP net.IP) error { +func (g *bridgeEIPAddrManager) addIPToAnnotation(candidateIP net.IP) error { g.nodeAnnotationMu.Lock() defer g.nodeAnnotationMu.Unlock() return retry.RetryOnConflict(retry.DefaultRetry, func() error { @@ -412,7 +412,7 @@ func (g *BridgeEIPAddrManager) addIPToAnnotation(candidateIP net.IP) error { // deleteIPsFromAnnotation deletes address from annotation. If multiple users, callers must synchronise. // deletion of address that doesn't exist will not cause an error. -func (g *BridgeEIPAddrManager) deleteIPsFromAnnotation(candidateIPs ...net.IP) error { +func (g *bridgeEIPAddrManager) deleteIPsFromAnnotation(candidateIPs ...net.IP) error { g.nodeAnnotationMu.Lock() defer g.nodeAnnotationMu.Unlock() return retry.RetryOnConflict(retry.DefaultRetry, func() error { @@ -446,7 +446,7 @@ func (g *BridgeEIPAddrManager) deleteIPsFromAnnotation(candidateIPs ...net.IP) e }) } -func (g *BridgeEIPAddrManager) addIPBridge(ip net.IP) error { +func (g *bridgeEIPAddrManager) addIPBridge(ip net.IP) error { link, err := util.GetNetLinkOps().LinkByName(g.bridgeName) if err != nil { return fmt.Errorf("failed to get link obj by name %s: %v", g.bridgeName, err) @@ -454,7 +454,7 @@ func (g *BridgeEIPAddrManager) addIPBridge(ip net.IP) error { return g.addrManager.AddAddress(getEIPBridgeNetlinkAddress(ip, link.Attrs().Index)) } -func (g *BridgeEIPAddrManager) deleteIPBridge(ip net.IP) error { +func (g *bridgeEIPAddrManager) deleteIPBridge(ip net.IP) error { link, err := util.GetNetLinkOps().LinkByName(g.bridgeName) if err != nil { return fmt.Errorf("failed to get link obj by name %s: %v", g.bridgeName, err) @@ -464,7 +464,7 @@ func (g *BridgeEIPAddrManager) deleteIPBridge(ip net.IP) error { // getAnnotationIPs retrieves the egress IP annotation from the current node Nodes object. If multiple users, callers must synchronise. // if annotation isn't present, empty set is returned -func (g *BridgeEIPAddrManager) getAnnotationIPs() ([]net.IP, error) { +func (g *bridgeEIPAddrManager) getAnnotationIPs() ([]net.IP, error) { node, err := g.nodeLister.Get(g.nodeName) if err != nil { return nil, fmt.Errorf("failed to get node %s from lister: %v", g.nodeName, err) diff --git a/go-controller/pkg/node/egressip/gateway_egressip_test.go b/go-controller/pkg/node/gateway_egressip_test.go similarity index 95% rename from go-controller/pkg/node/egressip/gateway_egressip_test.go rename to go-controller/pkg/node/gateway_egressip_test.go index 07a03a87b6..db43f7450a 100644 --- a/go-controller/pkg/node/egressip/gateway_egressip_test.go +++ b/go-controller/pkg/node/gateway_egressip_test.go @@ -1,4 +1,4 @@ -package egressip +package node import ( "fmt" @@ -67,7 +67,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { addrMgr, stopFn := initBridgeEIPAddrManager(nodeName, bridgeName, emptyAnnotation) defer stopFn() eip := getEIPAssignedToNode(nodeName, mark, ipV4Addr) - isUpdated, err := addrMgr.AddEgressIP(eip) + isUpdated, err := addrMgr.addEgressIP(eip) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeTrue()) node, err := addrMgr.nodeLister.Get(nodeName) @@ -82,7 +82,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { addrMgr, stopFn := initBridgeEIPAddrManager(nodeName, bridgeName, emptyAnnotation) defer stopFn() eip := getEIPAssignedToNode(nodeName, "", ipV4Addr) - isUpdated, err := addrMgr.AddEgressIP(eip) + isUpdated, err := addrMgr.addEgressIP(eip) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeFalse()) node, err := addrMgr.nodeLister.Get(nodeName) @@ -97,7 +97,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { addrMgr, stopFn := initBridgeEIPAddrManager(nodeName, bridgeName, emptyAnnotation) defer stopFn() eip := getEIPAssignedToNode(nodeName, "not-an-integer", ipV4Addr) - isUpdated, err := addrMgr.AddEgressIP(eip) + isUpdated, err := addrMgr.addEgressIP(eip) gomega.Expect(err).Should(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeFalse()) node, err := addrMgr.nodeLister.Get(nodeName) @@ -117,7 +117,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { addrMgr, stopFn := initBridgeEIPAddrManager(nodeName, bridgeName, generateAnnotFromIPs(ipV4Addr2)) defer stopFn() eip := getEIPAssignedToNode(nodeName, mark, ipV4Addr) - isUpdated, err := addrMgr.AddEgressIP(eip) + isUpdated, err := addrMgr.addEgressIP(eip) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeTrue()) node, err := addrMgr.nodeLister.Get(nodeName) @@ -140,7 +140,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { defer stopFn() assignedEIP := getEIPAssignedToNode(nodeName, mark, ipV4Addr) unassignedEIP := getEIPNotAssignedToNode(mark, ipV4Addr) - isUpdated, err := addrMgr.UpdateEgressIP(unassignedEIP, assignedEIP) + isUpdated, err := addrMgr.updateEgressIP(unassignedEIP, assignedEIP) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeTrue()) node, err := addrMgr.nodeLister.Get(nodeName) @@ -162,10 +162,10 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { defer stopFn() assignedEIP := getEIPAssignedToNode(nodeName, mark, ipV4Addr) unassignedEIP := getEIPNotAssignedToNode(mark, ipV4Addr) - isUpdated, err := addrMgr.UpdateEgressIP(unassignedEIP, assignedEIP) + isUpdated, err := addrMgr.updateEgressIP(unassignedEIP, assignedEIP) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeTrue()) - isUpdated, err = addrMgr.UpdateEgressIP(assignedEIP, unassignedEIP) + isUpdated, err = addrMgr.updateEgressIP(assignedEIP, unassignedEIP) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeTrue()) node, err := addrMgr.nodeLister.Get(nodeName) @@ -191,10 +191,10 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { unassignedEIP := getEIPNotAssignedToNode(mark, ipV4Addr) assignedEIP1 := getEIPAssignedToNode(nodeName, mark, ipV4Addr) assignedEIP2 := getEIPAssignedToNode(nodeName, mark2, ipV4Addr2) - isUpdated, err := addrMgr.UpdateEgressIP(unassignedEIP, assignedEIP1) + isUpdated, err := addrMgr.updateEgressIP(unassignedEIP, assignedEIP1) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeTrue()) - isUpdated, err = addrMgr.UpdateEgressIP(assignedEIP1, assignedEIP2) + isUpdated, err = addrMgr.updateEgressIP(assignedEIP1, assignedEIP2) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeTrue()) node, err := addrMgr.nodeLister.Get(nodeName) @@ -221,10 +221,10 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { addrMgr, stopFn := initBridgeEIPAddrManager(nodeName, bridgeName, emptyAnnotation) defer stopFn() eip := getEIPAssignedToNode(nodeName, mark, ipV4Addr) - isUpdated, err := addrMgr.AddEgressIP(eip) + isUpdated, err := addrMgr.addEgressIP(eip) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeTrue()) - isUpdated, err = addrMgr.DeleteEgressIP(eip) + isUpdated, err = addrMgr.deleteEgressIP(eip) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeTrue()) node, err := addrMgr.nodeLister.Get(nodeName) @@ -240,7 +240,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { addrMgr, stopFn := initBridgeEIPAddrManager(nodeName, bridgeName, generateAnnotFromIPs(ipV4Addr2)) defer stopFn() eip := getEIPNotAssignedToNode(mark, ipV4Addr) - isUpdated, err := addrMgr.DeleteEgressIP(eip) + isUpdated, err := addrMgr.deleteEgressIP(eip) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process a valid EgressIP") gomega.Expect(isUpdated).Should(gomega.BeFalse()) node, err := addrMgr.nodeLister.Get(nodeName) @@ -265,7 +265,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { eipAssigned1 := getEIPAssignedToNode(nodeName, mark, ipV4Addr) eipAssigned2 := getEIPAssignedToNode(nodeName, mark2, ipV4Addr2) eipUnassigned3 := getEIPNotAssignedToNode(mark3, ipV4Addr3) - err := addrMgr.SyncEgressIP([]interface{}{eipAssigned1, eipAssigned2, eipUnassigned3}) + err := addrMgr.syncEgressIP([]interface{}{eipAssigned1, eipAssigned2, eipUnassigned3}) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process valid EgressIPs") node, err := addrMgr.nodeLister.Get(nodeName) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "node should be present within kapi") @@ -289,7 +289,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { defer stopFn() eipAssigned1 := getEIPAssignedToNode(nodeName, mark, ipV4Addr) eipAssigned2 := getEIPAssignedToNode(nodeName, mark2, ipV4Addr2) - err := addrMgr.SyncEgressIP([]interface{}{eipAssigned1, eipAssigned2}) + err := addrMgr.syncEgressIP([]interface{}{eipAssigned1, eipAssigned2}) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process valid EgressIPs") node, err := addrMgr.nodeLister.Get(nodeName) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "node should be present within kapi") @@ -306,7 +306,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { addrMgr, stopFn := initBridgeEIPAddrManager(nodeName, bridgeName, emptyAnnotation) // previously configured IP defer stopFn() eipAssigned := getEIPAssignedToNode(nodeName, "", ipV4Addr) - err := addrMgr.SyncEgressIP([]interface{}{eipAssigned}) + err := addrMgr.syncEgressIP([]interface{}{eipAssigned}) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "should process valid EgressIPs") node, err := addrMgr.nodeLister.Get(nodeName) gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "node should be present within kapi") @@ -315,7 +315,7 @@ var _ = ginkgo.Describe("Gateway EgressIP", func() { }) }) -func initBridgeEIPAddrManager(nodeName, bridgeName string, bridgeEIPAnnot string) (*BridgeEIPAddrManager, func()) { +func initBridgeEIPAddrManager(nodeName, bridgeName string, bridgeEIPAnnot string) (*bridgeEIPAddrManager, func()) { node := &corev1.Node{ ObjectMeta: metav1.ObjectMeta{Name: nodeName, Annotations: map[string]string{}}, } @@ -327,7 +327,7 @@ func initBridgeEIPAddrManager(nodeName, bridgeName string, bridgeEIPAnnot string gomega.Expect(watchFactory.Start()).Should(gomega.Succeed(), "watch factory should start") gomega.Expect(err).ShouldNot(gomega.HaveOccurred(), "watch factory creation must succeed") linkManager := linkmanager.NewController(nodeName, true, true, nil) - return NewBridgeEIPAddrManager(nodeName, bridgeName, linkManager, &kube.Kube{KClient: client}, watchFactory.EgressIPInformer(), watchFactory.NodeCoreInformer()), + return newBridgeEIPAddrManager(nodeName, bridgeName, linkManager, &kube.Kube{KClient: client}, watchFactory.EgressIPInformer(), watchFactory.NodeCoreInformer()), watchFactory.Shutdown } diff --git a/go-controller/pkg/node/gateway_init.go b/go-controller/pkg/node/gateway_init.go index b4d11d69cf..28e0fa669b 100644 --- a/go-controller/pkg/node/gateway_init.go +++ b/go-controller/pkg/node/gateway_init.go @@ -9,7 +9,6 @@ import ( "github.com/vishvananda/netlink" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/klog/v2" utilnet "k8s.io/utils/net" @@ -19,11 +18,96 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/managementport" nodenft "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/nftables" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/routemanager" - nodeutil "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/util" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" ) +// bridgedGatewayNodeSetup enables forwarding on bridge interface, sets up the physical network name mappings for the bridge, +// and returns an ifaceID created from the bridge name and the node name +func bridgedGatewayNodeSetup(nodeName, bridgeName, physicalNetworkName string) (string, error) { + // IPv6 forwarding is enabled globally + if config.IPv4Mode { + // we use forward slash as path separator to allow dotted bridgeName e.g. foo.200 + stdout, stderr, err := util.RunSysctl("-w", fmt.Sprintf("net/ipv4/conf/%s/forwarding=1", bridgeName)) + // systctl output enforces dot as path separator + if err != nil || stdout != fmt.Sprintf("net.ipv4.conf.%s.forwarding = 1", strings.ReplaceAll(bridgeName, ".", "/")) { + return "", fmt.Errorf("could not set the correct forwarding value for interface %s: stdout: %v, stderr: %v, err: %v", + bridgeName, stdout, stderr, err) + } + } + + // ovn-bridge-mappings maps a physical network name to a local ovs bridge + // that provides connectivity to that network. It is in the form of physnet1:br1,physnet2:br2. + // Note that there may be multiple ovs bridge mappings, be sure not to override + // the mappings for the other physical network + stdout, stderr, err := util.RunOVSVsctl("--if-exists", "get", "Open_vSwitch", ".", + "external_ids:ovn-bridge-mappings") + if err != nil { + return "", fmt.Errorf("failed to get ovn-bridge-mappings stderr:%s (%v)", stderr, err) + } + // skip the existing mapping setting for the specified physicalNetworkName + mapString := "" + bridgeMappings := strings.Split(stdout, ",") + for _, bridgeMapping := range bridgeMappings { + m := strings.Split(bridgeMapping, ":") + if network := m[0]; network != physicalNetworkName { + if len(mapString) != 0 { + mapString += "," + } + mapString += bridgeMapping + } + } + if len(mapString) != 0 { + mapString += "," + } + mapString += physicalNetworkName + ":" + bridgeName + + _, stderr, err = util.RunOVSVsctl("set", "Open_vSwitch", ".", + fmt.Sprintf("external_ids:ovn-bridge-mappings=%s", mapString)) + if err != nil { + return "", fmt.Errorf("failed to set ovn-bridge-mappings for ovs bridge %s"+ + ", stderr:%s (%v)", bridgeName, stderr, err) + } + + ifaceID := bridgeName + "_" + nodeName + return ifaceID, nil +} + +// getNetworkInterfaceIPAddresses returns the IP addresses for the network interface 'iface'. +func getNetworkInterfaceIPAddresses(iface string) ([]*net.IPNet, error) { + allIPs, err := util.GetFilteredInterfaceV4V6IPs(iface) + if err != nil { + return nil, fmt.Errorf("could not find IP addresses: %v", err) + } + + var ips []*net.IPNet + var foundIPv4 bool + var foundIPv6 bool + for _, ip := range allIPs { + if utilnet.IsIPv6CIDR(ip) { + if config.IPv6Mode && !foundIPv6 { + // For IPv6 addresses with 128 prefix, let's try to find an appropriate subnet + // in the routing table + subnetIP, err := util.GetIPv6OnSubnet(iface, ip) + if err != nil { + return nil, fmt.Errorf("could not find IPv6 address on subnet: %v", err) + } + ips = append(ips, subnetIP) + foundIPv6 = true + } + } else if config.IPv4Mode && !foundIPv4 { + ips = append(ips, ip) + foundIPv4 = true + } + } + if config.IPv4Mode && !foundIPv4 { + return nil, fmt.Errorf("failed to find IPv4 address on interface %s", iface) + } else if config.IPv6Mode && !foundIPv6 { + return nil, fmt.Errorf("failed to find IPv6 address on interface %s", iface) + } + return ips, nil +} + func getGatewayNextHops() ([]net.IP, string, error) { var gatewayNextHops []net.IP var needIPv4NextHop bool @@ -134,6 +218,52 @@ func getGatewayNextHops() ([]net.IP, string, error) { return gatewayNextHops, gatewayIntf, nil } +// getDPUHostPrimaryIPAddresses returns the DPU host IP/Network based on K8s Node IP +// and DPU IP subnet overriden by config config.Gateway.RouterSubnet +func getDPUHostPrimaryIPAddresses(k8sNodeIP net.IP, ifAddrs []*net.IPNet) ([]*net.IPNet, error) { + // Note(adrianc): No Dual-Stack support at this point as we rely on k8s node IP to derive gateway information + // for each node. + var gwIps []*net.IPNet + isIPv4 := utilnet.IsIPv4(k8sNodeIP) + + // override subnet mask via config + if config.Gateway.RouterSubnet != "" { + _, addr, err := net.ParseCIDR(config.Gateway.RouterSubnet) + if err != nil { + return nil, err + } + if utilnet.IsIPv4CIDR(addr) != isIPv4 { + return nil, fmt.Errorf("unexpected gateway router subnet provided (%s). "+ + "does not match Node IP address format", config.Gateway.RouterSubnet) + } + if !addr.Contains(k8sNodeIP) { + return nil, fmt.Errorf("unexpected gateway router subnet provided (%s). "+ + "subnet does not contain Node IP address (%s)", config.Gateway.RouterSubnet, k8sNodeIP) + } + addr.IP = k8sNodeIP + gwIps = append(gwIps, addr) + } else { + // Assume Host and DPU share the same subnet + // in this case just update the matching IPNet with the Host's IP address + for _, addr := range ifAddrs { + if utilnet.IsIPv4CIDR(addr) != isIPv4 { + continue + } + // expect k8s Node IP to be contained in the given subnet + if !addr.Contains(k8sNodeIP) { + continue + } + newAddr := *addr + newAddr.IP = k8sNodeIP + gwIps = append(gwIps, &newAddr) + } + if len(gwIps) == 0 { + return nil, fmt.Errorf("could not find subnet on DPU matching node IP %s", k8sNodeIP) + } + } + return gwIps, nil +} + // getInterfaceByIP retrieves Interface that has `ip` assigned to it func getInterfaceByIP(ip net.IP) (string, error) { links, err := util.GetNetLinkOps().LinkList() @@ -187,39 +317,6 @@ func configureSvcRouteViaInterface(routeManager *routemanager.Controller, iface return nil } -// getNodePrimaryIfAddrs returns the appropriate interface addresses based on the node mode -func getNodePrimaryIfAddrs(watchFactory factory.NodeWatchFactory, nodeName string, gatewayIntf string) ([]*net.IPNet, error) { - switch config.OvnKubeNode.Mode { - case types.NodeModeDPU: - // For DPU mode, use the host IP address from node annotation - node, err := watchFactory.GetNode(nodeName) - if err != nil { - return nil, fmt.Errorf("error retrieving node %s: %v", nodeName, err) - } - - // Extract the primary DPU address annotation from the node - nodeIfAddr, err := util.GetNodePrimaryDPUHostAddrAnnotation(node) - if err != nil { - return nil, err - } - - if nodeIfAddr.IPv4 == "" { - return nil, fmt.Errorf("node primary DPU address annotation is empty for node %s", nodeName) - } - - nodeIP, nodeAddrs, err := net.ParseCIDR(nodeIfAddr.IPv4) - if err != nil { - return nil, fmt.Errorf("failed to parse node IP address %s: %v", nodeIfAddr.IPv4, err) - } - - nodeAddrs.IP = nodeIP - return []*net.IPNet{nodeAddrs}, nil - default: - // For other modes, get network interface IP addresses directly - return nodeutil.GetNetworkInterfaceIPAddresses(gatewayIntf) - } -} - // initGatewayPreStart executes the first part of the gateway initialization for the node. // It creates the gateway object, the node IP manager, openflow manager and node port watcher // once OVN controller is ready and the patch port exists for this node. @@ -229,6 +326,7 @@ func (nc *DefaultNodeNetworkController) initGatewayPreStart( subnets []*net.IPNet, nodeAnnotator kube.Annotator, mgmtPort managementport.Interface, + kubeNodeIP net.IP, ) (*gateway, error) { klog.Info("Initializing Gateway Functionality for Gateway PreStart") @@ -247,12 +345,20 @@ func (nc *DefaultNodeNetworkController) initGatewayPreStart( egressGWInterface = interfaceForEXGW(config.Gateway.EgressGWInterface) } - // Get interface addresses based on node mode - ifAddrs, err = getNodePrimaryIfAddrs(nc.watchFactory, nc.name, gatewayIntf) + ifAddrs, err = getNetworkInterfaceIPAddresses(gatewayIntf) if err != nil { return nil, err } + // For DPU need to use the host IP addr which currently is assumed to be K8s Node cluster + // internal IP address. + if config.OvnKubeNode.Mode == types.NodeModeDPU { + ifAddrs, err = getDPUHostPrimaryIPAddresses(kubeNodeIP, ifAddrs) + if err != nil { + return nil, err + } + } + if err := util.SetNodePrimaryIfAddrs(nodeAnnotator, ifAddrs); err != nil { klog.Errorf("Unable to set primary IP net label on node, err: %v", err) } @@ -368,7 +474,7 @@ func (nc *DefaultNodeNetworkController) initGatewayMainStart(gw *gateway, waiter // interfaceForEXGW takes the interface requested to act as exgw bridge // and returns the name of the bridge if exists, or the interface itself -// if the bridge needs to be created. In this last scenario, BridgeForInterface +// if the bridge needs to be created. In this last scenario, bridgeForInterface // will create the bridge. func interfaceForEXGW(intfName string) string { if _, _, err := util.RunOVSVsctl("br-exists", intfName); err == nil { @@ -384,7 +490,7 @@ func interfaceForEXGW(intfName string) string { return intfName } -func (nc *DefaultNodeNetworkController) initGatewayDPUHost(kubeNodeIP net.IP, nodeAnnotator kube.Annotator) error { +func (nc *DefaultNodeNetworkController) initGatewayDPUHost(kubeNodeIP net.IP) error { // A DPU host gateway is complementary to the shared gateway running // on the DPU embedded CPU. it performs some initializations and // watch on services for iptable rule updates and run a loadBalancerHealth checker @@ -392,71 +498,35 @@ func (nc *DefaultNodeNetworkController) initGatewayDPUHost(kubeNodeIP net.IP, no klog.Info("Initializing Shared Gateway Functionality on DPU host") var err error - // Find the network interface that has the Kubernetes node IP assigned to it - // This interface will be used for DPU host gateway operations - kubeIntf, err := getInterfaceByIP(kubeNodeIP) + // Force gateway interface to be the interface associated with kubeNodeIP + gwIntf, err := getInterfaceByIP(kubeNodeIP) if err != nil { return err } + config.Gateway.Interface = gwIntf - // Get all IP addresses (IPv4 and IPv6) configured on the detected interface - ifAddrs, err := nodeutil.GetNetworkInterfaceIPAddresses(kubeIntf) + _, gatewayIntf, err := getGatewayNextHops() if err != nil { return err } - // Extract the IPv4 address from the interface addresses for node annotation - nodeIPNet, _ := util.MatchFirstIPNetFamily(false, ifAddrs) - nodeAddrSet := sets.New[string](nodeIPNet.String()) - - // If no gateway interface is explicitly configured, use the detected interface - if config.Gateway.Interface == "" { - config.Gateway.Interface = kubeIntf - } - - // If a different gateway interface is configured than the one with used for the kubernetes node IP, - // get its addresses and add them to the node address set for routing purposes - if config.Gateway.Interface != kubeIntf { - ifAddrs, err = nodeutil.GetNetworkInterfaceIPAddresses(config.Gateway.Interface) - if err != nil { - return err - } - detectedIPNetv4, _ := util.MatchFirstIPNetFamily(false, ifAddrs) - nodeAddrSet.Insert(detectedIPNetv4.String()) - // Use the configured interface for the masquerade route instead of the auto-detected one - kubeIntf = config.Gateway.Interface - } - - // Set the primary DPU address annotation on the node with the interface addresses - if err := util.SetNodePrimaryDPUHostAddr(nodeAnnotator, ifAddrs); err != nil { - klog.Errorf("Unable to set primary IP net label on node, err: %v", err) - return err - } - - // Set the host CIDRs annotation to include all detected network addresses - // This helps with routing decisions for traffic coming from the host - if err := util.SetNodeHostCIDRs(nodeAnnotator, nodeAddrSet); err != nil { - klog.Errorf("Unable to set host-cidrs on node, err: %v", err) + ifAddrs, err := getNetworkInterfaceIPAddresses(gatewayIntf) + if err != nil { return err } - // Apply all node annotations to the Kubernetes node object - if err := nodeAnnotator.Run(); err != nil { - return fmt.Errorf("failed to set node %s annotations: %w", nc.name, err) - } - // Delete stale masquerade resources if there are any. This is to make sure that there // are no Linux resources with IP from old masquerade subnet when masquerade subnet // gets changed as part of day2 operation. - if err := deleteStaleMasqueradeResources(kubeIntf, nc.name, nc.watchFactory); err != nil { + if err := deleteStaleMasqueradeResources(gwIntf, nc.name, nc.watchFactory); err != nil { return fmt.Errorf("failed to remove stale masquerade resources: %w", err) } - if err := setNodeMasqueradeIPOnExtBridge(kubeIntf); err != nil { - return fmt.Errorf("failed to set the node masquerade IP on the ext bridge %s: %v", kubeIntf, err) + if err := setNodeMasqueradeIPOnExtBridge(gwIntf); err != nil { + return fmt.Errorf("failed to set the node masquerade IP on the ext bridge %s: %v", gwIntf, err) } - if err := addMasqueradeRoute(nc.routeManager, kubeIntf, nc.name, ifAddrs, nc.watchFactory); err != nil { + if err := addMasqueradeRoute(nc.routeManager, gwIntf, nc.name, ifAddrs, nc.watchFactory); err != nil { return fmt.Errorf("failed to set the node masquerade route to OVN: %v", err) } @@ -465,7 +535,7 @@ func (nc *DefaultNodeNetworkController) initGatewayDPUHost(kubeNodeIP net.IP, no return fmt.Errorf("failed to update masquerade subnet annotation on node: %s, error: %v", nc.name, err) } - err = configureSvcRouteViaInterface(nc.routeManager, config.Gateway.Interface, DummyNextHopIPs()) + err = configureSvcRouteViaInterface(nc.routeManager, gatewayIntf, DummyNextHopIPs()) if err != nil { return err } @@ -491,7 +561,7 @@ func (nc *DefaultNodeNetworkController) initGatewayDPUHost(kubeNodeIP net.IP, no gw.portClaimWatcher = portClaimWatcher } - if err := addHostMACBindings(kubeIntf); err != nil { + if err := addHostMACBindings(gwIntf); err != nil { return fmt.Errorf("failed to add MAC bindings for service routing") } @@ -535,7 +605,7 @@ func CleanupClusterNode(name string) error { func (nc *DefaultNodeNetworkController) updateGatewayMAC(link netlink.Link) error { // TBD-merge for dpu-host mode: if interface mac of the dpu-host interface that connects to the // gateway bridge on the dpu changes, we need to update dpu's gatewayBridge.macAddress L3 gateway - // annotation (see BridgeForInterface) + // annotation (see bridgeForInterface) if config.OvnKubeNode.Mode != types.NodeModeFull { return nil } diff --git a/go-controller/pkg/node/gateway_init_linux_test.go b/go-controller/pkg/node/gateway_init_linux_test.go index 7e1f330937..efa9f0f38f 100644 --- a/go-controller/pkg/node/gateway_init_linux_test.go +++ b/go-controller/pkg/node/gateway_init_linux_test.go @@ -80,17 +80,6 @@ add chain inet ovn-kubernetes udn-service-prerouting { type filter hook prerouti add rule inet ovn-kubernetes udn-service-prerouting iifname != %s jump udn-service-mark add chain inet ovn-kubernetes udn-service-output { type filter hook output priority -150 ; comment "UDN services packet mark - Output" ; } add rule inet ovn-kubernetes udn-service-output jump udn-service-mark -add chain inet ovn-kubernetes ovn-kube-udn-masq { comment "OVN UDN masquerade" ; } -add rule inet ovn-kubernetes ovn-kube-udn-masq ip saddr != 169.254.169.0/29 ip daddr != 172.16.1.0/24 ip saddr 169.254.169.0/24 masquerade -add rule inet ovn-kubernetes ovn-kube-local-gw-masq jump ovn-kube-udn-masq -` - -const baseLGWNFTablesRules = ` -add rule inet ovn-kubernetes ovn-kube-local-gw-masq ip saddr 169.254.169.1 masquerade -add chain inet ovn-kubernetes ovn-kube-local-gw-masq { type nat hook postrouting priority 101 ; comment "OVN local gateway masquerade" ; } -add rule inet ovn-kubernetes ovn-kube-local-gw-masq jump ovn-kube-pod-subnet-masq -add rule inet ovn-kubernetes ovn-kube-pod-subnet-masq ip saddr 10.1.1.0/24 masquerade -add chain inet ovn-kubernetes ovn-kube-pod-subnet-masq ` func getBaseNFTRules(mgmtPort string) string { @@ -101,10 +90,6 @@ func getBaseNFTRules(mgmtPort string) string { return ret } -func getBaseLGWNFTablesRules(mgmtPort string) string { - return getBaseNFTRules(mgmtPort) + baseLGWNFTablesRules -} - func shareGatewayInterfaceTest(app *cli.App, testNS ns.NetNS, eth0Name, eth0MAC, eth0GWIP, eth0CIDR string, gatewayVLANID uint, l netlink.Link, hwOffload, setNodeIP bool) { const mtu string = "1234" @@ -288,8 +273,6 @@ func shareGatewayInterfaceTest(app *cli.App, testNS ns.NetNS, rm := routemanager.NewController() netInfo := &multinetworkmocks.NetInfo{} netInfo.On("GetPodNetworkAdvertisedOnNodeVRFs", nodeName).Return(nil) - netInfo.On("GetNodeGatewayIP", hostSubnets[0]).Return(util.GetNodeGatewayIfAddr(hostSubnets[0])) - netInfo.On("GetNodeManagementIP", hostSubnets[0]).Return(util.GetNodeManagementIfAddr(hostSubnets[0])) mp, err := managementport.NewManagementPortController(&existingNode, hostSubnets, "", "", rm, netInfo) Expect(err).NotTo(HaveOccurred()) @@ -589,7 +572,7 @@ func shareGatewayInterfaceDPUTest(app *cli.App, testNS ns.NetNS, // exec Mocks fexec := ovntest.NewLooseCompareFakeExec() // gatewayInitInternal - // BridgeForInterface + // bridgeForInterface fexec.AddFakeCmd(&ovntest.ExpectedCmd{ Cmd: "ovs-vsctl --timeout=15 port-to-br " + brphys, Err: fmt.Errorf(""), @@ -750,9 +733,6 @@ func shareGatewayInterfaceDPUTest(app *cli.App, testNS ns.NetNS, k := &kube.Kube{KClient: kubeFakeClient} nodeAnnotator := kube.NewNodeAnnotator(k, existingNode.Name) - err = util.SetNodePrimaryDPUHostAddr(nodeAnnotator, ovntest.MustParseIPNets(nodeSubnet)) - config.Gateway.RouterSubnet = nodeSubnet - Expect(err).NotTo(HaveOccurred()) err = util.SetNodeHostSubnetAnnotation(nodeAnnotator, ovntest.MustParseIPNets(nodeSubnet)) Expect(err).NotTo(HaveOccurred()) @@ -906,7 +886,7 @@ func shareGatewayInterfaceDPUHostTest(app *cli.App, testNS ns.NetNS, uplinkName, ipnet.IP = ip routeManager := routemanager.NewController() cnnci := NewCommonNodeNetworkControllerInfo(kubeFakeClient, fakeClient.AdminPolicyRouteClient, wf, nil, nodeName, routeManager) - nc := newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil, nil) + nc := newDefaultNodeNetworkController(cnnci, stop, wg, routeManager, nil) // must run route manager manually which is usually started with nc.Start() wg.Add(1) go func() { @@ -921,11 +901,8 @@ func shareGatewayInterfaceDPUHostTest(app *cli.App, testNS ns.NetNS, uplinkName, err = testNS.Do(func(ns.NetNS) error { defer GinkgoRecover() - k := &kube.Kube{KClient: kubeFakeClient} - - nodeAnnotator := kube.NewNodeAnnotator(k, existingNode.Name) - err := nc.initGatewayDPUHost(net.ParseIP(hostIP), nodeAnnotator) + err := nc.initGatewayDPUHost(net.ParseIP(hostIP)) Expect(err).NotTo(HaveOccurred()) link, err := netlink.LinkByName(uplinkName) @@ -1213,8 +1190,6 @@ OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0` rm := routemanager.NewController() netInfo := &multinetworkmocks.NetInfo{} netInfo.On("GetPodNetworkAdvertisedOnNodeVRFs", nodeName).Return(nil) - netInfo.On("GetNodeGatewayIP", hostSubnets[0]).Return(util.GetNodeGatewayIfAddr(hostSubnets[0])) - netInfo.On("GetNodeManagementIP", hostSubnets[0]).Return(util.GetNodeManagementIfAddr(hostSubnets[0])) mp, err := managementport.NewManagementPortController(&existingNode, hostSubnets, "", "", rm, netInfo) Expect(err).NotTo(HaveOccurred()) @@ -1377,6 +1352,10 @@ OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0` "OVN-KUBE-EXTERNALIP": []string{ fmt.Sprintf("-p %s -d %s --dport %v -j DNAT --to-destination %s:%v", service.Spec.Ports[0].Protocol, externalIP, service.Spec.Ports[0].Port, service.Spec.ClusterIP, service.Spec.Ports[0].Port), }, + "POSTROUTING": []string{ + "-s 169.254.169.1 -j MASQUERADE", + "-s 10.1.1.0/24 -j MASQUERADE", + }, "OVN-KUBE-ETP": []string{}, "OVN-KUBE-ITP": []string{}, }, @@ -1436,7 +1415,7 @@ OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0` err = f6.MatchState(expectedTables, nil) Expect(err).NotTo(HaveOccurred()) - expectedNFT := getBaseLGWNFTablesRules(types.K8sMgmtIntfName) + expectedNFT := getBaseNFTRules(types.K8sMgmtIntfName) err = nodenft.MatchNFTRules(expectedNFT, nft.Dump()) Expect(err).NotTo(HaveOccurred()) @@ -1692,6 +1671,47 @@ var _ = Describe("Gateway unit tests", func() { util.SetNetLinkOpMockInst(origNetlinkInst) }) + Context("getDPUHostPrimaryIPAddresses", func() { + + It("returns Gateway IP/Subnet for kubernetes node IP", func() { + _, dpuSubnet, _ := net.ParseCIDR("10.0.0.101/24") + nodeIP := net.ParseIP("10.0.0.11") + expectedGwSubnet := []*net.IPNet{ + {IP: nodeIP, Mask: net.CIDRMask(24, 32)}, + } + gwSubnet, err := getDPUHostPrimaryIPAddresses(nodeIP, []*net.IPNet{dpuSubnet}) + Expect(err).ToNot(HaveOccurred()) + Expect(gwSubnet).To(Equal(expectedGwSubnet)) + }) + + It("Fails if node IP is not in host subnets", func() { + _, dpuSubnet, _ := net.ParseCIDR("10.0.0.101/24") + nodeIP := net.ParseIP("10.0.1.11") + _, err := getDPUHostPrimaryIPAddresses(nodeIP, []*net.IPNet{dpuSubnet}) + Expect(err).To(HaveOccurred()) + }) + + It("returns node IP with config.Gateway.RouterSubnet subnet", func() { + config.Gateway.RouterSubnet = "10.1.0.0/16" + _, dpuSubnet, _ := net.ParseCIDR("10.0.0.101/24") + nodeIP := net.ParseIP("10.1.0.11") + expectedGwSubnet := []*net.IPNet{ + {IP: nodeIP, Mask: net.CIDRMask(16, 32)}, + } + gwSubnet, err := getDPUHostPrimaryIPAddresses(nodeIP, []*net.IPNet{dpuSubnet}) + Expect(err).ToNot(HaveOccurred()) + Expect(gwSubnet).To(Equal(expectedGwSubnet)) + }) + + It("Fails if node IP is not in config.Gateway.RouterSubnet subnet", func() { + config.Gateway.RouterSubnet = "10.1.0.0/16" + _, dpuSubnet, _ := net.ParseCIDR("10.0.0.101/24") + nodeIP := net.ParseIP("10.0.0.11") + _, err := getDPUHostPrimaryIPAddresses(nodeIP, []*net.IPNet{dpuSubnet}) + Expect(err).To(HaveOccurred()) + }) + }) + Context("getInterfaceByIP", func() { It("Finds correct interface", func() { lnk := &linkMock.Link{} diff --git a/go-controller/pkg/node/gateway_iptables.go b/go-controller/pkg/node/gateway_iptables.go index 90bffbe91f..e9b6b12387 100644 --- a/go-controller/pkg/node/gateway_iptables.go +++ b/go-controller/pkg/node/gateway_iptables.go @@ -21,10 +21,11 @@ import ( ) const ( - iptableNodePortChain = "OVN-KUBE-NODEPORT" // called from nat-PREROUTING and nat-OUTPUT - iptableExternalIPChain = "OVN-KUBE-EXTERNALIP" // called from nat-PREROUTING and nat-OUTPUT - iptableETPChain = "OVN-KUBE-ETP" // called from nat-PREROUTING only - iptableITPChain = "OVN-KUBE-ITP" // called from mangle-OUTPUT and nat-OUTPUT + iptableNodePortChain = "OVN-KUBE-NODEPORT" // called from nat-PREROUTING and nat-OUTPUT + iptableExternalIPChain = "OVN-KUBE-EXTERNALIP" // called from nat-PREROUTING and nat-OUTPUT + iptableETPChain = "OVN-KUBE-ETP" // called from nat-PREROUTING only + iptableITPChain = "OVN-KUBE-ITP" // called from mangle-OUTPUT and nat-OUTPUT + iptableUDNMasqueradeChain = "OVN-KUBE-UDN-MASQUERADE" // called from nat-POSTROUTING ) func clusterIPTablesProtocols() []iptables.Protocol { @@ -68,11 +69,29 @@ func restoreIptRulesFiltered(rules []nodeipt.Rule, filter map[string]map[string] return nodeipt.RestoreRulesFiltered(rules, filter) } +// appendIptRules adds the provided rules in an append fashion +// i.e each rule gets added at the last position in the chain +func appendIptRules(rules []nodeipt.Rule) error { + return nodeipt.AddRules(rules, true) +} + // deleteIptRules removes provided rules from the chain func deleteIptRules(rules []nodeipt.Rule) error { return nodeipt.DelRules(rules) } +// ensureChain ensures that a chain exists within a table +func ensureChain(table, chain string) error { + for _, proto := range clusterIPTablesProtocols() { + ipt, err := util.GetIPTablesHelper(proto) + if err != nil { + return fmt.Errorf("failed to get IPTables helper to add UDN chain: %v", err) + } + addChaintoTable(ipt, table, chain) + } + return nil +} + func getGatewayInitRules(chain string, proto iptables.Protocol) []nodeipt.Rule { iptRules := []nodeipt.Rule{} if chain == iptableITPChain { @@ -384,8 +403,123 @@ func getLocalGatewayFilterRules(ifname string, cidr *net.IPNet) []nodeipt.Rule { } } -// initLocalGatewayIPTFilterRules sets up iptables rules for interfaces -func initLocalGatewayIPTFilterRules(ifname string, cidr *net.IPNet) error { +func getLocalGatewayPodSubnetNATRules(cidr *net.IPNet) []nodeipt.Rule { + protocol := getIPTablesProtocol(cidr.IP.String()) + return []nodeipt.Rule{ + { + Table: "nat", + Chain: "POSTROUTING", + Args: []string{ + "-s", cidr.String(), + "-j", "MASQUERADE", + }, + Protocol: protocol, + }, + } +} + +// getUDNMasqueradeRules is only called for local-gateway-mode +func getUDNMasqueradeRules(protocol iptables.Protocol) []nodeipt.Rule { + // the following rules are actively used only for the UDN Feature: + // -A POSTROUTING -j OVN-KUBE-UDN-MASQUERADE + // -A OVN-KUBE-UDN-MASQUERADE -s 169.254.0.0/29 -j RETURN + // -A OVN-KUBE-UDN-MASQUERADE -d 10.96.0.0/16 -j RETURN + // -A OVN-KUBE-UDN-MASQUERADE -s 169.254.0.0/17 -j MASQUERADE + // NOTE: Ordering is important here, the RETURN must come before + // the MASQUERADE rule. Please don't change the ordering. + srcUDNMasqueradePrefix := config.Gateway.V4MasqueradeSubnet + ipFamily := utilnet.IPv4 + if protocol == iptables.ProtocolIPv6 { + srcUDNMasqueradePrefix = config.Gateway.V6MasqueradeSubnet + ipFamily = utilnet.IPv6 + } + // defaultNetworkReservedMasqueradePrefix contains the first 6 IPs in the + // masquerade range that shouldn't be masqueraded. Hence it's always 3 bits (8 + // IPs) wide, regardless of IP family. + _, ipnet, _ := net.ParseCIDR(srcUDNMasqueradePrefix) + _, len := ipnet.Mask.Size() + defaultNetworkReservedMasqueradePrefix := fmt.Sprintf("%s/%d", ipnet.IP.String(), len-3) + + rules := []nodeipt.Rule{ + { + Table: "nat", + Chain: "POSTROUTING", + Args: []string{"-j", iptableUDNMasqueradeChain}, // NOTE: AddRules will take care of creating the chain + Protocol: protocol, + }, + { + Table: "nat", + Chain: iptableUDNMasqueradeChain, + Args: []string{ + "-s", defaultNetworkReservedMasqueradePrefix, + "-j", "RETURN", + }, + Protocol: protocol, + }, + } + for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { + if utilnet.IPFamilyOfCIDR(svcCIDR) != ipFamily { + continue + } + rules = append(rules, + nodeipt.Rule{ + Table: "nat", + Chain: iptableUDNMasqueradeChain, + Args: []string{ + "-d", svcCIDR.String(), + "-j", "RETURN", + }, + Protocol: protocol, + }, + ) + } + rules = append(rules, + nodeipt.Rule{ + Table: "nat", + Chain: iptableUDNMasqueradeChain, + Args: []string{ + "-s", srcUDNMasqueradePrefix, + "-j", "MASQUERADE", + }, + Protocol: protocol, + }, + ) + return rules +} + +func getLocalGatewayNATRules(cidr *net.IPNet) []nodeipt.Rule { + // Allow packets to/from the gateway interface in case defaults deny + protocol := getIPTablesProtocol(cidr.IP.String()) + masqueradeIP := config.Gateway.MasqueradeIPs.V4OVNMasqueradeIP + if protocol == iptables.ProtocolIPv6 { + masqueradeIP = config.Gateway.MasqueradeIPs.V6OVNMasqueradeIP + } + rules := append( + []nodeipt.Rule{ + { + Table: "nat", + Chain: "POSTROUTING", + Args: []string{ + "-s", masqueradeIP.String(), + "-j", "MASQUERADE", + }, + Protocol: protocol, + }, + }, + getLocalGatewayPodSubnetNATRules(cidr)..., + ) + + // FIXME(tssurya): If the feature is disabled we should be removing + // these rules + if util.IsNetworkSegmentationSupportEnabled() { + rules = append(rules, getUDNMasqueradeRules(protocol)...) + } + + return rules +} + +// initLocalGatewayNATRules sets up iptables rules for interfaces +func initLocalGatewayNATRules(ifname string, cidr *net.IPNet) error { // Insert the filter table rules because they need to be evaluated BEFORE the DROP rules // we have for forwarding. DO NOT change the ordering; specially important // during SGW->LGW rollouts and restarts. @@ -393,8 +527,25 @@ func initLocalGatewayIPTFilterRules(ifname string, cidr *net.IPNet) error { if err != nil { return fmt.Errorf("unable to insert forwarding rules %v", err) } - // NOTE: nftables masquerade rules are now handled separately in initLocalGatewayNFTNATRules - return nil + // append the masquerade rules in POSTROUTING table since that needs to be + // evaluated last. + return appendIptRules(getLocalGatewayNATRules(cidr)) +} + +func addLocalGatewayPodSubnetNATRules(cidrs ...*net.IPNet) error { + var rules []nodeipt.Rule + for _, cidr := range cidrs { + rules = append(rules, getLocalGatewayPodSubnetNATRules(cidr)...) + } + return appendIptRules(rules) +} + +func delLocalGatewayPodSubnetNATRules(cidrs ...*net.IPNet) error { + var rules []nodeipt.Rule + for _, cidr := range cidrs { + rules = append(rules, getLocalGatewayPodSubnetNATRules(cidr)...) + } + return deleteIptRules(rules) } func addChaintoTable(ipt util.IPTablesHelper, tableName, chain string) { diff --git a/go-controller/pkg/node/gateway_localnet.go b/go-controller/pkg/node/gateway_localnet.go index 6b8ed9aa0b..e0cc822844 100644 --- a/go-controller/pkg/node/gateway_localnet.go +++ b/go-controller/pkg/node/gateway_localnet.go @@ -17,11 +17,11 @@ import ( func initLocalGateway(hostSubnets []*net.IPNet, mgmtPort managementport.Interface) error { klog.Info("Adding iptables masquerading rules for new local gateway") - - var allCIDRs []*net.IPNet - ifName := mgmtPort.GetInterfaceName() - - // First pass: collect all CIDRs and setup iptables filter rules per interface + if util.IsNetworkSegmentationSupportEnabled() { + if err := ensureChain("nat", iptableUDNMasqueradeChain); err != nil { + return fmt.Errorf("failed to ensure chain %s in NAT table: %w", iptableUDNMasqueradeChain, err) + } + } for _, hostSubnet := range hostSubnets { // local gateway mode uses mp0 as default path for all ingress traffic into OVN nextHop, err := util.MatchFirstIPNetFamily(utilnet.IsIPv6CIDR(hostSubnet), mgmtPort.GetAddresses()) @@ -32,21 +32,11 @@ func initLocalGateway(hostSubnets []*net.IPNet, mgmtPort managementport.Interfac // add iptables masquerading for mp0 to exit the host for egress cidr := nextHop.IP.Mask(nextHop.Mask) cidrNet := &net.IPNet{IP: cidr, Mask: nextHop.Mask} - allCIDRs = append(allCIDRs, cidrNet) - - // Setup iptables filter rules for this interface/CIDR - if err := initLocalGatewayIPTFilterRules(ifName, cidrNet); err != nil { + ifName := mgmtPort.GetInterfaceName() + if err := initLocalGatewayNATRules(ifName, cidrNet); err != nil { return fmt.Errorf("failed to add local NAT rules for: %s, err: %v", ifName, err) } } - - // setup nftables masquerade rules for all CIDRs (v4, v6 or dualstack) - if len(allCIDRs) > 0 { - if err := initLocalGatewayNFTNATRules(allCIDRs...); err != nil { - return fmt.Errorf("failed to setup nftables masquerade rules: %w", err) - } - } - return nil } diff --git a/go-controller/pkg/node/gateway_localnet_linux_test.go b/go-controller/pkg/node/gateway_localnet_linux_test.go index 49e4d1ee13..013234e1b1 100644 --- a/go-controller/pkg/node/gateway_localnet_linux_test.go +++ b/go-controller/pkg/node/gateway_localnet_linux_test.go @@ -21,7 +21,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/networkmanager" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/bridgeconfig" nodenft "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/nftables" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/retry" ovntest "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing" @@ -57,8 +56,9 @@ func initFakeNodePortWatcher(iptV4, iptV6 util.IPTablesHelper) *nodePortWatcher gwMACParsed, _ := net.ParseMAC(gwMAC) - defaultBridge := bridgeconfig.TestDefaultBridgeConfig() - defaultBridge.SetMAC(gwMACParsed) + defaultNetConfig := &bridgeUDNConfiguration{ + ofPortPatch: "patch-breth0_ov", + } fNPW := nodePortWatcher{ ofportPhys: "eth0", @@ -66,11 +66,15 @@ func initFakeNodePortWatcher(iptV4, iptV6 util.IPTablesHelper) *nodePortWatcher gatewayIPv6: v6localnetGatewayIP, serviceInfo: make(map[k8stypes.NamespacedName]*serviceConfig), ofm: &openflowManager{ - flowCache: map[string][]string{}, - defaultBridge: defaultBridge, + flowCache: map[string][]string{}, + defaultBridge: &bridgeConfiguration{ + macAddress: gwMACParsed, + netConfig: map[string]*bridgeUDNConfiguration{ + types.DefaultNetworkName: defaultNetConfig, + }, + }, }, networkManager: networkmanager.Default().Interface(), - gwBridge: bridgeconfig.TestBridgeConfig(""), } return &fNPW } diff --git a/go-controller/pkg/node/gateway_nftables.go b/go-controller/pkg/node/gateway_nftables.go index b38f2baebb..6e341466ab 100644 --- a/go-controller/pkg/node/gateway_nftables.go +++ b/go-controller/pkg/node/gateway_nftables.go @@ -6,15 +6,12 @@ package node import ( "context" "fmt" - "net" "strings" corev1 "k8s.io/api/core/v1" utilnet "k8s.io/utils/net" "sigs.k8s.io/knftables" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/bridgeconfig" nodenft "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/nftables" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" @@ -29,13 +26,6 @@ import ( // use an "accept" rule to override a later "drop" rule), then those rules will need to // either both be iptables or both be nftables. -// nftables chain names -const ( - nftablesLocalGatewayMasqChain = "ovn-kube-local-gw-masq" - nftablesPodSubnetMasqChain = "ovn-kube-pod-subnet-masq" - nftablesUDNMasqChain = "ovn-kube-udn-masq" -) - // getNoSNATNodePortRules returns elements to add to the "mgmtport-no-snat-nodeports" // set to prevent SNAT of sourceIP when passing through the management port, for an // `externalTrafficPolicy: Local` service with NodePorts. @@ -78,10 +68,10 @@ func getNoSNATLoadBalancerIPRules(svcPort corev1.ServicePort, localEndpoints []s // getUDNNodePortMarkNFTRule returns a verdict map element (nftablesUDNMarkNodePortsMap) // with a key composed of the svcPort protocol and port. // The value is a jump to the UDN chain mark if netInfo is provided, or nil that is useful for map entry removal. -func getUDNNodePortMarkNFTRule(svcPort corev1.ServicePort, netInfo *bridgeconfig.BridgeUDNConfiguration) *knftables.Element { +func getUDNNodePortMarkNFTRule(svcPort corev1.ServicePort, netInfo *bridgeUDNConfiguration) *knftables.Element { var val []string if netInfo != nil { - val = []string{fmt.Sprintf("jump %s", GetUDNMarkChain(netInfo.PktMark))} + val = []string{fmt.Sprintf("jump %s", GetUDNMarkChain(netInfo.pktMark))} } return &knftables.Element{ Map: nftablesUDNMarkNodePortsMap, @@ -94,12 +84,12 @@ func getUDNNodePortMarkNFTRule(svcPort corev1.ServicePort, netInfo *bridgeconfig // getUDNExternalIPsMarkNFTRules returns a verdict map elements (nftablesUDNMarkExternalIPsV4Map or nftablesUDNMarkExternalIPsV6Map) // with a key composed of the external IP, svcPort protocol and port. // The value is a jump to the UDN chain mark if netInfo is provided, or nil that is useful for map entry removal. -func getUDNExternalIPsMarkNFTRules(svcPort corev1.ServicePort, externalIPs []string, netInfo *bridgeconfig.BridgeUDNConfiguration) []*knftables.Element { +func getUDNExternalIPsMarkNFTRules(svcPort corev1.ServicePort, externalIPs []string, netInfo *bridgeUDNConfiguration) []*knftables.Element { var nftRules []*knftables.Element var val []string if netInfo != nil { - val = []string{fmt.Sprintf("jump %s", GetUDNMarkChain(netInfo.PktMark))} + val = []string{fmt.Sprintf("jump %s", GetUDNMarkChain(netInfo.pktMark))} } for _, externalIP := range externalIPs { mapName := nftablesUDNMarkExternalIPsV4Map @@ -185,7 +175,7 @@ func getGatewayNFTRules(service *corev1.Service, localEndpoints []string, svcHas // getUDNNFTRules generates nftables rules for a UDN service. // If netConfig is nil, the resulting map elements will have empty values, // suitable only for entry removal. -func getUDNNFTRules(service *corev1.Service, netConfig *bridgeconfig.BridgeUDNConfiguration) []*knftables.Element { +func getUDNNFTRules(service *corev1.Service, netConfig *bridgeUDNConfiguration) []*knftables.Element { rules := make([]*knftables.Element, 0) for _, svcPort := range service.Spec.Ports { if util.ServiceTypeHasNodePort(service) { @@ -195,320 +185,3 @@ func getUDNNFTRules(service *corev1.Service, netConfig *bridgeconfig.BridgeUDNCo } return rules } - -// getLocalGatewayPodSubnetMasqueradeNFTRule creates a rule for masquerading traffic from the pod subnet CIDR -// in local gateway node in a seperate chain which is then called from local gateway masquerade chain. -// -// chain ovn-kube-pod-subnet-masq { -// ip saddr 10.244.0.0/24 masquerade -// ip6 saddr fd00:10:244:1::/64 masquerade -// } -// -// If isAdvertisedNetwork is true, masquerade only when destination matches remote node IPs. -// Rules look like: -// ip saddr 10.244.0.0/24 ip daddr @remote-node-ips-v4 masquerade -// ip6 saddr fd00:10:244:1::/64 ip6 daddr @remote-node-ips-v6 masquerade -func getLocalGatewayPodSubnetMasqueradeNFTRule(cidr *net.IPNet, isAdvertisedNetwork bool) (*knftables.Rule, error) { - // Create the rule for masquerading traffic from the CIDR - var ipPrefix string - var remoteNodeSetName string - if utilnet.IsIPv6CIDR(cidr) { - ipPrefix = "ip6" - remoteNodeSetName = types.NFTRemoteNodeIPsv6 - } else { - ipPrefix = "ip" - remoteNodeSetName = types.NFTRemoteNodeIPsv4 - } - - // If network is advertised, only masquerade if destination is a remote node IP - var optionalDestRules []string - if isAdvertisedNetwork { - optionalDestRules = []string{ipPrefix, "daddr", "@", remoteNodeSetName} - } - rule := &knftables.Rule{ - Rule: knftables.Concat( - ipPrefix, "saddr", cidr, - optionalDestRules, - "masquerade", - ), - Chain: nftablesPodSubnetMasqChain, - } - - return rule, nil -} - -// getLocalGatewayNATNFTRules returns the nftables rules for local gateway NAT including masquerade IP rule, -// pod subnet rules, and UDN masquerade rules (if network segmentation is enabled). -// This function supports dual-stack by accepting multiple CIDRs and generating rules for all IP families. -// -// chain ovn-kube-local-gw-masq { -// comment "OVN local gateway masquerade" -// type nat hook postrouting priority srcnat; policy accept; -// ip saddr 169.254.0.1 masquerade -// ip6 saddr fd69::1 masquerade -// jump ovn-kube-pod-subnet-masq -// jump ovn-kube-udn-masq -// } -func getLocalGatewayNATNFTRules(cidrs ...*net.IPNet) ([]*knftables.Rule, error) { - var rules []*knftables.Rule - - // Process each CIDR to support dual-stack - for _, cidr := range cidrs { - // Determine IP version and masquerade IP - isIPv6 := utilnet.IsIPv6CIDR(cidr) - var masqueradeIP net.IP - var ipPrefix string - if isIPv6 { - masqueradeIP = config.Gateway.MasqueradeIPs.V6OVNMasqueradeIP - ipPrefix = "ip6" - } else { - masqueradeIP = config.Gateway.MasqueradeIPs.V4OVNMasqueradeIP - ipPrefix = "ip" - } - - // Rule1: Masquerade IP rule for the main chain - masqRule := &knftables.Rule{ - Chain: nftablesLocalGatewayMasqChain, - Rule: knftables.Concat( - ipPrefix, "saddr", masqueradeIP, - "masquerade", - ), - } - rules = append(rules, masqRule) - - // Rule2: Pod subnet NAT rule for the pod subnet chain - podSubnetRule, err := getLocalGatewayPodSubnetMasqueradeNFTRule(cidr, false) - if err != nil { - return nil, fmt.Errorf("failed to create pod subnet masquerade rule: %w", err) - } - rules = append(rules, podSubnetRule) - } - - // Rule 3: UDN masquerade rules (if network segmentation is enabled) - if util.IsNetworkSegmentationSupportEnabled() { - if config.IPv4Mode { - udnRules, err := getUDNMasqueradeNFTRules(utilnet.IPv4) - if err != nil { - return nil, fmt.Errorf("failed to create IPv4 UDN masquerade rules: %w", err) - } - rules = append(rules, udnRules...) - } - if config.IPv6Mode { - udnRules, err := getUDNMasqueradeNFTRules(utilnet.IPv6) - if err != nil { - return nil, fmt.Errorf("failed to create IPv6 UDN masquerade rules: %w", err) - } - rules = append(rules, udnRules...) - } - } - - return rules, nil -} - -// getUDNMasqueradeNFTRules returns the nftables rules for UDN masquerade. -// Chain creation is handled separately by setupLocalGatewayNATNFTRules. -// -// chain ovn-kube-udn-masq { -// comment "OVN UDN masquerade" -// ip saddr != 169.254.0.0/29 ip daddr != 10.96.0.0/16 ip saddr 169.254.0.0/17 masquerade -// ip6 saddr != fd69::/125 ip daddr != fd00:10:96::/112 ip6 saddr fd69::/112 masquerade -// } -func getUDNMasqueradeNFTRules(ipFamily utilnet.IPFamily) ([]*knftables.Rule, error) { - var rules []*knftables.Rule - - // Determine subnet and IP family - srcUDNMasqueradePrefix := config.Gateway.V4MasqueradeSubnet - ipPrefix := "ip" - if ipFamily == utilnet.IPv6 { - srcUDNMasqueradePrefix = config.Gateway.V6MasqueradeSubnet - ipPrefix = "ip6" - } - - // Calculate reserved masquerade prefix (first 8 IPs) - _, ipnet, err := net.ParseCIDR(srcUDNMasqueradePrefix) - if err != nil { - return nil, fmt.Errorf("failed to parse UDN masquerade subnet: %w", err) - } - _, prefixLen := ipnet.Mask.Size() - defaultNetworkReservedMasqueradePrefix := fmt.Sprintf("%s/%d", ipnet.IP.String(), prefixLen-3) - - // Rule: RETURN for reserved masquerade prefix and service CIDRs - // rest of the traffic is masqueraded - - for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { - if utilnet.IPFamilyOfCIDR(svcCIDR) != ipFamily { - continue - } - masqueradeRule := &knftables.Rule{ - Chain: nftablesUDNMasqChain, - Rule: knftables.Concat( - ipPrefix, "saddr", "!=", defaultNetworkReservedMasqueradePrefix, // this guarantees we don't SNAT default network masqueradeIPs - ipPrefix, "daddr", "!=", svcCIDR, // this guarantees we don't SNAT service traffic - ipPrefix, "saddr", srcUDNMasqueradePrefix, // this guarantees we SNAT all UDN MasqueradeIPs traffic leaving the node - "masquerade", - ), - } - rules = append(rules, masqueradeRule) - } - - return rules, nil -} - -// initLocalGatewayNFTNATRules sets up nftables rules for local gateway NAT functionality -// This function supports dual-stack by accepting multiple CIDRs and generating rules for all IP families -func initLocalGatewayNFTNATRules(cidrs ...*net.IPNet) error { - nft, err := nodenft.GetNFTablesHelper() - if err != nil { - return fmt.Errorf("failed to get nftables helper: %w", err) - } - - // Create transaction and apply all chains and rules - tx := nft.NewTransaction() - - // Create main local gateway masquerade chain - // Use priority 101 instead of defaultknftables.SNATPriority (100) to ensure - // iptables egress IP rules in OVN-KUBE-EGRESS-IP-MULTI-NIC chain run first - // this also ensure for egress-services, the - // chain egress-services { - // type nat hook postrouting priority srcnat; policy accept; - // is called before the local gateway masquerade chain - localGwMasqChain := &knftables.Chain{ - Name: nftablesLocalGatewayMasqChain, - Comment: knftables.PtrTo("OVN local gateway masquerade"), - Type: knftables.PtrTo(knftables.NATType), - Hook: knftables.PtrTo(knftables.PostroutingHook), - Priority: knftables.PtrTo(knftables.BaseChainPriority("101")), - } - tx.Add(localGwMasqChain) - - // Create dedicated pod subnet masquerade chain - podSubnetMasqChain := &knftables.Chain{ - Name: nftablesPodSubnetMasqChain, - } - tx.Add(podSubnetMasqChain) - - // Create UDN masquerade chain only if network segmentation is enabled - var udnMasqChain *knftables.Chain - if util.IsNetworkSegmentationSupportEnabled() { - udnMasqChain = &knftables.Chain{ - Name: nftablesUDNMasqChain, - Comment: knftables.PtrTo("OVN UDN masquerade"), - } - tx.Add(udnMasqChain) - } - - // Flush existing chains to ensure clean state - tx.Flush(localGwMasqChain) - tx.Flush(podSubnetMasqChain) - if util.IsNetworkSegmentationSupportEnabled() { - tx.Flush(udnMasqChain) - } - - // Get the existing local gateway NAT rules - localGwRules, err := getLocalGatewayNATNFTRules(cidrs...) - if err != nil { - return fmt.Errorf("failed to get local gateway NAT rules: %w", err) - } - - // Add the main local gateway NAT rules - for _, rule := range localGwRules { - tx.Add(rule) - } - - // Add jump rule from main chain to pod subnet chain - jumpToPodSubnetRule := &knftables.Rule{ - Chain: nftablesLocalGatewayMasqChain, - Rule: knftables.Concat( - "jump", nftablesPodSubnetMasqChain, - ), - } - tx.Add(jumpToPodSubnetRule) - - // Add jump rule to UDN chain only if network segmentation is enabled - if util.IsNetworkSegmentationSupportEnabled() { - jumpToUDNRule := &knftables.Rule{ - Chain: nftablesLocalGatewayMasqChain, - Rule: knftables.Concat( - "jump", nftablesUDNMasqChain, - ), - } - tx.Add(jumpToUDNRule) - } - - err = nft.Run(context.TODO(), tx) - if err != nil { - return fmt.Errorf("failed to setup local gateway NAT nftables rules: %w", err) - } - - return nil -} - -// addOrUpdateLocalGatewayPodSubnetNFTRules adds nftables rules for pod subnet masquerading for multiple CIDRs -// These rules are added to the dedicated pod subnet masquerade chain. -// If the rules already exist, they are updated. -// If isAdvertisedNetwork is true, the masquerade rules also get a destination match -// that matches the remote node IP set. -func addOrUpdateLocalGatewayPodSubnetNFTRules(isAdvertisedNetwork bool, cidrs ...*net.IPNet) error { - nft, err := nodenft.GetNFTablesHelper() - if err != nil { - return fmt.Errorf("failed to get nftables helper: %w", err) - } - - tx := nft.NewTransaction() - - // Ensure the pod subnet chain exists - podSubnetChain := &knftables.Chain{ - Name: nftablesPodSubnetMasqChain, - } - tx.Add(podSubnetChain) - - // Flush the chain to remove all existing rules - // if network toggles between advertised and non-advertised, we need to flush the chain and re-add correct rules - tx.Flush(podSubnetChain) - - // Add the new rules for each CIDR - for _, cidr := range cidrs { - rule, err := getLocalGatewayPodSubnetMasqueradeNFTRule(cidr, isAdvertisedNetwork) - if err != nil { - return fmt.Errorf("failed to create nftables rules for CIDR %s: %w", cidr.String(), err) - } - - // Add the rule - tx.Add(rule) - } - - if err := nft.Run(context.TODO(), tx); err != nil { - return fmt.Errorf("failed to add pod subnet NAT rules: %w", err) - } - - return nil -} - -// delLocalGatewayPodSubnetNFTRules removes nftables rules for pod subnet masquerading for multiple CIDRs -// Since we use a separate chain, we can simply flush it to remove all pod subnet rules. -func delLocalGatewayPodSubnetNFTRules() error { - nft, err := nodenft.GetNFTablesHelper() - if err != nil { - return fmt.Errorf("failed to get nftables helper: %w", err) - } - - tx := nft.NewTransaction() - - // In shared gateway mode, this chain might not exist if its - // not migration from local gateway mode. In that case, let's - // use the idiomatic way of adding the chain before trying to flush it. - // I anyways also have the knftables.IsNotFound() check in the caller later. - tx.Add(&knftables.Chain{ - Name: nftablesPodSubnetMasqChain, - }) - - // Simply flush the dedicated pod subnet masquerade chain - // This removes all pod subnet masquerade rules at once - tx.Flush(&knftables.Chain{Name: nftablesPodSubnetMasqChain}) - - if err := nft.Run(context.TODO(), tx); err != nil && !knftables.IsNotFound(err) { - return fmt.Errorf("failed to delete pod subnet NAT rules: %w", err) - } - - return nil -} diff --git a/go-controller/pkg/node/gateway_shared_intf.go b/go-controller/pkg/node/gateway_shared_intf.go index 35e409618b..535ca7db2b 100644 --- a/go-controller/pkg/node/gateway_shared_intf.go +++ b/go-controller/pkg/node/gateway_shared_intf.go @@ -26,25 +26,36 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/networkmanager" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/bridgeconfig" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/egressip" nodeipt "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/iptables" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/linkmanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/managementport" nodenft "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/nftables" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/routemanager" - nodetypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types" - nodeutil "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/util" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" utilerrors "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util/errors" ) const ( + // defaultOpenFlowCookie identifies default open flow rules added to the host OVS bridge. + // The hex number 0xdeff105, aka defflos, is meant to sound like default flows. + defaultOpenFlowCookie = "0xdeff105" // etpSvcOpenFlowCookie identifies constant open flow rules added to the host OVS // bridge to move packets between host and external for etp=local traffic. // The hex number 0xe745ecf105, represents etp(e74)-service(5ec)-flows which makes it easier for debugging. etpSvcOpenFlowCookie = "0xe745ecf105" + // pmtudOpenFlowCookie identifies the flows used to drop ICMP type (3) destination unreachable, + // fragmentation-needed (4) + pmtudOpenFlowCookie = "0x0304" + // ovsLocalPort is the name of the OVS bridge local port + ovsLocalPort = "LOCAL" + // ctMarkOVN is the conntrack mark value for OVN traffic + ctMarkOVN = "0x1" + // ctMarkHost is the conntrack mark value for host traffic + ctMarkHost = "0x2" + // ovnKubeNodeSNATMark is used to mark packets that need to be SNAT-ed to nodeIP for + // traffic originating from egressIP and egressService controlled pods towards other nodes in the cluster. + ovnKubeNodeSNATMark = "0x3f0" // nftablesUDNServicePreroutingChain is a base chain registered into the prerouting hook, // and it contains one rule that jumps to nftablesUDNServiceMarkChain. @@ -81,6 +92,10 @@ const ( // to the appropriate network. nftablesUDNMarkExternalIPsV4Map = "udn-mark-external-ips-v4" nftablesUDNMarkExternalIPsV6Map = "udn-mark-external-ips-v6" + + // outputPortDrop is used to signify that there is no output port for an openflow action and the + // rendered action should result in a drop + outputPortDrop = "output-port-drop" ) // configureUDNServicesNFTables configures the nftables chains, rules, and verdict maps @@ -190,7 +205,7 @@ type nodePortWatcher struct { gatewayIPv6 string gatewayIPLock sync.Mutex ofportPhys string - gwBridge *bridgeconfig.BridgeConfiguration + gwBridge string // Map of service name to programmed iptables/OF rules serviceInfo map[ktypes.NamespacedName]*serviceConfig serviceInfoLock sync.Mutex @@ -216,9 +231,11 @@ type cidrAndFlags struct { validLifetime int } -func (npw *nodePortWatcher) updateGatewayIPs() { +func (npw *nodePortWatcher) updateGatewayIPs(addressManager *addressManager) { // Get Physical IPs of Node, Can be IPV4 IPV6 or both - gatewayIPv4, gatewayIPv6 := getGatewayFamilyAddrs(npw.gwBridge.GetIPs()) + addressManager.gatewayBridge.Lock() + gatewayIPv4, gatewayIPv6 := getGatewayFamilyAddrs(addressManager.gatewayBridge.ips) + addressManager.gatewayBridge.Unlock() npw.gatewayIPLock.Lock() defer npw.gatewayIPLock.Unlock() @@ -247,7 +264,7 @@ func (npw *nodePortWatcher) updateServiceFlowCache(service *corev1.Service, netI return nil } - var netConfig *bridgeconfig.BridgeUDNConfiguration + var netConfig *bridgeUDNConfiguration var actions string if add { @@ -255,7 +272,7 @@ func (npw *nodePortWatcher) updateServiceFlowCache(service *corev1.Service, netI if netConfig == nil { return fmt.Errorf("failed to get active network config for network %s", netInfo.GetNetworkName()) } - actions = fmt.Sprintf("output:%s", netConfig.OfPortPatch) + actions = fmt.Sprintf("output:%s", netConfig.ofPortPatch) } // CAUTION: when adding new flows where the in_port is ofPortPatch and the out_port is ofPortPhys, ensure @@ -335,7 +352,7 @@ func (npw *nodePortWatcher) updateServiceFlowCache(service *corev1.Service, netI // table=0, matches on return traffic from service nodePort and sends it out to primary node interface (br-ex) fmt.Sprintf("cookie=%s, priority=110, in_port=%s, dl_src=%s, %s, tp_src=%d, "+ "actions=output:%s", - cookie, netConfig.OfPortPatch, npw.ofm.getDefaultBridgeMAC(), flowProtocol, svcPort.NodePort, npw.ofportPhys)}) + cookie, netConfig.ofPortPatch, npw.ofm.getDefaultBridgeMAC(), flowProtocol, svcPort.NodePort, npw.ofportPhys)}) } } } @@ -368,11 +385,11 @@ func (npw *nodePortWatcher) updateServiceFlowCache(service *corev1.Service, netI var ofPorts []string // don't get the ports unless we need to as it is a costly operation if (len(extParsedIPs) > 0 || len(ingParsedIPs) > 0) && add { - ofPorts, err = util.GetOpenFlowPorts(npw.gwBridge.GetBridgeName(), false) + ofPorts, err = util.GetOpenFlowPorts(npw.gwBridge, false) if err != nil { // in the odd case that getting all ports from the bridge should not work, // simply output to LOCAL (this should work well in the vast majority of cases, anyway) - klog.Warningf("Unable to get port list from bridge. Using OvsLocalPort as output only: error: %v", + klog.Warningf("Unable to get port list from bridge. Using ovsLocalPort as output only: error: %v", err) } } @@ -405,14 +422,14 @@ func (npw *nodePortWatcher) updateServiceFlowCache(service *corev1.Service, netI ipPrefix = "ipv6" } // table 2, user-defined network host -> OVN towards default cluster network services - defaultNetConfig := npw.ofm.defaultBridge.GetActiveNetworkBridgeConfigCopy(types.DefaultNetworkName) + defaultNetConfig := npw.ofm.defaultBridge.getActiveNetworkBridgeConfigCopy(types.DefaultNetworkName) // sample flow: cookie=0xdeff105, duration=2319.685s, table=2, n_packets=496, n_bytes=67111, priority=300, // ip,nw_dst=10.96.0.1 actions=mod_dl_dst:02:42:ac:12:00:03,output:"patch-breth0_ov" // This flow is used for UDNs and advertised UDNs to be able to reach kapi and dns services alone on default network flows := []string{fmt.Sprintf("cookie=%s, priority=300, table=2, %s, %s_dst=%s, "+ "actions=set_field:%s->eth_dst,output:%s", - nodetypes.DefaultOpenFlowCookie, ipPrefix, ipPrefix, service.Spec.ClusterIP, - npw.ofm.getDefaultBridgeMAC().String(), defaultNetConfig.OfPortPatch)} + defaultOpenFlowCookie, ipPrefix, ipPrefix, service.Spec.ClusterIP, + npw.ofm.getDefaultBridgeMAC().String(), defaultNetConfig.ofPortPatch)} if util.IsRouteAdvertisementsEnabled() { // if the network is advertised, then for the reply from kapi and dns services to go back // into the UDN's VRF we need flows that statically send this to the local port @@ -425,7 +442,7 @@ func (npw *nodePortWatcher) updateServiceFlowCache(service *corev1.Service, netI // sample flow for non-advertised UDNs: cookie=0xdeff105, duration=684.087s, table=0, n_packets=0, n_bytes=0, // idle_age=684, priority=500,ip,in_port=2,nw_src=10.96.0.0/16,nw_dst=169.254.0.0/17 actions=ct(table=3,zone=64001,nat) flows = append(flows, fmt.Sprintf("cookie=%s, priority=490, in_port=%s, ip, ip_src=%s,actions=ct(zone=%d,nat,table=3)", - nodetypes.DefaultOpenFlowCookie, defaultNetConfig.OfPortPatch, service.Spec.ClusterIP, config.Default.HostMasqConntrackZone)) + defaultOpenFlowCookie, defaultNetConfig.ofPortPatch, service.Spec.ClusterIP, config.Default.HostMasqConntrackZone)) } npw.ofm.updateFlowCacheEntry(key, flows) } @@ -452,7 +469,7 @@ func (npw *nodePortWatcher) updateServiceFlowCache(service *corev1.Service, netI // `actions`: "send to patchport" // `externalIPOrLBIngressIP` is either externalIP.IP or LB.status.ingress.IP // `ipType` is either "External" or "Ingress" -func (npw *nodePortWatcher) createLbAndExternalSvcFlows(service *corev1.Service, netConfig *bridgeconfig.BridgeUDNConfiguration, svcPort *corev1.ServicePort, add bool, +func (npw *nodePortWatcher) createLbAndExternalSvcFlows(service *corev1.Service, netConfig *bridgeUDNConfiguration, svcPort *corev1.ServicePort, add bool, hasLocalHostNetworkEp bool, protocol string, actions string, externalIPOrLBIngressIPs []string, ipType string, ofPorts []string) error { for _, externalIPOrLBIngressIP := range externalIPOrLBIngressIPs { @@ -483,7 +500,7 @@ func (npw *nodePortWatcher) createLbAndExternalSvcFlows(service *corev1.Service, continue } // add the ARP bypass flow regardless of service type or gateway modes since its applicable in all scenarios. - arpFlow := npw.generateARPBypassFlow(ofPorts, netConfig.OfPortPatch, externalIPOrLBIngressIP, cookie) + arpFlow := npw.generateARPBypassFlow(ofPorts, netConfig.ofPortPatch, externalIPOrLBIngressIP, cookie) externalIPFlows = append(externalIPFlows, arpFlow) // This allows external traffic ingress when the svc's ExternalTrafficPolicy is // set to Local, and the backend pod is HostNetworked. We need to add @@ -520,7 +537,7 @@ func (npw *nodePortWatcher) createLbAndExternalSvcFlows(service *corev1.Service, etpSvcOpenFlowCookie, npw.ofportPhys)) } else if config.Gateway.Mode == config.GatewayModeShared { // add the ICMP Fragmentation flow for shared gateway mode. - icmpFlow := nodeutil.GenerateICMPFragmentationFlow(externalIPOrLBIngressIP, netConfig.OfPortPatch, npw.ofportPhys, cookie, 110) + icmpFlow := generateICMPFragmentationFlow(externalIPOrLBIngressIP, netConfig.ofPortPatch, npw.ofportPhys, cookie, 110) externalIPFlows = append(externalIPFlows, icmpFlow) // case2 (see function description for details) externalIPFlows = append(externalIPFlows, @@ -531,7 +548,7 @@ func (npw *nodePortWatcher) createLbAndExternalSvcFlows(service *corev1.Service, // table=0, matches on return traffic from service externalIP or LB ingress and sends it out to primary node interface (br-ex) fmt.Sprintf("cookie=%s, priority=110, in_port=%s, dl_src=%s, %s, %s=%s, tp_src=%d, "+ "actions=output:%s", - cookie, netConfig.OfPortPatch, npw.ofm.getDefaultBridgeMAC(), flowProtocol, nwSrc, externalIPOrLBIngressIP, svcPort.Port, npw.ofportPhys)) + cookie, netConfig.ofPortPatch, npw.ofm.getDefaultBridgeMAC(), flowProtocol, nwSrc, externalIPOrLBIngressIP, svcPort.Port, npw.ofportPhys)) } npw.ofm.updateFlowCacheEntry(key, externalIPFlows) } @@ -556,7 +573,7 @@ func (npw *nodePortWatcher) generateARPBypassFlow(ofPorts []string, ofPortPatch, // simply output to LOCAL (this should work well in the vast majority of cases, anyway) arpFlow = fmt.Sprintf("cookie=%s, priority=110, in_port=%s, %s, %s=%s, "+ "actions=output:%s", - cookie, npw.ofportPhys, addrResProto, addrResDst, ipAddr, nodetypes.OvsLocalPort) + cookie, npw.ofportPhys, addrResProto, addrResDst, ipAddr, ovsLocalPort) } else { // cover the case where breth0 has more than 3 ports, e.g. if an admin adds a 4th port // and the ExternalIP would be on that port @@ -586,6 +603,31 @@ func (npw *nodePortWatcher) generateARPBypassFlow(ofPorts []string, ofPortPatch, return arpFlow } +func generateICMPFragmentationFlow(ipAddr, outputPort, inPort, cookie string, priority int) string { + // we send any ICMP destination unreachable, fragmentation needed to the OVN pipeline too so that + // path MTU discovery continues to work. + icmpMatch := "icmp" + icmpType := 3 + icmpCode := 4 + nwDst := "nw_dst" + if utilnet.IsIPv6String(ipAddr) { + icmpMatch = "icmp6" + icmpType = 2 + icmpCode = 0 + nwDst = "ipv6_dst" + } + + action := fmt.Sprintf("output:%s", outputPort) + if outputPort == outputPortDrop { + action = "drop" + } + + icmpFragmentationFlow := fmt.Sprintf("cookie=%s, priority=%d, in_port=%s, %s, %s=%s, icmp_type=%d, "+ + "icmp_code=%d, actions=%s", + cookie, priority, inPort, icmpMatch, nwDst, ipAddr, icmpType, icmpCode, action) + return icmpFragmentationFlow +} + // getAndDeleteServiceInfo returns the serviceConfig for a service and if it exists and then deletes the entry func (npw *nodePortWatcher) getAndDeleteServiceInfo(index ktypes.NamespacedName) (out *serviceConfig, exists bool) { npw.serviceInfoLock.Lock() @@ -664,7 +706,7 @@ func addServiceRules(service *corev1.Service, netInfo util.NetInfo, localEndpoin // For dpu or Full mode var err error var errors []error - var activeNetwork *bridgeconfig.BridgeUDNConfiguration + var activeNetwork *bridgeUDNConfiguration if npw != nil { if err = npw.updateServiceFlowCache(service, netInfo, true, svcHasLocalHostNetEndPnt); err != nil { errors = append(errors, err) @@ -1409,6 +1451,942 @@ func (npwipt *nodePortWatcherIptables) SyncServices(services []interface{}) erro return utilerrors.Join(errors...) } +func flowsForDefaultBridge(bridge *bridgeConfiguration, extraIPs []net.IP) ([]string, error) { + // CAUTION: when adding new flows where the in_port is ofPortPatch and the out_port is ofPortPhys, ensure + // that dl_src is included in match criteria! + + ofPortPhys := bridge.ofPortPhys + bridgeMacAddress := bridge.macAddress.String() + ofPortHost := bridge.ofPortHost + bridgeIPs := bridge.ips + + var dftFlows []string + // 14 bytes of overhead for ethernet header (does not include VLAN) + maxPktLength := getMaxFrameLength() + + strip_vlan := "" + mod_vlan_id := "" + match_vlan := "" + if config.Gateway.VLANID != 0 { + strip_vlan = "strip_vlan," + match_vlan = fmt.Sprintf("dl_vlan=%d,", config.Gateway.VLANID) + mod_vlan_id = fmt.Sprintf("mod_vlan_vid:%d,", config.Gateway.VLANID) + } + + if config.IPv4Mode { + // table0, Geneve packets coming from external. Skip conntrack and go directly to host + // if dest mac is the shared mac send directly to host. + if ofPortPhys != "" { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=205, in_port=%s, dl_dst=%s, udp, udp_dst=%d, "+ + "actions=output:%s", defaultOpenFlowCookie, ofPortPhys, bridgeMacAddress, config.Default.EncapPort, + ofPortHost)) + // perform NORMAL action otherwise. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=200, in_port=%s, udp, udp_dst=%d, "+ + "actions=NORMAL", defaultOpenFlowCookie, ofPortPhys, config.Default.EncapPort)) + + // table0, Geneve packets coming from LOCAL/Host OFPort. Skip conntrack and go directly to external + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=200, in_port=%s, udp, udp_dst=%d, "+ + "actions=output:%s", defaultOpenFlowCookie, ofPortHost, config.Default.EncapPort, ofPortPhys)) + } + physicalIP, err := util.MatchFirstIPNetFamily(false, bridgeIPs) + if err != nil { + return nil, fmt.Errorf("unable to determine IPv4 physical IP of host: %v", err) + } + for _, netConfig := range bridge.patchedNetConfigs() { + // table 0, SVC Hairpin from OVN destined to local host, DNAT and go to table 4 + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ip, ip_dst=%s, ip_src=%s,"+ + "actions=ct(commit,zone=%d,nat(dst=%s),table=4)", + defaultOpenFlowCookie, netConfig.ofPortPatch, config.Gateway.MasqueradeIPs.V4HostMasqueradeIP.String(), physicalIP.IP, + config.Default.HostMasqConntrackZone, physicalIP.IP)) + } + + // table 0, hairpin from OVN destined to local host (but an additional node IP), send to table 4 + for _, ip := range extraIPs { + if ip.To4() == nil { + continue + } + // not needed for the physical IP + if ip.Equal(physicalIP.IP) { + continue + } + + // not needed for special masquerade IP + if ip.Equal(config.Gateway.MasqueradeIPs.V4HostMasqueradeIP) { + continue + } + + for _, netConfig := range bridge.patchedNetConfigs() { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ip, ip_dst=%s, ip_src=%s,"+ + "actions=ct(commit,zone=%d,table=4)", + defaultOpenFlowCookie, netConfig.ofPortPatch, ip.String(), physicalIP.IP, + config.Default.HostMasqConntrackZone)) + } + } + + // table 0, Reply SVC traffic from Host -> OVN, unSNAT and goto table 5 + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ip, ip_dst=%s,"+ + "actions=ct(zone=%d,nat,table=5)", + defaultOpenFlowCookie, ofPortHost, config.Gateway.MasqueradeIPs.V4OVNMasqueradeIP.String(), config.Default.OVNMasqConntrackZone)) + } + if config.IPv6Mode { + if ofPortPhys != "" { + // table0, Geneve packets coming from external. Skip conntrack and go directly to host + // if dest mac is the shared mac send directly to host. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=205, in_port=%s, dl_dst=%s, udp6, udp_dst=%d, "+ + "actions=output:%s", defaultOpenFlowCookie, ofPortPhys, bridgeMacAddress, config.Default.EncapPort, + ofPortHost)) + // perform NORMAL action otherwise. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=200, in_port=%s, udp6, udp_dst=%d, "+ + "actions=NORMAL", defaultOpenFlowCookie, ofPortPhys, config.Default.EncapPort)) + + // table0, Geneve packets coming from LOCAL. Skip conntrack and send to external + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=200, in_port=%s, udp6, udp_dst=%d, "+ + "actions=output:%s", defaultOpenFlowCookie, ovsLocalPort, config.Default.EncapPort, ofPortPhys)) + } + + physicalIP, err := util.MatchFirstIPNetFamily(true, bridgeIPs) + if err != nil { + return nil, fmt.Errorf("unable to determine IPv6 physical IP of host: %v", err) + } + // table 0, SVC Hairpin from OVN destined to local host, DNAT to host, send to table 4 + for _, netConfig := range bridge.patchedNetConfigs() { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ipv6, ipv6_dst=%s, ipv6_src=%s,"+ + "actions=ct(commit,zone=%d,nat(dst=%s),table=4)", + defaultOpenFlowCookie, netConfig.ofPortPatch, config.Gateway.MasqueradeIPs.V6HostMasqueradeIP.String(), physicalIP.IP, + config.Default.HostMasqConntrackZone, physicalIP.IP)) + } + + // table 0, hairpin from OVN destined to local host (but an additional node IP), send to table 4 + for _, ip := range extraIPs { + if ip.To4() != nil { + continue + } + // not needed for the physical IP + if ip.Equal(physicalIP.IP) { + continue + } + + // not needed for special masquerade IP + if ip.Equal(config.Gateway.MasqueradeIPs.V6HostMasqueradeIP) { + continue + } + + for _, netConfig := range bridge.patchedNetConfigs() { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ipv6, ipv6_dst=%s, ipv6_src=%s,"+ + "actions=ct(commit,zone=%d,table=4)", + defaultOpenFlowCookie, netConfig.ofPortPatch, ip.String(), physicalIP.IP, + config.Default.HostMasqConntrackZone)) + } + } + + // table 0, Reply SVC traffic from Host -> OVN, unSNAT and goto table 5 + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=500, in_port=%s, ipv6, ipv6_dst=%s,"+ + "actions=ct(zone=%d,nat,table=5)", + defaultOpenFlowCookie, ofPortHost, config.Gateway.MasqueradeIPs.V6OVNMasqueradeIP.String(), config.Default.OVNMasqConntrackZone)) + } + + var protoPrefix, masqIP, masqSubnet string + + // table 0, packets coming from Host -> Service + for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { + if utilnet.IsIPv4CIDR(svcCIDR) { + protoPrefix = "ip" + masqIP = config.Gateway.MasqueradeIPs.V4HostMasqueradeIP.String() + masqSubnet = config.Gateway.V4MasqueradeSubnet + } else { + protoPrefix = "ipv6" + masqIP = config.Gateway.MasqueradeIPs.V6HostMasqueradeIP.String() + masqSubnet = config.Gateway.V6MasqueradeSubnet + } + + // table 0, Host (default network) -> OVN towards SVC, SNAT to special IP. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=500, in_port=%s, %s, %s_dst=%s, "+ + "actions=ct(commit,zone=%d,nat(src=%s),table=2)", + defaultOpenFlowCookie, ofPortHost, protoPrefix, protoPrefix, + svcCIDR, config.Default.HostMasqConntrackZone, masqIP)) + + if util.IsNetworkSegmentationSupportEnabled() { + // table 0, Host (UDNs) -> OVN towards SVC, SNAT to special IP. + // For packets originating from UDN, commit without NATing, those + // have already been SNATed to the masq IP of the UDN. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=550, in_port=%s, %s, %s_src=%s, %s_dst=%s, "+ + "actions=ct(commit,zone=%d,table=2)", + defaultOpenFlowCookie, ofPortHost, protoPrefix, protoPrefix, + masqSubnet, protoPrefix, svcCIDR, config.Default.HostMasqConntrackZone)) + if util.IsRouteAdvertisementsEnabled() { + // If the UDN is advertised then instead of matching on the masqSubnet + // we match on the UDNPodSubnet itself and we also don't SNAT to 169.254.0.2 + // sample flow: cookie=0xdeff105, duration=1472.742s, table=0, n_packets=9, n_bytes=666, priority=550 + // ip,in_port=LOCAL,nw_src=103.103.0.0/16,nw_dst=10.96.0.0/16 actions=ct(commit,table=2,zone=64001) + for _, netConfig := range bridge.patchedNetConfigs() { + if netConfig.isDefaultNetwork() { + continue + } + if netConfig.advertised.Load() { + var udnAdvertisedSubnets []*net.IPNet + for _, clusterEntry := range netConfig.subnets { + udnAdvertisedSubnets = append(udnAdvertisedSubnets, clusterEntry.CIDR) + } + // Filter subnets based on the clusterIP service family + // NOTE: We don't support more than 1 subnet CIDR of same family type; we only pick the first one + matchingIPFamilySubnet, err := util.MatchFirstIPNetFamily(utilnet.IsIPv6CIDR(svcCIDR), udnAdvertisedSubnets) + if err != nil { + klog.Infof("Unable to determine UDN subnet for the provided family isIPV6: %t, %v", utilnet.IsIPv6CIDR(svcCIDR), err) + continue + } + + // Use the filtered subnet for the flow compute instead of the masqueradeIP + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=550, in_port=%s, %s, %s_src=%s, %s_dst=%s, "+ + "actions=ct(commit,zone=%d,table=2)", + defaultOpenFlowCookie, ofPortHost, protoPrefix, protoPrefix, + matchingIPFamilySubnet.String(), protoPrefix, svcCIDR, config.Default.HostMasqConntrackZone)) + } + } + } + } + + masqDst := masqIP + if util.IsNetworkSegmentationSupportEnabled() { + // In UDN match on the whole masquerade subnet to handle replies from UDN enabled services + masqDst = masqSubnet + } + for _, netConfig := range bridge.patchedNetConfigs() { + // table 0, Reply hairpin traffic to host, coming from OVN, unSNAT + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=500, in_port=%s, %s, %s_src=%s, %s_dst=%s,"+ + "actions=ct(zone=%d,nat,table=3)", + defaultOpenFlowCookie, netConfig.ofPortPatch, protoPrefix, protoPrefix, svcCIDR, + protoPrefix, masqDst, config.Default.HostMasqConntrackZone)) + // table 0, Reply traffic coming from OVN to outside, drop it if the DNAT wasn't done either + // at the GR load balancer or switch load balancer. It means the correct port wasn't provided. + // nodeCIDR->serviceCIDR traffic flow is internal and it shouldn't be carried to outside the cluster + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=115, in_port=%s, %s, %s_dst=%s,"+ + "actions=drop", defaultOpenFlowCookie, netConfig.ofPortPatch, protoPrefix, protoPrefix, svcCIDR)) + } + } + + // table 0, add IP fragment reassembly flows, only needed in SGW mode with + // physical interface attached to bridge + if config.Gateway.Mode == config.GatewayModeShared && ofPortPhys != "" { + reassemblyFlows := generateIPFragmentReassemblyFlow(ofPortPhys) + dftFlows = append(dftFlows, reassemblyFlows...) + } + if ofPortPhys != "" { + for _, netConfig := range bridge.patchedNetConfigs() { + var actions string + if config.Gateway.Mode != config.GatewayModeLocal || config.Gateway.DisablePacketMTUCheck { + actions = fmt.Sprintf("output:%s", netConfig.ofPortPatch) + } else { + // packets larger than known acceptable MTU need to go to kernel for + // potential fragmentation + // introduced specifically for replies to egress traffic not routed + // through the host + actions = fmt.Sprintf("check_pkt_larger(%d)->reg0[0],resubmit(,11)", maxPktLength) + } + + if config.IPv4Mode { + // table 1, established and related connections in zone 64000 with ct_mark ctMarkOVN go to OVN + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, table=1, ip, ct_state=+trk+est, ct_mark=%s, "+ + "actions=%s", defaultOpenFlowCookie, netConfig.masqCTMark, actions)) + + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, table=1, ip, ct_state=+trk+rel, ct_mark=%s, "+ + "actions=%s", defaultOpenFlowCookie, netConfig.masqCTMark, actions)) + + } + + if config.IPv6Mode { + // table 1, established and related connections in zone 64000 with ct_mark ctMarkOVN go to OVN + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, table=1, ipv6, ct_state=+trk+est, ct_mark=%s, "+ + "actions=%s", defaultOpenFlowCookie, netConfig.masqCTMark, actions)) + + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, table=1, ipv6, ct_state=+trk+rel, ct_mark=%s, "+ + "actions=%s", defaultOpenFlowCookie, netConfig.masqCTMark, actions)) + } + } + if config.IPv4Mode { + // table 1, established and related connections in zone 64000 with ct_mark ctMarkHost go to host + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, table=1, %s ip, ct_state=+trk+est, ct_mark=%s, "+ + "actions=%soutput:%s", + defaultOpenFlowCookie, match_vlan, ctMarkHost, strip_vlan, ofPortHost)) + + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, table=1, %s ip, ct_state=+trk+rel, ct_mark=%s, "+ + "actions=%soutput:%s", + defaultOpenFlowCookie, match_vlan, ctMarkHost, strip_vlan, ofPortHost)) + + } + if config.IPv6Mode { + // table 1, established and related connections in zone 64000 with ct_mark ctMarkHost go to host + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, table=1, %s ip6, ct_state=+trk+est, ct_mark=%s, "+ + "actions=%soutput:%s", + defaultOpenFlowCookie, match_vlan, ctMarkHost, strip_vlan, ofPortHost)) + + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, table=1, %s ip6, ct_state=+trk+rel, ct_mark=%s, "+ + "actions=%soutput:%s", + defaultOpenFlowCookie, match_vlan, ctMarkHost, strip_vlan, ofPortHost)) + + } + + // table 1, we check to see if this dest mac is the shared mac, if so send to host + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=10, table=1, %s dl_dst=%s, actions=%soutput:%s", + defaultOpenFlowCookie, match_vlan, bridgeMacAddress, strip_vlan, ofPortHost)) + } + + defaultNetConfig := bridge.netConfig[types.DefaultNetworkName] + + // table 2, dispatch from Host -> OVN + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, table=2, "+ + "actions=set_field:%s->eth_dst,%soutput:%s", defaultOpenFlowCookie, + bridgeMacAddress, mod_vlan_id, defaultNetConfig.ofPortPatch)) + + // table 2, priority 200, dispatch from UDN -> Host -> OVN. These packets have + // already been SNATed to the UDN's masq IP or have been marked with the UDN's packet mark. + if config.IPv4Mode { + for _, netConfig := range bridge.patchedNetConfigs() { + if netConfig.isDefaultNetwork() { + continue + } + srcIPOrSubnet := netConfig.v4MasqIPs.ManagementPort.IP.String() + if util.IsRouteAdvertisementsEnabled() && netConfig.advertised.Load() { + var udnAdvertisedSubnets []*net.IPNet + for _, clusterEntry := range netConfig.subnets { + udnAdvertisedSubnets = append(udnAdvertisedSubnets, clusterEntry.CIDR) + } + // Filter subnets based on the clusterIP service family + // NOTE: We don't support more than 1 subnet CIDR of same family type; we only pick the first one + matchingIPFamilySubnet, err := util.MatchFirstIPNetFamily(false, udnAdvertisedSubnets) + if err != nil { + klog.Infof("Unable to determine IPV4 UDN subnet for the provided family isIPV6: %v", err) + continue + } + + // Use the filtered subnets for the flow compute instead of the masqueradeIP + srcIPOrSubnet = matchingIPFamilySubnet.String() + } + + // Drop traffic coming from the masquerade IP or the UDN subnet(for advertised UDNs) to ensure that + // isolation between networks is enforced. This handles the case where a pod on the UDN subnet is sending traffic to + // a service in another UDN. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=200, table=2, ip, ip_src=%s, "+ + "actions=drop", + defaultOpenFlowCookie, srcIPOrSubnet)) + + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=250, table=2, ip, pkt_mark=%s, "+ + "actions=set_field:%s->eth_dst,output:%s", + defaultOpenFlowCookie, netConfig.pktMark, + bridgeMacAddress, netConfig.ofPortPatch)) + } + } + + if config.IPv6Mode { + for _, netConfig := range bridge.patchedNetConfigs() { + if netConfig.isDefaultNetwork() { + continue + } + srcIPOrSubnet := netConfig.v6MasqIPs.ManagementPort.IP.String() + if util.IsRouteAdvertisementsEnabled() && netConfig.advertised.Load() { + var udnAdvertisedSubnets []*net.IPNet + for _, clusterEntry := range netConfig.subnets { + udnAdvertisedSubnets = append(udnAdvertisedSubnets, clusterEntry.CIDR) + } + // Filter subnets based on the clusterIP service family + // NOTE: We don't support more than 1 subnet CIDR of same family type; we only pick the first one + matchingIPFamilySubnet, err := util.MatchFirstIPNetFamily(true, udnAdvertisedSubnets) + if err != nil { + klog.Infof("Unable to determine IPV6 UDN subnet for the provided family isIPV6: %v", err) + continue + } + + // Use the filtered subnets for the flow compute instead of the masqueradeIP + srcIPOrSubnet = matchingIPFamilySubnet.String() + } + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=200, table=2, ip6, ipv6_src=%s, "+ + "actions=drop", + defaultOpenFlowCookie, srcIPOrSubnet)) + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=250, table=2, ip6, pkt_mark=%s, "+ + "actions=set_field:%s->eth_dst,output:%s", + defaultOpenFlowCookie, netConfig.pktMark, + bridgeMacAddress, netConfig.ofPortPatch)) + } + } + + // table 3, dispatch from OVN -> Host + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, table=3, %s "+ + "actions=move:NXM_OF_ETH_DST[]->NXM_OF_ETH_SRC[],set_field:%s->eth_dst,%soutput:%s", + defaultOpenFlowCookie, match_vlan, bridgeMacAddress, strip_vlan, ofPortHost)) + + // table 4, hairpinned pkts that need to go from OVN -> Host + // We need to SNAT and masquerade OVN GR IP, send to table 3 for dispatch to Host + if config.IPv4Mode { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, table=4,ip,"+ + "actions=ct(commit,zone=%d,nat(src=%s),table=3)", + defaultOpenFlowCookie, config.Default.OVNMasqConntrackZone, config.Gateway.MasqueradeIPs.V4OVNMasqueradeIP.String())) + } + if config.IPv6Mode { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, table=4,ipv6, "+ + "actions=ct(commit,zone=%d,nat(src=%s),table=3)", + defaultOpenFlowCookie, config.Default.OVNMasqConntrackZone, config.Gateway.MasqueradeIPs.V6OVNMasqueradeIP.String())) + } + // table 5, Host Reply traffic to hairpinned svc, need to unDNAT, send to table 2 + if config.IPv4Mode { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, table=5, ip, "+ + "actions=ct(commit,zone=%d,nat,table=2)", + defaultOpenFlowCookie, config.Default.HostMasqConntrackZone)) + } + if config.IPv6Mode { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, table=5, ipv6, "+ + "actions=ct(commit,zone=%d,nat,table=2)", + defaultOpenFlowCookie, config.Default.HostMasqConntrackZone)) + } + return dftFlows, nil +} + +func commonFlows(hostSubnets []*net.IPNet, bridge *bridgeConfiguration) ([]string, error) { + // CAUTION: when adding new flows where the in_port is ofPortPatch and the out_port is ofPortPhys, ensure + // that dl_src is included in match criteria! + ofPortPhys := bridge.ofPortPhys + bridgeMacAddress := bridge.macAddress.String() + ofPortHost := bridge.ofPortHost + bridgeIPs := bridge.ips + + var dftFlows []string + + strip_vlan := "" + match_vlan := "" + mod_vlan_id := "" + if config.Gateway.VLANID != 0 { + strip_vlan = "strip_vlan," + match_vlan = fmt.Sprintf("dl_vlan=%d,", config.Gateway.VLANID) + mod_vlan_id = fmt.Sprintf("mod_vlan_vid:%d,", config.Gateway.VLANID) + } + + if ofPortPhys != "" { + // table 0, we check to see if this dest mac is the shared mac, if so flood to all ports + actions := "" + for _, netConfig := range bridge.patchedNetConfigs() { + actions += "output:" + netConfig.ofPortPatch + "," + } + actions += strip_vlan + "NORMAL" + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=10, table=0, %s dl_dst=%s, actions=%s", + defaultOpenFlowCookie, match_vlan, bridgeMacAddress, actions)) + } + + // table 0, check packets coming from OVN have the correct mac address. Low priority flows that are a catch all + // for non-IP packets that would normally be forwarded with NORMAL action (table 0, priority 0 flow). + for _, netConfig := range bridge.patchedNetConfigs() { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=10, table=0, in_port=%s, dl_src=%s, actions=output:NORMAL", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress)) + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=9, table=0, in_port=%s, actions=drop", + defaultOpenFlowCookie, netConfig.ofPortPatch)) + } + + if config.IPv4Mode { + physicalIP, err := util.MatchFirstIPNetFamily(false, bridgeIPs) + if err != nil { + return nil, fmt.Errorf("unable to determine IPv4 physical IP of host: %v", err) + } + if ofPortPhys != "" { + for _, netConfig := range bridge.patchedNetConfigs() { + // table0, packets coming from egressIP pods that have mark 1008 on them + // will be SNAT-ed a final time into nodeIP to maintain consistency in traffic even if the GR + // SNATs these into egressIP prior to reaching external bridge. + // egressService pods will also undergo this SNAT to nodeIP since these features are tied + // together at the OVN policy level on the distributed router. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=105, in_port=%s, dl_src=%s, ip, pkt_mark=%s "+ + "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)),output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, ovnKubeNodeSNATMark, + config.Default.ConntrackZone, physicalIP.IP, netConfig.masqCTMark, ofPortPhys)) + + // table 0, packets coming from egressIP pods only from user defined networks. If an egressIP is assigned to + // this node, then all networks get a flow even if no pods on that network were selected for by this egressIP. + if util.IsNetworkSegmentationSupportEnabled() && config.OVNKubernetesFeature.EnableInterconnect && + config.Gateway.Mode != config.GatewayModeDisabled && bridge.eipMarkIPs != nil { + if netConfig.masqCTMark != ctMarkOVN { + for mark, eip := range bridge.eipMarkIPs.GetIPv4() { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=105, in_port=%s, dl_src=%s, ip, pkt_mark=%d, "+ + "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)), output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, mark, + config.Default.ConntrackZone, eip, netConfig.masqCTMark, ofPortPhys)) + } + } + } + + // table 0, packets coming from pods headed externally. Commit connections with ct_mark ctMarkOVN + // so that reverse direction goes back to the pods. + if netConfig.isDefaultNetwork() { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, in_port=%s, dl_src=%s, ip, "+ + "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, config.Default.ConntrackZone, + netConfig.masqCTMark, ofPortPhys)) + + // Allow (a) OVN->host traffic on the same node + // (b) host->host traffic on the same node + if config.Gateway.Mode == config.GatewayModeShared || config.Gateway.Mode == config.GatewayModeLocal { + dftFlows = append(dftFlows, hostNetworkNormalActionFlows(netConfig, bridgeMacAddress, hostSubnets, false)...) + } + } else { + // for UDN we additionally SNAT the packet from masquerade IP -> node IP + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, in_port=%s, dl_src=%s, ip, ip_src=%s, "+ + "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)), output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, netConfig.v4MasqIPs.GatewayRouter.IP, config.Default.ConntrackZone, + physicalIP.IP, netConfig.masqCTMark, ofPortPhys)) + } + } + + // table 0, packets coming from host Commit connections with ct_mark ctMarkHost + // so that reverse direction goes back to the host. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, in_port=%s, ip, "+ + "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), %soutput:%s", + defaultOpenFlowCookie, ofPortHost, config.Default.ConntrackZone, ctMarkHost, mod_vlan_id, ofPortPhys)) + } + if config.Gateway.Mode == config.GatewayModeLocal { + for _, netConfig := range bridge.patchedNetConfigs() { + // table 0, any packet coming from OVN send to host in LGW mode, host will take care of sending it outside if needed. + // exceptions are traffic for egressIP and egressGW features and ICMP related traffic which will hit the priority 100 flow instead of this. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=175, in_port=%s, tcp, nw_src=%s, "+ + "actions=ct(table=4,zone=%d)", + defaultOpenFlowCookie, netConfig.ofPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=175, in_port=%s, udp, nw_src=%s, "+ + "actions=ct(table=4,zone=%d)", + defaultOpenFlowCookie, netConfig.ofPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=175, in_port=%s, sctp, nw_src=%s, "+ + "actions=ct(table=4,zone=%d)", + defaultOpenFlowCookie, netConfig.ofPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) + // We send BFD traffic coming from OVN to outside directly using a higher priority flow + if ofPortPhys != "" { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=650, table=0, in_port=%s, dl_src=%s, udp, tp_dst=3784, actions=output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, ofPortPhys)) + } + } + } + + if ofPortPhys != "" { + // table 0, packets coming from external or other localnet ports. Send it through conntrack and + // resubmit to table 1 to know the state and mark of the connection. + // Note, there are higher priority rules that take care of traffic coming from LOCAL and OVN ports. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=50, ip, actions=ct(zone=%d, nat, table=1)", + defaultOpenFlowCookie, config.Default.ConntrackZone)) + } + } + + if config.IPv6Mode { + physicalIP, err := util.MatchFirstIPNetFamily(true, bridgeIPs) + if err != nil { + return nil, fmt.Errorf("unable to determine IPv6 physical IP of host: %v", err) + } + if ofPortPhys != "" { + for _, netConfig := range bridge.patchedNetConfigs() { + // table0, packets coming from egressIP pods that have mark 1008 on them + // will be DNAT-ed a final time into nodeIP to maintain consistency in traffic even if the GR + // DNATs these into egressIP prior to reaching external bridge. + // egressService pods will also undergo this SNAT to nodeIP since these features are tied + // together at the OVN policy level on the distributed router. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=105, in_port=%s, dl_src=%s, ipv6, pkt_mark=%s "+ + "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)),output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, ovnKubeNodeSNATMark, + config.Default.ConntrackZone, physicalIP.IP, netConfig.masqCTMark, ofPortPhys)) + + // table 0, packets coming from egressIP pods only from user defined networks. If an egressIP is assigned to + // this node, then all networks get a flow even if no pods on that network were selected for by this egressIP. + if util.IsNetworkSegmentationSupportEnabled() && config.OVNKubernetesFeature.EnableInterconnect && + config.Gateway.Mode != config.GatewayModeDisabled && bridge.eipMarkIPs != nil { + if netConfig.masqCTMark != ctMarkOVN { + for mark, eip := range bridge.eipMarkIPs.GetIPv6() { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=105, in_port=%s, dl_src=%s, ipv6, pkt_mark=%d, "+ + "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)), output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, mark, + config.Default.ConntrackZone, eip, netConfig.masqCTMark, ofPortPhys)) + } + } + } + + // table 0, packets coming from pods headed externally. Commit connections with ct_mark ctMarkOVN + // so that reverse direction goes back to the pods. + if netConfig.isDefaultNetwork() { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, in_port=%s, dl_src=%s, ipv6, "+ + "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, config.Default.ConntrackZone, netConfig.masqCTMark, ofPortPhys)) + + // Allow (a) OVN->host traffic on the same node + // (b) host->host traffic on the same node + if config.Gateway.Mode == config.GatewayModeShared || config.Gateway.Mode == config.GatewayModeLocal { + dftFlows = append(dftFlows, hostNetworkNormalActionFlows(netConfig, bridgeMacAddress, hostSubnets, true)...) + } + } else { + // for UDN we additionally SNAT the packet from masquerade IP -> node IP + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, in_port=%s, dl_src=%s, ipv6, ipv6_src=%s, "+ + "actions=ct(commit, zone=%d, nat(src=%s), exec(set_field:%s->ct_mark)), output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, netConfig.v6MasqIPs.GatewayRouter.IP, config.Default.ConntrackZone, + physicalIP.IP, netConfig.masqCTMark, ofPortPhys)) + } + } + + // table 0, packets coming from host. Commit connections with ct_mark ctMarkHost + // so that reverse direction goes back to the host. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=100, in_port=%s, ipv6, "+ + "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), %soutput:%s", + defaultOpenFlowCookie, ofPortHost, config.Default.ConntrackZone, ctMarkHost, mod_vlan_id, ofPortPhys)) + + } + if config.Gateway.Mode == config.GatewayModeLocal { + for _, netConfig := range bridge.patchedNetConfigs() { + // table 0, any packet coming from OVN send to host in LGW mode, host will take care of sending it outside if needed. + // exceptions are traffic for egressIP and egressGW features and ICMP related traffic which will hit the priority 100 flow instead of this. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=175, in_port=%s, tcp6, ipv6_src=%s, "+ + "actions=ct(table=4,zone=%d)", + defaultOpenFlowCookie, netConfig.ofPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=175, in_port=%s, udp6, ipv6_src=%s, "+ + "actions=ct(table=4,zone=%d)", + defaultOpenFlowCookie, netConfig.ofPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=175, in_port=%s, sctp6, ipv6_src=%s, "+ + "actions=ct(table=4,zone=%d)", + defaultOpenFlowCookie, netConfig.ofPortPatch, physicalIP.IP, config.Default.HostMasqConntrackZone)) + if ofPortPhys != "" { + // We send BFD traffic coming from OVN to outside directly using a higher priority flow + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=650, table=0, in_port=%s, dl_src=%s, udp6, tp_dst=3784, actions=output:%s", + defaultOpenFlowCookie, netConfig.ofPortPatch, bridgeMacAddress, ofPortPhys)) + } + } + } + if ofPortPhys != "" { + // table 0, packets coming from external. Send it through conntrack and + // resubmit to table 1 to know the state and mark of the connection. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=50, in_port=%s, ipv6, "+ + "actions=ct(zone=%d, nat, table=1)", defaultOpenFlowCookie, ofPortPhys, config.Default.ConntrackZone)) + } + } + // Egress IP is often configured on a node different from the one hosting the affected pod. + // Due to the fact that ovn-controllers on different nodes apply the changes independently, + // there is a chance that the pod traffic will reach the egress node before it configures the SNAT flows. + // Drop pod traffic that is not SNATed, excluding local pods(required for ICNIv2) + defaultNetConfig := bridge.netConfig[types.DefaultNetworkName] + if config.OVNKubernetesFeature.EnableEgressIP { + for _, clusterEntry := range config.Default.ClusterSubnets { + cidr := clusterEntry.CIDR + ipv := getIPv(cidr) + // table 0, drop packets coming from pods headed externally that were not SNATed. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=104, in_port=%s, %s, %s_src=%s, actions=drop", + defaultOpenFlowCookie, defaultNetConfig.ofPortPatch, ipv, ipv, cidr)) + } + for _, subnet := range defaultNetConfig.nodeSubnets { + ipv := getIPv(subnet) + if ofPortPhys != "" { + // table 0, commit connections from local pods. + // ICNIv2 requires that local pod traffic can leave the node without SNAT. + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=109, in_port=%s, dl_src=%s, %s, %s_src=%s"+ + "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), output:%s", + defaultOpenFlowCookie, defaultNetConfig.ofPortPatch, bridgeMacAddress, ipv, ipv, subnet, + config.Default.ConntrackZone, ctMarkOVN, ofPortPhys)) + } + } + } + + if ofPortPhys != "" { + for _, netConfig := range bridge.patchedNetConfigs() { + isNetworkAdvertised := netConfig.advertised.Load() + // disableSNATMultipleGWs only applies to default network + disableSNATMultipleGWs := netConfig.isDefaultNetwork() && config.Gateway.DisableSNATMultipleGWs + if !disableSNATMultipleGWs && !isNetworkAdvertised { + continue + } + output := netConfig.ofPortPatch + if isNetworkAdvertised && config.Gateway.Mode == config.GatewayModeLocal { + // except if advertised through BGP, go to kernel + // TODO: MEG enabled pods should still go through the patch port + // but holding this until + // https://issues.redhat.com/browse/FDP-646 is fixed, for now we + // are assuming MEG & BGP are not used together + output = ovsLocalPort + } + for _, clusterEntry := range netConfig.subnets { + cidr := clusterEntry.CIDR + ipv := getIPv(cidr) + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=15, table=1, %s, %s_dst=%s, "+ + "actions=output:%s", + defaultOpenFlowCookie, ipv, ipv, cidr, output)) + } + if output == netConfig.ofPortPatch { + // except node management traffic + for _, subnet := range netConfig.nodeSubnets { + mgmtIP := util.GetNodeManagementIfAddr(subnet) + ipv := getIPv(mgmtIP) + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=16, table=1, %s, %s_dst=%s, "+ + "actions=output:%s", + defaultOpenFlowCookie, ipv, ipv, mgmtIP.IP, ovsLocalPort), + ) + } + } + } + + // table 1, we check to see if this dest mac is the shared mac, if so send to host + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=10, table=1, %s dl_dst=%s, actions=%soutput:%s", + defaultOpenFlowCookie, match_vlan, bridgeMacAddress, strip_vlan, ofPortHost)) + + if config.IPv6Mode { + // REMOVEME(trozet) when https://bugzilla.kernel.org/show_bug.cgi?id=11797 is resolved + // must flood icmpv6 Route Advertisement and Neighbor Advertisement traffic as it fails to create a CT entry + for _, icmpType := range []int{types.RouteAdvertisementICMPType, types.NeighborAdvertisementICMPType} { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=14, table=1,icmp6,icmpv6_type=%d actions=FLOOD", + defaultOpenFlowCookie, icmpType)) + } + if ofPortPhys != "" { + // We send BFD traffic both on the host and in ovn + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=13, table=1, in_port=%s, udp6, tp_dst=3784, actions=output:%s,output:%s", + defaultOpenFlowCookie, ofPortPhys, defaultNetConfig.ofPortPatch, ofPortHost)) + } + } + + if config.IPv4Mode { + if ofPortPhys != "" { + // We send BFD traffic both on the host and in ovn + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=13, table=1, in_port=%s, udp, tp_dst=3784, actions=output:%s,output:%s", + defaultOpenFlowCookie, ofPortPhys, defaultNetConfig.ofPortPatch, ofPortHost)) + } + } + + // packets larger than known acceptable MTU need to go to kernel for + // potential fragmentation + // introduced specifically for replies to egress traffic not routed + // through the host + if config.Gateway.Mode == config.GatewayModeLocal && !config.Gateway.DisablePacketMTUCheck { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=10, table=11, reg0=0x1, "+ + "actions=output:%s", defaultOpenFlowCookie, ofPortHost)) + + // Send UDN destined traffic to right patch port + for _, netConfig := range bridge.patchedNetConfigs() { + if netConfig.masqCTMark != ctMarkOVN { + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=5, table=11, ct_mark=%s, "+ + "actions=output:%s", defaultOpenFlowCookie, netConfig.masqCTMark, netConfig.ofPortPatch)) + } + } + + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=1, table=11, "+ + "actions=output:%s", defaultOpenFlowCookie, defaultNetConfig.ofPortPatch)) + } + + // table 1, all other connections do normal processing + dftFlows = append(dftFlows, + fmt.Sprintf("cookie=%s, priority=0, table=1, actions=output:NORMAL", defaultOpenFlowCookie)) + } + + return dftFlows, nil +} + +func pmtudDropFlows(bridge *bridgeConfiguration, ipAddrs []string) []string { + var flows []string + if config.Gateway.Mode != config.GatewayModeShared { + return nil + } + for _, addr := range ipAddrs { + for _, netConfig := range bridge.patchedNetConfigs() { + flows = append(flows, + generateICMPFragmentationFlow(addr, outputPortDrop, netConfig.ofPortPatch, pmtudOpenFlowCookie, 700)) + } + } + + return flows +} + +// hostNetworkNormalActionFlows returns the flows that allow IP{v4,v6} traffic: +// a. from pods in the OVN network to pods in a localnet network, on the same node +// b. from pods on the host to pods in a localnet network, on the same node +// when the localnet is mapped to breth0. +// The expected srcMAC is the MAC address of breth0 and the expected hostSubnets is the host subnets found on the node +// primary interface. +func hostNetworkNormalActionFlows(netConfig *bridgeUDNConfiguration, srcMAC string, hostSubnets []*net.IPNet, isV6 bool) []string { + var flows []string + var ipFamily, ipFamilyDest string + + if isV6 { + ipFamily = "ipv6" + ipFamilyDest = "ipv6_dst" + } else { + ipFamily = "ip" + ipFamilyDest = "nw_dst" + } + + formatFlow := func(inPort, destIP, ctMark string) string { + // Matching IP traffic will be handled by the bridge instead of being output directly + // to the NIC by the existing flow at prio=100. + flowTemplate := "cookie=%s, priority=102, in_port=%s, dl_src=%s, %s, %s=%s, " + + "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), output:NORMAL" + return fmt.Sprintf(flowTemplate, + defaultOpenFlowCookie, + inPort, + srcMAC, + ipFamily, + ipFamilyDest, + destIP, + config.Default.ConntrackZone, + ctMark) + } + + // Traffic path (a): OVN->localnet for shared gw mode + if config.Gateway.Mode == config.GatewayModeShared { + for _, hostSubnet := range hostSubnets { + if utilnet.IsIPv6(hostSubnet.IP) != isV6 { + continue + } + flows = append(flows, formatFlow(netConfig.ofPortPatch, hostSubnet.String(), netConfig.masqCTMark)) + } + } + + // Traffic path (a): OVN->localnet for local gw mode + // Traffic path (b): host->localnet for both gw modes + for _, hostSubnet := range hostSubnets { + if utilnet.IsIPv6(hostSubnet.IP) != isV6 { + continue + } + flows = append(flows, formatFlow(ovsLocalPort, hostSubnet.String(), ctMarkHost)) + } + + if isV6 { + // IPv6 neighbor discovery uses ICMPv6 messages sent to a special destination (ff02::1:ff00:0/104) + // that is unrelated to the host subnets matched in the prio=102 flow above. + // Allow neighbor discovery by matching against ICMP type and ingress port. + formatICMPFlow := func(inPort, ctMark string, icmpType int) string { + icmpFlowTemplate := "cookie=%s, priority=102, in_port=%s, dl_src=%s, icmp6, icmpv6_type=%d, " + + "actions=ct(commit, zone=%d, exec(set_field:%s->ct_mark)), output:NORMAL" + return fmt.Sprintf(icmpFlowTemplate, + defaultOpenFlowCookie, + inPort, + srcMAC, + icmpType, + config.Default.ConntrackZone, + ctMark) + } + + for _, icmpType := range []int{types.NeighborSolicitationICMPType, types.NeighborAdvertisementICMPType} { + // Traffic path (a) for ICMP: OVN-> localnet for shared gw mode + if config.Gateway.Mode == config.GatewayModeShared { + flows = append(flows, + formatICMPFlow(netConfig.ofPortPatch, netConfig.masqCTMark, icmpType)) + } + + // Traffic path (a) for ICMP: OVN->localnet for local gw mode + // Traffic path (b) for ICMP: host->localnet for both gw modes + flows = append(flows, formatICMPFlow(ovsLocalPort, ctMarkHost, icmpType)) + } + } + return flows +} + +func setBridgeOfPorts(bridge *bridgeConfiguration) error { + bridge.Lock() + defer bridge.Unlock() + // Get ofport of patchPort + for _, netConfig := range bridge.netConfig { + if err := netConfig.setBridgeNetworkOfPortsInternal(); err != nil { + return fmt.Errorf("error setting bridge openflow ports for network with patchport %v: err: %v", netConfig.patchPort, err) + } + } + + if bridge.uplinkName != "" { + // Get ofport of physical interface + ofportPhys, stderr, err := util.GetOVSOfPort("get", "interface", bridge.uplinkName, "ofport") + if err != nil { + return fmt.Errorf("failed to get ofport of %s, stderr: %q, error: %v", + bridge.uplinkName, stderr, err) + } + bridge.ofPortPhys = ofportPhys + } + + // Get ofport representing the host. That is, host representor port in case of DPUs, ovsLocalPort otherwise. + if config.OvnKubeNode.Mode == types.NodeModeDPU { + var stderr string + hostRep, err := util.GetDPUHostInterface(bridge.bridgeName) + if err != nil { + return err + } + + bridge.ofPortHost, stderr, err = util.RunOVSVsctl("get", "interface", hostRep, "ofport") + if err != nil { + return fmt.Errorf("failed to get ofport of host interface %s, stderr: %q, error: %v", + hostRep, stderr, err) + } + } else { + var err error + if bridge.gwIfaceRep != "" { + bridge.ofPortHost, _, err = util.RunOVSVsctl("get", "interface", bridge.gwIfaceRep, "ofport") + if err != nil { + return fmt.Errorf("failed to get ofport of bypass rep %s, error: %v", bridge.gwIfaceRep, err) + } + } else { + bridge.ofPortHost = ovsLocalPort + } + } + + return nil +} + func newGateway( nodeName string, subnets []*net.IPNet, @@ -1425,9 +2403,7 @@ func newGateway( gatewayMode config.GatewayMode, ) (*gateway, error) { klog.Info("Creating new gateway") - gw := &gateway{ - nextHops: gwNextHops, - } + gw := &gateway{} if gatewayMode == config.GatewayModeLocal { if err := initLocalGateway(subnets, mgmtPort); err != nil { @@ -1444,19 +2420,37 @@ func newGateway( if exGwBridge != nil { gw.readyFunc = func() (bool, error) { - if !gwBridge.IsGatewayReady() { - return false, nil + gwBridge.Lock() + for _, netConfig := range gwBridge.netConfig { + ready, err := gatewayReady(netConfig.patchPort) + if err != nil || !ready { + gwBridge.Unlock() + return false, err + } } - if !exGwBridge.IsGatewayReady() { - return false, nil + gwBridge.Unlock() + exGwBridge.Lock() + for _, netConfig := range exGwBridge.netConfig { + exGWReady, err := gatewayReady(netConfig.patchPort) + if err != nil || !exGWReady { + exGwBridge.Unlock() + return false, err + } } + exGwBridge.Unlock() return true, nil } } else { gw.readyFunc = func() (bool, error) { - if !gwBridge.IsGatewayReady() { - return false, nil + gwBridge.Lock() + for _, netConfig := range gwBridge.netConfig { + ready, err := gatewayReady(netConfig.patchPort) + if err != nil || !ready { + gwBridge.Unlock() + return false, err + } } + gwBridge.Unlock() return true, nil } } @@ -1471,19 +2465,19 @@ func newGateway( // Program cluster.GatewayIntf to let non-pod traffic to go to host // stack klog.Info("Creating Gateway Openflow Manager") - err := gwBridge.SetOfPorts() + err := setBridgeOfPorts(gwBridge) if err != nil { return err } if exGwBridge != nil { - err = exGwBridge.SetOfPorts() + err = setBridgeOfPorts(exGwBridge) if err != nil { return err } } if util.IsNetworkSegmentationSupportEnabled() && config.OVNKubernetesFeature.EnableInterconnect && config.Gateway.Mode != config.GatewayModeDisabled { - gw.bridgeEIPAddrManager = egressip.NewBridgeEIPAddrManager(nodeName, gwBridge.GetBridgeName(), linkManager, kube, watchFactory.EgressIPInformer(), watchFactory.NodeCoreInformer()) - gwBridge.SetEIPMarkIPs(gw.bridgeEIPAddrManager.GetCache()) + gw.bridgeEIPAddrManager = newBridgeEIPAddrManager(nodeName, gwBridge.bridgeName, linkManager, kube, watchFactory.EgressIPInformer(), watchFactory.NodeCoreInformer()) + gwBridge.eipMarkIPs = gw.bridgeEIPAddrManager.GetCache() } gw.nodeIPManager = newAddressManager(nodeName, kube, mgmtPort, watchFactory, gwBridge) @@ -1491,15 +2485,15 @@ func newGateway( // Delete stale masquerade resources if there are any. This is to make sure that there // are no Linux resources with IP from old masquerade subnet when masquerade subnet // gets changed as part of day2 operation. - if err := deleteStaleMasqueradeResources(gwBridge.GetGatewayIface(), nodeName, watchFactory); err != nil { + if err := deleteStaleMasqueradeResources(gwBridge.gwIface, nodeName, watchFactory); err != nil { return fmt.Errorf("failed to remove stale masquerade resources: %w", err) } - if err := setNodeMasqueradeIPOnExtBridge(gwBridge.GetGatewayIface()); err != nil { - return fmt.Errorf("failed to set the node masquerade IP on the ext bridge %s: %v", gwBridge.GetGatewayIface(), err) + if err := setNodeMasqueradeIPOnExtBridge(gwBridge.gwIface); err != nil { + return fmt.Errorf("failed to set the node masquerade IP on the ext bridge %s: %v", gwBridge.gwIface, err) } - if err := addMasqueradeRoute(routeManager, gwBridge.GetGatewayIface(), nodeName, gwIPs, watchFactory); err != nil { + if err := addMasqueradeRoute(routeManager, gwBridge.gwIface, nodeName, gwIPs, watchFactory); err != nil { return fmt.Errorf("failed to set the node masquerade route to OVN: %v", err) } @@ -1523,7 +2517,7 @@ func newGateway( } if gw.nodePortWatcher != nil { npw, _ := gw.nodePortWatcher.(*nodePortWatcher) - npw.updateGatewayIPs() + npw.updateGatewayIPs(gw.nodeIPManager) } // Services create OpenFlow flows as well, need to update them all if gw.servicesRetryFramework != nil { @@ -1546,7 +2540,7 @@ func newGateway( gw.openflowManager.requestFlowSync() } - if err := addHostMACBindings(gwBridge.GetGatewayIface()); err != nil { + if err := addHostMACBindings(gwBridge.gwIface); err != nil { return fmt.Errorf("failed to add MAC bindings for service routing: %w", err) } @@ -1558,7 +2552,7 @@ func newGateway( } func newNodePortWatcher( - gwBridge *bridgeconfig.BridgeConfiguration, + gwBridge *bridgeConfiguration, ofm *openflowManager, nodeIPManager *addressManager, watchFactory factory.NodeWatchFactory, @@ -1567,10 +2561,10 @@ func newNodePortWatcher( // Get ofport of physical interface ofportPhys, stderr, err := util.GetOVSOfPort("--if-exists", "get", - "interface", gwBridge.GetUplinkName(), "ofport") + "interface", gwBridge.uplinkName, "ofport") if err != nil { return nil, fmt.Errorf("failed to get ofport of %s, stderr: %q, error: %v", - gwBridge.GetUplinkName(), stderr, err) + gwBridge.uplinkName, stderr, err) } // In the shared gateway mode, the NodePort service is handled by the OpenFlow flows configured @@ -1608,11 +2602,11 @@ func newNodePortWatcher( subnets = append(subnets, config.Kubernetes.ServiceCIDRs...) if config.Gateway.DisableForwarding { if err := initExternalBridgeServiceForwardingRules(subnets); err != nil { - return nil, fmt.Errorf("failed to add accept rules in forwarding table for bridge %s: err %v", gwBridge.GetGatewayIface(), err) + return nil, fmt.Errorf("failed to add accept rules in forwarding table for bridge %s: err %v", gwBridge.gwIface, err) } } else { if err := delExternalBridgeServiceForwardingRules(subnets); err != nil { - return nil, fmt.Errorf("failed to delete accept rules in forwarding table for bridge %s: err %v", gwBridge.GetGatewayIface(), err) + return nil, fmt.Errorf("failed to delete accept rules in forwarding table for bridge %s: err %v", gwBridge.gwIface, err) } } @@ -1623,14 +2617,14 @@ func newNodePortWatcher( } // Get Physical IPs of Node, Can be IPV4 IPV6 or both - gatewayIPv4, gatewayIPv6 := getGatewayFamilyAddrs(gwBridge.GetIPs()) + gatewayIPv4, gatewayIPv6 := getGatewayFamilyAddrs(gwBridge.ips) npw := &nodePortWatcher{ dpuMode: dpuMode, gatewayIPv4: gatewayIPv4, gatewayIPv6: gatewayIPv6, ofportPhys: ofportPhys, - gwBridge: gwBridge, + gwBridge: gwBridge.bridgeName, serviceInfo: make(map[ktypes.NamespacedName]*serviceConfig), nodeIPManager: nodeIPManager, ofm: ofm, @@ -1891,6 +2885,36 @@ func updateMasqueradeAnnotation(nodeName string, kube kube.Interface) error { return nil } +// generateIPFragmentReassemblyFlow adds flows in table 0 that send packets to a +// specific conntrack zone for reassembly with the same priority as node port +// flows that match on L4 fields. After reassembly packets are reinjected to +// table 0 again. This requires a conntrack immplementation that reassembles +// fragments. This reqreuiment is met for the kernel datapath with the netfilter +// module loaded. This reqreuiment is not met for the userspace datapath. +func generateIPFragmentReassemblyFlow(ofPortPhys string) []string { + flows := make([]string, 0, 2) + if config.IPv4Mode { + flows = append(flows, + fmt.Sprintf("cookie=%s, priority=110, table=0, in_port=%s, ip, nw_frag=yes, actions=ct(table=0,zone=%d)", + defaultOpenFlowCookie, + ofPortPhys, + config.Default.ReassemblyConntrackZone, + ), + ) + } + if config.IPv6Mode { + flows = append(flows, + fmt.Sprintf("cookie=%s, priority=110, table=0, in_port=%s, ipv6, nw_frag=yes, actions=ct(table=0,zone=%d)", + defaultOpenFlowCookie, + ofPortPhys, + config.Default.ReassemblyConntrackZone, + ), + ) + } + + return flows +} + // deleteStaleMasqueradeResources removes stale Linux resources when config.Gateway.V4MasqueradeSubnet // or config.Gateway.V6MasqueradeSubnet gets changed at day 2. func deleteStaleMasqueradeResources(bridgeName, nodeName string, wf factory.NodeWatchFactory) error { @@ -2024,6 +3048,14 @@ func deleteMasqueradeResources(link netlink.Link, staleMasqueradeIPs *config.Mas return utilerrors.Join(aggregatedErrors...) } +func getIPv(ipnet *net.IPNet) string { + prefix := "ip" + if utilnet.IsIPv6CIDR(ipnet) { + prefix = "ipv6" + } + return prefix +} + // configureAdvertisedUDNIsolationNFTables configures nftables to drop traffic generated locally towards advertised UDN subnets. // It sets up a nftables chain named nftablesUDNBGPOutputChain in the output hook with filter priority which drops // traffic originating from the local node destined to nftablesAdvertisedUDNsSet. diff --git a/go-controller/pkg/node/gateway_udn.go b/go-controller/pkg/node/gateway_udn.go index 9d3d0a75ac..d991fc74eb 100644 --- a/go-controller/pkg/node/gateway_udn.go +++ b/go-controller/pkg/node/gateway_udn.go @@ -6,6 +6,7 @@ import ( "net" "slices" "strings" + "sync/atomic" "time" "github.com/vishvananda/netlink" @@ -89,10 +90,149 @@ type UserDefinedNetworkGateway struct { // gwInterfaceIndex holds the link index of gateway interface gwInterfaceIndex int +} + +// UTILS Needed for UDN (also leveraged for default netInfo) in bridgeConfiguration + +// getBridgePortConfigurations returns a slice of Network port configurations along with the +// uplinkName and physical port's ofport value +func (b *bridgeConfiguration) getBridgePortConfigurations() ([]*bridgeUDNConfiguration, string, string) { + b.Lock() + defer b.Unlock() + var netConfigs []*bridgeUDNConfiguration + for _, netConfig := range b.netConfig { + netConfigs = append(netConfigs, netConfig.shallowCopy()) + } + return netConfigs, b.uplinkName, b.ofPortPhys +} + +// addNetworkBridgeConfig adds the patchport and ctMark value for the provided netInfo into the bridge configuration cache +func (b *bridgeConfiguration) addNetworkBridgeConfig( + nInfo util.NetInfo, + nodeSubnets []*net.IPNet, + masqCTMark, pktMark uint, + v6MasqIPs, v4MasqIPs *udn.MasqueradeIPs) error { + b.Lock() + defer b.Unlock() + + netName := nInfo.GetNetworkName() + patchPort := nInfo.GetNetworkScopedPatchPortName(b.bridgeName, b.nodeName) + + _, found := b.netConfig[netName] + if !found { + netConfig := &bridgeUDNConfiguration{ + patchPort: patchPort, + masqCTMark: fmt.Sprintf("0x%x", masqCTMark), + pktMark: fmt.Sprintf("0x%x", pktMark), + v4MasqIPs: v4MasqIPs, + v6MasqIPs: v6MasqIPs, + subnets: nInfo.Subnets(), + nodeSubnets: nodeSubnets, + } + netConfig.advertised.Store(util.IsPodNetworkAdvertisedAtNode(nInfo, b.nodeName)) + + b.netConfig[netName] = netConfig + } else { + klog.Warningf("Trying to update bridge config for network %s which already"+ + "exists in cache...networks are not mutable...ignoring update", nInfo.GetNetworkName()) + } + return nil +} + +// delNetworkBridgeConfig deletes the provided netInfo from the bridge configuration cache +func (b *bridgeConfiguration) delNetworkBridgeConfig(nInfo util.NetInfo) { + b.Lock() + defer b.Unlock() + + delete(b.netConfig, nInfo.GetNetworkName()) +} + +func (b *bridgeConfiguration) getNetworkBridgeConfig(networkName string) *bridgeUDNConfiguration { + b.Lock() + defer b.Unlock() + return b.netConfig[networkName] +} + +// getActiveNetworkBridgeConfigCopy returns a shallow copy of the network configuration corresponding to the +// provided netInfo. +// +// NOTE: if the network configuration can't be found or if the network is not patched by OVN +// yet this returns nil. +func (b *bridgeConfiguration) getActiveNetworkBridgeConfigCopy(networkName string) *bridgeUDNConfiguration { + b.Lock() + defer b.Unlock() + + if netConfig, found := b.netConfig[networkName]; found && netConfig.ofPortPatch != "" { + return netConfig.shallowCopy() + } + return nil +} + +func (b *bridgeConfiguration) patchedNetConfigs() []*bridgeUDNConfiguration { + result := make([]*bridgeUDNConfiguration, 0, len(b.netConfig)) + for _, netConfig := range b.netConfig { + if netConfig.ofPortPatch == "" { + continue + } + result = append(result, netConfig) + } + return result +} + +// END UDN UTILs for bridgeConfiguration + +// bridgeUDNConfiguration holds the patchport and ctMark +// information for a given network +type bridgeUDNConfiguration struct { + patchPort string + ofPortPatch string + masqCTMark string + pktMark string + v4MasqIPs *udn.MasqueradeIPs + v6MasqIPs *udn.MasqueradeIPs + subnets []config.CIDRNetworkEntry + nodeSubnets []*net.IPNet + advertised atomic.Bool +} + +func (netConfig *bridgeUDNConfiguration) shallowCopy() *bridgeUDNConfiguration { + copy := &bridgeUDNConfiguration{ + patchPort: netConfig.patchPort, + ofPortPatch: netConfig.ofPortPatch, + masqCTMark: netConfig.masqCTMark, + pktMark: netConfig.pktMark, + v4MasqIPs: netConfig.v4MasqIPs, + v6MasqIPs: netConfig.v6MasqIPs, + subnets: netConfig.subnets, + nodeSubnets: netConfig.nodeSubnets, + } + netConfig.advertised.Store(netConfig.advertised.Load()) + return copy +} - // save BGP state at the start of reconciliation loop run to handle it consistently throughout the run - isNetworkAdvertisedToDefaultVRF bool - isNetworkAdvertised bool +func (netConfig *bridgeUDNConfiguration) isDefaultNetwork() bool { + return netConfig.masqCTMark == ctMarkOVN +} + +func (netConfig *bridgeUDNConfiguration) setBridgeNetworkOfPortsInternal() error { + ofportPatch, stderr, err := util.GetOVSOfPort("get", "Interface", netConfig.patchPort, "ofport") + if err != nil { + return fmt.Errorf("failed while waiting on patch port %q to be created by ovn-controller and "+ + "while getting ofport. stderr: %v, error: %v", netConfig.patchPort, stderr, err) + } + netConfig.ofPortPatch = ofportPatch + return nil +} + +func setBridgeNetworkOfPorts(bridge *bridgeConfiguration, netName string) error { + bridge.Lock() + defer bridge.Unlock() + + netConfig, found := bridge.netConfig[netName] + if !found { + return fmt.Errorf("failed to find network %s configuration on bridge %s", netName, bridge.bridgeName) + } + return netConfig.setBridgeNetworkOfPortsInternal() } func NewUserDefinedNetworkGateway(netInfo util.NetInfo, node *corev1.Node, nodeLister listers.NodeLister, @@ -128,7 +268,7 @@ func NewUserDefinedNetworkGateway(netInfo util.NetInfo, node *corev1.Node, nodeL if gw.openflowManager == nil { return nil, fmt.Errorf("openflow manager has not been provided for network: %s", netInfo.GetNetworkName()) } - intfName := gw.openflowManager.defaultBridge.GetGatewayIface() + intfName := gw.openflowManager.defaultBridge.gwIface link, err := util.GetNetLinkOps().LinkByName(intfName) if err != nil { return nil, fmt.Errorf("unable to get link for %s, error: %v", intfName, err) @@ -166,9 +306,7 @@ func (udng *UserDefinedNetworkGateway) delMarkChain() error { chain := &knftables.Chain{ Name: GetUDNMarkChain(fmt.Sprintf("0x%x", udng.pktMark)), } - // Delete would return an error if we tried to delete a chain that didn't exist, so - // we do an Add first (which is a no-op if the chain already exists) and then Delete. - tx.Add(chain) + tx.Flush(chain) tx.Delete(chain) return nft.Run(context.TODO(), tx) } @@ -229,18 +367,18 @@ func (udng *UserDefinedNetworkGateway) AddNetwork() error { return fmt.Errorf("could not add VRF %s routes for network %s, err: %v", vrfDeviceName, udng.GetNetworkName(), err) } - udng.updateAdvertisementStatus() + isNetworkAdvertised := util.IsPodNetworkAdvertisedAtNode(udng.NetInfo, udng.node.Name) // create the iprules for this network - if err = udng.updateUDNVRFIPRules(); err != nil { + if err = udng.updateUDNVRFIPRules(isNetworkAdvertised); err != nil { return fmt.Errorf("failed to update IP rules for network %s: %w", udng.GetNetworkName(), err) } - if err = udng.updateAdvertisedUDNIsolationRules(); err != nil { + if err = udng.updateAdvertisedUDNIsolationRules(isNetworkAdvertised); err != nil { return fmt.Errorf("failed to update isolation rules for network %s: %w", udng.GetNetworkName(), err) } - if err := udng.updateUDNVRFIPRoute(); err != nil { + if err := udng.updateUDNVRFIPRoute(isNetworkAdvertised); err != nil { return fmt.Errorf("failed to update ip routes for network %s: %w", udng.GetNetworkName(), err) } @@ -251,25 +389,21 @@ func (udng *UserDefinedNetworkGateway) AddNetwork() error { } nodeSubnets, err := udng.getLocalSubnets() - var mgmtIPs []*net.IPNet - for _, subnet := range nodeSubnets { - mgmtIPs = append(mgmtIPs, udng.GetNodeManagementIP(subnet)) - } if err != nil { return fmt.Errorf("failed to get node subnets for network %s: %w", udng.GetNetworkName(), err) } - if err = udng.openflowManager.addNetwork(udng.NetInfo, nodeSubnets, mgmtIPs, udng.masqCTMark, udng.pktMark, udng.v6MasqIPs, udng.v4MasqIPs); err != nil { + if err = udng.openflowManager.addNetwork(udng.NetInfo, nodeSubnets, udng.masqCTMark, udng.pktMark, udng.v6MasqIPs, udng.v4MasqIPs); err != nil { return fmt.Errorf("could not add network %s: %v", udng.GetNetworkName(), err) } waiter := newStartupWaiterWithTimeout(waitForPatchPortTimeout) readyFunc := func() (bool, error) { - if err := udng.openflowManager.defaultBridge.SetNetworkOfPatchPort(udng.GetNetworkName()); err != nil { + if err := setBridgeNetworkOfPorts(udng.openflowManager.defaultBridge, udng.GetNetworkName()); err != nil { klog.V(3).Infof("Failed to set network %s's openflow ports for default bridge; error: %v", udng.GetNetworkName(), err) return false, nil } if udng.openflowManager.externalGatewayBridge != nil { - if err := udng.openflowManager.externalGatewayBridge.SetNetworkOfPatchPort(udng.GetNetworkName()); err != nil { + if err := setBridgeNetworkOfPorts(udng.openflowManager.externalGatewayBridge, udng.GetNetworkName()); err != nil { klog.V(3).Infof("Failed to set network %s's openflow ports for secondary bridge; error: %v", udng.GetNetworkName(), err) return false, nil } @@ -322,16 +456,18 @@ func (udng *UserDefinedNetworkGateway) DelNetwork() error { } } - err := udng.deleteAdvertisedUDNIsolationRules() - if err != nil { - return fmt.Errorf("failed to remove advertised UDN isolation rules for network %s: %w", udng.GetNetworkName(), err) + if util.IsPodNetworkAdvertisedAtNode(udng.NetInfo, udng.node.Name) { + err := udng.updateAdvertisedUDNIsolationRules(false) + if err != nil { + return fmt.Errorf("failed to remove advertised UDN isolation rules for network %s: %w", udng.GetNetworkName(), err) + } } if err := udng.delMarkChain(); err != nil { return err } // delete the management port interface for this network - err = udng.deleteUDNManagementPort() + err := udng.deleteUDNManagementPort() if err != nil { return err } @@ -357,7 +493,7 @@ func (udng *UserDefinedNetworkGateway) addUDNManagementPort() (netlink.Link, err if len(networkLocalSubnets) == 0 { return nil, fmt.Errorf("cannot determine subnets while configuring management port for network: %s", udng.GetNetworkName()) } - macAddr := util.IPAddrToHWAddr(udng.GetNodeManagementIP(networkLocalSubnets[0]).IP) + macAddr := util.IPAddrToHWAddr(util.GetNodeManagementIfAddr(networkLocalSubnets[0]).IP) // STEP1 stdout, stderr, err := util.RunOVSVsctl( @@ -428,7 +564,7 @@ func (udng *UserDefinedNetworkGateway) addUDNManagementPortIPs(mpLink netlink.Li // extract management port IP from subnets and add it to link for _, subnet := range networkLocalSubnets { if config.IPv6Mode && utilnet.IsIPv6CIDR(subnet) || config.IPv4Mode && utilnet.IsIPv4CIDR(subnet) { - ip := udng.GetNodeManagementIP(subnet) + ip := util.GetNodeManagementIfAddr(subnet) var err error var exists bool if exists, err = util.LinkAddrExist(mpLink, ip); err == nil && !exists { @@ -489,7 +625,8 @@ func (udng *UserDefinedNetworkGateway) computeRoutesForUDN(mpLink netlink.Link) // Route2: Add default route: default via 172.18.0.1 dev breth0 mtu 1400 // necessary for UDN CNI and host-networked pods default traffic to go to node's gatewayIP - defaultRoute, err := udng.getDefaultRouteExceptIfVRFLite() + isNetworkAdvertised := util.IsPodNetworkAdvertisedAtNode(udng.NetInfo, udng.node.Name) + defaultRoute, err := udng.getDefaultRoute(isNetworkAdvertised) if err != nil { return nil, fmt.Errorf("unable to add default route for network %s, err: %v", udng.GetNetworkName(), err) } @@ -532,7 +669,7 @@ func (udng *UserDefinedNetworkGateway) computeRoutesForUDN(mpLink netlink.Link) return nil, err } for _, localSubnet := range networkLocalSubnets { - gwIP := udng.GetNodeGatewayIP(localSubnet) + gwIP := util.GetNodeGatewayIfAddr(localSubnet) if gwIP == nil { return nil, fmt.Errorf("unable to find gateway IP for network %s, subnet: %s", udng.GetNetworkName(), localSubnet) } @@ -590,7 +727,15 @@ func (udng *UserDefinedNetworkGateway) computeRoutesForUDN(mpLink netlink.Link) return retVal, nil } -func (udng *UserDefinedNetworkGateway) getDefaultRoute() ([]netlink.Route, error) { +func (udng *UserDefinedNetworkGateway) getDefaultRoute(isNetworkAdvertised bool) ([]netlink.Route, error) { + vrfs := udng.GetPodNetworkAdvertisedOnNodeVRFs(udng.node.Name) + // If the network is advertised on a non default VRF then we should only consider routes received from external BGP + // device and not send any traffic based on default route similar to one present in default VRF. This is more important + // for VRF-Lite usecase where we need traffic to leave from vlan device instead of default gateway interface. + if isNetworkAdvertised && !slices.Contains(vrfs, types.DefaultNetworkName) { + return nil, nil + } + networkMTU := udng.NetInfo.MTU() if networkMTU == 0 { networkMTU = config.Default.MTU @@ -598,7 +743,7 @@ func (udng *UserDefinedNetworkGateway) getDefaultRoute() ([]netlink.Route, error var retVal []netlink.Route var defaultAnyCIDR *net.IPNet - for _, nextHop := range udng.gateway.nextHops { + for _, nextHop := range udng.gateway.openflowManager.defaultBridge.nextHops { isV6 := utilnet.IsIPv6(nextHop) _, defaultAnyCIDR, _ = net.ParseCIDR("0.0.0.0/0") if isV6 { @@ -615,16 +760,6 @@ func (udng *UserDefinedNetworkGateway) getDefaultRoute() ([]netlink.Route, error return retVal, nil } -func (udng *UserDefinedNetworkGateway) getDefaultRouteExceptIfVRFLite() ([]netlink.Route, error) { - // If the network is advertised on a non default VRF then we should only consider routes received from external BGP - // device and not send any traffic based on default route similar to one present in default VRF. This is more important - // for VRF-Lite usecase where we need traffic to leave from vlan device instead of default gateway interface. - if udng.isNetworkAdvertised && !udng.isNetworkAdvertisedToDefaultVRF { - return nil, nil - } - return udng.getDefaultRoute() -} - // getV4MasqueradeIP returns the V4 management port masqueradeIP for this network func (udng *UserDefinedNetworkGateway) getV4MasqueradeIP() (*net.IPNet, error) { if !config.IPv4Mode { @@ -651,18 +786,18 @@ func (udng *UserDefinedNetworkGateway) getV6MasqueradeIP() (*net.IPNet, error) { // constructUDNVRFIPRules constructs rules that redirect matching packets // into the corresponding UDN VRF routing table. -// -// When a network is not advertised on the default VRF, an example of the rules -// we set for it is: -// 2000: from all fwmark 0x1001 lookup 1007 -// 2000: from all to 169.254.0.12 lookup 1007 -// -// When a network is advertised on the default VRF, an example of the rules -// we set for it is: +// If the network is not advertised, an example of the rules we set for a +// network is: +// 2000: from all fwmark 0x1001 lookup 1007 +// 2000: from all to 169.254.0.12 lookup 1007 +// 2000: from all fwmark 0x1002 lookup 1009 +// 2000: from all to 169.254.0.14 lookup 1009 +// If the network is advertised, an example of the rules we set for a network is: // 2000: from all fwmark 0x1001 lookup 1007 // 2000: from all to 10.132.0.0/14 lookup 1007 -// 2000: from all to 169.254.0.12 lookup 1007 -func (udng *UserDefinedNetworkGateway) constructUDNVRFIPRules() ([]netlink.Rule, []netlink.Rule, error) { +// 2000: from all fwmark 0x1001 lookup 1009 +// 2000: from all to 10.134.0.0/14 lookup 1009 +func (udng *UserDefinedNetworkGateway) constructUDNVRFIPRules(isNetworkAdvertised bool) ([]netlink.Rule, []netlink.Rule, error) { var addIPRules []netlink.Rule var delIPRules []netlink.Rule var masqIPRules []netlink.Rule @@ -695,14 +830,12 @@ func (udng *UserDefinedNetworkGateway) constructUDNVRFIPRules() ([]netlink.Rule, } } switch { - case udng.isNetworkAdvertisedToDefaultVRF: - // the network is advertised to the default VRF - addIPRules = append(addIPRules, masqIPRules...) - addIPRules = append(addIPRules, subnetIPRules...) - default: - // network is not advertised on the default VRF + case !isNetworkAdvertised: addIPRules = append(addIPRules, masqIPRules...) delIPRules = append(delIPRules, subnetIPRules...) + default: + addIPRules = append(addIPRules, subnetIPRules...) + delIPRules = append(delIPRules, masqIPRules...) } return addIPRules, delIPRules, nil } @@ -800,20 +933,19 @@ func (udng *UserDefinedNetworkGateway) doReconcile() error { return fmt.Errorf("openflow manager with default bridge configuration has not been provided for network %s", udng.GetNetworkName()) } - udng.updateAdvertisementStatus() - // update bridge configuration - netConfig := udng.openflowManager.defaultBridge.GetNetworkConfig(udng.GetNetworkName()) + isNetworkAdvertised := util.IsPodNetworkAdvertisedAtNode(udng.NetInfo, udng.node.Name) + netConfig := udng.openflowManager.defaultBridge.getNetworkBridgeConfig(udng.GetNetworkName()) if netConfig == nil { return fmt.Errorf("missing bridge configuration for network %s", udng.GetNetworkName()) } - netConfig.Advertised.Store(udng.isNetworkAdvertised) + netConfig.advertised.Store(isNetworkAdvertised) - if err := udng.updateUDNVRFIPRules(); err != nil { + if err := udng.updateUDNVRFIPRules(isNetworkAdvertised); err != nil { return fmt.Errorf("error while updating ip rule for UDN %s: %s", udng.GetNetworkName(), err) } - if err := udng.updateUDNVRFIPRoute(); err != nil { + if err := udng.updateUDNVRFIPRoute(isNetworkAdvertised); err != nil { return fmt.Errorf("error while updating ip route for UDN %s: %s", udng.GetNetworkName(), err) } @@ -827,16 +959,16 @@ func (udng *UserDefinedNetworkGateway) doReconcile() error { // let's sync these flows immediately udng.openflowManager.requestFlowSync() - if err := udng.updateAdvertisedUDNIsolationRules(); err != nil { + if err := udng.updateAdvertisedUDNIsolationRules(isNetworkAdvertised); err != nil { return fmt.Errorf("error while updating advertised UDN isolation rules for network %s: %w", udng.GetNetworkName(), err) } return nil } // updateUDNVRFIPRules updates IP rules for a network depending on whether the -// network is advertised to the default VRF or not -func (udng *UserDefinedNetworkGateway) updateUDNVRFIPRules() error { - addIPRules, deleteIPRules, err := udng.constructUDNVRFIPRules() +// network is advertised or not +func (udng *UserDefinedNetworkGateway) updateUDNVRFIPRules(isNetworkAdvertised bool) error { + addIPRules, deleteIPRules, err := udng.constructUDNVRFIPRules(isNetworkAdvertised) if err != nil { return fmt.Errorf("unable to get iprules for network %s, err: %v", udng.GetNetworkName(), err) } @@ -855,40 +987,30 @@ func (udng *UserDefinedNetworkGateway) updateUDNVRFIPRules() error { } // Add or remove default route from a vrf device based on the network is -// advertised on its own network or the default network -func (udng *UserDefinedNetworkGateway) updateUDNVRFIPRoute() error { - vrfName := util.GetNetworkVRFName(udng.NetInfo) - - switch { - case udng.isNetworkAdvertised && !udng.isNetworkAdvertisedToDefaultVRF: - // Remove default route for networks advertised to non-default VRF +// advertised on its own network or default network +func (udng *UserDefinedNetworkGateway) updateUDNVRFIPRoute(isNetworkAdvertised bool) error { + vrfs := udng.GetPodNetworkAdvertisedOnNodeVRFs(udng.node.Name) + if isNetworkAdvertised && !slices.Contains(vrfs, types.DefaultNetworkName) { if err := udng.removeDefaultRouteFromVRF(); err != nil { - return fmt.Errorf("failed to remove default route from VRF %s for network %s: %v", - vrfName, udng.GetNetworkName(), err) + return fmt.Errorf("error while removing default route from VRF %s corresponding to network %s: %s", + util.GetNetworkVRFName(udng.NetInfo), udng.GetNetworkName(), err) } - - default: - // Add default route for networks that are either: - // - not advertised - // - advertised to default VRF - defaultRoute, err := udng.getDefaultRouteExceptIfVRFLite() + } else if !isNetworkAdvertised || slices.Contains(vrfs, types.DefaultNetworkName) { + defaultRoute, err := udng.getDefaultRoute(isNetworkAdvertised) if err != nil { - return fmt.Errorf("failed to get default route for network %s: %v", - udng.GetNetworkName(), err) + return fmt.Errorf("unable to get default route for network %s, err: %v", udng.GetNetworkName(), err) } - - if err = udng.vrfManager.AddVRFRoutes(vrfName, defaultRoute); err != nil { - return fmt.Errorf("failed to add default route to VRF %s for network %s: %v", - vrfName, udng.GetNetworkName(), err) + if err = udng.vrfManager.AddVRFRoutes(util.GetNetworkVRFName(udng.NetInfo), defaultRoute); err != nil { + return fmt.Errorf("error while adding default route to VRF %s corresponding to network %s, err: %v", + util.GetNetworkVRFName(udng.NetInfo), udng.GetNetworkName(), err) } } - return nil } func (udng *UserDefinedNetworkGateway) removeDefaultRouteFromVRF() error { vrfDeviceName := util.GetNetworkVRFName(udng.NetInfo) - defaultRoute, err := udng.getDefaultRoute() + defaultRoute, err := udng.getDefaultRoute(false) if err != nil { return fmt.Errorf("unable to get default route for network %s, err: %v", udng.GetNetworkName(), err) } @@ -917,22 +1039,39 @@ func (udng *UserDefinedNetworkGateway) removeDefaultRouteFromVRF() error { // comment "advertised UDNs V4 subnets" // elements = { 10.10.0.0/16 comment "cluster_udn_l3network" } // } -func (udng *UserDefinedNetworkGateway) updateAdvertisedUDNIsolationRules() error { - switch { - case udng.isNetworkAdvertised: - return udng.addAdvertisedUDNIsolationRules() - default: - return udng.deleteAdvertisedUDNIsolationRules() - } -} - -func (udng *UserDefinedNetworkGateway) addAdvertisedUDNIsolationRules() error { +func (udng *UserDefinedNetworkGateway) updateAdvertisedUDNIsolationRules(isNetworkAdvertised bool) error { nft, err := nodenft.GetNFTablesHelper() if err != nil { return fmt.Errorf("failed to get nftables helper: %v", err) } tx := nft.NewTransaction() + if !isNetworkAdvertised { + existingV4, err := nft.ListElements(context.TODO(), "set", nftablesAdvertisedUDNsSetV4) + if err != nil { + if !knftables.IsNotFound(err) { + return fmt.Errorf("could not list existing items in %s set: %w", nftablesAdvertisedUDNsSetV4, err) + } + } + existingV6, err := nft.ListElements(context.TODO(), "set", nftablesAdvertisedUDNsSetV6) + if err != nil { + if !knftables.IsNotFound(err) { + return fmt.Errorf("could not list existing items in %s set: %w", nftablesAdvertisedUDNsSetV6, err) + } + } + + for _, elem := range append(existingV4, existingV6...) { + if elem.Comment != nil && *elem.Comment == udng.GetNetworkName() { + tx.Delete(elem) + } + } + + if tx.NumOperations() == 0 { + return nil + } + return nft.Run(context.TODO(), tx) + } + for _, udnNet := range udng.Subnets() { set := nftablesAdvertisedUDNsSetV4 if utilnet.IsIPv6CIDR(udnNet.CIDR) { @@ -951,41 +1090,3 @@ func (udng *UserDefinedNetworkGateway) addAdvertisedUDNIsolationRules() error { } return nft.Run(context.TODO(), tx) } - -func (udng *UserDefinedNetworkGateway) deleteAdvertisedUDNIsolationRules() error { - nft, err := nodenft.GetNFTablesHelper() - if err != nil { - return fmt.Errorf("failed to get nftables helper: %v", err) - } - tx := nft.NewTransaction() - - existingV4, err := nft.ListElements(context.TODO(), "set", nftablesAdvertisedUDNsSetV4) - if err != nil { - if !knftables.IsNotFound(err) { - return fmt.Errorf("could not list existing items in %s set: %w", nftablesAdvertisedUDNsSetV4, err) - } - } - existingV6, err := nft.ListElements(context.TODO(), "set", nftablesAdvertisedUDNsSetV6) - if err != nil { - if !knftables.IsNotFound(err) { - return fmt.Errorf("could not list existing items in %s set: %w", nftablesAdvertisedUDNsSetV6, err) - } - } - - for _, elem := range append(existingV4, existingV6...) { - if elem.Comment != nil && *elem.Comment == udng.GetNetworkName() { - tx.Delete(elem) - } - } - - if tx.NumOperations() == 0 { - return nil - } - return nft.Run(context.TODO(), tx) -} - -func (udng *UserDefinedNetworkGateway) updateAdvertisementStatus() { - vrfs := udng.GetPodNetworkAdvertisedOnNodeVRFs(udng.node.Name) - udng.isNetworkAdvertised = len(vrfs) > 0 - udng.isNetworkAdvertisedToDefaultVRF = slices.Contains(vrfs, types.DefaultNetworkName) -} diff --git a/go-controller/pkg/node/gateway_udn_test.go b/go-controller/pkg/node/gateway_udn_test.go index 4611ea97ed..575d8bc9c8 100644 --- a/go-controller/pkg/node/gateway_udn_test.go +++ b/go-controller/pkg/node/gateway_udn_test.go @@ -21,6 +21,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes/fake" + utilnet "k8s.io/utils/net" "k8s.io/utils/ptr" "sigs.k8s.io/knftables" @@ -31,7 +32,6 @@ import ( factoryMocks "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory/mocks" kubemocks "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube/mocks" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/networkmanager" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/bridgeconfig" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/iprulemanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/managementport" nodenft "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/nftables" @@ -237,13 +237,115 @@ func openflowManagerCheckPorts(ofMgr *openflowManager) { GinkgoHelper() netConfigs, uplink, ofPortPhys := ofMgr.getDefaultBridgePortConfigurations() sort.SliceStable(netConfigs, func(i, j int) bool { - return netConfigs[i].PatchPort < netConfigs[j].PatchPort + return netConfigs[i].patchPort < netConfigs[j].patchPort }) Expect(checkPorts(netConfigs, uplink, ofPortPhys)).To(Succeed()) } +func checkDefaultSvcIsolationOVSFlows(flows []string, defaultConfig *bridgeUDNConfiguration, ofPortHost, bridgeMAC string, svcCIDR *net.IPNet) { + By(fmt.Sprintf("Checking default service isolation flows for %s", svcCIDR.String())) + + var masqIP string + var masqSubnet string + var protoPrefix string + if utilnet.IsIPv4CIDR(svcCIDR) { + protoPrefix = "ip" + masqIP = config.Gateway.MasqueradeIPs.V4HostMasqueradeIP.String() + masqSubnet = config.Gateway.V4MasqueradeSubnet + } else { + protoPrefix = "ip6" + masqIP = config.Gateway.MasqueradeIPs.V6HostMasqueradeIP.String() + masqSubnet = config.Gateway.V6MasqueradeSubnet + } + + var nTable0DefaultFlows int + var nTable0UDNMasqFlows int + var nTable2Flows int + for _, flow := range flows { + if strings.Contains(flow, fmt.Sprintf("priority=500, in_port=%s, %s, %s_dst=%s, actions=ct(commit,zone=%d,nat(src=%s),table=2)", + ofPortHost, protoPrefix, protoPrefix, svcCIDR, config.Default.HostMasqConntrackZone, + masqIP)) { + nTable0DefaultFlows++ + } else if strings.Contains(flow, fmt.Sprintf("priority=550, in_port=%s, %s, %s_src=%s, %s_dst=%s, actions=ct(commit,zone=%d,table=2)", + ofPortHost, protoPrefix, protoPrefix, masqSubnet, protoPrefix, svcCIDR, config.Default.HostMasqConntrackZone)) { + nTable0UDNMasqFlows++ + } else if strings.Contains(flow, fmt.Sprintf("priority=100, table=2, actions=set_field:%s->eth_dst,output:%s", + bridgeMAC, defaultConfig.ofPortPatch)) { + nTable2Flows++ + } + } + + Expect(nTable0DefaultFlows).To(Equal(1)) + Expect(nTable0UDNMasqFlows).To(Equal(1)) + Expect(nTable2Flows).To(Equal(1)) +} + +func checkAdvertisedUDNSvcIsolationOVSFlows(flows []string, netConfig *bridgeUDNConfiguration, netName string, svcCIDR *net.IPNet, expectedNFlows int) { + By(fmt.Sprintf("Checking advertsised UDN %s service isolation flows for %s; expected %d flows", + netName, svcCIDR.String(), expectedNFlows)) + + var matchingIPFamilySubnet *net.IPNet + var protoPrefix string + var udnAdvertisedSubnets []*net.IPNet + var err error + for _, clusterEntry := range netConfig.subnets { + udnAdvertisedSubnets = append(udnAdvertisedSubnets, clusterEntry.CIDR) + } + if utilnet.IsIPv4CIDR(svcCIDR) { + matchingIPFamilySubnet, err = util.MatchFirstIPNetFamily(false, udnAdvertisedSubnets) + Expect(err).ToNot(HaveOccurred()) + protoPrefix = "ip" + } else { + matchingIPFamilySubnet, err = util.MatchFirstIPNetFamily(false, udnAdvertisedSubnets) + Expect(err).ToNot(HaveOccurred()) + protoPrefix = "ip6" + } + + var nFlows int + for _, flow := range flows { + if strings.Contains(flow, fmt.Sprintf("priority=200, table=2, %s, %s_src=%s, actions=drop", + protoPrefix, protoPrefix, matchingIPFamilySubnet)) { + nFlows++ + } + if strings.Contains(flow, fmt.Sprintf("priority=550, in_port=LOCAL, %s, %s_src=%s, %s_dst=%s, actions=ct(commit,zone=64001,table=2)", + protoPrefix, protoPrefix, matchingIPFamilySubnet, protoPrefix, svcCIDR)) { + nFlows++ + } + } + + Expect(nFlows).To(Equal(expectedNFlows)) +} + +func checkUDNSvcIsolationOVSFlows(flows []string, netConfig *bridgeUDNConfiguration, netName string, svcCIDR *net.IPNet, expectedNFlows int) { + By(fmt.Sprintf("Checking UDN %s service isolation flows for %s; expected %d flows", + netName, svcCIDR.String(), expectedNFlows)) + + var mgmtMasqIP string + var protoPrefix string + if utilnet.IsIPv4CIDR(svcCIDR) { + mgmtMasqIP = netConfig.v4MasqIPs.ManagementPort.IP.String() + protoPrefix = "ip" + } else { + mgmtMasqIP = netConfig.v6MasqIPs.ManagementPort.IP.String() + protoPrefix = "ip6" + } + + var nFlows int + for _, flow := range flows { + if strings.Contains(flow, fmt.Sprintf("priority=200, table=2, %s, %s_src=%s, actions=drop", + protoPrefix, protoPrefix, mgmtMasqIP)) { + nFlows++ + } + } + + Expect(nFlows).To(Equal(expectedNFlows)) +} + func getDummyOpenflowManager() *openflowManager { - gwBridge := bridgeconfig.TestBridgeConfig("breth0") + gwBridge := &bridgeConfiguration{ + gwIface: "breth0", + bridgeName: "breth0", + } ofm := &openflowManager{ defaultBridge: gwBridge, } @@ -667,22 +769,22 @@ var _ = Describe("UserDefinedNetworkGateway", func() { } } Expect(udnFlows).To(Equal(0)) - Expect(udnGateway.openflowManager.defaultBridge.GetNetConfigLen()).To(Equal(1)) // only default network + Expect(udnGateway.openflowManager.defaultBridge.netConfig).To(HaveLen(1)) // only default network Expect(udnGateway.AddNetwork()).To(Succeed()) flowMap = udnGateway.gateway.openflowManager.flowCache - Expect(flowMap["DEFAULT"]).To(HaveLen(64)) // 18 UDN Flows are added by default - Expect(udnGateway.openflowManager.defaultBridge.GetNetConfigLen()).To(Equal(2)) // default network + UDN network - defaultUdnConfig := udnGateway.openflowManager.defaultBridge.GetNetworkConfig("default") - bridgeUdnConfig := udnGateway.openflowManager.defaultBridge.GetNetworkConfig("bluenet") - bridgeMAC := udnGateway.openflowManager.defaultBridge.GetMAC().String() - ofPortHost := udnGateway.openflowManager.defaultBridge.GetOfPortHost() + Expect(flowMap["DEFAULT"]).To(HaveLen(64)) // 18 UDN Flows are added by default + Expect(udnGateway.openflowManager.defaultBridge.netConfig).To(HaveLen(2)) // default network + UDN network + defaultUdnConfig := udnGateway.openflowManager.defaultBridge.netConfig["default"] + bridgeUdnConfig := udnGateway.openflowManager.defaultBridge.netConfig["bluenet"] + bridgeMAC := udnGateway.openflowManager.defaultBridge.macAddress.String() + ofPortHost := udnGateway.openflowManager.defaultBridge.ofPortHost for _, flows := range flowMap { for _, flow := range flows { if strings.Contains(flow, fmt.Sprintf("0x%x", udnGateway.masqCTMark)) { // UDN Flow udnFlows++ - } else if strings.Contains(flow, fmt.Sprintf("in_port=%s", bridgeUdnConfig.OfPortPatch)) { + } else if strings.Contains(flow, fmt.Sprintf("in_port=%s", bridgeUdnConfig.ofPortPatch)) { udnFlows++ } } @@ -692,10 +794,10 @@ var _ = Describe("UserDefinedNetworkGateway", func() { for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { // Check flows for default network service CIDR. - bridgeconfig.CheckDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) + checkDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) // Expect exactly one flow per UDN for table 2 for service isolation. - bridgeconfig.CheckUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 1) + checkUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 1) } // The second call to checkPorts() will return no ofPort for the UDN - simulating a deletion that already was @@ -707,8 +809,8 @@ var _ = Describe("UserDefinedNetworkGateway", func() { kubeMock.On("UpdateNodeStatus", cnode).Return(nil) // check if network key gets deleted from annotation Expect(udnGateway.DelNetwork()).To(Succeed()) flowMap = udnGateway.gateway.openflowManager.flowCache - Expect(flowMap["DEFAULT"]).To(HaveLen(46)) // only default network flows are present - Expect(udnGateway.openflowManager.defaultBridge.GetNetConfigLen()).To(Equal(1)) // default network only + Expect(flowMap["DEFAULT"]).To(HaveLen(46)) // only default network flows are present + Expect(udnGateway.openflowManager.defaultBridge.netConfig).To(HaveLen(1)) // default network only udnFlows = 0 for _, flows := range flowMap { for _, flow := range flows { @@ -722,10 +824,10 @@ var _ = Describe("UserDefinedNetworkGateway", func() { for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { // Check flows for default network service CIDR. - bridgeconfig.CheckDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) + checkDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) // Expect no more flows per UDN for table 2 for service isolation. - bridgeconfig.CheckUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 0) + checkUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 0) } return nil }) @@ -898,22 +1000,22 @@ var _ = Describe("UserDefinedNetworkGateway", func() { } } Expect(udnFlows).To(Equal(0)) - Expect(udnGateway.openflowManager.defaultBridge.GetNetConfigLen()).To(Equal(1)) // only default network + Expect(udnGateway.openflowManager.defaultBridge.netConfig).To(HaveLen(1)) // only default network Expect(udnGateway.AddNetwork()).To(Succeed()) flowMap = udnGateway.gateway.openflowManager.flowCache - Expect(flowMap["DEFAULT"]).To(HaveLen(64)) // 18 UDN Flows are added by default - Expect(udnGateway.openflowManager.defaultBridge.GetNetConfigLen()).To(Equal(2)) // default network + UDN network - defaultUdnConfig := udnGateway.openflowManager.defaultBridge.GetNetworkConfig("default") - bridgeUdnConfig := udnGateway.openflowManager.defaultBridge.GetNetworkConfig("bluenet") - bridgeMAC := udnGateway.openflowManager.defaultBridge.GetMAC().String() - ofPortHost := udnGateway.openflowManager.defaultBridge.GetOfPortHost() + Expect(flowMap["DEFAULT"]).To(HaveLen(64)) // 18 UDN Flows are added by default + Expect(udnGateway.openflowManager.defaultBridge.netConfig).To(HaveLen(2)) // default network + UDN network + defaultUdnConfig := udnGateway.openflowManager.defaultBridge.netConfig["default"] + bridgeUdnConfig := udnGateway.openflowManager.defaultBridge.netConfig["bluenet"] + bridgeMAC := udnGateway.openflowManager.defaultBridge.macAddress.String() + ofPortHost := udnGateway.openflowManager.defaultBridge.ofPortHost for _, flows := range flowMap { for _, flow := range flows { if strings.Contains(flow, fmt.Sprintf("0x%x", udnGateway.masqCTMark)) { // UDN Flow udnFlows++ - } else if strings.Contains(flow, fmt.Sprintf("in_port=%s", bridgeUdnConfig.OfPortPatch)) { + } else if strings.Contains(flow, fmt.Sprintf("in_port=%s", bridgeUdnConfig.ofPortPatch)) { udnFlows++ } } @@ -923,10 +1025,10 @@ var _ = Describe("UserDefinedNetworkGateway", func() { for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { // Check flows for default network service CIDR. - bridgeconfig.CheckDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) + checkDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) // Expect exactly one flow per UDN for tables 0 and 2 for service isolation. - bridgeconfig.CheckUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 1) + checkUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 1) } // The second call to checkPorts() will return no ofPort for the UDN - simulating a deletion that already was @@ -938,8 +1040,8 @@ var _ = Describe("UserDefinedNetworkGateway", func() { kubeMock.On("UpdateNodeStatus", cnode).Return(nil) // check if network key gets deleted from annotation Expect(udnGateway.DelNetwork()).To(Succeed()) flowMap = udnGateway.gateway.openflowManager.flowCache - Expect(flowMap["DEFAULT"]).To(HaveLen(46)) // only default network flows are present - Expect(udnGateway.openflowManager.defaultBridge.GetNetConfigLen()).To(Equal(1)) // default network only + Expect(flowMap["DEFAULT"]).To(HaveLen(46)) // only default network flows are present + Expect(udnGateway.openflowManager.defaultBridge.netConfig).To(HaveLen(1)) // default network only udnFlows = 0 for _, flows := range flowMap { for _, flow := range flows { @@ -953,10 +1055,10 @@ var _ = Describe("UserDefinedNetworkGateway", func() { for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { // Check flows for default network service CIDR. - bridgeconfig.CheckDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) + checkDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) // Expect no more flows per UDN for tables 0 and 2 for service isolation. - bridgeconfig.CheckUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 0) + checkUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 0) } return nil }) @@ -1139,37 +1241,35 @@ var _ = Describe("UserDefinedNetworkGateway", func() { } } Expect(udnFlows).To(Equal(0)) - Expect(udnGateway.openflowManager.defaultBridge.GetNetConfigLen()).To(Equal(1)) // only default network + Expect(udnGateway.openflowManager.defaultBridge.netConfig).To(HaveLen(1)) // only default network Expect(udnGateway.AddNetwork()).To(Succeed()) flowMap = udnGateway.gateway.openflowManager.flowCache - Expect(flowMap["DEFAULT"]).To(HaveLen(73)) // 18 UDN Flows, 5 advertisedUDN flows, and 2 packet mark flows (IPv4+IPv6) are added by default - Expect(udnGateway.openflowManager.defaultBridge.GetNetConfigLen()).To(Equal(2)) // default network + UDN network - defaultUdnConfig := udnGateway.openflowManager.defaultBridge.GetNetworkConfig("default") - bridgeUdnConfig := udnGateway.openflowManager.defaultBridge.GetNetworkConfig("bluenet") - bridgeMAC := udnGateway.openflowManager.defaultBridge.GetMAC().String() - ofPortHost := udnGateway.openflowManager.defaultBridge.GetOfPortHost() + Expect(flowMap["DEFAULT"]).To(HaveLen(69)) // 18 UDN Flows and 5 advertisedUDN flows are added by default + Expect(udnGateway.openflowManager.defaultBridge.netConfig).To(HaveLen(2)) // default network + UDN network + defaultUdnConfig := udnGateway.openflowManager.defaultBridge.netConfig["default"] + bridgeUdnConfig := udnGateway.openflowManager.defaultBridge.netConfig["bluenet"] + bridgeMAC := udnGateway.openflowManager.defaultBridge.macAddress.String() + ofPortHost := udnGateway.openflowManager.defaultBridge.ofPortHost for _, flows := range flowMap { for _, flow := range flows { if strings.Contains(flow, fmt.Sprintf("0x%x", udnGateway.masqCTMark)) { // UDN Flow udnFlows++ - } else if strings.Contains(flow, fmt.Sprintf("in_port=%s", bridgeUdnConfig.OfPortPatch)) { + } else if strings.Contains(flow, fmt.Sprintf("in_port=%s", bridgeUdnConfig.ofPortPatch)) { udnFlows++ } } } - Expect(udnFlows).To(Equal(16)) + Expect(udnFlows).To(Equal(14)) openflowManagerCheckPorts(udnGateway.openflowManager) for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { // Check flows for default network service CIDR. - bridgeconfig.CheckDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) + checkDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) - // Expect exactly two flow per advertised UDN for table 2 and table 0 for service isolation. - // but one of the flows used by advertised UDNs is already tracked and used by default UDNs hence not - // counted here but in the check above for default svc isolation flows. - bridgeconfig.CheckAdvertisedUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 2) + // Expect exactly one flow per advertised UDN for table 2 and table 0 for service isolation. + checkAdvertisedUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 2) } // The second call to checkPorts() will return no ofPort for the UDN - simulating a deletion that already was @@ -1181,8 +1281,8 @@ var _ = Describe("UserDefinedNetworkGateway", func() { kubeMock.On("UpdateNodeStatus", cnode).Return(nil) // check if network key gets deleted from annotation Expect(udnGateway.DelNetwork()).To(Succeed()) flowMap = udnGateway.gateway.openflowManager.flowCache - Expect(flowMap["DEFAULT"]).To(HaveLen(46)) // only default network flows are present - Expect(udnGateway.openflowManager.defaultBridge.GetNetConfigLen()).To(Equal(1)) // default network only + Expect(flowMap["DEFAULT"]).To(HaveLen(46)) // only default network flows are present + Expect(udnGateway.openflowManager.defaultBridge.netConfig).To(HaveLen(1)) // default network only udnFlows = 0 for _, flows := range flowMap { for _, flow := range flows { @@ -1196,10 +1296,10 @@ var _ = Describe("UserDefinedNetworkGateway", func() { for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { // Check flows for default network service CIDR. - bridgeconfig.CheckDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) + checkDefaultSvcIsolationOVSFlows(flowMap["DEFAULT"], defaultUdnConfig, ofPortHost, bridgeMAC, svcCIDR) // Expect no more flows per UDN for table 2 and table0 for service isolation. - bridgeconfig.CheckAdvertisedUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 0) + checkAdvertisedUDNSvcIsolationOVSFlows(flowMap["DEFAULT"], bridgeUdnConfig, "bluenet", svcCIDR, 0) } return nil }) @@ -1382,8 +1482,8 @@ var _ = Describe("UserDefinedNetworkGateway", func() { err = testNS.Do(func(ns.NetNS) error { defer GinkgoRecover() ofm := getDummyOpenflowManager() - udnGateway, err := NewUserDefinedNetworkGateway(mutableNetInfo, node, nil, nil, vrf, nil, - &gateway{openflowManager: ofm, nextHops: ovntest.MustParseIPs(config.Gateway.NextHop)}) + ofm.defaultBridge.nextHops = ovntest.MustParseIPs(config.Gateway.NextHop) + udnGateway, err := NewUserDefinedNetworkGateway(mutableNetInfo, node, nil, nil, vrf, nil, &gateway{openflowManager: ofm}) Expect(err).NotTo(HaveOccurred()) mplink, err := netlink.LinkByName(mgtPort) Expect(err).NotTo(HaveOccurred()) @@ -1627,6 +1727,7 @@ func TestConstructUDNVRFIPRules(t *testing.T) { cidr := "" if config.IPv4Mode { cidr = "100.128.0.0/16/24" + } if config.IPv4Mode && config.IPv6Mode { cidr += ",ae70::/60/64" @@ -1656,7 +1757,7 @@ func TestConstructUDNVRFIPRules(t *testing.T) { }) g.Expect(err).NotTo(HaveOccurred()) udnGateway.vrfTableId = test.vrftableID - rules, delRules, err := udnGateway.constructUDNVRFIPRules() + rules, delRules, err := udnGateway.constructUDNVRFIPRules(false) g.Expect(err).ToNot(HaveOccurred()) for i, rule := range rules { g.Expect(rule.Priority).To(Equal(test.expectedRules[i].priority)) @@ -1678,7 +1779,7 @@ func TestConstructUDNVRFIPRules(t *testing.T) { } } -func TestConstructUDNVRFIPRulesPodNetworkAdvertisedToDefaultVRF(t *testing.T) { +func TestConstructUDNVRFIPRulesPodNetworkAdvertised(t *testing.T) { type testRule struct { priority int family int @@ -1706,12 +1807,6 @@ func TestConstructUDNVRFIPRulesPodNetworkAdvertisedToDefaultVRF(t *testing.T) { table: 1007, mark: 0x1003, }, - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V4, - table: 1007, - dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("169.254.0.16")), - }, { priority: UDNMasqueradeIPRulePriority, family: netlink.FAMILY_V4, @@ -1719,189 +1814,12 @@ func TestConstructUDNVRFIPRulesPodNetworkAdvertisedToDefaultVRF(t *testing.T) { dst: *ovntest.MustParseIPNet("100.128.0.0/16"), }, }, - v4mode: true, - }, - { - desc: "v6 rule test", - vrftableID: 1009, - expectedRules: []testRule{ - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V6, - table: 1009, - mark: 0x1003, - }, - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V6, - table: 1009, - dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("fd69::10")), - }, - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V6, - table: 1009, - dst: *ovntest.MustParseIPNet("ae70::/60"), - }, - }, - v6mode: true, - }, - { - desc: "dualstack rule test", - vrftableID: 1010, - expectedRules: []testRule{ - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V4, - table: 1010, - mark: 0x1003, - }, - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V6, - table: 1010, - mark: 0x1003, - }, - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V4, - table: 1010, - dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("169.254.0.16")), - }, - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V6, - table: 1010, - dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("fd69::10")), - }, - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V4, - table: 1010, - dst: *ovntest.MustParseIPNet("100.128.0.0/16"), - }, - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V6, - table: 1010, - dst: *ovntest.MustParseIPNet("ae70::/60"), - }, - }, - v4mode: true, - v6mode: true, - }, - } - config.Gateway.V6MasqueradeSubnet = "fd69::/112" - config.Gateway.V4MasqueradeSubnet = "169.254.0.0/16" - for _, test := range tests { - t.Run(test.desc, func(t *testing.T) { - g := NewWithT(t) - node := &corev1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Name: nodeName, - }, - } - config.IPv4Mode = test.v4mode - config.IPv6Mode = test.v6mode - cidr := "" - if config.IPv4Mode { - cidr = "100.128.0.0/16/24" - } - if config.IPv4Mode && config.IPv6Mode { - cidr += ",ae70::/60/64" - } else if config.IPv6Mode { - cidr = "ae70::/60/64" - } - nad := ovntest.GenerateNAD("bluenet", "rednad", "greenamespace", - types.Layer3Topology, cidr, types.NetworkRolePrimary) - ovntest.AnnotateNADWithNetworkID("3", nad) - netInfo, err := util.ParseNADInfo(nad) - g.Expect(err).ToNot(HaveOccurred()) - mutableNetInfo := util.NewMutableNetInfo(netInfo) - mutableNetInfo.SetPodNetworkAdvertisedVRFs(map[string][]string{node.Name: {"bluenet"}}) - ofm := getDummyOpenflowManager() - // create dummy gateway interface(Need to run this test as root) - err = netlink.LinkAdd(&netlink.Dummy{ - LinkAttrs: netlink.LinkAttrs{ - Name: "breth0", - }, - }) - g.Expect(err).NotTo(HaveOccurred()) - udnGateway, err := NewUserDefinedNetworkGateway(mutableNetInfo, node, nil, nil, nil, nil, &gateway{openflowManager: ofm}) - g.Expect(err).NotTo(HaveOccurred()) - // delete dummy gateway interface after creating UDN gateway(Need to run this test as root) - err = netlink.LinkDel(&netlink.Dummy{ - LinkAttrs: netlink.LinkAttrs{ - Name: "breth0", - }, - }) - g.Expect(err).NotTo(HaveOccurred()) - udnGateway.vrfTableId = test.vrftableID - udnGateway.isNetworkAdvertised = true - udnGateway.isNetworkAdvertisedToDefaultVRF = true - rules, delRules, err := udnGateway.constructUDNVRFIPRules() - g.Expect(err).ToNot(HaveOccurred()) - for i, rule := range rules { - g.Expect(rule.Priority).To(Equal(test.expectedRules[i].priority)) - g.Expect(rule.Table).To(Equal(test.expectedRules[i].table)) - g.Expect(rule.Family).To(Equal(test.expectedRules[i].family)) - if rule.Dst != nil { - g.Expect(*rule.Dst).To(Equal(test.expectedRules[i].dst)) - } else { - g.Expect(rule.Mark).To(Equal(test.expectedRules[i].mark)) - } - } - for i, rule := range delRules { - g.Expect(rule.Priority).To(Equal(test.deleteRules[i].priority)) - g.Expect(rule.Table).To(Equal(test.deleteRules[i].table)) - g.Expect(rule.Family).To(Equal(test.deleteRules[i].family)) - g.Expect(*rule.Dst).To(Equal(test.deleteRules[i].dst)) - } - }) - } -} - -func TestConstructUDNVRFIPRulesPodNetworkAdvertisedToNonDefaultVRF(t *testing.T) { - type testRule struct { - priority int - family int - table int - mark uint32 - dst net.IPNet - } - type testConfig struct { - desc string - vrftableID int - v4mode bool - v6mode bool - expectedRules []testRule - deleteRules []testRule - } - - tests := []testConfig{ - { - desc: "v4 rule test", - vrftableID: 1007, - expectedRules: []testRule{ - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V4, - table: 1007, - mark: 0x1003, - }, - { - priority: UDNMasqueradeIPRulePriority, - family: netlink.FAMILY_V4, - table: 1007, - dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("169.254.0.16")), - }, - }, deleteRules: []testRule{ { priority: UDNMasqueradeIPRulePriority, family: netlink.FAMILY_V4, table: 1007, - dst: *ovntest.MustParseIPNet("100.128.0.0/16"), + dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("169.254.0.16")), }, }, v4mode: true, @@ -1920,7 +1838,7 @@ func TestConstructUDNVRFIPRulesPodNetworkAdvertisedToNonDefaultVRF(t *testing.T) priority: UDNMasqueradeIPRulePriority, family: netlink.FAMILY_V6, table: 1009, - dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("fd69::10")), + dst: *ovntest.MustParseIPNet("ae70::/60"), }, }, deleteRules: []testRule{ @@ -1928,7 +1846,7 @@ func TestConstructUDNVRFIPRulesPodNetworkAdvertisedToNonDefaultVRF(t *testing.T) priority: UDNMasqueradeIPRulePriority, family: netlink.FAMILY_V6, table: 1009, - dst: *ovntest.MustParseIPNet("ae70::/60"), + dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("fd69::10")), }, }, v6mode: true, @@ -1953,13 +1871,13 @@ func TestConstructUDNVRFIPRulesPodNetworkAdvertisedToNonDefaultVRF(t *testing.T) priority: UDNMasqueradeIPRulePriority, family: netlink.FAMILY_V4, table: 1010, - dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("169.254.0.16")), + dst: *ovntest.MustParseIPNet("100.128.0.0/16"), }, { priority: UDNMasqueradeIPRulePriority, family: netlink.FAMILY_V6, table: 1010, - dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("fd69::10")), + dst: *ovntest.MustParseIPNet("ae70::/60"), }, }, deleteRules: []testRule{ @@ -1967,13 +1885,13 @@ func TestConstructUDNVRFIPRulesPodNetworkAdvertisedToNonDefaultVRF(t *testing.T) priority: UDNMasqueradeIPRulePriority, family: netlink.FAMILY_V4, table: 1010, - dst: *ovntest.MustParseIPNet("100.128.0.0/16"), + dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("169.254.0.16")), }, { priority: UDNMasqueradeIPRulePriority, family: netlink.FAMILY_V6, table: 1010, - dst: *ovntest.MustParseIPNet("ae70::/60"), + dst: *util.GetIPNetFullMaskFromIP(ovntest.MustParseIP("fd69::10")), }, }, v4mode: true, @@ -2026,12 +1944,8 @@ func TestConstructUDNVRFIPRulesPodNetworkAdvertisedToNonDefaultVRF(t *testing.T) }) g.Expect(err).NotTo(HaveOccurred()) udnGateway.vrfTableId = test.vrftableID - udnGateway.isNetworkAdvertised = true - udnGateway.isNetworkAdvertisedToDefaultVRF = false - rules, delRules, err := udnGateway.constructUDNVRFIPRules() + rules, delRules, err := udnGateway.constructUDNVRFIPRules(true) g.Expect(err).ToNot(HaveOccurred()) - g.Expect(rules).To(HaveLen(len(test.expectedRules))) - g.Expect(delRules).To(HaveLen(len(test.deleteRules))) for i, rule := range rules { g.Expect(rule.Priority).To(Equal(test.expectedRules[i].priority)) g.Expect(rule.Table).To(Equal(test.expectedRules[i].table)) @@ -2161,8 +2075,7 @@ func TestUserDefinedNetworkGateway_updateAdvertisedUDNIsolationRules(t *testing. udng := &UserDefinedNetworkGateway{ NetInfo: netInfo, } - udng.isNetworkAdvertised = tt.isNetworkAdvertised - err = udng.updateAdvertisedUDNIsolationRules() + err = udng.updateAdvertisedUDNIsolationRules(tt.isNetworkAdvertised) g.Expect(err).NotTo(HaveOccurred()) v4Elems, err := nft.ListElements(context.TODO(), "set", nftablesAdvertisedUDNsSetV4) diff --git a/go-controller/pkg/node/helper_linux.go b/go-controller/pkg/node/helper_linux.go index 8b46f05315..5e55173a4a 100644 --- a/go-controller/pkg/node/helper_linux.go +++ b/go-controller/pkg/node/helper_linux.go @@ -153,6 +153,23 @@ func getDefaultGatewayInterfaceByFamily(family int, gwIface string) (string, net return "", net.IP{}, nil } +func getIntfName(gatewayIntf string) (string, error) { + // The given (or autodetected) interface is an OVS bridge and this could be + // created by us using util.NicToBridge() or it was pre-created by the user. + + // Is intfName a port of gatewayIntf? + intfName, err := util.GetNicName(gatewayIntf) + if err != nil { + return "", err + } + _, stderr, err := util.RunOVSVsctl("get", "interface", intfName, "ofport") + if err != nil { + return "", fmt.Errorf("failed to get ofport of %s, stderr: %q, error: %v", + intfName, stderr, err) + } + return intfName, nil +} + // filterRoutesByIfIndex is a helper function that will sieve the provided routes and check // if they match the provided index. This used to be implemented with netlink.RT_FILTER_OIF, // however the problem is that this filtered out MultiPath IPv6 routes which have a LinkIndex of 0. diff --git a/go-controller/pkg/node/iptables/iptables_manager.go b/go-controller/pkg/node/iptables/iptables_manager.go index 1d8f31f1b0..b84516b9a1 100644 --- a/go-controller/pkg/node/iptables/iptables_manager.go +++ b/go-controller/pkg/node/iptables/iptables_manager.go @@ -67,8 +67,8 @@ func NewController() *Controller { return &Controller{ store: make(map[rulesIndex]rules, 0), mu: &sync.Mutex{}, - iptV4: iptables.New(iptables.ProtocolIPv4), - iptV6: iptables.New(iptables.ProtocolIPv6), + iptV4: iptables.New(kexec.New(), iptables.ProtocolIPv4), + iptV6: iptables.New(kexec.New(), iptables.ProtocolIPv6), } } diff --git a/go-controller/pkg/node/managementport/port_config.go b/go-controller/pkg/node/managementport/port_config.go index 6c7730570b..79ad4b7886 100644 --- a/go-controller/pkg/node/managementport/port_config.go +++ b/go-controller/pkg/node/managementport/port_config.go @@ -49,7 +49,7 @@ func newManagementPortConfig(node *corev1.Node, hostSubnets []*net.IPNet, netInf if len(hostSubnets) == 0 { return nil, fmt.Errorf("cannot determine subnets while configuring management port for network: %s", types.DefaultNetworkName) } - mpMAC = util.IPAddrToHWAddr(netInfo.GetNodeManagementIP(hostSubnets[0]).IP) + mpMAC = util.IPAddrToHWAddr(util.GetNodeManagementIfAddr(hostSubnets[0]).IP) } mpcfg := &managementPortConfig{ @@ -77,7 +77,7 @@ func newManagementPortConfig(node *corev1.Node, hostSubnets []*net.IPNet, netInf family = "IPv4" } - cfg, err := newManagementPortIPFamilyConfig(hostSubnet, isIPv6, netInfo) + cfg, err := newManagementPortIPFamilyConfig(hostSubnet, isIPv6) if err != nil { return nil, err } @@ -121,10 +121,10 @@ type managementPortIPFamilyConfig struct { gwIP net.IP } -func newManagementPortIPFamilyConfig(hostSubnet *net.IPNet, isIPv6 bool, netInfo util.NetInfo) (*managementPortIPFamilyConfig, error) { +func newManagementPortIPFamilyConfig(hostSubnet *net.IPNet, isIPv6 bool) (*managementPortIPFamilyConfig, error) { cfg := &managementPortIPFamilyConfig{ - ifAddr: netInfo.GetNodeManagementIP(hostSubnet), - gwIP: netInfo.GetNodeGatewayIP(hostSubnet).IP, + ifAddr: util.GetNodeManagementIfAddr(hostSubnet), + gwIP: util.GetNodeGatewayIfAddr(hostSubnet).IP, } // capture all the subnets for which we need to add routes through management port diff --git a/go-controller/pkg/node/managementport/port_linux.go b/go-controller/pkg/node/managementport/port_linux.go index 3699d37f8b..f6ea8676dd 100644 --- a/go-controller/pkg/node/managementport/port_linux.go +++ b/go-controller/pkg/node/managementport/port_linux.go @@ -138,7 +138,7 @@ func (c *managementPortController) start(stopChan <-chan struct{}) error { if config.Gateway.NodeportEnable { if config.OvnKubeNode.Mode == types.NodeModeFull { // (TODO): Internal Traffic Policy is not supported in DPU mode - if err := initMgmPortRoutingRules(c.cfg); err != nil { + if err := initMgmPortRoutingRules(c.cfg.hostSubnets); err != nil { return err } } @@ -696,11 +696,11 @@ func DelLegacyMgtPortIptRules() { // initMgmPortRoutingRules creates the routing table, routes and rules that // let's us forward service traffic to ovn-k8s-mp0 as opposed to the default // route towards breth0 -func initMgmPortRoutingRules(mgmtCfg *managementPortConfig) error { +func initMgmPortRoutingRules(hostSubnets []*net.IPNet) error { // create ovnkubeSvcViaMgmPortRT and service route towards ovn-k8s-mp0 - for _, hostSubnet := range mgmtCfg.hostSubnets { + for _, hostSubnet := range hostSubnets { isIPv6 := utilnet.IsIPv6CIDR(hostSubnet) - gatewayIP := mgmtCfg.netInfo.GetNodeGatewayIP(hostSubnet).IP.String() + gatewayIP := util.GetNodeGatewayIfAddr(hostSubnet).IP.String() for _, svcCIDR := range config.Kubernetes.ServiceCIDRs { if isIPv6 == utilnet.IsIPv6CIDR(svcCIDR) { if stdout, stderr, err := util.RunIP("route", "replace", "table", ovnkubeSvcViaMgmPortRT, svcCIDR.String(), "via", gatewayIP, "dev", types.K8sMgmtIntfName); err != nil { diff --git a/go-controller/pkg/node/managementport/port_linux_test.go b/go-controller/pkg/node/managementport/port_linux_test.go index 5187c4b418..13d7641c11 100644 --- a/go-controller/pkg/node/managementport/port_linux_test.go +++ b/go-controller/pkg/node/managementport/port_linux_test.go @@ -241,13 +241,10 @@ func testManagementPort(ctx *cli.Context, fexec *ovntest.FakeExec, testNS ns.Net nodeSubnetCIDRs := make([]*net.IPNet, len(configs)) mgtPortAddrs := make([]*netlink.Addr, len(configs)) - netInfo := &multinetworkmocks.NetInfo{} for i, cfg := range configs { nodeSubnetCIDRs[i] = cfg.GetNodeSubnetCIDR() mgtPortAddrs[i] = cfg.GetMgtPortAddr() - netInfo.On("GetNodeGatewayIP", nodeSubnetCIDRs[i]).Return(util.GetNodeGatewayIfAddr(nodeSubnetCIDRs[i])) - netInfo.On("GetNodeManagementIP", nodeSubnetCIDRs[i]).Return(util.GetNodeManagementIfAddr(nodeSubnetCIDRs[i])) } existingNode := corev1.Node{ObjectMeta: metav1.ObjectMeta{ @@ -266,11 +263,13 @@ func testManagementPort(ctx *cli.Context, fexec *ovntest.FakeExec, testNS ns.Net KubeClient: fakeClient, } + netInfo := &multinetworkmocks.NetInfo{} if isRoutingAdvertised { netInfo.On("GetPodNetworkAdvertisedOnNodeVRFs", nodeName).Return([]string{"vrf"}) } else { netInfo.On("GetPodNetworkAdvertisedOnNodeVRFs", nodeName).Return(nil) } + _, err = config.InitConfig(ctx, fexec, nil) Expect(err).NotTo(HaveOccurred()) kubeInterface := &kube.KubeOVN{Kube: kube.Kube{KClient: fakeClient}, ANPClient: anpfake.NewSimpleClientset(), @@ -354,11 +353,9 @@ func testManagementPortDPU(ctx *cli.Context, fexec *ovntest.FakeExec, testNS ns. Expect(err).NotTo(HaveOccurred()) nodeSubnetCIDRs := make([]*net.IPNet, len(configs)) - netInfo := &multinetworkmocks.NetInfo{} + for i, cfg := range configs { nodeSubnetCIDRs[i] = cfg.GetNodeSubnetCIDR() - netInfo.On("GetNodeGatewayIP", nodeSubnetCIDRs[i]).Return(util.GetNodeGatewayIfAddr(nodeSubnetCIDRs[i])) - netInfo.On("GetNodeManagementIP", nodeSubnetCIDRs[i]).Return(util.GetNodeManagementIfAddr(nodeSubnetCIDRs[i])) } existingNode := corev1.Node{ObjectMeta: metav1.ObjectMeta{ @@ -372,6 +369,7 @@ func testManagementPortDPU(ctx *cli.Context, fexec *ovntest.FakeExec, testNS ns. KubeClient: fakeClient, } + netInfo := &multinetworkmocks.NetInfo{} netInfo.On("GetPodNetworkAdvertisedOnNodeVRFs", nodeName).Return(nil) _, err = config.InitConfig(ctx, fexec, nil) @@ -459,14 +457,13 @@ func testManagementPortDPUHost(ctx *cli.Context, fexec *ovntest.FakeExec, testNS nodeSubnetCIDRs := make([]*net.IPNet, len(configs)) mgtPortAddrs := make([]*netlink.Addr, len(configs)) - netInfo := &multinetworkmocks.NetInfo{} + for i, cfg := range configs { nodeSubnetCIDRs[i] = cfg.GetNodeSubnetCIDR() mgtPortAddrs[i] = cfg.GetMgtPortAddr() - netInfo.On("GetNodeGatewayIP", nodeSubnetCIDRs[i]).Return(util.GetNodeGatewayIfAddr(nodeSubnetCIDRs[i])) - netInfo.On("GetNodeManagementIP", nodeSubnetCIDRs[i]).Return(util.GetNodeManagementIfAddr(nodeSubnetCIDRs[i])) } + netInfo := &multinetworkmocks.NetInfo{} netInfo.On("GetPodNetworkAdvertisedOnNodeVRFs", nodeName).Return(nil) _, err = config.InitConfig(ctx, fexec, nil) @@ -775,12 +772,10 @@ var _ = Describe("Management Port tests", func() { nft := nodenft.SetFakeNFTablesHelper() netInfo := &multinetworkmocks.NetInfo{} - nodeNet := ovntest.MustParseIPNet("10.1.1.0/24") - netInfo.On("GetPodNetworkAdvertisedOnNodeVRFs", "").Return(nil) - netInfo.On("GetNodeGatewayIP", nodeNet).Return(util.GetNodeGatewayIfAddr(nodeNet)) - netInfo.On("GetNodeManagementIP", nodeNet).Return(util.GetNodeManagementIfAddr(nodeNet)) + // Make a fake MgmtPortConfig with only the fields we care about + nodeNet := ovntest.MustParseIPNet("10.1.1.0/24") fakeMgmtPortIPFamilyConfig := managementPortIPFamilyConfig{ ifAddr: nodeNet, } @@ -1178,8 +1173,7 @@ var _ = Describe("Management Port tests", func() { netdevName, rep := "ens1f0v0", "ens1f0_0" netInfo := &multinetworkmocks.NetInfo{} netInfo.On("GetPodNetworkAdvertisedOnNodeVRFs", "worker-node").Return(nil) - netInfo.On("GetNodeGatewayIP", hostSubnets[0]).Return(util.GetNodeGatewayIfAddr(hostSubnets[0])) - netInfo.On("GetNodeManagementIP", hostSubnets[0]).Return(util.GetNodeManagementIfAddr(hostSubnets[0])) + It("Creates managementPort by default", func() { mgmtPort, err := NewManagementPortController(node, hostSubnets, netdevName, rep, nil, netInfo) Expect(err).NotTo(HaveOccurred()) diff --git a/go-controller/pkg/node/node_ip_handler_linux.go b/go-controller/pkg/node/node_ip_handler_linux.go index dcbbbfc7d6..a0c5ab21e8 100644 --- a/go-controller/pkg/node/node_ip_handler_linux.go +++ b/go-controller/pkg/node/node_ip_handler_linux.go @@ -20,7 +20,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/bridgeconfig" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/managementport" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" @@ -38,21 +37,21 @@ type addressManager struct { syncPeriod time.Duration // compare node primary IP change nodePrimaryAddr net.IP - gatewayBridge *bridgeconfig.BridgeConfiguration + gatewayBridge *bridgeConfiguration OnChanged func() sync.Mutex } // initializes a new address manager which will hold all the IPs on a node -func newAddressManager(nodeName string, k kube.Interface, mgmtPort managementport.Interface, watchFactory factory.NodeWatchFactory, gwBridge *bridgeconfig.BridgeConfiguration) *addressManager { +func newAddressManager(nodeName string, k kube.Interface, mgmtPort managementport.Interface, watchFactory factory.NodeWatchFactory, gwBridge *bridgeConfiguration) *addressManager { return newAddressManagerInternal(nodeName, k, mgmtPort, watchFactory, gwBridge, true) } // newAddressManagerInternal creates a new address manager; this function is // only expose for testcases to disable netlink subscription to ensure // reproducibility of unit tests. -func newAddressManagerInternal(nodeName string, k kube.Interface, mgmtPort managementport.Interface, watchFactory factory.NodeWatchFactory, gwBridge *bridgeconfig.BridgeConfiguration, useNetlink bool) *addressManager { +func newAddressManagerInternal(nodeName string, k kube.Interface, mgmtPort managementport.Interface, watchFactory factory.NodeWatchFactory, gwBridge *bridgeConfiguration, useNetlink bool) *addressManager { mgr := &addressManager{ nodeName: nodeName, watchFactory: watchFactory, @@ -65,11 +64,27 @@ func newAddressManagerInternal(nodeName string, k kube.Interface, mgmtPort manag } mgr.nodeAnnotator = kube.NewNodeAnnotator(k, nodeName) if config.OvnKubeNode.Mode == types.NodeModeDPU { - if err := mgr.updateHostCIDRs(); err != nil { + var ifAddrs []*net.IPNet + + // update k8s.ovn.org/host-cidrs + node, err := watchFactory.GetNode(nodeName) + if err != nil { + klog.Errorf("Failed to get node %s: %v", nodeName, err) + return nil + } + if useNetlink { + // get updated interface IP addresses for the gateway bridge + ifAddrs, err = gwBridge.updateInterfaceIPAddresses(node) + if err != nil { + klog.Errorf("Failed to obtain interface IP addresses for node %s: %v", nodeName, err) + return nil + } + } + if err = mgr.updateHostCIDRs(ifAddrs); err != nil { klog.Errorf("Failed to update host-cidrs annotations on node %s: %v", nodeName, err) return nil } - if err := mgr.nodeAnnotator.Run(); err != nil { + if err = mgr.nodeAnnotator.Run(); err != nil { klog.Errorf("Failed to set host-cidrs annotations on node %s: %v", nodeName, err) return nil } @@ -263,14 +278,14 @@ func (c *addressManager) updateNodeAddressAnnotations() error { if c.useNetlink { // get updated interface IP addresses for the gateway bridge - ifAddrs, err = c.gatewayBridge.UpdateInterfaceIPAddresses(node) + ifAddrs, err = c.gatewayBridge.updateInterfaceIPAddresses(node) if err != nil { return err } } // update k8s.ovn.org/host-cidrs - if err = c.updateHostCIDRs(); err != nil { + if err = c.updateHostCIDRs(ifAddrs); err != nil { return err } @@ -300,10 +315,14 @@ func (c *addressManager) updateNodeAddressAnnotations() error { return nil } -func (c *addressManager) updateHostCIDRs() error { +func (c *addressManager) updateHostCIDRs(ifAddrs []*net.IPNet) error { if config.OvnKubeNode.Mode == types.NodeModeDPU { - // For DPU mode, we don't need to update the host-cidrs annotation. - return nil + // For DPU mode, here we need to use the DPU host's IP address which is the tenant cluster's + // host internal IP address instead. + // Currently we are only intentionally supporting IPv4 for DPU here. + nodeIPNetv4, _ := util.MatchFirstIPNetFamily(false, ifAddrs) + nodeAddrSet := sets.New[string](nodeIPNetv4.String()) + return util.SetNodeHostCIDRs(c.nodeAnnotator, nodeAddrSet) } return util.SetNodeHostCIDRs(c.nodeAnnotator, c.cidrs) @@ -418,8 +437,7 @@ func (c *addressManager) isValidNodeIP(addr net.IP, linkIndex int) bool { if util.IsNetworkSegmentationSupportEnabled() && config.OVNKubernetesFeature.EnableInterconnect && config.Gateway.Mode != config.GatewayModeDisabled { // Two methods to lookup EIPs assigned to the gateway bridge. Fast path from a shared cache or slow path from node annotations. // At startup, gateway bridge cache gets sync - eipMarkIPs := c.gatewayBridge.GetEIPMarkIPs() - if eipMarkIPs != nil && eipMarkIPs.HasSyncdOnce() && eipMarkIPs.IsIPPresent(addr) { + if c.gatewayBridge.eipMarkIPs != nil && c.gatewayBridge.eipMarkIPs.HasSyncdOnce() && c.gatewayBridge.eipMarkIPs.IsIPPresent(addr) { return false } else { if eipAddresses, err := c.getPrimaryHostEgressIPs(); err != nil { diff --git a/go-controller/pkg/node/node_ip_handler_linux_test.go b/go-controller/pkg/node/node_ip_handler_linux_test.go index aa819cdb8a..ee10bbfc41 100644 --- a/go-controller/pkg/node/node_ip_handler_linux_test.go +++ b/go-controller/pkg/node/node_ip_handler_linux_test.go @@ -21,7 +21,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/bridgeconfig" nodenft "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/nftables" ovntest "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing" nodemocks "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing/mocks/github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node" @@ -402,7 +401,7 @@ func configureKubeOVNContext(nodeName string, useNetlink bool) *testCtx { mpmock := &nodemocks.ManagementPort{} mpmock.On("GetAddresses").Return([]*net.IPNet{tc.mgmtPortIP4, tc.mgmtPortIP6}) - fakeBridgeConfiguration := bridgeconfig.TestBridgeConfig("breth0") + fakeBridgeConfiguration := &bridgeConfiguration{bridgeName: "breth0", gwIface: "breth0"} k := &kube.Kube{KClient: tc.fakeClient} tc.ipManager = newAddressManagerInternal(nodeName, k, mpmock, tc.watchFactory, fakeBridgeConfiguration, useNetlink) diff --git a/go-controller/pkg/node/node_nftables.go b/go-controller/pkg/node/node_nftables.go index ca4afc9ac2..e52a8970a4 100644 --- a/go-controller/pkg/node/node_nftables.go +++ b/go-controller/pkg/node/node_nftables.go @@ -13,8 +13,8 @@ import ( const nftPMTUDChain = "no-pmtud" -// setupRemoteNodeNFTSets sets up the NFT sets that contain remote Kubernetes node IPs -func setupRemoteNodeNFTSets() error { +// setupPMTUDNFTSets sets up the NFT sets that contain remote Kubernetes node IPs +func setupPMTUDNFTSets() error { nft, err := nodenft.GetNFTablesHelper() if err != nil { return fmt.Errorf("failed to get nftables helper: %w", err) @@ -22,12 +22,12 @@ func setupRemoteNodeNFTSets() error { tx := nft.NewTransaction() tx.Add(&knftables.Set{ - Name: types.NFTRemoteNodeIPsv4, + Name: types.NFTNoPMTUDRemoteNodeIPsv4, Comment: knftables.PtrTo("Block egress ICMP needs frag to remote Kubernetes nodes"), Type: "ipv4_addr", }) tx.Add(&knftables.Set{ - Name: types.NFTRemoteNodeIPsv6, + Name: types.NFTNoPMTUDRemoteNodeIPsv6, Comment: knftables.PtrTo("Block egress ICMPv6 packet too big to remote Kubernetes nodes"), Type: "ipv6_addr", }) @@ -68,7 +68,7 @@ func setupPMTUDNFTChain() error { tx.Add(&knftables.Rule{ Chain: nftPMTUDChain, Rule: knftables.Concat( - "ip daddr @"+types.NFTRemoteNodeIPsv4, + "ip daddr @"+types.NFTNoPMTUDRemoteNodeIPsv4, "meta l4proto icmp", "icmp type 3", // type 3 == Destination Unreachable "icmp code 4", // code 4 indicates fragmentation needed @@ -85,7 +85,7 @@ func setupPMTUDNFTChain() error { "meta l4proto icmpv6", // match on ICMPv6 packets "icmpv6 type 2", // type 2 == Packet Too Big (PMTUD) "icmpv6 code 0", // code 0 for that message - "ip6 daddr @"+types.NFTRemoteNodeIPsv6, + "ip6 daddr @"+types.NFTNoPMTUDRemoteNodeIPsv6, counterIfDebug, "drop", // drop the packet ), diff --git a/go-controller/pkg/node/obj_retry_node.go b/go-controller/pkg/node/obj_retry_node.go index 646cca2ac3..9c9657678e 100644 --- a/go-controller/pkg/node/obj_retry_node.go +++ b/go-controller/pkg/node/obj_retry_node.go @@ -238,43 +238,34 @@ func (h *nodeEventHandler) UpdateResource(oldObj, newObj interface{}, _ bool) er return nil } - if util.NodeHostCIDRsAnnotationChanged(oldNode, newNode) { - // remote node that is changing - // Use GetNodeAddresses to get new node IPs - newIPsv4, newIPsv6, err := util.GetNodeAddresses(config.IPv4Mode, config.IPv6Mode, newNode) - if err != nil { - return fmt.Errorf("failed to get addresses for new node %q: %w", newNode.Name, err) + // remote node that is changing + ipsToKeep := map[string]bool{} + for _, address := range newNode.Status.Addresses { + if address.Type != corev1.NodeInternalIP { + continue } - - ipsToKeep := map[string]bool{} - for _, nodeIP := range newIPsv4 { - ipsToKeep[nodeIP.String()] = true + nodeIP := net.ParseIP(address.Address) + if nodeIP == nil { + continue } - for _, nodeIP := range newIPsv6 { - ipsToKeep[nodeIP.String()] = true + ipsToKeep[nodeIP.String()] = true + } + ipsToRemove := make([]net.IP, 0) + for _, address := range oldNode.Status.Addresses { + if address.Type != corev1.NodeInternalIP { + continue } - - // Use GetNodeAddresses to get old node IPs - oldIPsv4, oldIPsv6, err := util.GetNodeAddresses(config.IPv4Mode, config.IPv6Mode, oldNode) - if err != nil { - return fmt.Errorf("failed to get addresses for old node %q: %w", oldNode.Name, err) + nodeIP := net.ParseIP(address.Address) + if nodeIP == nil { + continue } - - ipsToRemove := make([]net.IP, 0) - for _, nodeIP := range oldIPsv4 { - if _, exists := ipsToKeep[nodeIP.String()]; !exists { - ipsToRemove = append(ipsToRemove, nodeIP) - } - } - for _, nodeIP := range oldIPsv6 { - if _, exists := ipsToKeep[nodeIP.String()]; !exists { - ipsToRemove = append(ipsToRemove, nodeIP) - } + if _, exists := ipsToKeep[nodeIP.String()]; !exists { + ipsToRemove = append(ipsToRemove, nodeIP) } + } - if err := removePMTUDNodeNFTRules(ipsToRemove); err != nil { - return fmt.Errorf("error removing node %q stale NFT rules during update: %w", oldNode.Name, err) - } + if err := removePMTUDNodeNFTRules(ipsToRemove); err != nil { + return fmt.Errorf("error removing node %q stale NFT rules during update: %w", oldNode.Name, err) } return h.nc.addOrUpdateNode(newNode) diff --git a/go-controller/pkg/node/openflow_manager.go b/go-controller/pkg/node/openflow_manager.go index 47a397766b..96b55a52e1 100644 --- a/go-controller/pkg/node/openflow_manager.go +++ b/go-controller/pkg/node/openflow_manager.go @@ -13,15 +13,13 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/bridgeconfig" - nodetypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" ) type openflowManager struct { - defaultBridge *bridgeconfig.BridgeConfiguration - externalGatewayBridge *bridgeconfig.BridgeConfiguration + defaultBridge *bridgeConfiguration + externalGatewayBridge *bridgeConfiguration // flow cache, use map instead of array for readability when debugging flowCache map[string][]string flowMutex sync.Mutex @@ -33,20 +31,20 @@ type openflowManager struct { // UTILs Needed for UDN (also leveraged for default netInfo) in openflowmanager -func (c *openflowManager) getDefaultBridgePortConfigurations() ([]*bridgeconfig.BridgeUDNConfiguration, string, string) { - return c.defaultBridge.GetPortConfigurations() +func (c *openflowManager) getDefaultBridgePortConfigurations() ([]*bridgeUDNConfiguration, string, string) { + return c.defaultBridge.getBridgePortConfigurations() } -func (c *openflowManager) getExGwBridgePortConfigurations() ([]*bridgeconfig.BridgeUDNConfiguration, string, string) { - return c.externalGatewayBridge.GetPortConfigurations() +func (c *openflowManager) getExGwBridgePortConfigurations() ([]*bridgeUDNConfiguration, string, string) { + return c.externalGatewayBridge.getBridgePortConfigurations() } -func (c *openflowManager) addNetwork(nInfo util.NetInfo, nodeSubnets, mgmtIPs []*net.IPNet, masqCTMark, pktMark uint, v6MasqIPs, v4MasqIPs *udn.MasqueradeIPs) error { - if err := c.defaultBridge.AddNetworkConfig(nInfo, nodeSubnets, mgmtIPs, masqCTMark, pktMark, v6MasqIPs, v4MasqIPs); err != nil { +func (c *openflowManager) addNetwork(nInfo util.NetInfo, nodeSubnets []*net.IPNet, masqCTMark, pktMark uint, v6MasqIPs, v4MasqIPs *udn.MasqueradeIPs) error { + if err := c.defaultBridge.addNetworkBridgeConfig(nInfo, nodeSubnets, masqCTMark, pktMark, v6MasqIPs, v4MasqIPs); err != nil { return err } if c.externalGatewayBridge != nil { - if err := c.externalGatewayBridge.AddNetworkConfig(nInfo, nodeSubnets, mgmtIPs, masqCTMark, pktMark, v6MasqIPs, v4MasqIPs); err != nil { + if err := c.externalGatewayBridge.addNetworkBridgeConfig(nInfo, nodeSubnets, masqCTMark, pktMark, v6MasqIPs, v4MasqIPs); err != nil { return err } } @@ -54,28 +52,34 @@ func (c *openflowManager) addNetwork(nInfo util.NetInfo, nodeSubnets, mgmtIPs [] } func (c *openflowManager) delNetwork(nInfo util.NetInfo) { - c.defaultBridge.DelNetworkConfig(nInfo) + c.defaultBridge.delNetworkBridgeConfig(nInfo) if c.externalGatewayBridge != nil { - c.externalGatewayBridge.DelNetworkConfig(nInfo) + c.externalGatewayBridge.delNetworkBridgeConfig(nInfo) } } -func (c *openflowManager) getActiveNetwork(nInfo util.NetInfo) *bridgeconfig.BridgeUDNConfiguration { - return c.defaultBridge.GetActiveNetworkBridgeConfigCopy(nInfo.GetNetworkName()) +func (c *openflowManager) getActiveNetwork(nInfo util.NetInfo) *bridgeUDNConfiguration { + return c.defaultBridge.getActiveNetworkBridgeConfigCopy(nInfo.GetNetworkName()) } // END UDN UTILs func (c *openflowManager) getDefaultBridgeName() string { - return c.defaultBridge.GetBridgeName() + c.defaultBridge.Lock() + defer c.defaultBridge.Unlock() + return c.defaultBridge.bridgeName } func (c *openflowManager) getDefaultBridgeMAC() net.HardwareAddr { - return c.defaultBridge.GetMAC() + c.defaultBridge.Lock() + defer c.defaultBridge.Unlock() + return c.defaultBridge.macAddress } func (c *openflowManager) setDefaultBridgeMAC(macAddr net.HardwareAddr) { - c.defaultBridge.SetMAC(macAddr) + c.defaultBridge.Lock() + defer c.defaultBridge.Unlock() + c.defaultBridge.macAddress = macAddr } func (c *openflowManager) updateFlowCacheEntry(key string, flows []string) { @@ -112,6 +116,10 @@ func (c *openflowManager) requestFlowSync() { } func (c *openflowManager) syncFlows() { + // protect gwBridge config from being updated by gw.nodeIPManager + c.defaultBridge.Lock() + defer c.defaultBridge.Unlock() + c.flowMutex.Lock() defer c.flowMutex.Unlock() @@ -120,12 +128,15 @@ func (c *openflowManager) syncFlows() { flows = append(flows, entry...) } - _, stderr, err := util.ReplaceOFFlows(c.defaultBridge.GetBridgeName(), flows) + _, stderr, err := util.ReplaceOFFlows(c.defaultBridge.bridgeName, flows) if err != nil { klog.Errorf("Failed to add flows, error: %v, stderr, %s, flows: %s", err, stderr, c.flowCache) } if c.externalGatewayBridge != nil { + c.externalGatewayBridge.Lock() + defer c.externalGatewayBridge.Unlock() + c.exGWFlowMutex.Lock() defer c.exGWFlowMutex.Unlock() @@ -134,7 +145,7 @@ func (c *openflowManager) syncFlows() { flows = append(flows, entry...) } - _, stderr, err := util.ReplaceOFFlows(c.externalGatewayBridge.GetBridgeName(), flows) + _, stderr, err := util.ReplaceOFFlows(c.externalGatewayBridge.bridgeName, flows) if err != nil { klog.Errorf("Failed to add flows, error: %v, stderr, %s, flows: %s", err, stderr, c.exGWFlowCache) } @@ -149,7 +160,7 @@ func (c *openflowManager) syncFlows() { // // -- to handle host -> service access, via masquerading from the host to OVN GR // -- to handle external -> service(ExternalTrafficPolicy: Local) -> host access without SNAT -func newGatewayOpenFlowManager(gwBridge, exGWBridge *bridgeconfig.BridgeConfiguration) (*openflowManager, error) { +func newGatewayOpenFlowManager(gwBridge, exGWBridge *bridgeConfiguration) (*openflowManager, error) { // add health check function to check default OpenFlow flows are on the shared gateway bridge ofm := &openflowManager{ defaultBridge: gwBridge, @@ -200,10 +211,16 @@ func (c *openflowManager) Run(stopChan <-chan struct{}, doneWg *sync.WaitGroup) } func (c *openflowManager) updateBridgePMTUDFlowCache(key string, ipAddrs []string) { - dftFlows := c.defaultBridge.PMTUDDropFlows(ipAddrs) + // protect defaultBridge config from being updated by gw.nodeIPManager + c.defaultBridge.Lock() + defer c.defaultBridge.Unlock() + + dftFlows := pmtudDropFlows(c.defaultBridge, ipAddrs) c.updateFlowCacheEntry(key, dftFlows) if c.externalGatewayBridge != nil { - exGWBridgeDftFlows := c.externalGatewayBridge.PMTUDDropFlows(ipAddrs) + c.externalGatewayBridge.Lock() + defer c.externalGatewayBridge.Unlock() + exGWBridgeDftFlows := pmtudDropFlows(c.externalGatewayBridge, ipAddrs) c.updateExBridgeFlowCacheEntry(key, exGWBridgeDftFlows) } } @@ -211,49 +228,59 @@ func (c *openflowManager) updateBridgePMTUDFlowCache(key string, ipAddrs []strin // updateBridgeFlowCache generates the "static" per-bridge flows // note: this is shared between shared and local gateway modes func (c *openflowManager) updateBridgeFlowCache(hostIPs []net.IP, hostSubnets []*net.IPNet) error { + // protect defaultBridge config from being updated by gw.nodeIPManager + c.defaultBridge.Lock() + defer c.defaultBridge.Unlock() + // CAUTION: when adding new flows where the in_port is ofPortPatch and the out_port is ofPortPhys, ensure // that dl_src is included in match criteria! - dftFlows, err := c.defaultBridge.DefaultBridgeFlows(hostSubnets, hostIPs) + dftFlows, err := flowsForDefaultBridge(c.defaultBridge, hostIPs) + if err != nil { + return err + } + dftCommonFlows, err := commonFlows(hostSubnets, c.defaultBridge) if err != nil { return err } + dftFlows = append(dftFlows, dftCommonFlows...) c.updateFlowCacheEntry("NORMAL", []string{fmt.Sprintf("table=0,priority=0,actions=%s\n", util.NormalAction)}) c.updateFlowCacheEntry("DEFAULT", dftFlows) // we consume ex gw bridge flows only if that is enabled if c.externalGatewayBridge != nil { - exGWBridgeDftFlows, err := c.externalGatewayBridge.ExternalBridgeFlows(hostSubnets) + c.externalGatewayBridge.Lock() + defer c.externalGatewayBridge.Unlock() + c.updateExBridgeFlowCacheEntry("NORMAL", []string{fmt.Sprintf("table=0,priority=0,actions=%s\n", util.NormalAction)}) + exGWBridgeDftFlows, err := commonFlows(hostSubnets, c.externalGatewayBridge) if err != nil { return err } - - c.updateExBridgeFlowCacheEntry("NORMAL", []string{fmt.Sprintf("table=0,priority=0,actions=%s\n", util.NormalAction)}) c.updateExBridgeFlowCacheEntry("DEFAULT", exGWBridgeDftFlows) } return nil } -func checkPorts(netConfigs []*bridgeconfig.BridgeUDNConfiguration, physIntf, ofPortPhys string) error { +func checkPorts(netConfigs []*bridgeUDNConfiguration, physIntf, ofPortPhys string) error { // it could be that the ovn-controller recreated the patch between the host OVS bridge and // the integration bridge, as a result the ofport number changed for that patch interface for _, netConfig := range netConfigs { - if netConfig.OfPortPatch == "" { + if netConfig.ofPortPatch == "" { continue } - curOfportPatch, stderr, err := util.GetOVSOfPort("--if-exists", "get", "Interface", netConfig.PatchPort, "ofport") + curOfportPatch, stderr, err := util.GetOVSOfPort("--if-exists", "get", "Interface", netConfig.patchPort, "ofport") if err != nil { - return fmt.Errorf("failed to get ofport of %s, stderr: %q: %w", netConfig.PatchPort, stderr, err) + return fmt.Errorf("failed to get ofport of %s, stderr: %q: %w", netConfig.patchPort, stderr, err) } - if netConfig.OfPortPatch != curOfportPatch { - if netConfig.IsDefaultNetwork() { + if netConfig.ofPortPatch != curOfportPatch { + if netConfig.isDefaultNetwork() { klog.Errorf("Fatal error: patch port %s ofport changed from %s to %s", - netConfig.PatchPort, netConfig.OfPortPatch, curOfportPatch) + netConfig.patchPort, netConfig.ofPortPatch, curOfportPatch) os.Exit(1) } else { - klog.Warningf("UDN patch port %s changed for existing network from %v to %v. Expecting bridge config update.", netConfig.PatchPort, netConfig.OfPortPatch, curOfportPatch) + klog.Warningf("UDN patch port %s changed for existing network from %v to %v. Expecting bridge config update.", netConfig.patchPort, netConfig.ofPortPatch, curOfportPatch) } } } @@ -335,10 +362,10 @@ func bootstrapOVSFlows(nodeName string) error { // for non-IP packets that would normally be forwarded with NORMAL action (table 0, priority 0 flow). dftFlows = append(dftFlows, fmt.Sprintf("cookie=%s, priority=10, table=0, in_port=%s, dl_src=%s, actions=output:NORMAL", - nodetypes.DefaultOpenFlowCookie, ofportPatch, bridgeMACAddress)) + defaultOpenFlowCookie, ofportPatch, bridgeMACAddress)) dftFlows = append(dftFlows, fmt.Sprintf("cookie=%s, priority=9, table=0, in_port=%s, actions=drop", - nodetypes.DefaultOpenFlowCookie, ofportPatch)) + defaultOpenFlowCookie, ofportPatch)) dftFlows = append(dftFlows, "priority=0, table=0, actions=output:NORMAL") _, stderr, err = util.ReplaceOFFlows(bridge, dftFlows) diff --git a/go-controller/pkg/node/ovn_test.go b/go-controller/pkg/node/ovn_test.go index ed1fe1d181..428ffe1770 100644 --- a/go-controller/pkg/node/ovn_test.go +++ b/go-controller/pkg/node/ovn_test.go @@ -88,7 +88,7 @@ func (o *FakeOVNNode) init(ctx context.Context) { Expect(err).NotTo(HaveOccurred()) cnnci := NewCommonNodeNetworkControllerInfo(o.fakeClient.KubeClient, o.fakeClient.AdminPolicyRouteClient, o.watcher, o.recorder, fakeNodeName, routemanager.NewController()) - o.nc = newDefaultNodeNetworkController(cnnci, o.stopChan, o.wg, routemanager.NewController(), nil, nil) + o.nc = newDefaultNodeNetworkController(cnnci, o.stopChan, o.wg, routemanager.NewController(), nil) // watcher is started by nodeControllerManager, not by nodeNetworkController, so start it here. Expect(o.watcher.Start()).To(Succeed()) Expect(o.nc.Init(ctx)).To(Succeed()) diff --git a/go-controller/pkg/node/secondary_node_network_controller.go b/go-controller/pkg/node/secondary_node_network_controller.go index e5c4eba83f..07e78c8690 100644 --- a/go-controller/pkg/node/secondary_node_network_controller.go +++ b/go-controller/pkg/node/secondary_node_network_controller.go @@ -9,7 +9,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/networkmanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/iprulemanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/vrfmanager" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" @@ -32,7 +31,6 @@ type SecondaryNodeNetworkController struct { func NewSecondaryNodeNetworkController( cnnci *CommonNodeNetworkControllerInfo, netInfo util.NetInfo, - networkManager networkmanager.Interface, vrfManager *vrfmanager.Controller, ruleManager *iprulemanager.Controller, defaultNetworkGateway Gateway, @@ -44,7 +42,6 @@ func NewSecondaryNodeNetworkController( ReconcilableNetInfo: util.NewReconcilableNetInfo(netInfo), stopChan: make(chan struct{}), wg: &sync.WaitGroup{}, - networkManager: networkManager, }, } if util.IsNetworkSegmentationSupportEnabled() && snnc.IsPrimaryNetwork() { diff --git a/go-controller/pkg/node/secondary_node_network_controller_test.go b/go-controller/pkg/node/secondary_node_network_controller_test.go index bd0fbaab09..a9d76c280d 100644 --- a/go-controller/pkg/node/secondary_node_network_controller_test.go +++ b/go-controller/pkg/node/secondary_node_network_controller_test.go @@ -85,7 +85,7 @@ var _ = Describe("SecondaryNodeNetworkController", func() { factoryMock.On("GetNodes").Return(nodeList, nil) NetInfo, err := util.ParseNADInfo(nad) Expect(err).NotTo(HaveOccurred()) - controller, err := NewSecondaryNodeNetworkController(&cnnci, NetInfo, nil, nil, nil, &gateway{}) + controller, err := NewSecondaryNodeNetworkController(&cnnci, NetInfo, nil, nil, &gateway{}) Expect(err).NotTo(HaveOccurred()) err = controller.Start(context.Background()) Expect(err).NotTo(HaveOccurred()) @@ -116,7 +116,7 @@ var _ = Describe("SecondaryNodeNetworkController", func() { Expect(err).NotTo(HaveOccurred()) getCreationFakeCommands(fexec, "ovn-k8s-mp3", mgtPortMAC, NetInfo.GetNetworkName(), "worker1", NetInfo.MTU()) ofm := getDummyOpenflowManager() - controller, err := NewSecondaryNodeNetworkController(&cnnci, NetInfo, nil, nil, nil, &gateway{openflowManager: ofm}) + controller, err := NewSecondaryNodeNetworkController(&cnnci, NetInfo, nil, nil, &gateway{openflowManager: ofm}) Expect(err).NotTo(HaveOccurred()) err = controller.Start(context.Background()) Expect(err).To(HaveOccurred()) // we don't have the gateway pieces setup so its expected to fail here @@ -144,7 +144,7 @@ var _ = Describe("SecondaryNodeNetworkController", func() { types.Layer3Topology, "100.128.0.0/16", types.NetworkRoleSecondary) NetInfo, err := util.ParseNADInfo(nad) Expect(err).NotTo(HaveOccurred()) - controller, err := NewSecondaryNodeNetworkController(&cnnci, NetInfo, nil, nil, nil, &gateway{}) + controller, err := NewSecondaryNodeNetworkController(&cnnci, NetInfo, nil, nil, &gateway{}) Expect(err).NotTo(HaveOccurred()) err = controller.Start(context.Background()) Expect(err).NotTo(HaveOccurred()) @@ -420,7 +420,7 @@ var _ = Describe("SecondaryNodeNetworkController: UserDefinedPrimaryNetwork Gate By("creating secondary network controller for user defined primary network") cnnci := CommonNodeNetworkControllerInfo{name: nodeName, watchFactory: &factoryMock} - controller, err := NewSecondaryNodeNetworkController(&cnnci, NetInfo, nil, vrf, ipRulesManager, localGw) + controller, err := NewSecondaryNodeNetworkController(&cnnci, NetInfo, vrf, ipRulesManager, localGw) Expect(err).NotTo(HaveOccurred()) Expect(controller.gateway).To(Not(BeNil())) Expect(controller.gateway.ruleManager).To(Not(BeNil())) diff --git a/go-controller/pkg/node/types/const.go b/go-controller/pkg/node/types/const.go deleted file mode 100644 index bdf9c388bf..0000000000 --- a/go-controller/pkg/node/types/const.go +++ /dev/null @@ -1,22 +0,0 @@ -package types - -const ( - // CtMarkOVN is the conntrack mark value for OVN traffic - CtMarkOVN = "0x1" - // OvsLocalPort is the name of the OVS bridge local port - OvsLocalPort = "LOCAL" - // DefaultOpenFlowCookie identifies default open flow rules added to the host OVS bridge. - // The hex number 0xdeff105, aka defflos, is meant to sound like default flows. - DefaultOpenFlowCookie = "0xdeff105" - // OutputPortDrop is used to signify that there is no output port for an openflow action and the - // rendered action should result in a drop - OutputPortDrop = "output-port-drop" - // OvnKubeNodeSNATMark is used to mark packets that need to be SNAT-ed to nodeIP for - // traffic originating from egressIP and egressService controlled pods towards other nodes in the cluster. - OvnKubeNodeSNATMark = "0x3f0" - // PmtudOpenFlowCookie identifies the flows used to drop ICMP type (3) destination unreachable, - // fragmentation-needed (4) - PmtudOpenFlowCookie = "0x0304" - // CtMarkHost is the conntrack mark value for host traffic - CtMarkHost = "0x2" -) diff --git a/go-controller/pkg/node/util/util.go b/go-controller/pkg/node/util/util.go deleted file mode 100644 index e04be61b39..0000000000 --- a/go-controller/pkg/node/util/util.go +++ /dev/null @@ -1,118 +0,0 @@ -package util - -import ( - "fmt" - "net" - - net2 "k8s.io/utils/net" - - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - nodetypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node/types" - pkgutil "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" -) - -// GetNetworkInterfaceIPAddresses returns the IP addresses for the network interface 'iface'. -func GetNetworkInterfaceIPAddresses(iface string) ([]*net.IPNet, error) { - allIPs, err := pkgutil.GetFilteredInterfaceV4V6IPs(iface) - if err != nil { - return nil, fmt.Errorf("could not find IP addresses: %v", err) - } - - var ips []*net.IPNet - var foundIPv4 bool - var foundIPv6 bool - for _, ip := range allIPs { - if net2.IsIPv6CIDR(ip) { - if config.IPv6Mode && !foundIPv6 { - // For IPv6 addresses with 128 prefix, let's try to find an appropriate subnet - // in the routing table - subnetIP, err := pkgutil.GetIPv6OnSubnet(iface, ip) - if err != nil { - return nil, fmt.Errorf("could not find IPv6 address on subnet: %v", err) - } - ips = append(ips, subnetIP) - foundIPv6 = true - } - } else if config.IPv4Mode && !foundIPv4 { - ips = append(ips, ip) - foundIPv4 = true - } - } - if config.IPv4Mode && !foundIPv4 { - return nil, fmt.Errorf("failed to find IPv4 address on interface %s", iface) - } else if config.IPv6Mode && !foundIPv6 { - return nil, fmt.Errorf("failed to find IPv6 address on interface %s", iface) - } - return ips, nil -} - -// GetDPUHostPrimaryIPAddresses returns the DPU host IP/Network based on K8s Node IP -// and DPU IP subnet overriden by config config.Gateway.RouterSubnet -func GetDPUHostPrimaryIPAddresses(k8sNodeIP net.IP, ifAddrs []*net.IPNet) ([]*net.IPNet, error) { - // Note(adrianc): No Dual-Stack support at this point as we rely on k8s node IP to derive gateway information - // for each node. - var gwIps []*net.IPNet - isIPv4 := net2.IsIPv4(k8sNodeIP) - - // override subnet mask via config - if config.Gateway.RouterSubnet != "" { - _, addr, err := net.ParseCIDR(config.Gateway.RouterSubnet) - if err != nil { - return nil, err - } - if net2.IsIPv4CIDR(addr) != isIPv4 { - return nil, fmt.Errorf("unexpected gateway router subnet provided (%s). "+ - "does not match Node IP address format", config.Gateway.RouterSubnet) - } - if !addr.Contains(k8sNodeIP) { - return nil, fmt.Errorf("unexpected gateway router subnet provided (%s). "+ - "subnet does not contain Node IP address (%s)", config.Gateway.RouterSubnet, k8sNodeIP) - } - addr.IP = k8sNodeIP - gwIps = append(gwIps, addr) - } else { - // Assume Host and DPU share the same subnet - // in this case just update the matching IPNet with the Host's IP address - for _, addr := range ifAddrs { - if net2.IsIPv4CIDR(addr) != isIPv4 { - continue - } - // expect k8s Node IP to be contained in the given subnet - if !addr.Contains(k8sNodeIP) { - continue - } - newAddr := *addr - newAddr.IP = k8sNodeIP - gwIps = append(gwIps, &newAddr) - } - if len(gwIps) == 0 { - return nil, fmt.Errorf("could not find subnet on DPU matching node IP %s", k8sNodeIP) - } - } - return gwIps, nil -} - -func GenerateICMPFragmentationFlow(ipAddr, outputPort, inPort, cookie string, priority int) string { - // we send any ICMP destination unreachable, fragmentation needed to the OVN pipeline too so that - // path MTU discovery continues to work. - icmpMatch := "icmp" - icmpType := 3 - icmpCode := 4 - nwDst := "nw_dst" - if net2.IsIPv6String(ipAddr) { - icmpMatch = "icmp6" - icmpType = 2 - icmpCode = 0 - nwDst = "ipv6_dst" - } - - action := fmt.Sprintf("output:%s", outputPort) - if outputPort == nodetypes.OutputPortDrop { - action = "drop" - } - - icmpFragmentationFlow := fmt.Sprintf("cookie=%s, priority=%d, in_port=%s, %s, %s=%s, icmp_type=%d, "+ - "icmp_code=%d, actions=%s", - cookie, priority, inPort, icmpMatch, nwDst, ipAddr, icmpType, icmpCode, action) - return icmpFragmentationFlow -} diff --git a/go-controller/pkg/node/util/util_suite_test.go b/go-controller/pkg/node/util/util_suite_test.go deleted file mode 100644 index dc2d625792..0000000000 --- a/go-controller/pkg/node/util/util_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package util - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestNodeSuite(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Node util Suite") -} diff --git a/go-controller/pkg/node/util/util_test.go b/go-controller/pkg/node/util/util_test.go deleted file mode 100644 index 5ca6cc80a3..0000000000 --- a/go-controller/pkg/node/util/util_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package util - -import ( - "net" - - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("node util tests", func() { - BeforeEach(func() { - Expect(config.PrepareTestConfig()).To(Succeed()) - }) - - Context("GetDPUHostPrimaryIPAddresses", func() { - - It("returns Gateway IP/Subnet for kubernetes node IP", func() { - _, dpuSubnet, _ := net.ParseCIDR("10.0.0.101/24") - nodeIP := net.ParseIP("10.0.0.11") - expectedGwSubnet := []*net.IPNet{ - {IP: nodeIP, Mask: net.CIDRMask(24, 32)}, - } - gwSubnet, err := GetDPUHostPrimaryIPAddresses(nodeIP, []*net.IPNet{dpuSubnet}) - Expect(err).ToNot(HaveOccurred()) - Expect(gwSubnet).To(Equal(expectedGwSubnet)) - }) - - It("Fails if node IP is not in host subnets", func() { - _, dpuSubnet, _ := net.ParseCIDR("10.0.0.101/24") - nodeIP := net.ParseIP("10.0.1.11") - _, err := GetDPUHostPrimaryIPAddresses(nodeIP, []*net.IPNet{dpuSubnet}) - Expect(err).To(HaveOccurred()) - }) - - It("returns node IP with config.Gateway.RouterSubnet subnet", func() { - config.Gateway.RouterSubnet = "10.1.0.0/16" - _, dpuSubnet, _ := net.ParseCIDR("10.0.0.101/24") - nodeIP := net.ParseIP("10.1.0.11") - expectedGwSubnet := []*net.IPNet{ - {IP: nodeIP, Mask: net.CIDRMask(16, 32)}, - } - gwSubnet, err := GetDPUHostPrimaryIPAddresses(nodeIP, []*net.IPNet{dpuSubnet}) - Expect(err).ToNot(HaveOccurred()) - Expect(gwSubnet).To(Equal(expectedGwSubnet)) - }) - - It("Fails if node IP is not in config.Gateway.RouterSubnet subnet", func() { - config.Gateway.RouterSubnet = "10.1.0.0/16" - _, dpuSubnet, _ := net.ParseCIDR("10.0.0.101/24") - nodeIP := net.ParseIP("10.0.0.11") - _, err := GetDPUHostPrimaryIPAddresses(nodeIP, []*net.IPNet{dpuSubnet}) - Expect(err).To(HaveOccurred()) - }) - }) -}) diff --git a/go-controller/pkg/ovn/address_set/fake_address_set.go b/go-controller/pkg/ovn/address_set/fake_address_set.go index 22db3c4a0f..2f783b3486 100644 --- a/go-controller/pkg/ovn/address_set/fake_address_set.go +++ b/go-controller/pkg/ovn/address_set/fake_address_set.go @@ -11,7 +11,6 @@ import ( "k8s.io/klog/v2" utilnet "k8s.io/utils/net" - "github.com/ovn-kubernetes/libovsdb/client" "github.com/ovn-kubernetes/libovsdb/ovsdb" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" @@ -125,7 +124,7 @@ func (f *FakeAddressSetFactory) GetAddressSet(dbIDs *libovsdbops.DbObjectIDs) (A if ok { return set, nil } - return nil, fmt.Errorf("error fetching address set: %w", client.ErrNotFound) + return nil, fmt.Errorf("error fetching address set") } func (f *FakeAddressSetFactory) ProcessEachAddressSet(ownerController string, indexT *libovsdbops.ObjectIDsType, iteratorFn AddressSetIterFunc) error { diff --git a/go-controller/pkg/ovn/base_network_controller.go b/go-controller/pkg/ovn/base_network_controller.go index 491899184e..aba4b9ab04 100644 --- a/go-controller/pkg/ovn/base_network_controller.go +++ b/go-controller/pkg/ovn/base_network_controller.go @@ -405,7 +405,7 @@ func (bnc *BaseNetworkController) syncNodeClusterRouterPort(node *corev1.Node, h // logical router port MAC is based on IPv4 subnet if there is one, else IPv6 var nodeLRPMAC net.HardwareAddr for _, hostSubnet := range hostSubnets { - gwIfAddr := bnc.GetNodeGatewayIP(hostSubnet) + gwIfAddr := util.GetNodeGatewayIfAddr(hostSubnet) nodeLRPMAC = util.IPAddrToHWAddr(gwIfAddr.IP) if !utilnet.IsIPv6CIDR(hostSubnet) { break @@ -417,7 +417,7 @@ func (bnc *BaseNetworkController) syncNodeClusterRouterPort(node *corev1.Node, h lrpName := types.RouterToSwitchPrefix + switchName lrpNetworks := []string{} for _, hostSubnet := range hostSubnets { - gwIfAddr := bnc.GetNodeGatewayIP(hostSubnet) + gwIfAddr := util.GetNodeGatewayIfAddr(hostSubnet) lrpNetworks = append(lrpNetworks, gwIfAddr.String()) } @@ -489,7 +489,7 @@ func (bnc *BaseNetworkController) createNodeLogicalSwitch(nodeName string, hostS var nodeLRPMAC net.HardwareAddr switchName := bnc.GetNetworkScopedSwitchName(nodeName) for _, hostSubnet := range hostSubnets { - gwIfAddr := bnc.GetNodeGatewayIP(hostSubnet) + gwIfAddr := util.GetNodeGatewayIfAddr(hostSubnet) nodeLRPMAC = util.IPAddrToHWAddr(gwIfAddr.IP) if !utilnet.IsIPv6CIDR(hostSubnet) { break @@ -504,8 +504,8 @@ func (bnc *BaseNetworkController) createNodeLogicalSwitch(nodeName string, hostS var v4Gateway, v6Gateway net.IP logicalSwitch.OtherConfig = map[string]string{} for _, hostSubnet := range hostSubnets { - gwIfAddr := bnc.GetNodeGatewayIP(hostSubnet) - mgmtIfAddr := bnc.GetNodeManagementIP(hostSubnet) + gwIfAddr := util.GetNodeGatewayIfAddr(hostSubnet) + mgmtIfAddr := util.GetNodeManagementIfAddr(hostSubnet) if utilnet.IsIPv6CIDR(hostSubnet) { v6Gateway = gwIfAddr.IP @@ -585,7 +585,7 @@ func (bnc *BaseNetworkController) createNodeLogicalSwitch(nodeName string, hostS return fmt.Errorf("failed finding migratable pod IPs belonging to %s: %v", nodeName, err) } - return bnc.lsManager.AddOrUpdateSwitch(logicalSwitch.Name, hostSubnets, nil, migratableIPsByPod...) + return bnc.lsManager.AddOrUpdateSwitch(logicalSwitch.Name, hostSubnets, migratableIPsByPod...) } // deleteNodeLogicalNetwork removes the logical switch and logical router port associated with the node @@ -775,14 +775,14 @@ func (bnc *BaseNetworkController) syncNodeManagementPort(node *corev1.Node, swit if len(hostSubnets) == 0 { return nil, fmt.Errorf("unable to generate MAC address, no subnets provided for network: %s", bnc.GetNetworkName()) } - macAddress = util.IPAddrToHWAddr(bnc.GetNodeManagementIP(hostSubnets[0]).IP) + macAddress = util.IPAddrToHWAddr(util.GetNodeManagementIfAddr(hostSubnets[0]).IP) } var v4Subnet *net.IPNet addresses := macAddress.String() mgmtPortIPs := []net.IP{} for _, hostSubnet := range hostSubnets { - mgmtIfAddr := bnc.GetNodeManagementIP(hostSubnet) + mgmtIfAddr := util.GetNodeManagementIfAddr(hostSubnet) addresses += " " + mgmtIfAddr.IP.String() mgmtPortIPs = append(mgmtPortIPs, mgmtIfAddr.IP) @@ -836,7 +836,7 @@ func (bnc *BaseNetworkController) syncNodeManagementPort(node *corev1.Node, swit } if v4Subnet != nil { - if err := libovsdbutil.UpdateNodeSwitchExcludeIPs(bnc.nbClient, bnc.GetNetworkScopedK8sMgmtIntfName(node.Name), bnc.GetNetworkScopedSwitchName(node.Name), node.Name, v4Subnet, bnc.GetNodeManagementIP(v4Subnet)); err != nil { + if err := libovsdbutil.UpdateNodeSwitchExcludeIPs(bnc.nbClient, bnc.GetNetworkScopedK8sMgmtIntfName(node.Name), bnc.GetNetworkScopedSwitchName(node.Name), node.Name, v4Subnet); err != nil { return nil, err } } @@ -985,7 +985,7 @@ func (bnc *BaseNetworkController) isLayer2Interconnect() bool { return config.OVNKubernetesFeature.EnableInterconnect && bnc.TopologyType() == types.Layer2Topology } -func (bnc *BaseNetworkController) nodeZoneClusterChanged(oldNode, newNode *corev1.Node) bool { +func (bnc *BaseNetworkController) nodeZoneClusterChanged(oldNode, newNode *corev1.Node, newNodeIsLocalZone bool, netName string) bool { // Check if the annotations have changed. Use network topology and local params to skip unnecessary checks // NodeIDAnnotationChanged and NodeTransitSwitchPortAddrAnnotationChanged affects local and remote nodes @@ -996,6 +996,12 @@ func (bnc *BaseNetworkController) nodeZoneClusterChanged(oldNode, newNode *corev if util.NodeTransitSwitchPortAddrAnnotationChanged(oldNode, newNode) { return true } + + // NodeGatewayRouterLRPAddrsAnnotationChanged would not affect local, nor localnet secondary network + if !newNodeIsLocalZone && bnc.TopologyType() != types.LocalnetTopology && joinCIDRChanged(oldNode, newNode, netName) { + return true + } + return false } diff --git a/go-controller/pkg/ovn/base_network_controller_pods.go b/go-controller/pkg/ovn/base_network_controller_pods.go index 4427b17b63..4d334cf6a3 100644 --- a/go-controller/pkg/ovn/base_network_controller_pods.go +++ b/go-controller/pkg/ovn/base_network_controller_pods.go @@ -23,7 +23,6 @@ import ( ipallocator "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/ip" subnetipallocator "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/ip/subnet" - podallocator "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/pod" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kubevirt" @@ -916,7 +915,7 @@ func (bnc *BaseNetworkController) allocatePodAnnotation(pod *corev1.Pod, existin return nil, false, err } - err = podallocator.AddRoutesGatewayIP(bnc.GetNetInfo(), node, pod, podAnnotation, network) + err = util.AddRoutesGatewayIP(bnc.GetNetInfo(), node, pod, podAnnotation, network) if err != nil { return nil, false, err } diff --git a/go-controller/pkg/ovn/base_network_controller_secondary.go b/go-controller/pkg/ovn/base_network_controller_secondary.go index 106155b76e..f9c6d0b18f 100644 --- a/go-controller/pkg/ovn/base_network_controller_secondary.go +++ b/go-controller/pkg/ovn/base_network_controller_secondary.go @@ -28,8 +28,6 @@ import ( libovsdbops "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/ops" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb" - addressset "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn/address_set" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn/controller/udnenabledsvc" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/persistentips" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" @@ -814,7 +812,7 @@ func (oc *BaseSecondaryNetworkController) allowPersistentIPs() bool { // buildUDNEgressSNAT is used to build the conditional SNAT required on L3 and L2 UDNs to // steer traffic correctly via mp0 when leaving OVN to the host -func (bsnc *BaseSecondaryNetworkController) buildUDNEgressSNAT(localPodSubnets []*net.IPNet, outputPort string, isUDNAdvertised bool) ([]*nbdb.NAT, error) { +func (bsnc *BaseSecondaryNetworkController) buildUDNEgressSNAT(localPodSubnets []*net.IPNet, outputPort string) ([]*nbdb.NAT, error) { if len(localPodSubnets) == 0 { return nil, nil // nothing to do } @@ -823,47 +821,17 @@ func (bsnc *BaseSecondaryNetworkController) buildUDNEgressSNAT(localPodSubnets [ var err error networkID := bsnc.GetNetworkID() // calculate MAC - dstMac := util.IPAddrToHWAddr(bsnc.GetNodeManagementIP(localPodSubnets[0]).IP) - dstMacMatch := getMasqueradeManagementIPSNATMatch(dstMac.String()) + dstMac := util.IPAddrToHWAddr(util.GetNodeManagementIfAddr(localPodSubnets[0]).IP) extIDs := map[string]string{ types.NetworkExternalID: bsnc.GetNetworkName(), types.TopologyExternalID: bsnc.TopologyType(), } - - var nodeIPsAS, svcIPsAS addressset.AddressSet - if isUDNAdvertised { - // For advertised networks, we need to SNAT any traffic leaving the - // pods from these networks towards the node IPs in the cluster. In - // order to do such a conditional SNAT, we need an address set that - // contains the node IPs in the cluster. Given that egressIP feature - // already has an address set containing these nodeIPs owned by the - // default network controller, let's re-use it. - nodeIPsASIDs := getEgressIPAddrSetDbIDs(NodeIPAddrSetName, types.DefaultNetworkName, DefaultNetworkControllerName) - nodeIPsAS, err = bsnc.addressSetFactory.GetAddressSet(nodeIPsASIDs) - if err != nil { - return nil, fmt.Errorf("failed to get address set with IDs %v: %w", nodeIPsASIDs, err) - } - - // We also need to SNAT any traffic leaving the pods from these - // networks towards the default network service cluster IPs - // accessible from UDNs: we want the reply traffic to hit the - // masquerade IP rule rather than the UDN subnet ip rule to allow - // for overlaps in VRF-Lite configurations - svcIPsASIDs := udnenabledsvc.GetAddressSetDBIDs() - svcIPsAS, err = bsnc.addressSetFactory.GetAddressSet(svcIPsASIDs) - if err != nil { - return nil, fmt.Errorf("failed to get address set with IDs %v: %w", svcIPsASIDs, err) - } - } - for _, localPodSubnet := range localPodSubnets { - snatMatch := dstMacMatch - ipFamily := utilnet.IPv4 - masqIP, err = udn.AllocateV4MasqueradeIPs(networkID) if utilnet.IsIPv6CIDR(localPodSubnet) { masqIP, err = udn.AllocateV6MasqueradeIPs(networkID) - ipFamily = utilnet.IPv6 + } else { + masqIP, err = udn.AllocateV4MasqueradeIPs(networkID) } if err != nil { return nil, err @@ -871,55 +839,12 @@ func (bsnc *BaseSecondaryNetworkController) buildUDNEgressSNAT(localPodSubnets [ if masqIP == nil { return nil, fmt.Errorf("masquerade IP cannot be empty network %s (%d): %v", bsnc.GetNetworkName(), networkID, err) } - - if isUDNAdvertised { - additionalSNATMatch := getClusterNodesDestinationBasedSNATMatch(ipFamily, nodeIPsAS, svcIPsAS) - if additionalSNATMatch != "" { - snatMatch = fmt.Sprintf("%s && %s", snatMatch, additionalSNATMatch) - } - } - - snat := libovsdbops.BuildSNATWithMatch( - &masqIP.ManagementPort.IP, - localPodSubnet, - outputPort, - extIDs, - snatMatch, - ) - snats = append(snats, snat) + snats = append(snats, libovsdbops.BuildSNATWithMatch(&masqIP.ManagementPort.IP, localPodSubnet, outputPort, + extIDs, getMasqueradeManagementIPSNATMatch(dstMac.String()))) } - return snats, nil } -func getMasqueradeManagementIPSNATMatch(dstMac string) string { - return fmt.Sprintf("eth.dst == %s", dstMac) -} - -// getClusterNodesDestinationBasedSNATMatch creates destination-based SNAT match -// for the specified IP family. Returns an empty string if there is no address -// set for the provided IP family. -func getClusterNodesDestinationBasedSNATMatch(ipFamily utilnet.IPFamily, addressSets ...addressset.AddressSet) string { - asMatches := make([]string, 0, len(addressSets)) - for _, as := range addressSets { - asIPv4, asIPv6 := as.GetASHashNames() - switch { - case ipFamily == utilnet.IPv4 && asIPv4 != "": - asMatches = append(asMatches, fmt.Sprintf("ip4.dst == $%s", asIPv4)) - case ipFamily == utilnet.IPv6 && asIPv6 != "": - asMatches = append(asMatches, fmt.Sprintf("ip6.dst == $%s", asIPv6)) - } - } - switch len(asMatches) { - case 0: - return "" - case 1: - return asMatches[0] - default: - return fmt.Sprintf("(%s)", strings.Join(asMatches, " || ")) - } -} - func (bsnc *BaseSecondaryNetworkController) ensureDHCP(pod *corev1.Pod, podAnnotation *util.PodAnnotation, lsp *nbdb.LogicalSwitchPort) error { opts := []kubevirt.DHCPConfigsOpt{} @@ -942,6 +867,10 @@ func (bsnc *BaseSecondaryNetworkController) ensureDHCP(pod *corev1.Pod, podAnnot return kubevirt.EnsureDHCPOptionsForLSP(bsnc.controllerName, bsnc.nbClient, pod, podAnnotation.IPs, lsp, opts...) } +func getMasqueradeManagementIPSNATMatch(dstMac string) string { + return fmt.Sprintf("eth.dst == %s", dstMac) +} + func (bsnc *BaseSecondaryNetworkController) requireDHCP(pod *corev1.Pod) bool { // Configure DHCP only for kubevirt VMs layer2 primary udn with subnets return kubevirt.IsPodOwnedByVirtualMachine(pod) && diff --git a/go-controller/pkg/ovn/base_secondary_layer2_network_controller.go b/go-controller/pkg/ovn/base_secondary_layer2_network_controller.go index 83676df950..95ef04d1af 100644 --- a/go-controller/pkg/ovn/base_secondary_layer2_network_controller.go +++ b/go-controller/pkg/ovn/base_secondary_layer2_network_controller.go @@ -161,7 +161,8 @@ func (oc *BaseSecondaryLayer2NetworkController) run() error { return nil } -func (oc *BaseSecondaryLayer2NetworkController) initializeLogicalSwitch(switchName string, clusterSubnets []config.CIDRNetworkEntry, excludeSubnets, reservedSubnets []*net.IPNet, clusterLoadBalancerGroupUUID, switchLoadBalancerGroupUUID string) (*nbdb.LogicalSwitch, error) { +func (oc *BaseSecondaryLayer2NetworkController) initializeLogicalSwitch(switchName string, clusterSubnets []config.CIDRNetworkEntry, + excludeSubnets []*net.IPNet, clusterLoadBalancerGroupUUID, switchLoadBalancerGroupUUID string) (*nbdb.LogicalSwitch, error) { logicalSwitch := nbdb.LogicalSwitch{ Name: switchName, ExternalIDs: util.GenerateExternalIDsForSwitchOrRouter(oc.GetNetInfo()), @@ -194,7 +195,7 @@ func (oc *BaseSecondaryLayer2NetworkController) initializeLogicalSwitch(switchNa return nil, fmt.Errorf("failed to create logical switch %+v: %v", logicalSwitch, err) } - if err = oc.lsManager.AddOrUpdateSwitch(switchName, hostSubnets, reservedSubnets, excludeSubnets...); err != nil { + if err = oc.lsManager.AddOrUpdateSwitch(switchName, hostSubnets, excludeSubnets...); err != nil { return nil, err } diff --git a/go-controller/pkg/ovn/controller/apbroute/external_controller.go b/go-controller/pkg/ovn/controller/apbroute/external_controller.go index 73f6208e96..cd034d67b7 100644 --- a/go-controller/pkg/ovn/controller/apbroute/external_controller.go +++ b/go-controller/pkg/ovn/controller/apbroute/external_controller.go @@ -22,7 +22,6 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" "k8s.io/klog/v2" - v1pod "k8s.io/kubernetes/pkg/api/v1/pod" adminpolicybasedrouteapi "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/adminpolicybasedroute/v1" adminpolicybasedrouteinformer "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/adminpolicybasedroute/v1/apis/informers/externalversions/adminpolicybasedroute/v1" @@ -566,14 +565,10 @@ func (m *externalPolicyManager) onPodUpdate(oldObj, newObj interface{}) { utilruntime.HandleError(errors.New("invalid Pod provided to onPodUpdate()")) return } - // if labels AND assigned Pod IPs AND the multus network status annotations AND - // pod PodReady condition AND deletion timestamp (PodTerminating) are - // the same, skip processing changes to the pod. + // if labels AND assigned Pod IPs AND the multus network status annotations are the same, skip processing changes to the pod. if reflect.DeepEqual(o.Labels, n.Labels) && reflect.DeepEqual(o.Status.PodIPs, n.Status.PodIPs) && - reflect.DeepEqual(o.Annotations[nettypes.NetworkStatusAnnot], n.Annotations[nettypes.NetworkStatusAnnot]) && - reflect.DeepEqual(v1pod.GetPodReadyCondition(o.Status), v1pod.GetPodReadyCondition(n.Status)) && - reflect.DeepEqual(o.DeletionTimestamp, n.DeletionTimestamp) { + reflect.DeepEqual(o.Annotations[nettypes.NetworkStatusAnnot], n.Annotations[nettypes.NetworkStatusAnnot]) { return } m.podQueue.Add(n) diff --git a/go-controller/pkg/ovn/controller/apbroute/external_controller_namespace_test.go b/go-controller/pkg/ovn/controller/apbroute/external_controller_namespace_test.go index 6f521bf2bb..57ab01d93b 100644 --- a/go-controller/pkg/ovn/controller/apbroute/external_controller_namespace_test.go +++ b/go-controller/pkg/ovn/controller/apbroute/external_controller_namespace_test.go @@ -201,32 +201,14 @@ var _ = Describe("OVN External Gateway namespace", func() { "k8s.ovn.org/routing-network": "", nettypes.NetworkStatusAnnot: fmt.Sprintf(network_status, annotatedPodIP)}, }, - Status: corev1.PodStatus{ - PodIPs: []corev1.PodIP{{IP: annotatedPodIP}}, - Phase: corev1.PodRunning, - Conditions: []corev1.PodCondition{ - { - Type: corev1.PodReady, - Status: corev1.ConditionTrue, - }, - }, - }, + Status: corev1.PodStatus{PodIPs: []corev1.PodIP{{IP: annotatedPodIP}}, Phase: corev1.PodRunning}, } podGW = &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{Name: "pod", Namespace: namespaceGW.Name, Labels: map[string]string{"name": "pod"}, Annotations: map[string]string{nettypes.NetworkStatusAnnot: fmt.Sprintf(network_status, dynamicHopHostNetPodIP)}}, - Status: corev1.PodStatus{ - PodIPs: []corev1.PodIP{{IP: dynamicHopHostNetPodIP}}, - Phase: corev1.PodRunning, - Conditions: []corev1.PodCondition{ - { - Type: corev1.PodReady, - Status: corev1.ConditionTrue, - }, - }, - }, + Status: corev1.PodStatus{PodIPs: []corev1.PodIP{{IP: dynamicHopHostNetPodIP}}, Phase: corev1.PodRunning}, } namespaceTargetWithPod, namespaceTarget2WithPod, namespaceTarget2WithoutPod, namespaceGWWithPod *namespaceWithPods ) diff --git a/go-controller/pkg/ovn/controller/apbroute/external_controller_pod.go b/go-controller/pkg/ovn/controller/apbroute/external_controller_pod.go index 2b2915f521..9c49c474ba 100644 --- a/go-controller/pkg/ovn/controller/apbroute/external_controller_pod.go +++ b/go-controller/pkg/ovn/controller/apbroute/external_controller_pod.go @@ -11,10 +11,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/util/workqueue" "k8s.io/klog/v2" - v1pod "k8s.io/kubernetes/pkg/api/v1/pod" utilnet "k8s.io/utils/net" - - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" ) func (m *externalPolicyManager) syncPod(pod *corev1.Pod, routeQueue workqueue.TypedRateLimitingInterface[string]) error { @@ -31,13 +28,6 @@ func (m *externalPolicyManager) syncPod(pod *corev1.Pod, routeQueue workqueue.Ty } func getExGwPodIPs(gatewayPod *corev1.Pod, networkName string) (sets.Set[string], error) { - // If an external gateway pod is in terminating or not ready state then don't return the - // IPs for the external gateway pod - if util.PodTerminating(gatewayPod) || !v1pod.IsPodReadyConditionTrue(gatewayPod.Status) { - klog.Warningf("External gateway pod cannot serve traffic; it's in terminating or not ready state: %s/%s", gatewayPod.Namespace, gatewayPod.Name) - return nil, nil - } - if networkName != "" { return getMultusIPsFromNetworkName(gatewayPod, networkName) } diff --git a/go-controller/pkg/ovn/controller/apbroute/external_controller_pod_test.go b/go-controller/pkg/ovn/controller/apbroute/external_controller_pod_test.go index 7cbbcd7430..509940c730 100644 --- a/go-controller/pkg/ovn/controller/apbroute/external_controller_pod_test.go +++ b/go-controller/pkg/ovn/controller/apbroute/external_controller_pod_test.go @@ -448,163 +448,6 @@ var _ = Describe("OVN External Gateway pod", func() { }) }) - - var _ = Context("When pod goes into terminating or not ready state", func() { - - DescribeTable("reconciles a pod gateway in terminating or not ready state that matches two policies", func( - terminating bool, - ) { - initController([]runtime.Object{namespaceGW, namespaceTarget, namespaceTarget2, targetPod1, targetPod2, pod1}, - []runtime.Object{dynamicPolicy, dynamicPolicyDiffTargetNS}) - - expectedPolicy1, expectedRefs1 := expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTarget2WithPod}, - nil, - []*namespaceWithPods{namespaceGWWithPod}, false) - - expectedPolicy2, expectedRefs2 := expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTargetWithPod}, - nil, - []*namespaceWithPods{namespaceGWWithPod}, false) - - eventuallyExpectNumberOfPolicies(2) - eventuallyExpectConfig(dynamicPolicy.Name, expectedPolicy1, expectedRefs1) - eventuallyExpectConfig(dynamicPolicyDiffTargetNS.Name, expectedPolicy2, expectedRefs2) - - if terminating { - By("Setting deletion timestamp for the ex gw pod") - setPodDeletionTimestamp(pod1, &metav1.Time{Time: time.Now().Add(1000 * time.Second)}, fakeClient) - } else { - By("Updating the ex gw pod status to mark it as not ready") - setPodConditionReady(pod1, corev1.ConditionFalse, fakeClient) - } - - expectedPolicy1, expectedRefs1 = expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTarget2WithPod}, - nil, - []*namespaceWithPods{namespaceGWWithoutPod}, false) - - expectedPolicy2, expectedRefs2 = expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTargetWithPod}, - nil, - []*namespaceWithPods{namespaceGWWithoutPod}, false) - - eventuallyExpectNumberOfPolicies(2) - eventuallyExpectConfig(dynamicPolicy.Name, expectedPolicy1, expectedRefs1) - eventuallyExpectConfig(dynamicPolicyDiffTargetNS.Name, expectedPolicy2, expectedRefs2) - }, - Entry("Gateway pod in terminating state", true), - Entry("Gateway pod in not ready state", false), - ) - - DescribeTable("reconciles a pod gateway in terminating or not ready state that does not match any policy", func( - terminating bool, - ) { - noMatchPolicy := newPolicy( - "noMatchPolicy", - &metav1.LabelSelector{MatchLabels: targetNamespace1Match}, - nil, - &metav1.LabelSelector{MatchLabels: gatewayNamespaceMatch}, - &metav1.LabelSelector{MatchLabels: map[string]string{"key": "nomatch"}}, - false, - ) - initController([]runtime.Object{namespaceGW, namespaceTarget, pod1}, []runtime.Object{noMatchPolicy}) - - expectedPolicy, expectedRefs := expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTargetWithoutPod}, - nil, - []*namespaceWithPods{namespaceGWWithoutPod}, false) - - eventuallyExpectNumberOfPolicies(1) - eventuallyExpectConfig(noMatchPolicy.Name, expectedPolicy, expectedRefs) - - if terminating { - By("Setting deletion timestamp for the ex gw pod") - setPodDeletionTimestamp(pod1, &metav1.Time{Time: time.Now().Add(1000 * time.Second)}, fakeClient) - } else { - By("Updating the ex gw pod status to mark it as not ready") - setPodConditionReady(pod1, corev1.ConditionFalse, fakeClient) - } - // make sure pod event is handled - time.Sleep(100 * time.Millisecond) - - eventuallyExpectNumberOfPolicies(1) - eventuallyExpectConfig(noMatchPolicy.Name, expectedPolicy, expectedRefs) - }, - Entry("Gateway pod in terminating state", true), - Entry("Gateway pod in not ready state", false), - ) - - DescribeTable("reconciles a pod gateway in terminating or not ready state that is one of two pods that matches two policies", func( - terminating bool, - ) { - initController([]runtime.Object{namespaceGW, namespaceTarget, namespaceTarget2, targetPod1, targetPod2, pod1, pod2}, - []runtime.Object{dynamicPolicy, dynamicPolicyDiffTargetNS}) - namespaceGWWith2Pods := newNamespaceWithPods(namespaceGW.Name, pod1, pod2) - expectedPolicy1, expectedRefs1 := expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTarget2WithPod}, - nil, - []*namespaceWithPods{namespaceGWWith2Pods}, false) - - expectedPolicy2, expectedRefs2 := expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTargetWithPod}, - nil, - []*namespaceWithPods{namespaceGWWith2Pods}, false) - - eventuallyExpectNumberOfPolicies(2) - eventuallyExpectConfig(dynamicPolicy.Name, expectedPolicy1, expectedRefs1) - eventuallyExpectConfig(dynamicPolicyDiffTargetNS.Name, expectedPolicy2, expectedRefs2) - - if terminating { - By("Setting deletion timestamp for the ex gw pod") - setPodDeletionTimestamp(pod1, &metav1.Time{Time: time.Now().Add(1000 * time.Second)}, fakeClient) - } else { - By("Updating the ex gw pod status to mark it as not ready") - setPodConditionReady(pod1, corev1.ConditionFalse, fakeClient) - } - - namespaceGWWith1Pod := newNamespaceWithPods(namespaceGW.Name, pod2) - - expectedPolicy1, expectedRefs1 = expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTarget2WithPod}, - nil, - []*namespaceWithPods{namespaceGWWith1Pod}, false) - - expectedPolicy2, expectedRefs2 = expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTargetWithPod}, - nil, - []*namespaceWithPods{namespaceGWWith1Pod}, false) - - eventuallyExpectNumberOfPolicies(2) - eventuallyExpectConfig(dynamicPolicy.Name, expectedPolicy1, expectedRefs1) - eventuallyExpectConfig(dynamicPolicyDiffTargetNS.Name, expectedPolicy2, expectedRefs2) - - if terminating { - By("Removing deletion timestamp for the ex gw pod") - setPodDeletionTimestamp(pod1, nil, fakeClient) - } else { - By("Updating the ex gw pod status to mark it as ready") - setPodConditionReady(pod1, corev1.ConditionTrue, fakeClient) - } - - expectedPolicy1, expectedRefs1 = expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTarget2WithPod}, - nil, - []*namespaceWithPods{namespaceGWWith2Pods}, false) - - expectedPolicy2, expectedRefs2 = expectedPolicyStateAndRefs( - []*namespaceWithPods{namespaceTargetWithPod}, - nil, - []*namespaceWithPods{namespaceGWWith2Pods}, false) - - eventuallyExpectNumberOfPolicies(2) - eventuallyExpectConfig(dynamicPolicy.Name, expectedPolicy1, expectedRefs1) - eventuallyExpectConfig(dynamicPolicyDiffTargetNS.Name, expectedPolicy2, expectedRefs2) - }, - Entry("Gateway pod in terminating state", true), - Entry("Gateway pod in not ready state", false), - ) - }) }) func deletePod(pod *corev1.Pod, fakeClient *fake.Clientset) { @@ -635,36 +478,6 @@ func updatePodStatus(pod *corev1.Pod, podStatus corev1.PodStatus) { Expect(err).NotTo(HaveOccurred()) } -func setPodDeletionTimestamp(pod *corev1.Pod, deletionTimestamp *metav1.Time, fakeClient *fake.Clientset) { - p, err := fakeClient.CoreV1().Pods(pod.Namespace).Get(context.TODO(), pod.Name, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred()) - incrementResourceVersion(p) - p.DeletionTimestamp = deletionTimestamp - _, err = fakeClient.CoreV1().Pods(pod.Namespace).Update(context.Background(), p, metav1.UpdateOptions{}) - Expect(err).NotTo(HaveOccurred()) -} - -func setPodConditionReady(pod *corev1.Pod, condStatus corev1.ConditionStatus, fakeClient *fake.Clientset) { - p, err := fakeClient.CoreV1().Pods(pod.Namespace).Get(context.TODO(), pod.Name, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred()) - incrementResourceVersion(p) - if p.Status.Conditions != nil { - for i := range p.Status.Conditions { - if p.Status.Conditions[i].Type == corev1.PodReady { - p.Status.Conditions[i].Status = condStatus - } - } - } else { - notReadyCondition := corev1.PodCondition{ - Type: corev1.PodReady, - Status: corev1.ConditionFalse, - } - p.Status.Conditions = []corev1.PodCondition{notReadyCondition} - } - _, err = fakeClient.CoreV1().Pods(pod.Namespace).Update(context.Background(), p, metav1.UpdateOptions{}) - Expect(err).NotTo(HaveOccurred()) -} - func incrementResourceVersion(obj metav1.Object) { var rs int64 if obj.GetResourceVersion() != "" { diff --git a/go-controller/pkg/ovn/controller/apbroute/external_controller_policy_test.go b/go-controller/pkg/ovn/controller/apbroute/external_controller_policy_test.go index 266312ce2c..2605fad7bc 100644 --- a/go-controller/pkg/ovn/controller/apbroute/external_controller_policy_test.go +++ b/go-controller/pkg/ovn/controller/apbroute/external_controller_policy_test.go @@ -40,16 +40,8 @@ func newPodWithPhaseAndIP(podName, namespace string, phase corev1.PodPhase, podI p := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{Name: podName, Namespace: namespace, Labels: labels}, - Spec: corev1.PodSpec{NodeName: "node"}, - Status: corev1.PodStatus{ - Phase: phase, - Conditions: []corev1.PodCondition{ - { - Type: corev1.PodReady, - Status: corev1.ConditionTrue, - }, - }, - }, + Spec: corev1.PodSpec{NodeName: "node"}, + Status: corev1.PodStatus{Phase: phase}, } if len(podIP) > 0 { p.Annotations = map[string]string{nettypes.NetworkStatusAnnot: fmt.Sprintf(network_status, podIP)} diff --git a/go-controller/pkg/ovn/controller/egressservice/egressservice_zone_node.go b/go-controller/pkg/ovn/controller/egressservice/egressservice_zone_node.go index a3087ef4f5..94db811bb2 100644 --- a/go-controller/pkg/ovn/controller/egressservice/egressservice_zone_node.go +++ b/go-controller/pkg/ovn/controller/egressservice/egressservice_zone_node.go @@ -15,7 +15,6 @@ import ( utilnet "k8s.io/utils/net" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" ) @@ -152,7 +151,7 @@ func (c *Controller) syncNode(key string) error { return nil } - gatewayIPs, err := udn.GetGWRouterIPs(n, &network) + gatewayIPs, err := util.ParseNodeGatewayRouterJoinAddrs(n, types.DefaultNetworkName) if err != nil { return fmt.Errorf("failed to get default network gateway router join IPs for node %q: %w", n.Name, err) } diff --git a/go-controller/pkg/ovn/controller/services/lb_config.go b/go-controller/pkg/ovn/controller/services/lb_config.go index b6bbd833ba..2c47b1092b 100644 --- a/go-controller/pkg/ovn/controller/services/lb_config.go +++ b/go-controller/pkg/ovn/controller/services/lb_config.go @@ -120,16 +120,10 @@ func makeNodeRouterTargetIPs(service *corev1.Service, node *nodeInfo, c *lbConfi } // OCP HACK END - // TODO: For all scenarios the lbAddress should be set to hostAddressesStr but this is breaking CI needs more investigation - lbAddresses := node.hostAddressesStr() - if config.OvnKubeNode.Mode == types.NodeModeFull { - lbAddresses = node.l3gatewayAddressesStr() - } - // Any targets local to the node need to have a special // harpin IP added, but only for the router LB - targetIPsV4, v4Updated := util.UpdateIPsSlice(targetIPsV4, lbAddresses, []string{hostMasqueradeIPV4}) - targetIPsV6, v6Updated := util.UpdateIPsSlice(targetIPsV6, lbAddresses, []string{hostMasqueradeIPV6}) + targetIPsV4, v4Updated := util.UpdateIPsSlice(targetIPsV4, node.l3gatewayAddressesStr(), []string{hostMasqueradeIPV4}) + targetIPsV6, v6Updated := util.UpdateIPsSlice(targetIPsV6, node.l3gatewayAddressesStr(), []string{hostMasqueradeIPV6}) // Local endpoints are a subset of cluster endpoints, so it is enough to compare their length v4Changed = len(targetIPsV4) != len(c.clusterEndpoints.V4IPs) || v4Updated diff --git a/go-controller/pkg/ovn/controller/services/node_tracker.go b/go-controller/pkg/ovn/controller/services/node_tracker.go index 341764904a..9fecf577c1 100644 --- a/go-controller/pkg/ovn/controller/services/node_tracker.go +++ b/go-controller/pkg/ovn/controller/services/node_tracker.go @@ -60,9 +60,6 @@ type nodeInfo struct { // has the node migrated to remote? migrated bool /** HACK END **/ - - // The list of node's management IPs - mgmtIPs []net.IP } func (ni *nodeInfo) hostAddressesStr() []string { @@ -154,13 +151,13 @@ func (nt *nodeTracker) Start(nodeInformer coreinformers.NodeInformer) (cache.Res // updateNodeInfo updates the node info cache, and syncs all services // if it changed. -func (nt *nodeTracker) updateNodeInfo(nodeName, switchName, routerName, chassisID string, l3gatewayAddresses, hostAddresses []net.IP, podSubnets []*net.IPNet, mgmtIPs []net.IP, zone string, nodePortDisabled, migrated bool) { +func (nt *nodeTracker) updateNodeInfo(nodeName, switchName, routerName, chassisID string, l3gatewayAddresses, + hostAddresses []net.IP, podSubnets []*net.IPNet, zone string, nodePortDisabled, migrated bool) { ni := nodeInfo{ name: nodeName, l3gatewayAddresses: l3gatewayAddresses, hostAddresses: hostAddresses, podSubnets: make([]net.IPNet, 0, len(podSubnets)), - mgmtIPs: mgmtIPs, gatewayRouterName: routerName, switchName: switchName, chassisID: chassisID, @@ -259,11 +256,6 @@ func (nt *nodeTracker) updateNode(node *corev1.Node) { hostAddressesIPs = append(hostAddressesIPs, ip) } - mgmtIPs := make([]net.IP, 0, len(hsn)) - for _, hostSubnet := range hsn { - mgmtIPs = append(mgmtIPs, nt.netInfo.GetNodeManagementIP(hostSubnet).IP) - } - nt.updateNodeInfo( node.Name, switchName, @@ -272,7 +264,6 @@ func (nt *nodeTracker) updateNode(node *corev1.Node) { l3gatewayAddresses, hostAddressesIPs, hsn, - mgmtIPs, util.GetNodeZone(node), !nodePortEnabled, util.HasNodeMigratedZone(node), diff --git a/go-controller/pkg/ovn/controller/services/services_controller.go b/go-controller/pkg/ovn/controller/services/services_controller.go index 3f4275e028..71528380e0 100644 --- a/go-controller/pkg/ovn/controller/services/services_controller.go +++ b/go-controller/pkg/ovn/controller/services/services_controller.go @@ -3,6 +3,7 @@ package services import ( "errors" "fmt" + "net" "sync" "time" @@ -813,7 +814,11 @@ func (c *Controller) configureUDNEnabledServiceRoute(service *corev1.Service) er } var ops []ovsdb.Operation for _, nodeInfo := range c.nodeInfos { - mgmtIP, err := util.MatchFirstIPFamily(utilnet.IsIPv6String(service.Spec.ClusterIP), nodeInfo.mgmtIPs) + var mgmtPortIPs []net.IP + for _, subnet := range nodeInfo.podSubnets { + mgmtPortIPs = append(mgmtPortIPs, util.GetNodeManagementIfAddr(&subnet).IP) + } + mgmtIP, err := util.MatchFirstIPFamily(utilnet.IsIPv6String(service.Spec.ClusterIP), mgmtPortIPs) if err != nil { return err } diff --git a/go-controller/pkg/ovn/default_network_controller.go b/go-controller/pkg/ovn/default_network_controller.go index dae1aaf71e..ed79067e8e 100644 --- a/go-controller/pkg/ovn/default_network_controller.go +++ b/go-controller/pkg/ovn/default_network_controller.go @@ -170,7 +170,6 @@ func newDefaultNetworkControllerCommon( eIPController *EgressIPController, portCache *PortCache, ) (*DefaultNetworkController, error) { - defaultNetInfo := &util.DefaultNetInfo{} if addressSetFactory == nil { addressSetFactory = addressset.NewOvnAddressSetFactory(cnci.nbClient, config.IPv4Mode, config.IPv6Mode) @@ -183,7 +182,7 @@ func newDefaultNetworkControllerCommon( cnci.watchFactory.NodeCoreInformer(), networkManager, cnci.recorder, - defaultNetInfo, + &util.DefaultNetInfo{}, ) if err != nil { return nil, fmt.Errorf("unable to create new service controller while creating new default network controller: %w", err) @@ -192,7 +191,7 @@ func newDefaultNetworkControllerCommon( var zoneICHandler *zoneic.ZoneInterconnectHandler var zoneChassisHandler *zoneic.ZoneChassisHandler if config.OVNKubernetesFeature.EnableInterconnect { - zoneICHandler = zoneic.NewZoneInterconnectHandler(defaultNetInfo, cnci.nbClient, cnci.sbClient, cnci.watchFactory) + zoneICHandler = zoneic.NewZoneInterconnectHandler(&util.DefaultNetInfo{}, cnci.nbClient, cnci.sbClient, cnci.watchFactory) zoneChassisHandler = zoneic.NewZoneChassisHandler(cnci.sbClient) } apbExternalRouteController, err := apbroutecontroller.NewExternalMasterController( @@ -210,12 +209,11 @@ func newDefaultNetworkControllerCommon( if err != nil { return nil, fmt.Errorf("unable to create new admin policy based external route controller while creating new default network controller :%w", err) } - oc := &DefaultNetworkController{ BaseNetworkController: BaseNetworkController{ CommonNetworkControllerInfo: *cnci, controllerName: DefaultNetworkControllerName, - ReconcilableNetInfo: defaultNetInfo, + ReconcilableNetInfo: &util.DefaultNetInfo{}, lsManager: lsm.NewLogicalSwitchManager(), logicalPortCache: portCache, namespaces: make(map[string]*namespaceInfo), @@ -948,10 +946,9 @@ func (h *defaultNetworkControllerEventHandler) UpdateResource(oldObj, newObj int // | | | | // |--------------------+-------------------+-------------------------------------------------+ newNodeIsLocalZoneNode := h.oc.isLocalZoneNode(newNode) - zoneClusterChanged := h.oc.nodeZoneClusterChanged(oldNode, newNode) + zoneClusterChanged := h.oc.nodeZoneClusterChanged(oldNode, newNode, newNodeIsLocalZoneNode, types.DefaultNetworkName) nodeSubnetChange := nodeSubnetChanged(oldNode, newNode, types.DefaultNetworkName) nodeEncapIPsChanged := util.NodeEncapIPsChanged(oldNode, newNode) - nodePrimaryDPUHostAddrChanged := util.NodePrimaryDPUHostAddrAnnotationChanged(oldNode, newNode) var aggregatedErrors []error if newNodeIsLocalZoneNode { @@ -1009,18 +1006,11 @@ func (h *defaultNetworkControllerEventHandler) UpdateResource(oldObj, newObj int // Also check if node subnet changed, so static routes are properly set // Also check if the node is used to be a hybrid overlay node syncZoneIC = syncZoneIC || h.oc.isLocalZoneNode(oldNode) || nodeSubnetChange || zoneClusterChanged || - switchToOvnNode || nodeEncapIPsChanged || nodePrimaryDPUHostAddrChanged + switchToOvnNode || nodeEncapIPsChanged if syncZoneIC { klog.Infof("Node %q in remote zone %q, network %q, needs interconnect zone sync up. Zone cluster changed: %v", newNode.Name, util.GetNodeZone(newNode), h.oc.GetNetworkName(), zoneClusterChanged) } - // Reprovisioning the DPU (including OVS), which is pinned to a host, will change the system ID but not the node. - if config.OvnKubeNode.Mode == types.NodeModeDPU && nodeChassisChanged(oldNode, newNode) { - if err := h.oc.zoneChassisHandler.DeleteRemoteZoneNode(oldNode); err != nil { - aggregatedErrors = append(aggregatedErrors, err) - } - syncZoneIC = true - } if err := h.oc.addUpdateRemoteNodeEvent(newNode, syncZoneIC); err != nil { aggregatedErrors = append(aggregatedErrors, err) } @@ -1080,7 +1070,8 @@ func (h *defaultNetworkControllerEventHandler) UpdateResource(oldObj, newObj int } _, syncEIPNodeFailed := h.oc.syncEIPNodeFailed.Load(newNode.Name) - if syncEIPNodeFailed { + // update only if the GR join IP changed for default network + if syncEIPNodeFailed || joinCIDRChanged(oldNode, newNode, h.oc.GetNetworkName()) { err := h.oc.eIPC.addEgressNode(newNode) if err != nil { h.oc.syncEIPNodeFailed.Store(newNode.Name, true) diff --git a/go-controller/pkg/ovn/dns_name_resolver/external_dns.go b/go-controller/pkg/ovn/dns_name_resolver/external_dns.go index 1f676afb88..cd542c48e1 100644 --- a/go-controller/pkg/ovn/dns_name_resolver/external_dns.go +++ b/go-controller/pkg/ovn/dns_name_resolver/external_dns.go @@ -159,7 +159,7 @@ func (extEgDNS *ExternalEgressDNS) reconcileDNSNameResolver(key string) error { addresses = append(addresses, resolvedAddress.IP) } } - err = extEgDNS.dnsTracker.addOrUpdateDNSName(dnsName, addresses) + err = extEgDNS.dnsTracker.addDNSName(dnsName, addresses) return err } diff --git a/go-controller/pkg/ovn/dns_name_resolver/external_dns_test.go b/go-controller/pkg/ovn/dns_name_resolver/external_dns_test.go index bfe050f288..72661bd4ed 100644 --- a/go-controller/pkg/ovn/dns_name_resolver/external_dns_test.go +++ b/go-controller/pkg/ovn/dns_name_resolver/external_dns_test.go @@ -52,15 +52,21 @@ func newDNSNameResolverObject(name, namespace, dnsName string, addresses []strin } func expectDNSNameWithAddresses(extEgDNS *ExternalEgressDNS, dnsName string, expectedAddresses []string) { - gomega.Eventually(func() []string { - resolvedName, exists := extEgDNS.getResolvedName(dnsName) + var resolvedName *dnsResolvedName + err := wait.PollUntilContextTimeout(context.Background(), 1*time.Second, 5*time.Minute, true, func(context.Context) (done bool, err error) { + var exists bool + resolvedName, exists = extEgDNS.getResolvedName(dnsName) if !exists { - return []string{} + return false, nil } - v4, v6 := resolvedName.dnsAddressSet.GetAddresses() - ipStrings := append(v4, v6...) - return ipStrings - }).Should(gomega.ConsistOf(expectedAddresses)) + + return true, nil + }) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + + v4, v6 := resolvedName.dnsAddressSet.GetAddresses() + ipStrings := append(v4, v6...) + gomega.Expect(ipStrings).To(gomega.ConsistOf(expectedAddresses)) } var _ = ginkgo.Describe("Egress Firewall External DNS Operations", func() { @@ -221,37 +227,6 @@ var _ = ginkgo.Describe("Egress Firewall External DNS Operations", func() { }) }) - ginkgo.Context("on dns name resolver resource update", func() { - ginkgo.It("Should update addresses for a dns name", func() { - start() - - config.IPv4Mode = true - config.IPv6Mode = true - - addresses := []string{"1.1.1.1", "2.2.2.2", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"} - dnsNameResolver := newDNSNameResolverObject("dns-default", config.Kubernetes.OVNConfigNamespace, dnsName, addresses) - - _, err := fakeClient.OCPNetworkClient.NetworkV1alpha1().DNSNameResolvers(dnsNameResolver.Namespace). - Create(context.TODO(), dnsNameResolver, metav1.CreateOptions{}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - expectDNSNameWithAddresses(extEgDNS, dnsName, addresses) - - addresses = []string{"2.2.2.2", "3.3.3.3", "2001:0db8:85a3:0000:0000:8a2e:0370:7334", "2001:0db8:85a3:0000:0000:8a2e:0370:7335"} - var resolvedAddresses []ocpnetworkapiv1alpha1.DNSNameResolverResolvedAddress - for _, address := range addresses { - resolvedAddresses = append(resolvedAddresses, ocpnetworkapiv1alpha1.DNSNameResolverResolvedAddress{IP: address}) - } - dnsNameResolver.Status.ResolvedNames[0].ResolvedAddresses = resolvedAddresses - - _, err = fakeClient.OCPNetworkClient.NetworkV1alpha1().DNSNameResolvers(dnsNameResolver.Namespace). - Update(context.TODO(), dnsNameResolver, metav1.UpdateOptions{}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - expectDNSNameWithAddresses(extEgDNS, dnsName, addresses) - }) - }) - ginkgo.It("Should not delete added addresses if DNS name is still used in a namespace", func() { start() diff --git a/go-controller/pkg/ovn/dns_name_resolver/external_dns_tracker.go b/go-controller/pkg/ovn/dns_name_resolver/external_dns_tracker.go index b8cd861e97..730bd026af 100644 --- a/go-controller/pkg/ovn/dns_name_resolver/external_dns_tracker.go +++ b/go-controller/pkg/ovn/dns_name_resolver/external_dns_tracker.go @@ -59,8 +59,8 @@ func newDNSTracker(addressSetFactory addressset.AddressSetFactory, controllerNam } } -// addOrUpdateDNSName is called whenever a DNS name is needed to be added or updated. -func (dnsTracker *dnsTracker) addOrUpdateDNSName(dnsName string, addresses []string) error { +// addDNSName is called whenever a DNS name is needed to be added or updated. +func (dnsTracker *dnsTracker) addDNSName(dnsName string, addresses []string) error { dnsTracker.dnsLock.Lock() defer dnsTracker.dnsLock.Unlock() @@ -92,7 +92,7 @@ func (dnsTracker *dnsTracker) addOrUpdateDNSName(dnsName string, addresses []str addresses = filteredIPs } - if err := resolvedName.dnsAddressSet.SetAddresses(addresses); err != nil { + if err := resolvedName.dnsAddressSet.AddAddresses(addresses); err != nil { return fmt.Errorf("cannot add IPs to AddressSet for DNS name %s: %v", dnsName, err) } diff --git a/go-controller/pkg/ovn/egressfirewall_test.go b/go-controller/pkg/ovn/egressfirewall_test.go index 37d19ae30a..d68fa6aa06 100644 --- a/go-controller/pkg/ovn/egressfirewall_test.go +++ b/go-controller/pkg/ovn/egressfirewall_test.go @@ -850,7 +850,7 @@ var _ = ginkgo.Describe("OVN EgressFirewall Operations", func() { "k8s.ovn.org/node-subnets": fmt.Sprintf("{\"default\":[\"%s\", \"fd02:0:0:2::2895/64\"]}", v4NodeSubnet), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s/24\",\"%s/24\",\"%s/64\"]", nodeIP, nodeIP2, nodeIP3), "k8s.ovn.org/node-chassis-id": "2", - util.OvnNodeID: "2", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.2/16\"}}", }, }, } diff --git a/go-controller/pkg/ovn/egressgw.go b/go-controller/pkg/ovn/egressgw.go index d9d8610aba..2b8e939585 100644 --- a/go-controller/pkg/ovn/egressgw.go +++ b/go-controller/pkg/ovn/egressgw.go @@ -15,7 +15,6 @@ import ( ktypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/klog/v2" - v1pod "k8s.io/kubernetes/pkg/api/v1/pod" utilnet "k8s.io/utils/net" libovsdbclient "github.com/ovn-kubernetes/libovsdb/client" @@ -50,13 +49,6 @@ func (oc *DefaultNetworkController) addPodExternalGW(pod *corev1.Pod) error { klog.Infof("External gateway pod: %s, detected for namespace(s) %s", pod.Name, podRoutingNamespaceAnno) - // If an external gateway pod is in terminating or not ready state then don't add the - // routes for the external gateway pod - if util.PodTerminating(pod) || !v1pod.IsPodReadyConditionTrue(pod.Status) { - klog.Warningf("External gateway pod cannot serve traffic; it's in terminating or not ready state: %s/%s", pod.Namespace, pod.Name) - return nil - } - foundGws, err := getExGwPodIPs(pod) if err != nil { klog.Errorf("Error getting exgw IPs for pod: %s, error: %v", pod.Name, err) @@ -589,7 +581,7 @@ func (oc *DefaultNetworkController) deletePodSNAT(nodeName string, extIPs, podIP return nil } // Default network does not set any matches in Pod SNAT - ops, err := deletePodSNATOps(oc.nbClient, nil, oc.GetNetworkScopedGWRouterName(nodeName), extIPs, podIPNets) + ops, err := deletePodSNATOps(oc.nbClient, nil, oc.GetNetworkScopedGWRouterName(nodeName), extIPs, podIPNets, "") if err != nil { return err } @@ -639,8 +631,8 @@ func getExternalIPsGR(watchFactory *factory.WatchFactory, nodeName string) ([]*n // deletePodSNATOps creates ovsdb operation that removes per pod SNAT rules towards the nodeIP that are applied to the GR where the pod resides // used when disableSNATMultipleGWs=true -func deletePodSNATOps(nbClient libovsdbclient.Client, ops []ovsdb.Operation, gwRouterName string, extIPs, podIPNets []*net.IPNet) ([]ovsdb.Operation, error) { - nats, err := buildPodSNAT(extIPs, podIPNets, "") // for delete, match is not needed - we try to cleanup all the SNATs that match the isEquivalentNAT predicate +func deletePodSNATOps(nbClient libovsdbclient.Client, ops []ovsdb.Operation, gwRouterName string, extIPs, podIPNets []*net.IPNet, match string) ([]ovsdb.Operation, error) { + nats, err := buildPodSNAT(extIPs, podIPNets, match) if err != nil { return nil, err } @@ -657,7 +649,7 @@ func deletePodSNATOps(nbClient libovsdbclient.Client, ops []ovsdb.Operation, gwR // addOrUpdatePodSNAT adds or updates per pod SNAT rules towards the nodeIP that are applied to the GR where the pod resides // used when disableSNATMultipleGWs=true func addOrUpdatePodSNAT(nbClient libovsdbclient.Client, gwRouterName string, extIPs, podIfAddrs []*net.IPNet) error { - ops, err := addOrUpdatePodSNATOps(nbClient, gwRouterName, extIPs, podIfAddrs, "", nil) + ops, err := addOrUpdatePodSNATOps(nbClient, gwRouterName, extIPs, podIfAddrs, nil) if err != nil { return err } @@ -670,9 +662,9 @@ func addOrUpdatePodSNAT(nbClient libovsdbclient.Client, gwRouterName string, ext // addOrUpdatePodSNATOps returns the operation that adds or updates per pod SNAT rules towards the nodeIP that are // applied to the GR where the pod resides // used when disableSNATMultipleGWs=true -func addOrUpdatePodSNATOps(nbClient libovsdbclient.Client, gwRouterName string, extIPs, podIfAddrs []*net.IPNet, snatMatch string, ops []ovsdb.Operation) ([]ovsdb.Operation, error) { +func addOrUpdatePodSNATOps(nbClient libovsdbclient.Client, gwRouterName string, extIPs, podIfAddrs []*net.IPNet, ops []ovsdb.Operation) ([]ovsdb.Operation, error) { gwRouter := &nbdb.LogicalRouter{Name: gwRouterName} - nats, err := buildPodSNAT(extIPs, podIfAddrs, snatMatch) + nats, err := buildPodSNAT(extIPs, podIfAddrs, "") if err != nil { return nil, err } diff --git a/go-controller/pkg/ovn/egressgw_test.go b/go-controller/pkg/ovn/egressgw_test.go index 9b6f4810eb..9696d4192b 100644 --- a/go-controller/pkg/ovn/egressgw_test.go +++ b/go-controller/pkg/ovn/egressgw_test.go @@ -6,7 +6,6 @@ import ( "fmt" "net" "sync" - "time" nettypes "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" "github.com/onsi/ginkgo/v2" @@ -1047,7 +1046,7 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() { }, ) t.populateLogicalSwitchCache(fakeOvn) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) injectNode(fakeOvn) err = fakeOvn.controller.WatchNamespaces() @@ -1210,7 +1209,7 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() { }, ) t.populateLogicalSwitchCache(fakeOvn) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) injectNode(fakeOvn) err = fakeOvn.controller.WatchNamespaces() @@ -1379,7 +1378,7 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() { }, ) t.populateLogicalSwitchCache(fakeOvn) - err = fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}, nil) + err = fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) injectNode(fakeOvn) err = fakeOvn.controller.WatchNamespaces() @@ -1549,7 +1548,7 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() { apbExternalRouteCRList, ) t.populateLogicalSwitchCache(fakeOvn) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) injectNode(fakeOvn) err = fakeOvn.controller.WatchNamespaces() @@ -1819,591 +1818,6 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() { }, ), ) - ginkgo.DescribeTable("reconciles a host networked pod in terminating or not ready state acting as a exgw for another namespace for existing pod", - func(bfd bool, - terminating bool, - beforeUpdateNB []libovsdbtest.TestData, - afterUpdateNB []libovsdbtest.TestData, - expectedNamespaceAnnotation string, - apbExternalRouteCRList *adminpolicybasedrouteapi.AdminPolicyBasedExternalRouteList) { - app.Action = func(*cli.Context) error { - - namespaceT := *newNamespace(namespaceName) - namespaceX := *newNamespace(namespace2Name) - t := newTPod( - "node1", - "10.128.1.0/24", - "10.128.1.2", - "10.128.1.1", - "myPod", - "10.128.1.3", - "0a:58:0a:80:01:03", - namespaceT.Name, - ) - gwPod := *newPod(namespaceX.Name, gwPodName, "node2", "9.0.0.1") - gwPod.Annotations = map[string]string{"k8s.ovn.org/routing-namespaces": namespaceT.Name} - if bfd { - gwPod.Annotations["k8s.ovn.org/bfd-enabled"] = "" - } - gwPod.Spec.HostNetwork = true - fakeOvn.startWithDBSetup( - libovsdbtest.TestSetup{ - NBData: []libovsdbtest.TestData{ - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - }, - }, - }, - &corev1.NamespaceList{ - Items: []corev1.Namespace{ - namespaceT, namespaceX, - }, - }, - &corev1.NodeList{ - Items: []corev1.Node{ - *newNode("node1", "192.168.126.202/24"), - *newNode("node2", "192.168.126.50/24"), - }, - }, - &corev1.PodList{ - Items: []corev1.Pod{ - *newPod(t.namespace, t.podName, t.nodeName, t.podIP), - }, - }, - apbExternalRouteCRList, - ) - t.populateLogicalSwitchCache(fakeOvn) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}, nil) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - injectNode(fakeOvn) - err = fakeOvn.controller.WatchNamespaces() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = fakeOvn.controller.WatchPods() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - fakeOvn.RunAPBExternalPolicyController() - - _, err = fakeOvn.fakeClient.KubeClient.CoreV1().Pods(namespaceX.Name).Create(context.TODO(), &gwPod, metav1.CreateOptions{}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - gomega.Eventually(fakeOvn.nbClient).Should(libovsdbtest.HaveData(beforeUpdateNB)) - gomega.Eventually(func() string { - return getNamespaceAnnotations(fakeOvn.fakeClient.KubeClient, namespaceT.Name)[util.ExternalGatewayPodIPsAnnotation] - }).Should(gomega.Equal("9.0.0.1")) - - if terminating { - ginkgo.By("Setting deletion timestamp for the ex gw pod") - gwPod.DeletionTimestamp = &metav1.Time{Time: time.Now().Add(1000 * time.Second)} - _, err = fakeOvn.fakeClient.KubeClient.CoreV1().Pods(namespaceX.Name).Update(context.TODO(), &gwPod, metav1.UpdateOptions{}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - } else { - ginkgo.By("Updating the ex gw pod status to mark it as not ready") - notReadyCondition := corev1.PodCondition{ - Type: corev1.PodReady, - Status: corev1.ConditionFalse, - } - gwPod.Status.Conditions = []corev1.PodCondition{notReadyCondition} - _, err = fakeOvn.fakeClient.KubeClient.CoreV1().Pods(namespaceX.Name).UpdateStatus(context.TODO(), &gwPod, metav1.UpdateOptions{}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - } - - gomega.Eventually(fakeOvn.nbClient).Should(libovsdbtest.HaveData(afterUpdateNB)) - gomega.Eventually(func() string { - return getNamespaceAnnotations(fakeOvn.fakeClient.KubeClient, namespaceT.Name)[util.ExternalGatewayPodIPsAnnotation] - }).Should(gomega.Equal(expectedNamespaceAnnotation)) - for _, apbRoutePolicy := range apbExternalRouteCRList.Items { - checkAPBRouteStatus(fakeOvn, apbRoutePolicy.Name, false) - } - return nil - } - - err := app.Run([]string{app.Name}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }, - ginkgo.Entry("No BFD with ex gw pod in terminating state", false, true, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouterStaticRoute{ - UUID: "static-route-1-UUID", - IPPrefix: "10.128.1.3/32", - Nexthop: "9.0.0.1", - Policy: &nbdb.LogicalRouterStaticRoutePolicySrcIP, - OutputPort: &logicalRouterPort, - Options: map[string]string{ - "ecmp_symmetric_reply": "true", - }, - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{"static-route-1-UUID"}, - }, - }, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{}, - }, - }, - "", - &adminpolicybasedrouteapi.AdminPolicyBasedExternalRouteList{}, - ), - ginkgo.Entry("No BFD with ex gw pod in not ready state", false, false, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouterStaticRoute{ - UUID: "static-route-1-UUID", - IPPrefix: "10.128.1.3/32", - Nexthop: "9.0.0.1", - Policy: &nbdb.LogicalRouterStaticRoutePolicySrcIP, - OutputPort: &logicalRouterPort, - Options: map[string]string{ - "ecmp_symmetric_reply": "true", - }, - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{"static-route-1-UUID"}, - }, - }, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{}, - }, - }, - "", - &adminpolicybasedrouteapi.AdminPolicyBasedExternalRouteList{}, - ), - ginkgo.Entry("BFD Enabled with ex gw pod in terminating state", true, true, []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.BFD{ - UUID: bfd1NamedUUID, - DstIP: "9.0.0.1", - LogicalPort: "rtoe-GR_node1", - }, - &nbdb.LogicalRouterStaticRoute{ - UUID: "static-route-1-UUID", - IPPrefix: "10.128.1.3/32", - Nexthop: "9.0.0.1", - BFD: &bfd1NamedUUID, - Policy: &nbdb.LogicalRouterStaticRoutePolicySrcIP, - OutputPort: &logicalRouterPort, - Options: map[string]string{ - "ecmp_symmetric_reply": "true", - }, - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{"static-route-1-UUID"}, - }, - }, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{}, - }, - }, - "", - &adminpolicybasedrouteapi.AdminPolicyBasedExternalRouteList{}, - ), - ginkgo.Entry("BFD Enabled with ex gw pod in not ready state", true, false, []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.BFD{ - UUID: bfd1NamedUUID, - DstIP: "9.0.0.1", - LogicalPort: "rtoe-GR_node1", - }, - &nbdb.LogicalRouterStaticRoute{ - UUID: "static-route-1-UUID", - IPPrefix: "10.128.1.3/32", - Nexthop: "9.0.0.1", - BFD: &bfd1NamedUUID, - Policy: &nbdb.LogicalRouterStaticRoutePolicySrcIP, - OutputPort: &logicalRouterPort, - Options: map[string]string{ - "ecmp_symmetric_reply": "true", - }, - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{"static-route-1-UUID"}, - }, - }, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{}, - }, - }, - "", - &adminpolicybasedrouteapi.AdminPolicyBasedExternalRouteList{}, - ), - ginkgo.Entry("No BFD with ex gw pod in terminating state and with overlapping APB External Route CR and annotation", false, true, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouterStaticRoute{ - UUID: "static-route-1-UUID", - IPPrefix: "10.128.1.3/32", - Nexthop: "9.0.0.1", - Policy: &nbdb.LogicalRouterStaticRoutePolicySrcIP, - OutputPort: &logicalRouterPort, - Options: map[string]string{ - "ecmp_symmetric_reply": "true", - }, - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{"static-route-1-UUID"}, - }, - }, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{}, - }, - }, - "", - &adminpolicybasedrouteapi.AdminPolicyBasedExternalRouteList{ - Items: []adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute{ - newPolicy("policy", - &metav1.LabelSelector{MatchLabels: map[string]string{"name": namespaceName}}, - nil, - false, - &metav1.LabelSelector{MatchLabels: map[string]string{"name": namespace2Name}}, - &metav1.LabelSelector{MatchLabels: map[string]string{"name": gwPodName}}, - false, - ""), - }, - }, - ), - ginkgo.Entry("No BFD with ex gw pod in not ready state and with overlapping APB External Route CR and annotation", false, false, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouterStaticRoute{ - UUID: "static-route-1-UUID", - IPPrefix: "10.128.1.3/32", - Nexthop: "9.0.0.1", - Policy: &nbdb.LogicalRouterStaticRoutePolicySrcIP, - OutputPort: &logicalRouterPort, - Options: map[string]string{ - "ecmp_symmetric_reply": "true", - }, - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{"static-route-1-UUID"}, - }, - }, - []libovsdbtest.TestData{ - &nbdb.LogicalSwitchPort{ - UUID: "lsp1", - Addresses: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - ExternalIDs: map[string]string{ - "pod": "true", - "namespace": namespaceName, - }, - Name: "namespace1_myPod", - Options: map[string]string{ - "iface-id-ver": "myPod", - "requested-chassis": "node1", - }, - PortSecurity: []string{"0a:58:0a:80:01:03 10.128.1.3"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node1", - Name: "node1", - Ports: []string{"lsp1"}, - }, - &nbdb.LogicalSwitch{ - UUID: "node2", - Name: "node2", - }, - &nbdb.LogicalRouter{ - UUID: "GR_node1-UUID", - Name: "GR_node1", - StaticRoutes: []string{}, - }, - }, - "", - &adminpolicybasedrouteapi.AdminPolicyBasedExternalRouteList{ - Items: []adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute{ - newPolicy("policy", - &metav1.LabelSelector{MatchLabels: map[string]string{"name": namespaceName}}, - nil, - false, - &metav1.LabelSelector{MatchLabels: map[string]string{"name": namespace2Name}}, - &metav1.LabelSelector{MatchLabels: map[string]string{"name": gwPodName}}, - false, - ""), - }, - }, - ), - ) }) ginkgo.Context("on using bfd", func() { ginkgo.It("should enable bfd only on the namespace gw when set", func() { @@ -2462,7 +1876,7 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() { }, ) t.populateLogicalSwitchCache(fakeOvn) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) injectNode(fakeOvn) err = fakeOvn.controller.WatchNamespaces() @@ -2596,7 +2010,7 @@ var _ = ginkgo.Describe("OVN Egress Gateway Operations", func() { }, ) t.populateLogicalSwitchCache(fakeOvn) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch("node2", []*net.IPNet{ovntest.MustParseIPNet("10.128.2.0/24")}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) injectNode(fakeOvn) err = fakeOvn.controller.WatchNamespaces() diff --git a/go-controller/pkg/ovn/egressip.go b/go-controller/pkg/ovn/egressip.go index 881195ffc7..5f50cefb95 100644 --- a/go-controller/pkg/ovn/egressip.go +++ b/go-controller/pkg/ovn/egressip.go @@ -33,7 +33,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" egressipv1 "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/egressip/v1" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" libovsdbops "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/ops" libovsdbutil "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/util" @@ -250,7 +249,7 @@ func NewEIPController( // CASE 3.4: Both Namespace && Pod Selectors on Spec changed // } // -// NOTE: `Spec.EgressIPs" updates for EIP object are not processed here, that is the job of cluster manager +// NOTE: `Spec.EgressIPs“ updates for EIP object are not processed here, that is the job of cluster manager // // We only care about `Spec.NamespaceSelector`, `Spec.PodSelector` and `Status` field func (e *EgressIPController) reconcileEgressIP(old, new *egressipv1.EgressIP) (err error) { @@ -2091,7 +2090,7 @@ func (e *EgressIPController) addEgressNode(node *corev1.Node) error { // on IC if the node is gone, then the ovn_cluster_router is also gone along with all // the routes on it. ni := e.networkManager.GetNetwork(types.DefaultNetworkName) - gatewayIPs, err := udn.GetGWRouterIPs(node, &util.DefaultNetInfo{}) + gatewayIPs, err := util.ParseNodeGatewayRouterJoinAddrs(node, types.DefaultNetworkName) if err != nil { return fmt.Errorf("failed to get default network gateway router join IPs for node %q: %w", node.Name, err) } @@ -2595,21 +2594,9 @@ func (e *EgressIPController) addExternalGWPodSNATOps(ni util.NetInfo, ops []ovsd if err != nil { return nil, err } - - // Handle each pod IP individually since each IP family needs its own SNAT match - for _, podIP := range podIPs { - ipFamily := utilnet.IPv4 - if utilnet.IsIPv6CIDR(podIP) { - ipFamily = utilnet.IPv6 - } - snatMatch, err := GetNetworkScopedClusterSubnetSNATMatch(e.nbClient, ni, pod.Spec.NodeName, util.IsPodNetworkAdvertisedAtNode(ni, pod.Spec.NodeName), ipFamily) - if err != nil { - return nil, fmt.Errorf("failed to get SNAT match for node %s for network %s: %w", pod.Spec.NodeName, ni.GetNetworkName(), err) - } - ops, err = addOrUpdatePodSNATOps(e.nbClient, ni.GetNetworkScopedGWRouterName(pod.Spec.NodeName), extIPs, []*net.IPNet{podIP}, snatMatch, ops) - if err != nil { - return nil, err - } + ops, err = addOrUpdatePodSNATOps(e.nbClient, ni.GetNetworkScopedGWRouterName(pod.Spec.NodeName), extIPs, podIPs, ops) + if err != nil { + return nil, err } klog.V(5).Infof("Adding SNAT on %s since egress node managing %s/%s was the same: %s", pod.Spec.NodeName, pod.Namespace, pod.Name, status.Node) } @@ -2630,7 +2617,7 @@ func (e *EgressIPController) deleteExternalGWPodSNATOps(ni util.NetInfo, ops []o if err != nil { return nil, err } - ops, err = deletePodSNATOps(e.nbClient, ops, ni.GetNetworkScopedGWRouterName(pod.Spec.NodeName), extIPs, affectedIPs) + ops, err = deletePodSNATOps(e.nbClient, ops, ni.GetNetworkScopedGWRouterName(pod.Spec.NodeName), extIPs, affectedIPs, "") if err != nil { return nil, err } @@ -2688,9 +2675,9 @@ func (e *EgressIPController) getGatewayNextHop(ni util.NetInfo, nodeName string, // Node is remote // fetch Node gateway routers 'router to switch' port IP if isIPv6 { - return udn.GetGWRouterIPv6(node, ni) + return util.ParseNodeGatewayRouterJoinIPv6(node, ni.GetNetworkName()) } - return udn.GetGWRouterIPv4(node, ni) + return util.ParseNodeGatewayRouterJoinIPv4(node, ni.GetNetworkName()) } return nil, fmt.Errorf("unsupported network topology %s", ni.TopologyType()) } @@ -3209,7 +3196,7 @@ func (e *EgressIPController) ensureRouterPoliciesForNetwork(ni util.NetInfo, nod return fmt.Errorf("failed to ensure no reroute node policies for network %s: %v", ni.GetNetworkName(), err) } if config.OVNKubernetesFeature.EnableInterconnect && ni.TopologyType() == types.Layer3Topology { - gatewayIPs, err := udn.GetGWRouterIPs(node, ni) + gatewayIPs, err := util.ParseNodeGatewayRouterJoinAddrs(node, ni.GetNetworkName()) if err != nil { return fmt.Errorf("failed to get %q network gateway router join IPs for node %q, err: %w", ni.GetNetworkName(), node.Name, err) } diff --git a/go-controller/pkg/ovn/egressip_test.go b/go-controller/pkg/ovn/egressip_test.go index b54dc50a42..8cbac3665c 100644 --- a/go-controller/pkg/ovn/egressip_test.go +++ b/go-controller/pkg/ovn/egressip_test.go @@ -32,8 +32,8 @@ import ( ) var ( - nodeLogicalRouterIPv6 = []string{"fd98::2"} - node2LogicalRouterIPv6 = []string{"fd98::3"} + nodeLogicalRouterIPv6 = []string{"fef0::56"} + node2LogicalRouterIPv6 = []string{"fef0::57"} nodeLogicalRouterIPv4 = []string{"100.64.0.2"} node2LogicalRouterIPv4 = []string{"100.64.0.3"} node3LogicalRouterIPv4 = []string{"100.64.0.4"} @@ -5598,7 +5598,7 @@ var _ = ginkgo.Describe("OVN master EgressIP Operations cluster default network" "k8s.ovn.org/node-transit-switch-port-ifaddr": "{\"ipv4\":\"100.88.0.2/16\"}", // used only for ic=true test "k8s.ovn.org/zone-name": node1Zone, // used only for ic=true test util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), - util.OvnNodeID: "2", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}}`, nodeLogicalRouterIPv4[0]), } if node1Zone != "global" { annotations["k8s.ovn.org/remote-zone-migrated"] = node1Zone // used only for ic=true test @@ -5613,7 +5613,7 @@ var _ = ginkgo.Describe("OVN master EgressIP Operations cluster default network" "k8s.ovn.org/node-transit-switch-port-ifaddr": "{\"ipv4\":\"100.88.0.3/16\"}", // used only for ic=true test "k8s.ovn.org/zone-name": node2Zone, // used only for ic=true test util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), - util.OvnNodeID: "3", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}}`, node2LogicalRouterIPv4[0]), } if node2Zone != "global" { annotations["k8s.ovn.org/remote-zone-migrated"] = node2Zone // used only for ic=true test @@ -6946,7 +6946,7 @@ var _ = ginkgo.Describe("OVN master EgressIP Operations cluster default network" Items: []corev1.Pod{egressPod1}, }, ) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(node1.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(node1.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) err = fakeOvn.controller.WatchPods() gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -7302,7 +7302,7 @@ var _ = ginkgo.Describe("OVN master EgressIP Operations cluster default network" Items: []corev1.Pod{*egressPod1}, }, ) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(node1.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(node1.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) gomega.Expect(fakeOvn.controller.WatchPods()).To(gomega.Succeed()) gomega.Expect(fakeOvn.controller.WatchEgressIPNamespaces()).To(gomega.Succeed()) @@ -7683,9 +7683,9 @@ var _ = ginkgo.Describe("OVN master EgressIP Operations cluster default network" } fakeOvn.controller.localZoneNodes.Store(node1.Name, isNode1Local) fakeOvn.controller.localZoneNodes.Store(node2.Name, isNode2Local) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(node1.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(node1.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) - err = fakeOvn.controller.lsManager.AddOrUpdateSwitch(node2.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node2Subnet)}, nil) + err = fakeOvn.controller.lsManager.AddOrUpdateSwitch(node2.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node2Subnet)}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) err = fakeOvn.controller.WatchPods() gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -11051,7 +11051,7 @@ var _ = ginkgo.Describe("OVN master EgressIP Operations cluster default network" UUID: "reroute-UUID1", } if isEgressIPv6 { - podReRoutePolicy.Nexthops = nodeLogicalRouterIPv6 + podReRoutePolicy.Nexthops = []string{"fef0::56"} } node1GR.Nat = []string{"egressip-nat-UUID1", natToRemain.UUID} @@ -12942,7 +12942,7 @@ var _ = ginkgo.Describe("OVN master EgressIP Operations cluster default network" _, node1IPV6Net, _ := net.ParseCIDR(v6Node1Subnet) nodeAnnotations := map[string]string{ "k8s.ovn.org/l3-gateway-config": `{"default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop":"192.168.126.1"}}`, - util.OvnNodeID: "2", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\",\"ipv6\":\"%s\"}}", nodeLogicalRouterIfAddrV4, nodeLogicalRouterIfAddrV6), "k8s.ovn.org/node-primary-ifaddr": fmt.Sprintf("{\"ipv4\": \"%s\", \"ipv6\": \"%s\"}", Node1IPv4CIDR, node1IPv6CIDR), "k8s.ovn.org/node-subnets": fmt.Sprintf("{\"default\":[\"%s\", \"%s\"]}", v4Node1Subnet, v6Node1Subnet), "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf("{\"ipv4\":\"%s\", \"ipv6\": \"%s\"}", node1TranSwitchIPv4CIDR, node1TranSwitchIPv6CIDR), @@ -13185,7 +13185,7 @@ var _ = ginkgo.Describe("OVN master EgressIP Operations cluster default network" _, node1IPV6Net, _ := net.ParseCIDR(v6Node1Subnet) nodeAnnotations := map[string]string{ "k8s.ovn.org/l3-gateway-config": `{"default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop":"192.168.126.1"}}`, - util.OvnNodeID: "2", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\",\"ipv6\":\"%s\"}}", nodeLogicalRouterIfAddrV4, nodeLogicalRouterIfAddrV6), "k8s.ovn.org/node-primary-ifaddr": fmt.Sprintf("{\"ipv4\": \"%s\", \"ipv6\": \"%s\"}", Node1IPv4CIDR, node1IPv6CIDR), "k8s.ovn.org/node-subnets": fmt.Sprintf("{\"default\":[\"%s\", \"%s\"]}", v4Node1Subnet, v6Node1Subnet), "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf("{\"ipv4\":\"%s\", \"ipv6\": \"%s\"}", node1TranSwitchIPv4CIDR, node1TranSwitchIPv6CIDR), @@ -13205,7 +13205,7 @@ var _ = ginkgo.Describe("OVN master EgressIP Operations cluster default network" _, node2IPV4Net, _ := net.ParseCIDR(v4Node2Subnet) _, node2IPV6Net, _ := net.ParseCIDR(v6Node2Subnet) nodeAnnotations = map[string]string{ - util.OvnNodeID: "3", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\",\"ipv6\":\"%s\"}}", node2LogicalRouterIfAddrV4, node2LogicalRouterIfAddrV6), "k8s.ovn.org/node-primary-ifaddr": fmt.Sprintf("{\"ipv4\": \"%s\", \"ipv6\": \"%s\"}", node2IPv4CIDR, node2IPv6CIDR), "k8s.ovn.org/node-subnets": fmt.Sprintf("{\"default\":[\"%s\", \"%s\"]}", v4Node2Subnet, v6Node2Subnet), "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf("{\"ipv4\":\"%s\", \"ipv6\": \"%s\"}", node2TranSwitchIPv4CIDR, node2TranSwitchIPv6CIDR), diff --git a/go-controller/pkg/ovn/egressip_udn_l2_test.go b/go-controller/pkg/ovn/egressip_udn_l2_test.go index 577e9d7646..c9080d6b71 100644 --- a/go-controller/pkg/ovn/egressip_udn_l2_test.go +++ b/go-controller/pkg/ovn/egressip_udn_l2_test.go @@ -41,7 +41,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol v4Pod1IPNode1Net1 = "20.128.0.5" node1DefaultRtoJIP = "100.64.0.1" node1DefaultRtoJIPCIDR = node1DefaultRtoJIP + "/16" - node1Network1RtoSIP = "100.65.0.1" + node1Network1RtoSIP = "100.65.0.2" node1Network1RtoSIPCIDR = node1Network1RtoSIP + "/16" podName3 = "egress-pod3" v4Pod2IPNode1Net1 = "20.128.0.6" @@ -52,9 +52,9 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol podName4 = "egress-pod4" v4Pod1IPNode2Net1 = "20.129.0.2" v4Pod2IPNode2Net1 = "20.129.0.3" - node2DefaultRtoJIP = "100.64.0.2" + node2DefaultRtoJIP = "100.66.0.1" node2DefaultRtoJIPCIDR = node2DefaultRtoJIP + "/16" - node2Network1RtoSIP = "100.65.0.2" + node2Network1RtoSIP = "100.67.0.2" node2Network1RtoSIPCIDR = node2Network1RtoSIP + "/16" eIP1Mark = 50000 eIP2Mark = 50001 @@ -166,7 +166,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf("{\"ipv4\":\"%s/16\"}", v4Node1Tsp), "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", - util.OvnNodeID: "1", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node1DefaultRtoJIPCIDR, networkName1, node1Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -181,7 +181,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf("{\"ipv4\":\"%s/16\"}", v4Node2Tsp), "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", - util.OvnNodeID: "2", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node2DefaultRtoJIPCIDR, networkName1, node2Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop":"192.168.126.1", "next-hops": ["192.168.126.1"]}`, networkName1, v4Net1, gwIP, gwIP), @@ -535,7 +535,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node1Name, - util.OvnNodeID: "1", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node1DefaultRtoJIPCIDR, networkName1, node1Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -551,7 +551,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node2Name, - util.OvnNodeID: "2", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node2DefaultRtoJIPCIDR, networkName1, node2Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -1041,7 +1041,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node1Name, - util.OvnNodeID: "1", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node1DefaultRtoJIPCIDR, networkName1, node1Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -1057,7 +1057,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node2Name, - util.OvnNodeID: "2", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node2DefaultRtoJIPCIDR, networkName1, node2Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -1523,7 +1523,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node1Name, - util.OvnNodeID: "1", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node1DefaultRtoJIPCIDR, networkName1, node1Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -1539,7 +1539,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node2Name, - util.OvnNodeID: "2", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node2DefaultRtoJIPCIDR, networkName1, node2Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -1887,7 +1887,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node1Name, - util.OvnNodeID: "1", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node1DefaultRtoJIPCIDR, networkName1, node1Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -1903,7 +1903,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node2Name, - util.OvnNodeID: "2", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node2DefaultRtoJIPCIDR, networkName1, node2Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -2240,7 +2240,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node1Name, - util.OvnNodeID: "1", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node1DefaultRtoJIPCIDR, networkName1, node1Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -2256,7 +2256,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node2Name, - util.OvnNodeID: "2", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node2DefaultRtoJIPCIDR, networkName1, node2Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -2608,7 +2608,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node1Name, - util.OvnNodeID: "1", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node1DefaultRtoJIPCIDR, networkName1, node1Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), @@ -2624,7 +2624,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/node-chassis-id": "473ca66d-d800-472f-b289-1ab81ae7f21c", "k8s.ovn.org/remote-zone-migrated": node2Name, - util.OvnNodeID: "2", + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": fmt.Sprintf("{\"default\":{\"ipv4\":\"%s\"},\"%s\":{\"ipv4\":\"%s\"}}", node2DefaultRtoJIPCIDR, networkName1, node2Network1RtoSIPCIDR), util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), util.OvnNodeL3GatewayConfig: fmt.Sprintf(`{"%s":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"%s", "next-hop":"%s", "next-hops": ["%s"]}, "default":{"mode":"local","mac-address":"7e:57:f8:f0:3c:49", "ip-address":"192.168.126.12/24", "next-hop": "192.168.126.1", "next-hops": ["192.168.126.1"]}}`, networkName1, v4Net1, gwIP, gwIP), diff --git a/go-controller/pkg/ovn/egressip_udn_l3_test.go b/go-controller/pkg/ovn/egressip_udn_l3_test.go index 02b04f938d..0d311a96d5 100644 --- a/go-controller/pkg/ovn/egressip_udn_l3_test.go +++ b/go-controller/pkg/ovn/egressip_udn_l3_test.go @@ -35,9 +35,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol var ( app *cli.App fakeOvn *FakeOVN - - nodeUDNLogicalRouterIPv4 = []string{"100.65.0.2"} - node2UDNLogicalRouterIPv4 = []string{"100.65.0.3"} ) const ( @@ -167,7 +164,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf("{\"ipv4\":\"%s/16\"}", v4Node1Tsp), "k8s.ovn.org/zone-name": node1Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), - util.OvnNodeID: "2", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, nodeLogicalRouterIPv4[0], networkName1, nodeLogicalRouterIPv4[0]), } labels := map[string]string{ "k8s.ovn.org/egress-assignable": "", @@ -179,7 +176,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf("{\"ipv4\":\"%s/16\"}", v4Node2Tsp), "k8s.ovn.org/zone-name": node2Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), - util.OvnNodeID: "3", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, node2LogicalRouterIPv4[0], networkName1, node2LogicalRouterIPv4[0]), } node2 := getNodeObj(node2Name, node2Annotations, labels) eIP := egressipv1.EgressIP{ @@ -415,7 +412,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol egressNodeIPsASv4, // UDN - getReRouteStaticRouteForController(v4Net1, nodeUDNLogicalRouterIPv4[0], netInfo.GetNetworkName()), + getReRouteStaticRouteForController(v4Net1, nodeLogicalRouterIPv4[0], netInfo.GetNetworkName()), getReRoutePolicyForController(egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, eIP1Mark, IPFamilyValueV4, []string{nodeLogicalRouterIPv4[0], v4Node2Tsp}, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName4, v4Pod2IPNode2Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), @@ -545,7 +542,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/remote-zone-migrated": node1Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), - util.OvnNodeID: "2", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, nodeLogicalRouterIPv4[0], networkName1, nodeLogicalRouterIPv4[0]), } labels := map[string]string{ "k8s.ovn.org/egress-assignable": "", @@ -558,7 +555,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/remote-zone-migrated": node2Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), - util.OvnNodeID: "3", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, node2LogicalRouterIPv4[0], networkName1, node2LogicalRouterIPv4[0]), } node2 := getNodeObj(node2Name, node2Annotations, labels) twoNodeStatus := []egressipv1.EgressIPStatusItem{ @@ -793,7 +790,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol egressNodeIPsASv4, // UDN - getReRouteStaticRouteForController(v4Net1, nodeUDNLogicalRouterIPv4[0], netInfo.GetNetworkName()), + getReRouteStaticRouteForController(v4Net1, nodeLogicalRouterIPv4[0], netInfo.GetNetworkName()), getReRoutePolicyForController(egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, eIP1Mark, IPFamilyValueV4, []string{nodeLogicalRouterIPv4[0], v4Node2Tsp}, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName4, v4Pod2IPNode2Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), @@ -935,7 +932,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol egressNodeIPsASv4, // UDN - getReRouteStaticRouteForController(v4Net1, nodeUDNLogicalRouterIPv4[0], netInfo.GetNetworkName()), + getReRouteStaticRouteForController(v4Net1, nodeLogicalRouterIPv4[0], netInfo.GetNetworkName()), getReRoutePolicyForController(egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, eIP1Mark, IPFamilyValueV4, []string{v4Node2Tsp}, netInfo.GetNetworkName(), DefaultNetworkControllerName), getNoReRoutePolicyForUDNEnabledSvc(false, netInfo.GetNetworkName(), DefaultNetworkControllerName, egressIPServedPodsASUDNv4.Name, egressSVCServedPodsASv4.Name, udnEnabledSvcV4.Name), &nbdb.LogicalRouterPolicy{ @@ -1066,7 +1063,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/remote-zone-migrated": node1Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), - util.OvnNodeID: "2", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, nodeLogicalRouterIPv4[0], networkName1, nodeLogicalRouterIPv4[0]), } labels := map[string]string{ "k8s.ovn.org/egress-assignable": "", @@ -1079,7 +1076,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/remote-zone-migrated": node2Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), - util.OvnNodeID: "3", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, node2LogicalRouterIPv4[0], networkName1, node2LogicalRouterIPv4[0]), } node2 := getNodeObj(node2Name, node2Annotations, labels) twoNodeStatus := []egressipv1.EgressIPStatusItem{ @@ -1308,7 +1305,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol egressNodeIPsASv4, // UDN - getReRouteStaticRouteForController(v4Net1, nodeUDNLogicalRouterIPv4[0], netInfo.GetNetworkName()), + getReRouteStaticRouteForController(v4Net1, nodeLogicalRouterIPv4[0], netInfo.GetNetworkName()), getReRoutePolicyForController(egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, eIP1Mark, IPFamilyValueV4, []string{nodeLogicalRouterIPv4[0], v4Node2Tsp}, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName4, v4Pod2IPNode2Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), @@ -1354,33 +1351,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol Type: nbdb.NATTypeSNAT, Options: map[string]string{"stateless": "false"}, }, - &nbdb.LogicalRouterStaticRoute{ - UUID: fmt.Sprintf("static-route-%s-%s-UUID", v4Node2Net1, v4Node2Tsp), - ExternalIDs: map[string]string{ - "ic-node": node2.Name, - ovntypes.NetworkExternalID: netInfo.GetNetworkName(), - }, - IPPrefix: v4Node2Net1, - Nexthop: v4Node2Tsp, - }, - &nbdb.LogicalRouterStaticRoute{ - UUID: fmt.Sprintf("static-route-%s-%s-UUID", node2UDNLogicalRouterIPv4[0], v4Node2Tsp), - ExternalIDs: map[string]string{ - "ic-node": node2.Name, - ovntypes.NetworkExternalID: netInfo.GetNetworkName(), - }, - IPPrefix: node2UDNLogicalRouterIPv4[0] + "/32", - Nexthop: v4Node2Tsp, - }, - &nbdb.LogicalRouterPort{ - UUID: netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix+node1.Name) + "-UUID", - MAC: util.IPAddrToHWAddr(net.ParseIP(v4Node1Tsp)).String(), - Name: netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix + node1.Name), - Networks: []string{v4Node1Tsp + "/16"}, - Options: map[string]string{ - "mcast_flood": "true", - }, - }, &nbdb.LogicalRouter{ Name: netInfo.GetNetworkScopedClusterRouterName(), UUID: netInfo.GetNetworkScopedClusterRouterName() + "-UUID", @@ -1388,19 +1358,13 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol Policies: []string{"udn-default-no-reroute-node-UUID", "udn-default-no-reroute-UUID", "udn-no-reroute-service-UUID", "udn-enabled-svc-no-reroute-UUID", fmt.Sprintf("%s-no-reroute-reply-traffic", netInfo.GetNetworkName()), getReRoutePolicyUUID(eipNamespace2, podName2, IPFamilyValueV4, netInfo.GetNetworkName())}, - StaticRoutes: []string{ - fmt.Sprintf("%s-reroute-static-route-UUID", netInfo.GetNetworkName()), - fmt.Sprintf("static-route-%s-%s-UUID", v4Node2Net1, v4Node2Tsp), - fmt.Sprintf("static-route-%s-%s-UUID", node2UDNLogicalRouterIPv4[0], v4Node2Tsp), - }, - Nat: []string{networkName1_ + node1Name + "-masqueradeNAT-UUID"}, - Ports: []string{netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix+node1.Name) + "-UUID"}, + StaticRoutes: []string{fmt.Sprintf("%s-reroute-static-route-UUID", netInfo.GetNetworkName())}, + Nat: []string{networkName1_ + node1Name + "-masqueradeNAT-UUID"}, }, &nbdb.LogicalRouter{ - UUID: netInfo.GetNetworkScopedGWRouterName(node1.Name) + "-UUID", - Name: netInfo.GetNetworkScopedGWRouterName(node1.Name), - Ports: []string{ - ovntypes.GWRouterToJoinSwitchPrefix + ovntypes.GWRouterPrefix + networkName1_ + node1.Name + "-UUID"}, + UUID: netInfo.GetNetworkScopedGWRouterName(node1.Name) + "-UUID", + Name: netInfo.GetNetworkScopedGWRouterName(node1.Name), + Ports: []string{ovntypes.GWRouterToJoinSwitchPrefix + ovntypes.GWRouterPrefix + networkName1_ + node1.Name + "-UUID"}, ExternalIDs: map[string]string{ovntypes.NetworkExternalID: netInfo.GetNetworkName(), ovntypes.TopologyExternalID: ovntypes.Layer3Topology}, Policies: []string{getGWPktMarkLRPUUID(eipNamespace2, podName2, IPFamilyValueV4, netInfo.GetNetworkName()), getGWPktMarkLRPUUID(eipNamespace2, podName4, IPFamilyValueV4, netInfo.GetNetworkName())}, @@ -1445,32 +1409,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol }, ACLs: []string{netInfo.GetNetworkScopedSwitchName(node1.Name) + "-NetpolNode-UUID"}, }, - &nbdb.LogicalSwitchPort{ - UUID: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node1.Name) + "-UUID", - Addresses: []string{"router"}, - Name: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix + node1.Name), - ExternalIDs: map[string]string{ - "node": node1.Name, - }, - Options: map[string]string{ - libovsdbops.RouterPort: netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix + node1.Name), - libovsdbops.RequestedTnlKey: node1.Annotations[util.OvnNodeID], - }, - Type: "router", - }, - &nbdb.LogicalSwitchPort{ - UUID: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node2.Name) + "-UUID", - Addresses: []string{util.IPAddrToHWAddr(net.ParseIP(v4Node2Tsp)).String() + " " + v4Node2Tsp + "/16"}, - Name: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix + node2.Name), - ExternalIDs: map[string]string{ - "node": node2.Name, - }, - Options: map[string]string{ - libovsdbops.RequestedChassis: node2.Name, - libovsdbops.RequestedTnlKey: node2.Annotations[util.OvnNodeID], - }, - Type: "remote", - }, &nbdb.LogicalSwitch{ UUID: netInfo.GetNetworkScopedSwitchName(node1.Name) + "TRANSIT-UUID", Name: networkName1_ + ovntypes.TransitSwitch, @@ -1485,10 +1423,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "interconn-ts": networkName1_ + ovntypes.TransitSwitch, libovsdbops.RequestedTnlKey: tnlKey, }, - Ports: []string{ - netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node1.Name) + "-UUID", - netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node2.Name) + "-UUID", - }, }, getNoReRouteReplyTrafficPolicyForController(netInfo.GetNetworkName(), DefaultNetworkControllerName), getDefaultQoSRule(false, netInfo.GetNetworkName(), DefaultNetworkControllerName), @@ -1563,7 +1497,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol egressNodeIPsASv4, // UDN - getReRouteStaticRouteForController(v4Net1, nodeUDNLogicalRouterIPv4[0], netInfo.GetNetworkName()), + getReRouteStaticRouteForController(v4Net1, nodeLogicalRouterIPv4[0], netInfo.GetNetworkName()), getNoReRoutePolicyForUDNEnabledSvc(false, netInfo.GetNetworkName(), DefaultNetworkControllerName, egressIPServedPodsASUDNv4.Name, egressSVCServedPodsASv4.Name, udnEnabledSvcV4.Name), &nbdb.LogicalRouterPolicy{ Priority: ovntypes.DefaultNoRereoutePriority, @@ -1606,33 +1540,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol Type: nbdb.NATTypeSNAT, Options: map[string]string{"stateless": "false"}, }, - &nbdb.LogicalRouterStaticRoute{ - UUID: fmt.Sprintf("static-route-%s-%s-UUID", v4Node2Net1, v4Node2Tsp), - ExternalIDs: map[string]string{ - "ic-node": node2.Name, - ovntypes.NetworkExternalID: netInfo.GetNetworkName(), - }, - IPPrefix: v4Node2Net1, - Nexthop: v4Node2Tsp, - }, - &nbdb.LogicalRouterStaticRoute{ - UUID: fmt.Sprintf("static-route-%s-%s-UUID", node2UDNLogicalRouterIPv4[0], v4Node2Tsp), - ExternalIDs: map[string]string{ - "ic-node": node2.Name, - ovntypes.NetworkExternalID: netInfo.GetNetworkName(), - }, - IPPrefix: node2UDNLogicalRouterIPv4[0] + "/32", - Nexthop: v4Node2Tsp, - }, - &nbdb.LogicalRouterPort{ - UUID: netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix+node1.Name) + "-UUID", - MAC: util.IPAddrToHWAddr(net.ParseIP(v4Node1Tsp)).String(), - Name: netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix + node1.Name), - Networks: []string{v4Node1Tsp + "/16"}, - Options: map[string]string{ - "mcast_flood": "true", - }, - }, &nbdb.LogicalRouter{ Name: netInfo.GetNetworkScopedClusterRouterName(), UUID: netInfo.GetNetworkScopedClusterRouterName() + "-UUID", @@ -1640,13 +1547,8 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol Policies: []string{"udn-default-no-reroute-node-UUID", "udn-default-no-reroute-UUID", "udn-no-reroute-service-UUID", "udn-enabled-svc-no-reroute-UUID", fmt.Sprintf("%s-no-reroute-reply-traffic", netInfo.GetNetworkName()), }, - StaticRoutes: []string{ - fmt.Sprintf("%s-reroute-static-route-UUID", netInfo.GetNetworkName()), - fmt.Sprintf("static-route-%s-%s-UUID", v4Node2Net1, v4Node2Tsp), - fmt.Sprintf("static-route-%s-%s-UUID", node2UDNLogicalRouterIPv4[0], v4Node2Tsp), - }, - Nat: []string{networkName1_ + node1Name + "-masqueradeNAT-UUID"}, - Ports: []string{netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix+node1.Name) + "-UUID"}, + StaticRoutes: []string{fmt.Sprintf("%s-reroute-static-route-UUID", netInfo.GetNetworkName())}, + Nat: []string{networkName1_ + node1Name + "-masqueradeNAT-UUID"}, }, &nbdb.LogicalRouter{ UUID: netInfo.GetNetworkScopedGWRouterName(node1.Name) + "-UUID", @@ -1694,32 +1596,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol }, ACLs: []string{netInfo.GetNetworkScopedSwitchName(node1.Name) + "-NetpolNode-UUID"}, }, - &nbdb.LogicalSwitchPort{ - UUID: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node1.Name) + "-UUID", - Addresses: []string{"router"}, - Name: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix + node1.Name), - ExternalIDs: map[string]string{ - "node": node1.Name, - }, - Options: map[string]string{ - libovsdbops.RouterPort: netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix + node1.Name), - libovsdbops.RequestedTnlKey: node1.Annotations[util.OvnNodeID], - }, - Type: "router", - }, - &nbdb.LogicalSwitchPort{ - UUID: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node2.Name) + "-UUID", - Addresses: []string{util.IPAddrToHWAddr(net.ParseIP(v4Node2Tsp)).String() + " " + v4Node2Tsp + "/16"}, - Name: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix + node2.Name), - ExternalIDs: map[string]string{ - "node": node2.Name, - }, - Options: map[string]string{ - libovsdbops.RequestedChassis: node2.Name, - libovsdbops.RequestedTnlKey: node2.Annotations[util.OvnNodeID], - }, - Type: "remote", - }, &nbdb.LogicalSwitch{ UUID: netInfo.GetNetworkScopedSwitchName(node1.Name) + "TRANSIT-UUID", Name: networkName1_ + ovntypes.TransitSwitch, @@ -1734,10 +1610,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "interconn-ts": networkName1_ + ovntypes.TransitSwitch, libovsdbops.RequestedTnlKey: tnlKey, }, - Ports: []string{ - netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node1.Name) + "-UUID", - netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node2.Name) + "-UUID", - }, }, getNoReRouteReplyTrafficPolicyForController(netInfo.GetNetworkName(), DefaultNetworkControllerName), getDefaultQoSRule(false, netInfo.GetNetworkName(), DefaultNetworkControllerName), @@ -1802,7 +1674,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/remote-zone-migrated": node1Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), - util.OvnNodeID: "2", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, nodeLogicalRouterIPv4[0], networkName1, nodeLogicalRouterIPv4[0]), } labels := map[string]string{ "k8s.ovn.org/egress-assignable": "", @@ -1815,7 +1687,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/remote-zone-migrated": node2Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), - util.OvnNodeID: "3", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, node2LogicalRouterIPv4[0], networkName1, node2LogicalRouterIPv4[0]), } node2 := getNodeObj(node2Name, node2Annotations, labels) twoNodeStatus := []egressipv1.EgressIPStatusItem{ @@ -2049,7 +1921,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol egressNodeIPsASv4, // UDN - getReRouteStaticRouteForController(v4Net1, nodeUDNLogicalRouterIPv4[0], netInfo.GetNetworkName()), + getReRouteStaticRouteForController(v4Net1, nodeLogicalRouterIPv4[0], netInfo.GetNetworkName()), getReRoutePolicyForController(egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, eIP1Mark, IPFamilyValueV4, []string{nodeLogicalRouterIPv4[0], v4Node2Tsp}, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), getNoReRoutePolicyForUDNEnabledSvc(false, netInfo.GetNetworkName(), DefaultNetworkControllerName, egressIPServedPodsASUDNv4.Name, egressSVCServedPodsASv4.Name, udnEnabledSvcV4.Name), @@ -2172,7 +2044,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/remote-zone-migrated": node1Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), - util.OvnNodeID: "2", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, nodeLogicalRouterIPv4[0], networkName1, nodeLogicalRouterIPv4[0]), } labels := map[string]string{ "k8s.ovn.org/egress-assignable": "", @@ -2185,7 +2057,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/remote-zone-migrated": node2Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), - util.OvnNodeID: "3", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, node2LogicalRouterIPv4[0], networkName1, node2LogicalRouterIPv4[0]), } node2 := getNodeObj(node2Name, node2Annotations, labels) twoNodeStatus := []egressipv1.EgressIPStatusItem{ @@ -2407,7 +2279,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol egressNodeIPsASv4, // UDN - getReRouteStaticRouteForController(v4Net1, nodeUDNLogicalRouterIPv4[0], netInfo.GetNetworkName()), + getReRouteStaticRouteForController(v4Net1, nodeLogicalRouterIPv4[0], netInfo.GetNetworkName()), getReRoutePolicyForController(egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, eIP1Mark, IPFamilyValueV4, []string{nodeLogicalRouterIPv4[0], v4Node2Tsp}, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), getNoReRoutePolicyForUDNEnabledSvc(false, netInfo.GetNetworkName(), DefaultNetworkControllerName, egressIPServedPodsASUDNv4.Name, egressSVCServedPodsASv4.Name, udnEnabledSvcV4.Name), @@ -2533,7 +2405,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node1Name, "k8s.ovn.org/remote-zone-migrated": node1Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node1IPv4CIDR), - util.OvnNodeID: "2", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, nodeLogicalRouterIPv4[0], networkName1, nodeLogicalRouterIPv4[0]), } labels := map[string]string{ "k8s.ovn.org/egress-assignable": "", @@ -2546,7 +2418,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "k8s.ovn.org/zone-name": node2Name, "k8s.ovn.org/remote-zone-migrated": node2Name, util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", node2IPv4CIDR), - util.OvnNodeID: "3", + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s/16"}, "%s":{"ipv4":"%s/16"}}`, node2LogicalRouterIPv4[0], networkName1, node2LogicalRouterIPv4[0]), } node2 := getNodeObj(node2Name, node2Annotations, labels) twoNodeStatus := []egressipv1.EgressIPStatusItem{ @@ -2783,7 +2655,7 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol egressNodeIPsASv4, // UDN - getReRouteStaticRouteForController(v4Net1, nodeUDNLogicalRouterIPv4[0], netInfo.GetNetworkName()), + getReRouteStaticRouteForController(v4Net1, nodeLogicalRouterIPv4[0], netInfo.GetNetworkName()), getReRoutePolicyForController(egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, eIP1Mark, IPFamilyValueV4, []string{nodeLogicalRouterIPv4[0], v4Node2Tsp}, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName2, v4Pod1IPNode1Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), getGWPktMarkLRPForController(eIP1Mark, egressIPName, eipNamespace2, podName4, v4Pod2IPNode2Net1, IPFamilyValueV4, netInfo.GetNetworkName(), DefaultNetworkControllerName), @@ -2829,33 +2701,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol Type: nbdb.NATTypeSNAT, Options: map[string]string{"stateless": "false"}, }, - &nbdb.LogicalRouterStaticRoute{ - UUID: fmt.Sprintf("static-route-%s-%s-UUID", v4Node2Net1, v4Node2Tsp), - ExternalIDs: map[string]string{ - "ic-node": node2.Name, - ovntypes.NetworkExternalID: netInfo.GetNetworkName(), - }, - IPPrefix: v4Node2Net1, - Nexthop: v4Node2Tsp, - }, - &nbdb.LogicalRouterStaticRoute{ - UUID: fmt.Sprintf("static-route-%s-%s-UUID", node2UDNLogicalRouterIPv4[0], v4Node2Tsp), - ExternalIDs: map[string]string{ - "ic-node": node2.Name, - ovntypes.NetworkExternalID: netInfo.GetNetworkName(), - }, - IPPrefix: node2UDNLogicalRouterIPv4[0] + "/32", - Nexthop: v4Node2Tsp, - }, - &nbdb.LogicalRouterPort{ - UUID: netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix+node1.Name) + "-UUID", - MAC: util.IPAddrToHWAddr(net.ParseIP(v4Node1Tsp)).String(), - Name: netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix + node1.Name), - Networks: []string{v4Node1Tsp + "/16"}, - Options: map[string]string{ - "mcast_flood": "true", - }, - }, &nbdb.LogicalRouter{ Name: netInfo.GetNetworkScopedClusterRouterName(), UUID: netInfo.GetNetworkScopedClusterRouterName() + "-UUID", @@ -2863,13 +2708,8 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol Policies: []string{"udn-default-no-reroute-node-UUID", "udn-default-no-reroute-UUID", "udn-no-reroute-service-UUID", "udn-enabled-svc-no-reroute-UUID", fmt.Sprintf("%s-no-reroute-reply-traffic", netInfo.GetNetworkName()), getReRoutePolicyUUID(eipNamespace2, podName2, IPFamilyValueV4, netInfo.GetNetworkName())}, - StaticRoutes: []string{ - fmt.Sprintf("%s-reroute-static-route-UUID", netInfo.GetNetworkName()), - fmt.Sprintf("static-route-%s-%s-UUID", v4Node2Net1, v4Node2Tsp), - fmt.Sprintf("static-route-%s-%s-UUID", node2UDNLogicalRouterIPv4[0], v4Node2Tsp), - }, - Nat: []string{networkName1_ + node1Name + "-masqueradeNAT-UUID"}, - Ports: []string{netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix+node1.Name) + "-UUID"}, + StaticRoutes: []string{fmt.Sprintf("%s-reroute-static-route-UUID", netInfo.GetNetworkName())}, + Nat: []string{networkName1_ + node1Name + "-masqueradeNAT-UUID"}, }, &nbdb.LogicalRouter{ UUID: netInfo.GetNetworkScopedGWRouterName(node1.Name) + "-UUID", @@ -2919,32 +2759,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol }, ACLs: []string{netInfo.GetNetworkScopedSwitchName(node1.Name) + "-NetpolNode-UUID"}, }, - &nbdb.LogicalSwitchPort{ - UUID: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node1.Name) + "-UUID", - Addresses: []string{"router"}, - Name: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix + node1.Name), - ExternalIDs: map[string]string{ - "node": node1.Name, - }, - Options: map[string]string{ - libovsdbops.RouterPort: netInfo.GetNetworkScopedName(ovntypes.RouterToTransitSwitchPrefix + node1.Name), - libovsdbops.RequestedTnlKey: node1.Annotations[util.OvnNodeID], - }, - Type: "router", - }, - &nbdb.LogicalSwitchPort{ - UUID: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node2.Name) + "-UUID", - Addresses: []string{util.IPAddrToHWAddr(net.ParseIP(v4Node2Tsp)).String() + " " + v4Node2Tsp + "/16"}, - Name: netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix + node2.Name), - ExternalIDs: map[string]string{ - "node": node2.Name, - }, - Options: map[string]string{ - libovsdbops.RequestedChassis: node2.Name, - libovsdbops.RequestedTnlKey: node2.Annotations[util.OvnNodeID], - }, - Type: "remote", - }, &nbdb.LogicalSwitch{ UUID: netInfo.GetNetworkScopedSwitchName(node1.Name) + "TRANSIT-UUID", Name: networkName1_ + ovntypes.TransitSwitch, @@ -2960,10 +2774,6 @@ var _ = ginkgo.Describe("EgressIP Operations for user defined network with topol "interconn-ts": networkName1_ + ovntypes.TransitSwitch, libovsdbops.RequestedTnlKey: tnlKey, }, - Ports: []string{ - netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node1.Name) + "-UUID", - netInfo.GetNetworkScopedName(ovntypes.TransitSwitchToRouterPrefix+node2.Name) + "-UUID", - }, }, getNoReRouteReplyTrafficPolicyForController(netInfo.GetNetworkName(), DefaultNetworkControllerName), getDefaultQoSRule(false, netInfo.GetNetworkName(), DefaultNetworkControllerName), diff --git a/go-controller/pkg/ovn/egressservices_test.go b/go-controller/pkg/ovn/egressservices_test.go index 25412c13d5..5b47022a9d 100644 --- a/go-controller/pkg/ovn/egressservices_test.go +++ b/go-controller/pkg/ovn/egressservices_test.go @@ -956,7 +956,7 @@ var _ = ginkgo.Describe("OVN Egress Service Operations", func() { config.IPv6Mode = true config.OVNKubernetesFeature.EnableInterconnect = interconnectEnabled node1 := nodeFor(node1Name, node1IPv4, node1IPv6, node1IPv4Subnet, node1IPv6Subnet, node1transitIPv4, node1transitIPv6) - node1.Annotations[util.OvnNodeID] = "2" + node1.Annotations[util.OVNNodeGRLRPAddrs] = `{"default":{"ipv4":"100.64.0.2/16", "ipv6":"fef0::56/16"}}` node2 := nodeFor(node2Name, node2IPv4, node2IPv6, node2IPv4Subnet, node2IPv6Subnet, node2transitIPv4, node2transitIPv6) clusterRouter := &nbdb.LogicalRouter{ diff --git a/go-controller/pkg/ovn/gateway.go b/go-controller/pkg/ovn/gateway.go index a6ce3704fb..a43adf5368 100644 --- a/go-controller/pkg/ovn/gateway.go +++ b/go-controller/pkg/ovn/gateway.go @@ -25,7 +25,6 @@ import ( "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/node" - addressset "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn/address_set" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn/gateway" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn/gatewayrouter" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" @@ -43,6 +42,7 @@ type GatewayManager struct { nbClient libovsdbclient.Client netInfo util.NetInfo watchFactory *factory.WatchFactory + // Cluster wide Load_Balancer_Group UUID. // Includes all node switches and node gateway routers. clusterLoadBalancerGroupUUID string @@ -143,8 +143,8 @@ func WithLoadBalancerGroups(routerLBGroup, clusterLBGroup, switchLBGroup string) } // cleanupStalePodSNATs removes pod SNATs against nodeIP for the given node if -// the SNAT.logicalIP isn't an active podIP, or disableSNATMultipleGWs=false. -// We don't have to worry about +// the SNAT.logicalIP isn't an active podIP, the pod network is being advertised +// on this node or disableSNATMultipleGWs=false. We don't have to worry about // missing SNATs that should be added because addLogicalPort takes care of this // for all pods when RequestRetryObjs is called for each node add. // Other non-pod SNATs like join subnet SNATs are ignored. @@ -154,11 +154,11 @@ func WithLoadBalancerGroups(routerLBGroup, clusterLBGroup, switchLBGroup string) // pod->nodeSNATs which won't get cleared up unless explicitly deleted. // NOTE2: egressIP SNATs are synced in EIP controller. func (gw *GatewayManager) cleanupStalePodSNATs(nodeName string, nodeIPs []*net.IPNet, gwLRPIPs []net.IP) error { - // collect all the pod IPs for which we should be doing the SNAT; - // if DisableSNATMultipleGWs==false we consider all + // collect all the pod IPs for which we should be doing the SNAT; if the pod + // network is advertised or DisableSNATMultipleGWs==false we consider all // the SNATs stale podIPsWithSNAT := sets.New[string]() - if config.Gateway.DisableSNATMultipleGWs { + if !gw.isRoutingAdvertised(nodeName) && config.Gateway.DisableSNATMultipleGWs { pods, err := gw.watchFactory.GetAllPods() if err != nil { return fmt.Errorf("unable to list existing pods on node: %s, %w", @@ -231,6 +231,7 @@ func (gw *GatewayManager) cleanupStalePodSNATs(nodeName string, nodeIPs []*net.I } natsToDelete = append(natsToDelete, routerNat) } + if len(natsToDelete) > 0 { err := libovsdbops.DeleteNATs(gw.nbClient, gatewayRouter, natsToDelete...) if err != nil { @@ -389,8 +390,8 @@ func (gw *GatewayManager) createGWRouterPort(hostSubnets []*net.IPNet, gwLRPJoin // one node per zone, since ARPs for .1 will not go beyond local switch. // This is being done to add the ICMP SNATs for .1 podSubnet that OVN GR generates for _, subnet := range hostSubnets { - gwLRPIPs = append(gwLRPIPs, gw.netInfo.GetNodeGatewayIP(subnet).IP) - gwLRPNetworks = append(gwLRPNetworks, gw.netInfo.GetNodeGatewayIP(subnet).String()) + gwLRPIPs = append(gwLRPIPs, util.GetNodeGatewayIfAddr(subnet).IP) + gwLRPNetworks = append(gwLRPNetworks, util.GetNodeGatewayIfAddr(subnet).String()) } } gwLRPMAC := util.IPAddrToHWAddr(gwLRPIPs[0]) @@ -611,7 +612,7 @@ func (gw *GatewayManager) updateClusterRouterStaticRoutes(hostSubnets []*net.IPN // If migrating from local to shared gateway, let's remove the static routes towards // management port interface for the hostSubnet prefix before adding the routes // towards join switch. - mgmtIfAddr := gw.netInfo.GetNodeManagementIP(hostSubnet) + mgmtIfAddr := util.GetNodeManagementIfAddr(hostSubnet) gw.staticRouteCleanup([]net.IP{mgmtIfAddr.IP}, hostSubnet) if err := libovsdbops.CreateOrReplaceLogicalRouterStaticRouteWithPredicate( @@ -763,9 +764,7 @@ func (gw *GatewayManager) updateGWRouterNAT(nodeName string, clusterIPSubnet []* nats := make([]*nbdb.NAT, 0, len(clusterIPSubnet)) var nat *nbdb.NAT - // DisableSNATMultipleGWs is only applicable to cluster default network and not to user defined networks. - // For user defined networks, we always add SNAT rules regardless of whether the network is advertised or not. - if !config.Gateway.DisableSNATMultipleGWs || gw.netInfo.IsPrimaryNetwork() { + if (!config.Gateway.DisableSNATMultipleGWs || gw.netInfo.IsPrimaryNetwork()) && !gw.isRoutingAdvertised(nodeName) { // Default SNAT rules. DisableSNATMultipleGWs=false in LGW (traffic egresses via mp0) always. // We are not checking for gateway mode to be shared explicitly to reduce topology differences. for _, entry := range clusterIPSubnet { @@ -775,17 +774,7 @@ func (gw *GatewayManager) updateGWRouterNAT(nodeName string, clusterIPSubnet []* gw.gwRouterName, err) } - // Get the match for this specific subnet's IP family - ipFamily := utilnet.IPv4 - if utilnet.IsIPv6CIDR(entry) { - ipFamily = utilnet.IPv6 - } - snatMatch, err := GetNetworkScopedClusterSubnetSNATMatch(gw.nbClient, gw.netInfo, nodeName, gw.isRoutingAdvertised(nodeName), ipFamily) - if err != nil { - return fmt.Errorf("failed to get SNAT match for node %s for network %s: %w", nodeName, gw.netInfo.GetNetworkName(), err) - } - - nat = libovsdbops.BuildSNATWithMatch(&externalIP[0], entry, "", extIDs, snatMatch) + nat = libovsdbops.BuildSNATWithMatch(&externalIP[0], entry, "", extIDs, gw.netInfo.GetNetworkScopedClusterSubnetSNATMatch(nodeName)) nats = append(nats, nat) } err = libovsdbops.CreateOrUpdateNATs(gw.nbClient, gwRouter, nats...) @@ -795,7 +784,7 @@ func (gw *GatewayManager) updateGWRouterNAT(nodeName string, clusterIPSubnet []* } else { // ensure we do not have any leftover SNAT entries after an upgrade for _, logicalSubnet := range clusterIPSubnet { - nat = libovsdbops.BuildSNAT(nil, logicalSubnet, "", extIDs) + nat = libovsdbops.BuildSNATWithMatch(nil, logicalSubnet, "", extIDs, gw.netInfo.GetNetworkScopedClusterSubnetSNATMatch(nodeName)) nats = append(nats, nat) } err = libovsdbops.DeleteNATs(gw.nbClient, gwRouter, nats...) @@ -913,39 +902,6 @@ func (gw *GatewayManager) gatewayInit( return nil } -// GetNetworkScopedClusterSubnetSNATMatch returns the match for the SNAT rule for the cluster default network -// and the match for the SNAT rule for the L3/L2 user defined network. -// If the network is not advertised: -// - For Layer2 topology, the match is the output port of the GR to the join switch since in L2 there is only 1 router but two cSNATs. -// - For Layer3 topology, the match is empty. -// If the network is advertised: -// - For Layer2 topology, the match is the output port of the GR to the join switch and the destination must be a nodeIP in the cluster. -// - For Layer3 topology, the match is the destination must be a nodeIP in the cluster. -func GetNetworkScopedClusterSubnetSNATMatch(nbClient libovsdbclient.Client, netInfo util.NetInfo, nodeName string, isNetworkAdvertised bool, ipFamily utilnet.IPFamily) (string, error) { - if !isNetworkAdvertised { - if netInfo.TopologyType() != types.Layer2Topology { - return "", nil - } - return fmt.Sprintf("outport == %q", types.GWRouterToExtSwitchPrefix+netInfo.GetNetworkScopedGWRouterName(nodeName)), nil - } - - // if the network is advertised, we need to ensure that the SNAT exists with the correct conditional destination match - dbIDs := getEgressIPAddrSetDbIDs(NodeIPAddrSetName, types.DefaultNetworkName, DefaultNetworkControllerName) - addressSetFactory := addressset.NewOvnAddressSetFactory(nbClient, config.IPv4Mode, config.IPv6Mode) - addrSet, err := addressSetFactory.GetAddressSet(dbIDs) - if err != nil { - return "", fmt.Errorf("cannot ensure that addressSet %v exists: %w", dbIDs, err) - } - destinationMatch := getClusterNodesDestinationBasedSNATMatch(ipFamily, addrSet) - if destinationMatch == "" { - return "", fmt.Errorf("could not build a destination based SNAT match because no addressSet %v exists for IP family %v", dbIDs, ipFamily) - } - if netInfo.TopologyType() != types.Layer2Topology { - return destinationMatch, nil - } - return fmt.Sprintf("outport == %q && %s", types.GWRouterToExtSwitchPrefix+netInfo.GetNetworkScopedGWRouterName(nodeName), destinationMatch), nil -} - // addExternalSwitch creates a switch connected to the external bridge and connects it to // the gateway router func (gw *GatewayManager) addExternalSwitch(prefix, interfaceID, gatewayRouter, macAddress, physNetworkName string, ipAddresses []*net.IPNet, vlanID *uint) error { @@ -1401,7 +1357,7 @@ func (gw *GatewayManager) SyncGateway( routerName = gw.gwRouterName } for _, subnet := range gwConfig.hostSubnets { - mgmtIfAddr := gw.netInfo.GetNodeManagementIP(subnet) + mgmtIfAddr := util.GetNodeManagementIfAddr(subnet) if mgmtIfAddr == nil { return fmt.Errorf("management interface address not found for subnet %q on network %q", subnet, gw.netInfo.GetNetworkName()) } diff --git a/go-controller/pkg/ovn/gateway_test.go b/go-controller/pkg/ovn/gateway_test.go index 893d17ad09..61f89e831d 100644 --- a/go-controller/pkg/ovn/gateway_test.go +++ b/go-controller/pkg/ovn/gateway_test.go @@ -65,15 +65,6 @@ func generateGatewayInitExpectedNB(testData []libovsdbtest.TestData, expectedOVN expectedNodeSwitch *nbdb.LogicalSwitch, nodeName string, clusterIPSubnets []*net.IPNet, hostSubnets []*net.IPNet, l3GatewayConfig *util.L3GatewayConfig, joinLRPIPs, defLRPIPs []*net.IPNet, skipSnat bool, nodeMgmtPortIP, gatewayMTU string) []libovsdbtest.TestData { - return generateGatewayInitExpectedNBWithPodNetworkAdvertised(testData, expectedOVNClusterRouter, expectedNodeSwitch, - nodeName, clusterIPSubnets, hostSubnets, l3GatewayConfig, joinLRPIPs, defLRPIPs, skipSnat, nodeMgmtPortIP, - gatewayMTU, false) // Default to no pod network advertised -} - -func generateGatewayInitExpectedNBWithPodNetworkAdvertised(testData []libovsdbtest.TestData, expectedOVNClusterRouter *nbdb.LogicalRouter, - expectedNodeSwitch *nbdb.LogicalSwitch, nodeName string, clusterIPSubnets []*net.IPNet, hostSubnets []*net.IPNet, - l3GatewayConfig *util.L3GatewayConfig, joinLRPIPs, defLRPIPs []*net.IPNet, skipSnat bool, nodeMgmtPortIP, - gatewayMTU string, isPodNetworkAdvertised bool) []libovsdbtest.TestData { GRName := "GR_" + nodeName gwSwitchPort := types.JoinSwitchToGWRouterPrefix + GRName @@ -223,16 +214,6 @@ func generateGatewayInitExpectedNBWithPodNetworkAdvertised(testData []libovsdbte }, Networks: networks, }) - var egressNodeIPsASv4, egressNodeIPsASv6 *nbdb.AddressSet - if config.OVNKubernetesFeature.EnableEgressIP { - egressNodeIPsASv4, egressNodeIPsASv6 = buildEgressIPNodeAddressSets(physicalIPs) - if config.IPv4Mode { - testData = append(testData, egressNodeIPsASv4) - } - if config.IPv6Mode { - testData = append(testData, egressNodeIPsASv6) - } - } natUUIDs := make([]string, 0, len(clusterIPSubnets)) if !skipSnat { @@ -250,19 +231,6 @@ func generateGatewayInitExpectedNBWithPodNetworkAdvertised(testData []libovsdbte if config.Gateway.Mode != config.GatewayModeDisabled { nat.ExternalPortRange = config.DefaultEphemeralPortRange } - if isPodNetworkAdvertised { - // IPv6 pod network - if utilnet.IsIPv6CIDR(subnet) { - if egressNodeIPsASv6 != nil { - nat.Match = fmt.Sprintf("ip6.dst == $%s", egressNodeIPsASv6.Name) - } - } else { - // IPv4 pod network - if egressNodeIPsASv4 != nil { - nat.Match = fmt.Sprintf("ip4.dst == $%s", egressNodeIPsASv4.Name) - } - } - } testData = append(testData, &nat) } } diff --git a/go-controller/pkg/ovn/hybrid.go b/go-controller/pkg/ovn/hybrid.go index 0164cc4076..41f98075f1 100644 --- a/go-controller/pkg/ovn/hybrid.go +++ b/go-controller/pkg/ovn/hybrid.go @@ -120,7 +120,7 @@ func (oc *DefaultNetworkController) handleHybridOverlayPort(node *corev1.Node, a return fmt.Errorf("failed to add hybrid overlay port %+v for node %s: %w", lsp, node.Name, err) } for _, subnet := range subnets { - if err := libovsdbutil.UpdateNodeSwitchExcludeIPs(oc.nbClient, oc.GetNetworkScopedK8sMgmtIntfName(node.Name), oc.GetNetworkScopedSwitchName(node.Name), node.Name, subnet, oc.GetNodeManagementIP(subnet)); err != nil { + if err := libovsdbutil.UpdateNodeSwitchExcludeIPs(oc.nbClient, oc.GetNetworkScopedK8sMgmtIntfName(node.Name), oc.GetNetworkScopedSwitchName(node.Name), node.Name, subnet); err != nil { return err } } diff --git a/go-controller/pkg/ovn/hybrid_test.go b/go-controller/pkg/ovn/hybrid_test.go index 45745027e9..4b01354429 100644 --- a/go-controller/pkg/ovn/hybrid_test.go +++ b/go-controller/pkg/ovn/hybrid_test.go @@ -1485,7 +1485,7 @@ var _ = ginkgo.Describe("Hybrid SDN Master Operations", func() { hotypes.HybridOverlayDRIP: nodeHOIP, hotypes.HybridOverlayDRMAC: nodeHOMAC, "k8s.ovn.org/ovn-node-id": "2", - } + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.2/16\"}}"} kubeFakeClient := fake.NewSimpleClientset(&corev1.NodeList{ Items: []corev1.Node{testNode}, diff --git a/go-controller/pkg/ovn/kubevirt_test.go b/go-controller/pkg/ovn/kubevirt_test.go index 061b9fc5f6..342aad35d4 100644 --- a/go-controller/pkg/ovn/kubevirt_test.go +++ b/go-controller/pkg/ovn/kubevirt_test.go @@ -97,7 +97,6 @@ var _ = Describe("OVN Kubevirt Operations", func() { expectedStaticRoutes []testStaticRoute } type testNode struct { - nodeID string lrpNetworkIPv4 string lrpNetworkIPv6 string subnetIPv4 string @@ -117,29 +116,26 @@ var _ = Describe("OVN Kubevirt Operations", func() { initialDB libovsdb.TestSetup nodeByName = map[string]testNode{ node1: { - nodeID: "4", subnetIPv4: "10.128.1.0/24", subnetIPv6: "fd11::/64", lrpNetworkIPv4: "100.64.0.4/24", - lrpNetworkIPv6: "fd98::4/64", + lrpNetworkIPv6: "fd12::4/64", transitSwitchPortIPv4: "100.65.0.4/24", transitSwitchPortIPv6: "fd13::4/64", }, node2: { - nodeID: "5", subnetIPv4: "10.128.2.0/24", subnetIPv6: "fd12::/64", lrpNetworkIPv4: "100.64.0.5/24", - lrpNetworkIPv6: "fd98::5/64", + lrpNetworkIPv6: "fd12::5/64", transitSwitchPortIPv4: "100.65.0.5/24", transitSwitchPortIPv6: "fd13::5/64", }, node3: { - nodeID: "6", subnetIPv4: "10.128.3.0/24", subnetIPv6: "fd13::/64", lrpNetworkIPv4: "100.64.0.6/24", - lrpNetworkIPv6: "fd98::6/64", + lrpNetworkIPv6: "fd12::6/64", transitSwitchPortIPv4: "100.65.0.6/24", transitSwitchPortIPv6: "fd13::6/64", }, @@ -671,7 +667,7 @@ var _ = Describe("OVN Kubevirt Operations", func() { Annotations: map[string]string{ "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf(`{"ipv4": %q, "ipv6": %q}`, nodeByName[node1].transitSwitchPortIPv4, nodeByName[node1].transitSwitchPortIPv6), "k8s.ovn.org/node-subnets": fmt.Sprintf(`{"default":[%q,%q]}`, nodeByName[node1].subnetIPv4, nodeByName[node1].subnetIPv6), - util.OvnNodeID: nodeByName[node1].nodeID, + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s", "ipv6":"%s"}}`, nodeByName[node1].lrpNetworkIPv4, nodeByName[node1].lrpNetworkIPv6), }, }, }, @@ -681,7 +677,7 @@ var _ = Describe("OVN Kubevirt Operations", func() { Annotations: map[string]string{ "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf(`{"ipv4": %q, "ipv6": %q}`, nodeByName[node2].transitSwitchPortIPv4, nodeByName[node2].transitSwitchPortIPv6), "k8s.ovn.org/node-subnets": fmt.Sprintf(`{"default":[%q,%q]}`, nodeByName[node2].subnetIPv4, nodeByName[node2].subnetIPv6), - util.OvnNodeID: nodeByName[node2].nodeID, + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s", "ipv6":"%s"}}`, nodeByName[node2].lrpNetworkIPv4, nodeByName[node2].lrpNetworkIPv6), }, }, }, @@ -691,7 +687,7 @@ var _ = Describe("OVN Kubevirt Operations", func() { Annotations: map[string]string{ "k8s.ovn.org/node-transit-switch-port-ifaddr": fmt.Sprintf(`{"ipv4": %q, "ipv6": %q}`, nodeByName[node3].transitSwitchPortIPv4, nodeByName[node3].transitSwitchPortIPv6), "k8s.ovn.org/node-subnets": fmt.Sprintf(`{"default":[%q,%q]}`, nodeByName[node3].subnetIPv4, nodeByName[node3].subnetIPv6), - util.OvnNodeID: nodeByName[node3].nodeID, + util.OVNNodeGRLRPAddrs: fmt.Sprintf(`{"default":{"ipv4":"%s", "ipv6":"%s"}}`, nodeByName[node3].lrpNetworkIPv4, nodeByName[node3].lrpNetworkIPv6), }, }, }, @@ -805,7 +801,7 @@ var _ = Describe("OVN Kubevirt Operations", func() { Name: "newNode1", Annotations: map[string]string{ "k8s.ovn.org/node-subnets": fmt.Sprintf(`{"default":[%q,%q]}`, nodeByName[t.replaceNode].subnetIPv4, nodeByName[t.replaceNode].subnetIPv6), - util.OvnNodeID: nodeByName[t.replaceNode].nodeID, + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.2/16\"}}", }, }, } diff --git a/go-controller/pkg/ovn/logical_switch_manager/logical_switch_manager.go b/go-controller/pkg/ovn/logical_switch_manager/logical_switch_manager.go index f14da9837f..8f4c7b3391 100644 --- a/go-controller/pkg/ovn/logical_switch_manager/logical_switch_manager.go +++ b/go-controller/pkg/ovn/logical_switch_manager/logical_switch_manager.go @@ -4,8 +4,6 @@ import ( "fmt" "net" - knet "k8s.io/utils/net" - ipam "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/ip" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/allocator/ip/subnet" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" @@ -16,8 +14,6 @@ var SwitchNotFound = subnet.ErrSubnetNotFound // LogicalSwitchManager provides switch info management APIs including IPAM for the host subnets type LogicalSwitchManager struct { allocator subnet.Allocator - gatewayIPs []*net.IPNet - mgmtIPs []*net.IPNet reserveIPs bool } @@ -46,44 +42,25 @@ func NewL2SwitchManager() *LogicalSwitchManager { // NewL2SwitchManagerForUserDefinedPrimaryNetwork initializes a new logical // switch manager for L2 primary networks. -// A user defined primary network auto-reserves the gateway and the node management IP addresses, +// A user defined primary network auto-reserves the .1 and .2 IP addresses, // which are required for egressing the cluster over this user defined network. -func NewL2SwitchManagerForUserDefinedPrimaryNetwork(gatewayIPs, mgmtIPs []*net.IPNet) *LogicalSwitchManager { - lsm := NewLogicalSwitchManager() - lsm.gatewayIPs = gatewayIPs - lsm.mgmtIPs = mgmtIPs - return lsm +func NewL2SwitchManagerForUserDefinedPrimaryNetwork() *LogicalSwitchManager { + return NewLogicalSwitchManager() } // AddOrUpdateSwitch adds/updates a switch to the logical switch manager for subnet // and IPAM management. -func (manager *LogicalSwitchManager) AddOrUpdateSwitch(switchName string, hostSubnets []*net.IPNet, reservedSubnets []*net.IPNet, excludeSubnets ...*net.IPNet) error { +func (manager *LogicalSwitchManager) AddOrUpdateSwitch(switchName string, hostSubnets []*net.IPNet, excludeSubnets ...*net.IPNet) error { if manager.reserveIPs { for _, hostSubnet := range hostSubnets { - gwIP, _ := util.MatchFirstIPNetFamily(knet.IsIPv6CIDR(hostSubnet), manager.gatewayIPs) - if gwIP == nil { - gwIP = util.GetNodeGatewayIfAddr(hostSubnet) - } - - mgmtIP, _ := util.MatchFirstIPNetFamily(knet.IsIPv6CIDR(hostSubnet), manager.mgmtIPs) - if mgmtIP == nil { - mgmtIP = util.GetNodeManagementIfAddr(hostSubnet) - } - - for _, ip := range []*net.IPNet{gwIP, mgmtIP} { - excludeIP := &net.IPNet{IP: ip.IP, Mask: util.GetIPFullMask(ip.IP)} - if !util.IsContainedInAnyCIDR(excludeIP, excludeSubnets...) { - excludeSubnets = append(excludeSubnets, excludeIP) - } + for _, ip := range []*net.IPNet{util.GetNodeGatewayIfAddr(hostSubnet), util.GetNodeManagementIfAddr(hostSubnet)} { + excludeSubnets = append(excludeSubnets, + &net.IPNet{IP: ip.IP, Mask: util.GetIPFullMask(ip.IP)}, + ) } } } - return manager.allocator.AddOrUpdateSubnet(subnet.SubnetConfig{ - Name: switchName, - Subnets: hostSubnets, - ReservedSubnets: reservedSubnets, - ExcludeSubnets: excludeSubnets, - }) + return manager.allocator.AddOrUpdateSubnet(switchName, hostSubnets, excludeSubnets...) } // AddNoHostSubnetSwitch adds/updates a switch without any host subnets @@ -92,7 +69,7 @@ func (manager *LogicalSwitchManager) AddNoHostSubnetSwitch(switchName string) er // setting the hostSubnets slice argument to nil in the cache means an object // exists for the switch but it was not assigned a hostSubnet by ovn-kubernetes // this will be true for switches created on nodes that are marked as host-subnet only. - return manager.allocator.AddOrUpdateSubnet(subnet.SubnetConfig{Name: switchName}) + return manager.allocator.AddOrUpdateSubnet(switchName, nil) } // Remove a switch from the the logical switch manager diff --git a/go-controller/pkg/ovn/logical_switch_manager/logical_switch_manager_test.go b/go-controller/pkg/ovn/logical_switch_manager/logical_switch_manager_test.go index ba97521823..276de6d0b1 100644 --- a/go-controller/pkg/ovn/logical_switch_manager/logical_switch_manager_test.go +++ b/go-controller/pkg/ovn/logical_switch_manager/logical_switch_manager_test.go @@ -77,7 +77,7 @@ var _ = ginkgo.Describe("OVN Logical Switch Manager operations", func() { "2000::/64", }, } - err = lsManager.AddOrUpdateSwitch(testNode.switchName, ovntest.MustParseIPNets(testNode.subnets...), nil) + err = lsManager.AddOrUpdateSwitch(testNode.switchName, ovntest.MustParseIPNets(testNode.subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) allocatedHybridOverlayDRIP, err := lsManager.AllocateHybridOverlay(testNode.switchName, []string{"10.1.1.53"}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -102,7 +102,7 @@ var _ = ginkgo.Describe("OVN Logical Switch Manager operations", func() { }, } - err = lsManager.AddOrUpdateSwitch(testNode.switchName, ovntest.MustParseIPNets(testNode.subnets...), nil) + err = lsManager.AddOrUpdateSwitch(testNode.switchName, ovntest.MustParseIPNets(testNode.subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) allocatedHybridOverlayDRIP, err := lsManager.AllocateHybridOverlay(testNode.switchName, []string{}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -129,7 +129,7 @@ var _ = ginkgo.Describe("OVN Logical Switch Manager operations", func() { }, } - err = lsManager.AddOrUpdateSwitch(testNode.switchName, ovntest.MustParseIPNets(testNode.subnets...), nil) + err = lsManager.AddOrUpdateSwitch(testNode.switchName, ovntest.MustParseIPNets(testNode.subnets...)) gomega.Expect(err).NotTo(gomega.HaveOccurred()) err = lsManager.AllocateIPs(testNode.switchName, []*net.IPNet{ {IP: net.ParseIP("10.1.1.3").To4(), Mask: net.CIDRMask(32, 32)}, @@ -160,8 +160,11 @@ var _ = ginkgo.Describe("OVN Logical Switch Manager operations for layer2 user d var lsManager *LogicalSwitchManager ginkgo.BeforeEach(func() { - lsManager = NewL2SwitchManagerForUserDefinedPrimaryNetwork(nil, nil) - gomega.Expect(lsManager.AddOrUpdateSwitch(switchName, ovntest.MustParseIPNets(ipv4Subnet, ipv6Subnet), nil)).NotTo(gomega.HaveOccurred()) + lsManager = NewL2SwitchManagerForUserDefinedPrimaryNetwork() + gomega.Expect(lsManager.AddOrUpdateSwitch( + switchName, + ovntest.MustParseIPNets(ipv4Subnet, ipv6Subnet), + )).NotTo(gomega.HaveOccurred()) gomega.Expect(lsManager.isAllocatedIP(switchName, "192.168.200.1/24")).To(gomega.BeTrue()) gomega.Expect(lsManager.isAllocatedIP(switchName, "192.168.200.2/24")).To(gomega.BeTrue()) gomega.Expect(lsManager.isAllocatedIP(switchName, "fd12:1500::1/64")).To(gomega.BeTrue()) diff --git a/go-controller/pkg/ovn/master.go b/go-controller/pkg/ovn/master.go index 432aa784be..b5394c7ffe 100644 --- a/go-controller/pkg/ovn/master.go +++ b/go-controller/pkg/ovn/master.go @@ -16,7 +16,6 @@ import ( hotypes "github.com/ovn-org/ovn-kubernetes/go-controller/hybrid-overlay/pkg/types" houtil "github.com/ovn-org/ovn-kubernetes/go-controller/hybrid-overlay/pkg/util" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" libovsdbops "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/ops" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb" @@ -122,7 +121,7 @@ func (oc *DefaultNetworkController) nodeGatewayConfig(node *corev1.Node) (*Gatew return nil, err } - gwLRPIPs, err := udn.GetGWRouterIPs(node, oc.GetNetInfo()) + gwLRPIPs, err := util.ParseNodeGatewayRouterJoinAddrs(node, oc.GetNetworkName()) if err != nil { if util.IsAnnotationNotSetError(err) { // FIXME(tssurya): This is present for backwards compatibility diff --git a/go-controller/pkg/ovn/master_test.go b/go-controller/pkg/ovn/master_test.go index 8de1687ee3..bc943ecf8b 100644 --- a/go-controller/pkg/ovn/master_test.go +++ b/go-controller/pkg/ovn/master_test.go @@ -31,7 +31,6 @@ import ( egressqosfake "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/egressqos/v1/apis/clientset/versioned/fake" egressservicefake "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/crd/egressservice/v1/apis/clientset/versioned/fake" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kubevirt" libovsdbops "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/ops" @@ -79,6 +78,7 @@ const ( // ovnNodeID is the id (of type integer) of a node. It is set by cluster-manager. ovnNodeID = "k8s.ovn.org/node-id" ovnNodePrimaryIfAddr = "k8s.ovn.org/node-primary-ifaddr" + ovnNodeSubnets = "k8s.ovn.org/node-subnets" ) func (n tNode) k8sNode(nodeID string) corev1.Node { @@ -86,9 +86,10 @@ func (n tNode) k8sNode(nodeID string) corev1.Node { ObjectMeta: metav1.ObjectMeta{ Name: n.Name, Annotations: map[string]string{ - ovnNodeID: nodeID, - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", fmt.Sprintf("%s/24", n.NodeIP)), - ovnNodePrimaryIfAddr: fmt.Sprintf("{\"ipv4\": \"%s\", \"ipv6\": \"%s\"}", fmt.Sprintf("%s/24", n.NodeIP), ""), + ovnNodeID: nodeID, + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\": \"100.64.0." + nodeID + "/16\"}}", + util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", fmt.Sprintf("%s/24", n.NodeIP)), + ovnNodePrimaryIfAddr: fmt.Sprintf("{\"ipv4\": \"%s\", \"ipv6\": \"%s\"}", fmt.Sprintf("%s/24", n.NodeIP), ""), }, }, Status: corev1.NodeStatus{ @@ -962,7 +963,6 @@ var _ = ginkgo.Describe("Default network controller operations", func() { // Restore global default values before each testcase gomega.Expect(config.PrepareTestConfig()).To(gomega.Succeed()) fakeOvn = NewFakeOVN(true) - config.OVNKubernetesFeature.EnableEgressIP = true app = cli.NewApp() app.Name = "test" @@ -1043,19 +1043,6 @@ var _ = ginkgo.Describe("Default network controller operations", func() { l3GatewayConfig = node1.gatewayConfig(config.GatewayModeLocal, uint(vlanID)) err = util.SetL3GatewayConfig(nodeAnnotator, l3GatewayConfig) gomega.Expect(err).NotTo(gomega.HaveOccurred()) - if config.OVNKubernetesFeature.EnableEgressIP { - physicalIPs := []string{} - for _, ip := range l3GatewayConfig.IPAddresses { - physicalIPs = append(physicalIPs, ip.IP.String()) - } - egressNodeIPsASv4, egressNodeIPsASv6 := buildEgressIPNodeAddressSets(physicalIPs) - if config.IPv4Mode { - dbSetup.NBData = append(dbSetup.NBData, egressNodeIPsASv4) - } - if config.IPv6Mode { - dbSetup.NBData = append(dbSetup.NBData, egressNodeIPsASv6) - } - } err = util.UpdateNodeManagementPortMACAddresses(&testNode, nodeAnnotator, ovntest.MustParseMAC(node1.NodeMgmtPortMAC), types.DefaultNetworkName) gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -1258,18 +1245,10 @@ var _ = ginkgo.Describe("Default network controller operations", func() { newNodeSNAT("stale-nodeNAT-UUID-3", "10.0.0.3", Node1GatewayRouterIP), newNodeSNAT("stale-nodeNAT-UUID-4", "10.0.0.3", "172.16.16.3"), } - extraNatsWithMatch := []*nbdb.NAT{ // used for pod network advertised test - newNodeSNATWithMatch("stale-nodeNAT-UUID-1", "10.1.0.3", Node1GatewayRouterIP, "ip4.dst == $a712973235162149816"), - newNodeSNATWithMatch("stale-nodeNAT-UUID-2", "10.2.0.3", Node1GatewayRouterIP, "ip4.dst == $a712973235162149816"), - newNodeSNATWithMatch("stale-nodeNAT-UUID-3", "10.0.0.3", Node1GatewayRouterIP, "ip4.dst == $a712973235162149816"), - newNodeSNATWithMatch("stale-nodeNAT-UUID-4", "10.0.0.3", "172.16.16.3", "ip4.dst == $a712973235162149816"), - } ginkgo.DescribeTable( "reconciles pod network SNATs from syncGateway", func(condition func(*DefaultNetworkController) error, expectedExtraNATs ...*nbdb.NAT) { - config.OVNKubernetesFeature.AdvertisedUDNIsolationMode = config.AdvertisedUDNIsolationModeStrict app.Action = func(ctx *cli.Context) error { - // Initialize config from CLI flags (including --init-gateways) _, err := config.InitConfig(ctx, nil, nil) gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -1279,10 +1258,6 @@ var _ = ginkgo.Describe("Default network controller operations", func() { _, err = fakeClient.KubeClient.CoreV1().Pods(ns.Name).Create(context.TODO(), &pod, metav1.CreateOptions{}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) - // generate specific test conditions (after base config is set) - err = condition(oc) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - // Let the real code run and ensure OVN database sync gomega.Expect(oc.WatchNodes()).To(gomega.Succeed()) @@ -1290,11 +1265,11 @@ var _ = ginkgo.Describe("Default network controller operations", func() { GR := &nbdb.LogicalRouter{ Name: types.GWRouterPrefix + node1.Name, } - if !oc.isPodNetworkAdvertisedAtNode(node1.Name) { - err = libovsdbops.CreateOrUpdateNATs(nbClient, GR, extraNats...) - } else { - err = libovsdbops.CreateOrUpdateNATs(nbClient, GR, extraNatsWithMatch...) - } + err = libovsdbops.CreateOrUpdateNATs(nbClient, GR, extraNats...) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + + // generate specific test conditions + err = condition(oc) gomega.Expect(err).NotTo(gomega.HaveOccurred()) // ensure the stale SNAT's are cleaned up @@ -1306,23 +1281,19 @@ var _ = ginkgo.Describe("Default network controller operations", func() { err = oc.syncNodeGateway(testNode) gomega.Expect(err).NotTo(gomega.HaveOccurred()) - skipSnat := config.Gateway.DisableSNATMultipleGWs && !oc.GetNetInfo().IsPrimaryNetwork() + skipSnat := config.Gateway.DisableSNATMultipleGWs || oc.isPodNetworkAdvertisedAtNode(node1.Name) var clusterSubnets []*net.IPNet for _, clusterSubnet := range config.Default.ClusterSubnets { clusterSubnets = append(clusterSubnets, clusterSubnet.CIDR) } expectedNBDatabaseState = addNodeLogicalFlowsWithServiceController(nil, expectedOVNClusterRouter, expectedNodeSwitch, expectedClusterRouterPortGroup, expectedClusterPortGroup, &node1, oc.svcTemplateSupport) - if !oc.isPodNetworkAdvertisedAtNode(node1.Name) { - expectedNBDatabaseState = generateGatewayInitExpectedNB(expectedNBDatabaseState, expectedOVNClusterRouter, - expectedNodeSwitch, node1.Name, clusterSubnets, []*net.IPNet{subnet}, l3GatewayConfig, - []*net.IPNet{classBIPAddress(node1.LrpIP)}, []*net.IPNet{classBIPAddress(node1.DrLrpIP)}, - skipSnat, node1.NodeMgmtPortIP, "1400") - } else { - expectedNBDatabaseState = generateGatewayInitExpectedNBWithPodNetworkAdvertised(expectedNBDatabaseState, expectedOVNClusterRouter, - expectedNodeSwitch, node1.Name, clusterSubnets, []*net.IPNet{subnet}, l3GatewayConfig, - []*net.IPNet{classBIPAddress(node1.LrpIP)}, []*net.IPNet{classBIPAddress(node1.DrLrpIP)}, - skipSnat, node1.NodeMgmtPortIP, "1400", true) + expectedNBDatabaseState = generateGatewayInitExpectedNB(expectedNBDatabaseState, expectedOVNClusterRouter, + expectedNodeSwitch, node1.Name, clusterSubnets, []*net.IPNet{subnet}, l3GatewayConfig, + []*net.IPNet{classBIPAddress(node1.LrpIP)}, []*net.IPNet{classBIPAddress(node1.DrLrpIP)}, + skipSnat, node1.NodeMgmtPortIP, "1400") + + if oc.isPodNetworkAdvertisedAtNode(node1.Name) { addrSet, err := oc.addressSetFactory.GetAddressSet(GetAdvertisedNetworkSubnetsAddressSetDBIDs()) gomega.Expect(err).NotTo(gomega.HaveOccurred()) expectedNBDatabaseState = generateAdvertisedUDNIsolationExpectedNB(expectedNBDatabaseState, oc.GetNetworkName(), oc.GetNetworkID(), clusterSubnets, expectedNodeSwitch, addrSet) @@ -1376,21 +1347,17 @@ var _ = ginkgo.Describe("Default network controller operations", func() { mutableNetInfo.SetPodNetworkAdvertisedVRFs(map[string][]string{"node1": {"vrf"}}) return oc.Reconcile(mutableNetInfo) }, - // won't be deleted on this node since this pod belongs to node-1 and is advertised so we keep this SNAT - newNodeSNATWithMatch("stale-nodeNAT-UUID-3", "10.0.0.3", Node1GatewayRouterIP, "ip4.dst == $a712973235162149816"), - // won't be deleted on this node but will be deleted on the node whose IP is 172.16.16.3 since this pod belongs to node-1 - newNodeSNATWithMatch("stale-nodeNAT-UUID-4", "10.0.0.3", "172.16.16.3", "ip4.dst == $a712973235162149816"), + newNodeSNAT("stale-nodeNAT-UUID-4", "10.0.0.3", "172.16.16.3"), // won't be deleted on this node but will be deleted on the node whose IP is 172.16.16.3 since this pod belongs to this node ), ginkgo.Entry( "When pod network is advertised and DisableSNATMultipleGWs is false", func(oc *DefaultNetworkController) error { config.Gateway.DisableSNATMultipleGWs = false - config.OVNKubernetesFeature.EnableEgressIP = true mutableNetInfo := util.NewMutableNetInfo(oc.GetNetInfo()) mutableNetInfo.SetPodNetworkAdvertisedVRFs(map[string][]string{"node1": {"vrf"}}) return oc.Reconcile(mutableNetInfo) }, - newNodeSNATWithMatch("stale-nodeNAT-UUID-4", "10.0.0.3", "172.16.16.3", "ip4.dst == $a712973235162149816"), // won't be deleted on this node but will be deleted on the node whose IP is 172.16.16.3 since this pod belongs to this node + newNodeSNAT("stale-nodeNAT-UUID-4", "10.0.0.3", "172.16.16.3"), // won't be deleted on this node but will be deleted on the node whose IP is 172.16.16.3 since this pod belongs to this node ), ) @@ -1566,62 +1533,45 @@ var _ = ginkgo.Describe("Default network controller operations", func() { gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.DescribeTable("doesn't retry deleting a node that is missing annotation", - func(node *corev1.Node) { - app.Action = func(ctx *cli.Context) error { - _, err := config.InitConfig(ctx, nil, nil) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - startFakeController(oc, wg) - ginkgo.By("create new node with no annotation defined and ensure there's a retry entry") - _, err = kubeFakeClient.CoreV1().Nodes().Create(context.TODO(), node, metav1.CreateOptions{}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - retry.CheckRetryObjectMultipleFieldsEventually( - node.Name, - oc.retryNodes, - gomega.BeNil(), // oldObj should be nil - gomega.Not(gomega.BeNil()), // newObj should not be nil - ) - keyExists := true - retry.CheckRetryObjectEventually(node.Name, keyExists, oc.retryNodes) - ginkgo.By("delete node and check that there are no retries for the deleted node") - err = kubeFakeClient.CoreV1().Nodes().Delete(context.TODO(), node.Name, metav1.DeleteOptions{}) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - retry.CheckRetryObjectEventually(node.Name, !keyExists, oc.retryNodes) - ginkgo.By("ensure failures for sync host network address or adding nodes are cleared") - gomega.Eventually(func() bool { - _, foundSyncHostNetAddrSetFailed := oc.syncHostNetAddrSetFailed.Load(node.Name) - _, foundAddNodeFailed := oc.addNodeFailed.Load(node.Name) - return foundSyncHostNetAddrSetFailed || foundAddNodeFailed - }).Should(gomega.BeFalse()) - return nil - } - err := app.Run([]string{ - app.Name, - }) + ginkgo.It("doesn't retry deleting a node that doesn't have a node-subnet annotation", func() { + app.Action = func(ctx *cli.Context) error { + _, err := config.InitConfig(ctx, nil, nil) gomega.Expect(err).NotTo(gomega.HaveOccurred()) - - }, - ginkgo.Entry("k8s.ovn.org/node-subnets", - &corev1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Name: "newNode", - Annotations: map[string]string{ - "k8s.ovn.org/node-id": "2", - }, - }, - }, - ), - ginkgo.Entry("k8s.ovn.org/node-id", - &corev1.Node{ + startFakeController(oc, wg) + newNode := &corev1.Node{ ObjectMeta: metav1.ObjectMeta{ - Name: "newNode", - Annotations: map[string]string{ - "k8s.ovn.org/node-subnets": "{\"default\": [\"10.130.0.0/23\", \"fd01:0:0:2::/64\"]}", - }, + Name: "newNode", + Annotations: map[string]string{}, }, - }, - ), - ) + } + ginkgo.By("create new node with no host-subnet annotation defined and ensure theres a retry entry") + _, err = kubeFakeClient.CoreV1().Nodes().Create(context.TODO(), newNode, metav1.CreateOptions{}) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + retry.CheckRetryObjectMultipleFieldsEventually( + newNode.Name, + oc.retryNodes, + gomega.BeNil(), // oldObj should be nil + gomega.Not(gomega.BeNil()), // newObj should not be nil + ) + keyExists := true + retry.CheckRetryObjectEventually(newNode.Name, keyExists, oc.retryNodes) + ginkgo.By("delete node and check that there are no retries for the deleted node") + err = kubeFakeClient.CoreV1().Nodes().Delete(context.TODO(), newNode.Name, metav1.DeleteOptions{}) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + retry.CheckRetryObjectEventually(newNode.Name, !keyExists, oc.retryNodes) + ginkgo.By("ensure failures for sync host network address or adding nodes are cleared") + gomega.Eventually(func() bool { + _, foundSyncHostNetAddrSetFailed := oc.syncHostNetAddrSetFailed.Load(newNode.Name) + _, foundAddNodeFailed := oc.addNodeFailed.Load(newNode.Name) + return foundSyncHostNetAddrSetFailed || foundAddNodeFailed + }).Should(gomega.BeFalse()) + return nil + } + err := app.Run([]string{ + app.Name, + }) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) ginkgo.It("delete a partially constructed node", func() { app.Action = func(ctx *cli.Context) error { @@ -1732,7 +1682,7 @@ var _ = ginkgo.Describe("Default network controller operations", func() { Annotations: map[string]string{ "k8s.ovn.org/node-subnets": fmt.Sprintf("{\"default\":[\"%s\", \"fd02:0:0:2::2895/64\"]}", newNodeSubnet), "k8s.ovn.org/node-chassis-id": "2", - util.OvnNodeID: "2", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.2/16\"}}", }, }, } @@ -1919,7 +1869,7 @@ var _ = ginkgo.Describe("Default network controller operations", func() { gomega.Expect(err).NotTo(gomega.HaveOccurred()) mgmt_ips := util.GetNodeManagementIfAddr(hostSubnets[0]) ips = append(ips, mgmt_ips.IP.String()) - lrpips, err := udn.GetGWRouterIPs(updatedNode, oc.GetNetInfo()) + lrpips, err := util.ParseNodeGatewayRouterJoinAddrs(updatedNode, types.DefaultNetworkName) gomega.Expect(err).NotTo(gomega.HaveOccurred()) lrpip, _, _ := net.ParseCIDR(lrpips[0].String()) ips = append(ips, lrpip.String()) @@ -2012,12 +1962,6 @@ func newNodeSNAT(uuid, logicalIP, externalIP string) *nbdb.NAT { } } -func newNodeSNATWithMatch(uuid, logicalIP, externalIP, match string) *nbdb.NAT { - nat := newNodeSNAT(uuid, logicalIP, externalIP) - nat.Match = match - return nat -} - func TestController_syncNodes(t *testing.T) { gomega.RegisterFailHandler(ginkgo.Fail) diff --git a/go-controller/pkg/ovn/multicast_test.go b/go-controller/pkg/ovn/multicast_test.go index 11e319214c..b2f2598320 100644 --- a/go-controller/pkg/ovn/multicast_test.go +++ b/go-controller/pkg/ovn/multicast_test.go @@ -266,7 +266,7 @@ func newNodeWithNad(nad *nadapi.NetworkAttachmentDefinition, networkName, networ n.Annotations["k8s.ovn.org/node-mgmt-port-mac-addresses"] = fmt.Sprintf("{\"default\":\"96:8f:e8:25:a2:e5\",\"%s\":\"d6:bc:85:32:30:fb\"}", networkName) n.Annotations["k8s.ovn.org/node-chassis-id"] = "abdcef" n.Annotations["k8s.ovn.org/l3-gateway-config"] = "{\"default\":{\"mac-address\":\"52:54:00:e2:ed:d0\",\"ip-addresses\":[\"10.1.1.10/24\"],\"ip-address\":\"10.1.1.10/24\",\"next-hops\":[\"10.1.1.1\"],\"next-hop\":\"10.1.1.1\"}}" - n.Annotations[util.OvnNodeID] = "4" + n.Annotations["k8s.ovn.org/node-gateway-router-lrp-ifaddrs"] = fmt.Sprintf("{\"default\":{\"ipv4\":\"100.64.0.4/16\"},\"%s\":{\"ipv4\":\"100.65.0.4/16\"}}", networkName) } return n } diff --git a/go-controller/pkg/ovn/multipolicy_test.go b/go-controller/pkg/ovn/multipolicy_test.go index fc50dea5dd..095b35772f 100644 --- a/go-controller/pkg/ovn/multipolicy_test.go +++ b/go-controller/pkg/ovn/multipolicy_test.go @@ -109,13 +109,13 @@ func (p testPod) populateSecondaryNetworkLogicalSwitchCache(ocInfo secondaryCont switch ocInfo.bnc.TopologyType() { case ovntypes.Layer3Topology: podInfo := p.secondaryPodInfos[ocInfo.bnc.GetNetworkName()] - err = ocInfo.bnc.lsManager.AddOrUpdateSwitch(ocInfo.bnc.GetNetworkScopedName(p.nodeName), []*net.IPNet{ovntest.MustParseIPNet(podInfo.nodeSubnet)}, nil) + err = ocInfo.bnc.lsManager.AddOrUpdateSwitch(ocInfo.bnc.GetNetworkScopedName(p.nodeName), []*net.IPNet{ovntest.MustParseIPNet(podInfo.nodeSubnet)}) case ovntypes.Layer2Topology: subnet := ocInfo.bnc.Subnets()[0] - err = ocInfo.bnc.lsManager.AddOrUpdateSwitch(ocInfo.bnc.GetNetworkScopedName(ovntypes.OVNLayer2Switch), []*net.IPNet{subnet.CIDR}, nil) + err = ocInfo.bnc.lsManager.AddOrUpdateSwitch(ocInfo.bnc.GetNetworkScopedName(ovntypes.OVNLayer2Switch), []*net.IPNet{subnet.CIDR}) case ovntypes.LocalnetTopology: subnet := ocInfo.bnc.Subnets()[0] - err = ocInfo.bnc.lsManager.AddOrUpdateSwitch(ocInfo.bnc.GetNetworkScopedName(ovntypes.OVNLocalnetSwitch), []*net.IPNet{subnet.CIDR}, nil) + err = ocInfo.bnc.lsManager.AddOrUpdateSwitch(ocInfo.bnc.GetNetworkScopedName(ovntypes.OVNLocalnetSwitch), []*net.IPNet{subnet.CIDR}) } gomega.Expect(err).NotTo(gomega.HaveOccurred()) } diff --git a/go-controller/pkg/ovn/namespace.go b/go-controller/pkg/ovn/namespace.go index 072881714d..01f189228b 100644 --- a/go-controller/pkg/ovn/namespace.go +++ b/go-controller/pkg/ovn/namespace.go @@ -8,13 +8,10 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/klog/v2" - utilnet "k8s.io/utils/net" "github.com/ovn-kubernetes/libovsdb/ovsdb" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" - libovsdbops "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/ops" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util" utilerrors "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util/errors" @@ -237,41 +234,9 @@ func (oc *DefaultNetworkController) updateNamespace(old, newer *corev1.Namespace if err != nil { errors = append(errors, err) } else { - // Helper function to handle the complex SNAT operations - handleSNATOps := func() error { - extIPs, err := getExternalIPsGR(oc.watchFactory, pod.Spec.NodeName) - if err != nil { - return err - } - - var ops []ovsdb.Operation - // Handle each pod IP individually since each IP family needs its own SNAT match - for _, podIP := range podAnnotation.IPs { - ipFamily := utilnet.IPv4 - if utilnet.IsIPv6CIDR(podIP) { - ipFamily = utilnet.IPv6 - } - snatMatch, err := GetNetworkScopedClusterSubnetSNATMatch(oc.nbClient, oc.GetNetInfo(), pod.Spec.NodeName, oc.isPodNetworkAdvertisedAtNode(pod.Spec.NodeName), ipFamily) - if err != nil { - return fmt.Errorf("failed to get SNAT match for node %s for network %s: %v", pod.Spec.NodeName, oc.GetNetworkName(), err) - } - ops, err = addOrUpdatePodSNATOps(oc.nbClient, oc.GetNetworkScopedGWRouterName(pod.Spec.NodeName), extIPs, []*net.IPNet{podIP}, snatMatch, ops) - if err != nil { - return err - } - } - - // Execute all operations in a single transaction - if len(ops) > 0 { - _, err = libovsdbops.TransactAndCheck(oc.nbClient, ops) - if err != nil { - return fmt.Errorf("failed to update SNAT for pod %s on router %s: %v", pod.Name, oc.GetNetworkScopedGWRouterName(pod.Spec.NodeName), err) - } - } - return nil - } - - if err := handleSNATOps(); err != nil { + if extIPs, err := getExternalIPsGR(oc.watchFactory, pod.Spec.NodeName); err != nil { + errors = append(errors, err) + } else if err = addOrUpdatePodSNAT(oc.nbClient, oc.GetNetworkScopedGWRouterName(pod.Spec.NodeName), extIPs, podAnnotation.IPs); err != nil { errors = append(errors, err) } } @@ -371,22 +336,21 @@ func (oc *DefaultNetworkController) getHostNamespaceAddressesForNode(node *corev return nil, err } for _, hostSubnet := range hostSubnets { - mgmtIfAddr := oc.GetNodeManagementIP(hostSubnet) + mgmtIfAddr := util.GetNodeManagementIfAddr(hostSubnet) ips = append(ips, mgmtIfAddr.IP) } // for shared gateway mode we will use LRP IPs to SNAT host network traffic // so add these to the address set. - lrpIPs, gwIPsErr := udn.GetGWRouterIPs(node, oc.GetNetInfo()) - if gwIPsErr != nil { - if !util.IsAnnotationNotSetError(gwIPsErr) { - return nil, gwIPsErr - } - // FIXME(tssurya): This is present for backwards compatibility - // Remove me a few months from now - var lrpAddrsErr error - lrpIPs, lrpAddrsErr = util.ParseNodeGatewayRouterLRPAddrs(node) - if lrpAddrsErr != nil { - return nil, fmt.Errorf("failed to fallback to annotations after error %q: %w", gwIPsErr, lrpAddrsErr) + lrpIPs, err := util.ParseNodeGatewayRouterJoinAddrs(node, oc.GetNetworkName()) + if err != nil { + if util.IsAnnotationNotSetError(err) { + // FIXME(tssurya): This is present for backwards compatibility + // Remove me a few months from now + var err1 error + lrpIPs, err1 = util.ParseNodeGatewayRouterLRPAddrs(node) + if err1 != nil { + return nil, fmt.Errorf("failed to get join switch port IP address for node %s: %v/%v", node.Name, err, err1) + } } } diff --git a/go-controller/pkg/ovn/namespace_test.go b/go-controller/pkg/ovn/namespace_test.go index 4e400bca85..3e8c556b8a 100644 --- a/go-controller/pkg/ovn/namespace_test.go +++ b/go-controller/pkg/ovn/namespace_test.go @@ -17,7 +17,6 @@ import ( "k8s.io/client-go/kubernetes" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" libovsdbutil "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/util" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb" @@ -337,7 +336,7 @@ var _ = ginkgo.Describe("OVN Namespace Operations", func() { // be in the addressset yet, depending on if the host subnets annotation of the node exists in the informer cache. The addressset // can only be deterministic when WatchNamespaces() handles this host network namespace. - gwLRPIPs, err := udn.GetGWRouterIPs(&testNode, &util.DefaultNetInfo{}) + gwLRPIPs, err := util.ParseNodeGatewayRouterJoinAddrs(&testNode, ovntypes.DefaultNetworkName) gomega.Expect(err).NotTo(gomega.HaveOccurred()) gomega.Expect(gwLRPIPs).ToNot(gomega.BeEmpty()) diff --git a/go-controller/pkg/ovn/ovn.go b/go-controller/pkg/ovn/ovn.go index d935bca85f..293e23f4aa 100644 --- a/go-controller/pkg/ovn/ovn.go +++ b/go-controller/pkg/ovn/ovn.go @@ -1,6 +1,8 @@ package ovn import ( + "bytes" + "encoding/json" "errors" "fmt" "net" @@ -14,7 +16,6 @@ import ( listers "k8s.io/client-go/listers/core/v1" ref "k8s.io/client-go/tools/reference" "k8s.io/klog/v2" - v1pod "k8s.io/kubernetes/pkg/api/v1/pod" libovsdbclient "github.com/ovn-kubernetes/libovsdb/client" @@ -116,10 +117,6 @@ func networkStatusAnnotationsChanged(oldPod, newPod *corev1.Pod) bool { return oldPod.Annotations[nettypes.NetworkStatusAnnot] != newPod.Annotations[nettypes.NetworkStatusAnnot] } -func podBecameReady(oldPod, newPod *corev1.Pod) bool { - return !v1pod.IsPodReadyConditionTrue(oldPod.Status) && v1pod.IsPodReadyConditionTrue(newPod.Status) -} - // ensurePod tries to set up a pod. It returns nil on success and error on failure; failure // indicates the pod set up should be retried later. func (oc *DefaultNetworkController) ensurePod(oldPod, pod *corev1.Pod, addPort bool) error { @@ -134,14 +131,6 @@ func (oc *DefaultNetworkController) ensurePod(oldPod, pod *corev1.Pod, addPort b return oc.ensureRemotePodIP(oldPod, pod, addPort) } - // If an external gateway pod is in terminating or not ready state then remove the - // routes for the external gateway pod - if util.PodTerminating(pod) || !v1pod.IsPodReadyConditionTrue(pod.Status) { - if err := oc.deletePodExternalGW(pod); err != nil { - return fmt.Errorf("ensurePod failed %s/%s: %w", pod.Namespace, pod.Name, err) - } - } - if oc.isPodScheduledinLocalZone(pod) { klog.V(5).Infof("Ensuring zone local for Pod %s/%s in node %s", pod.Namespace, pod.Name, pod.Spec.NodeName) return oc.ensureLocalZonePod(oldPod, pod, addPort) @@ -181,7 +170,7 @@ func (oc *DefaultNetworkController) ensureLocalZonePod(oldPod, pod *corev1.Pod, } } else { // either pod is host-networked or its an update for a normal pod (addPort=false case) - if oldPod == nil || exGatewayAnnotationsChanged(oldPod, pod) || networkStatusAnnotationsChanged(oldPod, pod) || podBecameReady(oldPod, pod) { + if oldPod == nil || exGatewayAnnotationsChanged(oldPod, pod) || networkStatusAnnotationsChanged(oldPod, pod) { if err := oc.addPodExternalGW(pod); err != nil { return fmt.Errorf("addPodExternalGW failed for %s/%s: %w", pod.Namespace, pod.Name, err) } @@ -248,7 +237,7 @@ func (oc *DefaultNetworkController) ensureRemoteZonePod(oldPod, pod *corev1.Pod, } // either pod is host-networked or its an update for a normal pod (addPort=false case) - if oldPod == nil || exGatewayAnnotationsChanged(oldPod, pod) || networkStatusAnnotationsChanged(oldPod, pod) || podBecameReady(oldPod, pod) { + if oldPod == nil || exGatewayAnnotationsChanged(oldPod, pod) || networkStatusAnnotationsChanged(oldPod, pod) { // check if this remote pod is serving as an external GW. If so add the routes in the namespace // associated with this remote pod if err := oc.addPodExternalGW(pod); err != nil { @@ -397,8 +386,7 @@ func (oc *DefaultNetworkController) syncNodeGateway(node *corev1.Node) error { return fmt.Errorf("error creating gateway for node %s: %v", node.Name, err) } - if util.IsPodNetworkAdvertisedAtNode(oc, node.Name) && - config.OVNKubernetesFeature.AdvertisedUDNIsolationMode == config.AdvertisedUDNIsolationModeStrict { + if util.IsPodNetworkAdvertisedAtNode(oc, node.Name) { return oc.addAdvertisedNetworkIsolation(node.Name) } return oc.deleteAdvertisedNetworkIsolation(node.Name) @@ -423,6 +411,24 @@ func nodeSubnetChanged(oldNode, node *corev1.Node, netName string) bool { return util.NodeSubnetAnnotationChangedForNetwork(oldNode, node, netName) } +func joinCIDRChanged(oldNode, node *corev1.Node, netName string) bool { + var oldCIDRs, newCIDRs map[string]json.RawMessage + + if oldNode.Annotations[util.OVNNodeGRLRPAddrs] == node.Annotations[util.OVNNodeGRLRPAddrs] { + return false + } + + if err := json.Unmarshal([]byte(oldNode.Annotations[util.OVNNodeGRLRPAddrs]), &oldCIDRs); err != nil { + klog.Errorf("Failed to unmarshal old node %s annotation: %v", oldNode.Name, err) + return false + } + if err := json.Unmarshal([]byte(node.Annotations[util.OVNNodeGRLRPAddrs]), &newCIDRs); err != nil { + klog.Errorf("Failed to unmarshal new node %s annotation: %v", node.Name, err) + return false + } + return !bytes.Equal(oldCIDRs[netName], newCIDRs[netName]) +} + func primaryAddrChanged(oldNode, newNode *corev1.Node) bool { oldIP, _ := util.GetNodePrimaryIP(oldNode) newIP, _ := util.GetNodePrimaryIP(newNode) diff --git a/go-controller/pkg/ovn/pods.go b/go-controller/pkg/ovn/pods.go index 0ad9442e3e..5c3478f3cb 100644 --- a/go-controller/pkg/ovn/pods.go +++ b/go-controller/pkg/ovn/pods.go @@ -12,7 +12,6 @@ import ( corev1 "k8s.io/api/core/v1" ktypes "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" - utilnet "k8s.io/utils/net" "github.com/ovn-kubernetes/libovsdb/ovsdb" @@ -311,26 +310,13 @@ func (oc *DefaultNetworkController) addLogicalPort(pod *corev1.Pod) (err error) if err != nil { return err } - } else if config.Gateway.DisableSNATMultipleGWs { + } else if config.Gateway.DisableSNATMultipleGWs && !oc.isPodNetworkAdvertisedAtNode(pod.Spec.NodeName) { // Add NAT rules to pods if disable SNAT is set and does not have // namespace annotations to go through external egress router if extIPs, err := getExternalIPsGR(oc.watchFactory, pod.Spec.NodeName); err != nil { return err - } else { - // Handle each pod IP individually since each IP family needs its own SNAT match - for _, podIP := range podAnnotation.IPs { - ipFamily := utilnet.IPv4 - if utilnet.IsIPv6CIDR(podIP) { - ipFamily = utilnet.IPv6 - } - snatMatch, err := GetNetworkScopedClusterSubnetSNATMatch(oc.nbClient, oc.GetNetInfo(), pod.Spec.NodeName, oc.isPodNetworkAdvertisedAtNode(pod.Spec.NodeName), ipFamily) - if err != nil { - return fmt.Errorf("failed to get SNAT match for node %s for network %s: %v", pod.Spec.NodeName, oc.GetNetworkName(), err) - } - if ops, err = addOrUpdatePodSNATOps(oc.nbClient, oc.GetNetworkScopedGWRouterName(pod.Spec.NodeName), extIPs, []*net.IPNet{podIP}, snatMatch, ops); err != nil { - return err - } - } + } else if ops, err = addOrUpdatePodSNATOps(oc.nbClient, oc.GetNetworkScopedGWRouterName(pod.Spec.NodeName), extIPs, podAnnotation.IPs, ops); err != nil { + return err } } diff --git a/go-controller/pkg/ovn/pods_test.go b/go-controller/pkg/ovn/pods_test.go index c59a841d75..cf1caae6e7 100644 --- a/go-controller/pkg/ovn/pods_test.go +++ b/go-controller/pkg/ovn/pods_test.go @@ -124,12 +124,6 @@ func newPod(namespace, name, node, podIP string) *corev1.Pod { Phase: corev1.PodRunning, PodIP: podIP, PodIPs: podIPs, - Conditions: []corev1.PodCondition{ - { - Type: corev1.PodReady, - Status: corev1.ConditionTrue, - }, - }, }, } } @@ -329,7 +323,7 @@ func (p testPod) populateControllerLogicalSwitchCache(bnc *BaseNetworkController for _, subnet := range strings.Split(p.nodeSubnet, " ") { subnets = append(subnets, ovntest.MustParseIPNet(subnet)) } - err := bnc.lsManager.AddOrUpdateSwitch(bnc.GetNetworkScopedSwitchName(p.nodeName), subnets, nil) + err := bnc.lsManager.AddOrUpdateSwitch(bnc.GetNetworkScopedSwitchName(p.nodeName), subnets) gomega.Expect(err).NotTo(gomega.HaveOccurred()) } @@ -1944,7 +1938,7 @@ var _ = ginkgo.Describe("OVN Pod Operations", func() { }, ) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(testNode.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(testNode.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) err = fakeOvn.controller.WatchNamespaces() gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -2176,7 +2170,7 @@ var _ = ginkgo.Describe("OVN Pod Operations", func() { Items: []corev1.Pod{}, }, ) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(testNodeWithLS.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(testNodeWithLS.Name, []*net.IPNet{ovntest.MustParseIPNet(v4Node1Subnet)}) gomega.Expect(err).NotTo(gomega.HaveOccurred()) err = fakeOvn.controller.WatchPods() gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -2623,7 +2617,7 @@ var _ = ginkgo.Describe("OVN Pod Operations", func() { Items: []corev1.Pod{*myPod}, }, ) - err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(myPod.Spec.NodeName, nil, nil) + err := fakeOvn.controller.lsManager.AddOrUpdateSwitch(myPod.Spec.NodeName, nil) gomega.Expect(err).NotTo(gomega.HaveOccurred()) err = fakeOvn.controller.WatchPods() gomega.Expect(err).NotTo(gomega.HaveOccurred()) diff --git a/go-controller/pkg/ovn/secondary_layer2_network_controller.go b/go-controller/pkg/ovn/secondary_layer2_network_controller.go index 58679c448c..7ce63fc278 100644 --- a/go-controller/pkg/ovn/secondary_layer2_network_controller.go +++ b/go-controller/pkg/ovn/secondary_layer2_network_controller.go @@ -180,7 +180,8 @@ func (h *secondaryLayer2NetworkControllerEventHandler) UpdateResource(oldObj, ne hostCIDRsChanged(oldNode, newNode) || nodeGatewayMTUSupportChanged(oldNode, newNode) _, syncRerouteFailed := h.oc.syncEIPNodeRerouteFailed.Load(newNode.Name) - shouldSyncReroute := syncRerouteFailed || util.NodeHostCIDRsAnnotationChanged(oldNode, newNode) + shouldSyncReroute := syncRerouteFailed || util.NodeHostCIDRsAnnotationChanged(oldNode, newNode) || + joinCIDRChanged(oldNode, newNode, h.oc.GetNetworkName()) nodeSyncsParam = &nodeSyncs{ syncMgmtPort: shouldSyncMgmtPort, syncGw: shouldSyncGW, @@ -312,19 +313,9 @@ func NewSecondaryLayer2NetworkController( ipv4Mode, ipv6Mode := netInfo.IPMode() addressSetFactory := addressset.NewOvnAddressSetFactory(cnci.nbClient, ipv4Mode, ipv6Mode) - lsManager := lsm.NewL2SwitchManager() + lsManagerFactoryFn := lsm.NewL2SwitchManager if netInfo.IsPrimaryNetwork() { - var gatewayIPs, mgmtIPs []*net.IPNet - for _, subnet := range netInfo.Subnets() { - if gwIP := netInfo.GetNodeGatewayIP(subnet.CIDR); gwIP != nil { - gatewayIPs = append(gatewayIPs, gwIP) - } - if mgmtIP := netInfo.GetNodeManagementIP(subnet.CIDR); mgmtIP != nil { - mgmtIPs = append(mgmtIPs, mgmtIP) - } - } - - lsManager = lsm.NewL2SwitchManagerForUserDefinedPrimaryNetwork(gatewayIPs, mgmtIPs) + lsManagerFactoryFn = lsm.NewL2SwitchManagerForUserDefinedPrimaryNetwork } oc := &SecondaryLayer2NetworkController{ @@ -335,7 +326,7 @@ func NewSecondaryLayer2NetworkController( CommonNetworkControllerInfo: *cnci, controllerName: getNetworkControllerName(netInfo.GetNetworkName()), ReconcilableNetInfo: util.NewReconcilableNetInfo(netInfo), - lsManager: lsManager, + lsManager: lsManagerFactoryFn(), logicalPortCache: portCache, namespaces: make(map[string]*namespaceInfo), namespacesMutex: sync.Mutex{}, @@ -491,14 +482,11 @@ func (oc *SecondaryLayer2NetworkController) init() error { oc.clusterLoadBalancerGroupUUID = clusterLBGroupUUID oc.switchLoadBalancerGroupUUID = switchLBGroupUUID oc.routerLoadBalancerGroupUUID = routerLBGroupUUID - excludeSubnets := oc.ExcludeSubnets() - excludeSubnets = append(excludeSubnets, oc.InfrastructureSubnets()...) _, err = oc.initializeLogicalSwitch( oc.GetNetworkScopedSwitchName(types.OVNLayer2Switch), oc.Subnets(), - excludeSubnets, - oc.ReservedSubnets(), + oc.ExcludeSubnets(), oc.clusterLoadBalancerGroupUUID, oc.switchLoadBalancerGroupUUID, ) @@ -587,39 +575,36 @@ func (oc *SecondaryLayer2NetworkController) addUpdateLocalNodeEvent(node *corev1 gwManager := oc.gatewayManagerForNode(node.Name) oc.gatewayManagers.Store(node.Name, gwManager) - err := func() error { - gwConfig, err := oc.nodeGatewayConfig(node) - if err != nil { - return err - } + gwConfig, err := oc.nodeGatewayConfig(node) + if err != nil { + errs = append(errs, err) + oc.gatewaysFailed.Store(node.Name, true) + } else { if err := gwManager.SyncGateway( node, gwConfig, ); err != nil { - return err - } - isUDNAdvertised := util.IsPodNetworkAdvertisedAtNode(oc, node.Name) - err = oc.addOrUpdateUDNClusterSubnetEgressSNAT(gwConfig.hostSubnets, gwManager.gwRouterName, isUDNAdvertised) - if err != nil { - return err - } - shouldIsolate := isUDNAdvertised && config.OVNKubernetesFeature.AdvertisedUDNIsolationMode == config.AdvertisedUDNIsolationModeStrict - if shouldIsolate { - if err = oc.addAdvertisedNetworkIsolation(node.Name); err != nil { - return err - } + errs = append(errs, err) + oc.gatewaysFailed.Store(node.Name, true) } else { - if err = oc.deleteAdvertisedNetworkIsolation(node.Name); err != nil { - return err + if !util.IsPodNetworkAdvertisedAtNode(oc, node.Name) { + err = oc.addUDNClusterSubnetEgressSNAT(gwConfig.hostSubnets, gwManager.gwRouterName) + if err == nil && util.IsRouteAdvertisementsEnabled() { + err = oc.deleteAdvertisedNetworkIsolation(node.Name) + } + } else { + err = oc.deleteUDNClusterSubnetEgressSNAT(gwConfig.hostSubnets, gwManager.gwRouterName) + if err == nil { + err = oc.addAdvertisedNetworkIsolation(node.Name) + } + } + if err != nil { + errs = append(errs, err) + oc.gatewaysFailed.Store(node.Name, true) + } else { + oc.gatewaysFailed.Delete(node.Name) } } - oc.gatewaysFailed.Delete(node.Name) - return nil - }() - - if err != nil { - errs = append(errs, err) - oc.gatewaysFailed.Store(node.Name, true) } } @@ -693,7 +678,7 @@ func (oc *SecondaryLayer2NetworkController) addUpdateRemoteNodeEvent(node *corev } func (oc *SecondaryLayer2NetworkController) addPortForRemoteNodeGR(node *corev1.Node) error { - nodeJoinSubnetIPs, err := udn.GetGWRouterIPs(node, oc.GetNetInfo()) + nodeJoinSubnetIPs, err := util.ParseNodeGatewayRouterJoinAddrs(node, oc.GetNetworkName()) if err != nil { if util.IsAnnotationNotSetError(err) { // remote node may not have the annotation yet, suppress it @@ -756,8 +741,7 @@ func (oc *SecondaryLayer2NetworkController) deleteNodeEvent(node *corev1.Node) e return nil } -// addOrUpdateUDNClusterSubnetEgressSNAT adds or updates the SNAT on each node's GR in L2 networks for each UDN -// Based on the isUDNAdvertised flag, the SNAT matches are slightly different +// addUDNClusterSubnetEgressSNAT adds the SNAT on each node's GR in L2 networks // snat eth.dst == d6:cf:fd:2c:a6:44 169.254.0.12 10.128.0.0/14 // snat eth.dst == d6:cf:fd:2c:a6:44 169.254.0.12 2010:100:200::/64 // these SNATs are required for pod2Egress traffic in LGW mode and pod2SameNode traffic in SGW mode to function properly on UDNs @@ -767,12 +751,9 @@ func (oc *SecondaryLayer2NetworkController) deleteNodeEvent(node *corev1.Node) e // externalIP = "169.254.0.12"; which is the masqueradeIP for this L2 UDN // so all in all we want to condionally SNAT all packets that are coming from pods hosted on this node, // which are leaving via UDN's mpX interface to the UDN's masqueradeIP. -// If isUDNAdvertised is true, then we want to SNAT all packets that are coming from pods on this network -// leaving towards nodeIPs on the cluster to masqueradeIP. If network is advertise then the SNAT looks like this: -// "eth.dst == 0a:58:5d:5d:00:02 && (ip4.dst == $a712973235162149816)" "169.254.0.36" "93.93.0.0/16" -func (oc *SecondaryLayer2NetworkController) addOrUpdateUDNClusterSubnetEgressSNAT(localPodSubnets []*net.IPNet, gwRouterName string, isUDNAdvertised bool) error { +func (oc *SecondaryLayer2NetworkController) addUDNClusterSubnetEgressSNAT(localPodSubnets []*net.IPNet, gwRouterName string) error { outputPort := types.GWRouterToJoinSwitchPrefix + gwRouterName - nats, err := oc.buildUDNEgressSNAT(localPodSubnets, outputPort, isUDNAdvertised) + nats, err := oc.buildUDNEgressSNAT(localPodSubnets, outputPort) if err != nil { return err } @@ -789,6 +770,25 @@ func (oc *SecondaryLayer2NetworkController) addOrUpdateUDNClusterSubnetEgressSNA return nil } +func (oc *SecondaryLayer2NetworkController) deleteUDNClusterSubnetEgressSNAT(localPodSubnets []*net.IPNet, routerName string) error { + outputPort := types.GWRouterToJoinSwitchPrefix + routerName + nats, err := oc.buildUDNEgressSNAT(localPodSubnets, outputPort) + if err != nil { + return err + } + if len(nats) == 0 { + return nil // nothing to do + } + router := &nbdb.LogicalRouter{ + Name: routerName, + } + if err := libovsdbops.DeleteNATs(oc.nbClient, router, nats...); err != nil { + return fmt.Errorf("failed to delete SNAT for cluster on router: %q for network %q, error: %w", + routerName, oc.GetNetworkName(), err) + } + return nil +} + func (oc *SecondaryLayer2NetworkController) nodeGatewayConfig(node *corev1.Node) (*GatewayConfig, error) { l3GatewayConfig, err := util.ParseNodeL3GatewayAnnotation(node) if err != nil { @@ -822,7 +822,7 @@ func (oc *SecondaryLayer2NetworkController) nodeGatewayConfig(node *corev1.Node) // at layer2 the GR LRP should be different per node same we do for layer3 // since they should not collide at the distributed switch later on - gwLRPJoinIPs, err := udn.GetGWRouterIPs(node, oc.GetNetInfo()) + gwLRPJoinIPs, err := util.ParseNodeGatewayRouterJoinAddrs(node, networkName) if err != nil { return nil, fmt.Errorf("failed composing LRP addresses for layer2 network %s: %w", oc.GetNetworkName(), err) } diff --git a/go-controller/pkg/ovn/secondary_layer3_network_controller.go b/go-controller/pkg/ovn/secondary_layer3_network_controller.go index da57187694..b2355b9100 100644 --- a/go-controller/pkg/ovn/secondary_layer3_network_controller.go +++ b/go-controller/pkg/ovn/secondary_layer3_network_controller.go @@ -166,7 +166,7 @@ func (h *secondaryLayer3NetworkControllerEventHandler) UpdateResource(oldObj, ne return fmt.Errorf("could not cast oldObj of type %T to *kapi.Node", oldObj) } newNodeIsLocalZoneNode := h.oc.isLocalZoneNode(newNode) - zoneClusterChanged := h.oc.nodeZoneClusterChanged(oldNode, newNode) + zoneClusterChanged := h.oc.nodeZoneClusterChanged(oldNode, newNode, newNodeIsLocalZoneNode, h.oc.GetNetworkName()) nodeSubnetChange := nodeSubnetChanged(oldNode, newNode, h.oc.GetNetworkName()) if newNodeIsLocalZoneNode { var nodeSyncsParam *nodeSyncs @@ -186,7 +186,8 @@ func (h *secondaryLayer3NetworkControllerEventHandler) UpdateResource(oldObj, ne hostCIDRsChanged(oldNode, newNode) || nodeGatewayMTUSupportChanged(oldNode, newNode) _, failed = h.oc.syncEIPNodeRerouteFailed.Load(newNode.Name) - syncReroute := failed || util.NodeHostCIDRsAnnotationChanged(oldNode, newNode) + syncReroute := failed || util.NodeHostCIDRsAnnotationChanged(oldNode, newNode) || + joinCIDRChanged(oldNode, newNode, h.oc.GetNetworkName()) nodeSyncsParam = &nodeSyncs{ syncNode: nodeSync, syncClusterRouterPort: clusterRtrSync, @@ -856,8 +857,7 @@ func (oc *SecondaryLayer3NetworkController) addUpdateRemoteNodeEvent(node *corev return err } -// addOrUpdateUDNNodeSubnetEgressSNAT adds or updates the SNAT on each node's ovn-cluster-router in L3 networks for each UDN -// Based on the isUDNAdvertised flag, the SNAT matches are slightly different +// addNodeSubnetEgressSNAT adds the SNAT on each node's ovn-cluster-router in L3 networks // snat eth.dst == d6:cf:fd:2c:a6:44 169.254.0.12 10.128.0.0/24 // snat eth.dst == d6:cf:fd:2c:a6:44 169.254.0.12 2010:100:200::/64 // these SNATs are required for pod2Egress traffic in LGW mode and pod2SameNode traffic in SGW mode to function properly on UDNs @@ -867,12 +867,9 @@ func (oc *SecondaryLayer3NetworkController) addUpdateRemoteNodeEvent(node *corev // externalIP = "169.254.0.12"; which is the masqueradeIP for this L3 UDN // so all in all we want to condionally SNAT all packets that are coming from pods hosted on this node, // which are leaving via UDN's mpX interface to the UDN's masqueradeIP. -// If isUDNAdvertised is true, then we want to SNAT all packets that are coming from pods on this network -// leaving towards nodeIPs on the cluster to masqueradeIP. If network is advertise then the SNAT looks like this: -// "eth.dst == 0a:58:5d:5d:00:02 && (ip4.dst == $a712973235162149816)" "169.254.0.36" "93.93.0.0/24" -func (oc *SecondaryLayer3NetworkController) addOrUpdateUDNNodeSubnetEgressSNAT(localPodSubnets []*net.IPNet, node *corev1.Node, isUDNAdvertised bool) error { +func (oc *SecondaryLayer3NetworkController) addUDNNodeSubnetEgressSNAT(localPodSubnets []*net.IPNet, node *corev1.Node) error { outputPort := types.RouterToSwitchPrefix + oc.GetNetworkScopedName(node.Name) - nats, err := oc.buildUDNEgressSNAT(localPodSubnets, outputPort, isUDNAdvertised) + nats, err := oc.buildUDNEgressSNAT(localPodSubnets, outputPort) if err != nil { return fmt.Errorf("failed to build UDN masquerade SNATs for network %q on node %q, err: %w", oc.GetNetworkName(), node.Name, err) @@ -890,6 +887,28 @@ func (oc *SecondaryLayer3NetworkController) addOrUpdateUDNNodeSubnetEgressSNAT(l return nil } +// deleteUDNNodeSubnetEgressSNAT deletes SNAT rule from network specific +// ovn_cluster_router depending on whether the network is advertised or not +func (oc *SecondaryLayer3NetworkController) deleteUDNNodeSubnetEgressSNAT(localPodSubnets []*net.IPNet, node *corev1.Node) error { + outputPort := types.RouterToSwitchPrefix + oc.GetNetworkScopedName(node.Name) + nats, err := oc.buildUDNEgressSNAT(localPodSubnets, outputPort) + if err != nil { + return fmt.Errorf("failed to build UDN masquerade SNATs for network %q on node %q, err: %w", + oc.GetNetworkName(), node.Name, err) + } + if len(nats) == 0 { + return nil // nothing to do + } + router := &nbdb.LogicalRouter{ + Name: oc.GetNetworkScopedClusterRouterName(), + } + if err := libovsdbops.DeleteNATs(oc.nbClient, router, nats...); err != nil { + return fmt.Errorf("failed to delete SNAT for node subnet on router: %q for network %q, error: %w", + oc.GetNetworkScopedClusterRouterName(), oc.GetNetworkName(), err) + } + return nil +} + func (oc *SecondaryLayer3NetworkController) addNode(node *corev1.Node) ([]*net.IPNet, error) { // Node subnet for the secondary layer3 network is allocated by cluster manager. // Make sure that the node is allocated with the subnet before proceeding @@ -904,17 +923,20 @@ func (oc *SecondaryLayer3NetworkController) addNode(node *corev1.Node) ([]*net.I return nil, err } if util.IsNetworkSegmentationSupportEnabled() && oc.IsPrimaryNetwork() { - isUDNAdvertised := util.IsPodNetworkAdvertisedAtNode(oc, node.Name) - if err := oc.addOrUpdateUDNNodeSubnetEgressSNAT(hostSubnets, node, isUDNAdvertised); err != nil { - return nil, err - } - shouldIsolate := isUDNAdvertised && config.OVNKubernetesFeature.AdvertisedUDNIsolationMode == config.AdvertisedUDNIsolationModeStrict - if shouldIsolate { - if err = oc.addAdvertisedNetworkIsolation(node.Name); err != nil { + if !util.IsPodNetworkAdvertisedAtNode(oc, node.Name) { + if err := oc.addUDNNodeSubnetEgressSNAT(hostSubnets, node); err != nil { return nil, err } + if util.IsRouteAdvertisementsEnabled() { + if err := oc.deleteAdvertisedNetworkIsolation(node.Name); err != nil { + return nil, err + } + } } else { - if err = oc.deleteAdvertisedNetworkIsolation(node.Name); err != nil { + if err := oc.deleteUDNNodeSubnetEgressSNAT(hostSubnets, node); err != nil { + return nil, err + } + if err := oc.addAdvertisedNetworkIsolation(node.Name); err != nil { return nil, err } } @@ -1059,7 +1081,7 @@ func (oc *SecondaryLayer3NetworkController) nodeGatewayConfig(node *corev1.Node) return nil, fmt.Errorf("failed to get node %q subnet annotation for network %q: %v", node.Name, oc.GetNetworkName(), err) } - gwLRPJoinIPs, err := udn.GetGWRouterIPs(node, oc.GetNetInfo()) + gwLRPJoinIPs, err := util.ParseNodeGatewayRouterJoinAddrs(node, oc.GetNetworkName()) if err != nil { return nil, fmt.Errorf("failed extracting node %q GW router join subnet IP for layer3 network %q: %w", node.Name, networkName, err) } diff --git a/go-controller/pkg/ovn/secondary_layer3_network_controller_test.go b/go-controller/pkg/ovn/secondary_layer3_network_controller_test.go index fe667417ec..163d06dfd9 100644 --- a/go-controller/pkg/ovn/secondary_layer3_network_controller_test.go +++ b/go-controller/pkg/ovn/secondary_layer3_network_controller_test.go @@ -635,14 +635,14 @@ func newNodeWithSecondaryNets(nodeName string, nodeIPv4CIDR string, netInfos ... ObjectMeta: metav1.ObjectMeta{ Name: nodeName, Annotations: map[string]string{ - "k8s.ovn.org/node-primary-ifaddr": fmt.Sprintf("{\"ipv4\": \"%s\", \"ipv6\": \"%s\"}", nodeIPv4CIDR, ""), - "k8s.ovn.org/node-subnets": parsedNodeSubnets, - util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", nodeIPv4CIDR), - "k8s.ovn.org/zone-name": "global", - "k8s.ovn.org/l3-gateway-config": fmt.Sprintf("{\"default\":{\"mode\":\"shared\",\"bridge-id\":\"breth0\",\"interface-id\":\"breth0_ovn-worker\",\"mac-address\":%q,\"ip-addresses\":[%[2]q],\"ip-address\":%[2]q,\"next-hops\":[%[3]q],\"next-hop\":%[3]q,\"node-port-enable\":\"true\",\"vlan-id\":\"0\"}}", util.IPAddrToHWAddr(nodeIP), nodeCIDR, nextHopIP), - util.OvnNodeChassisID: "abdcef", - "k8s.ovn.org/network-ids": fmt.Sprintf("{\"default\":\"0\",\"isolatednet\":\"%s\"}", secondaryNetworkID), - util.OvnNodeID: "4", + "k8s.ovn.org/node-primary-ifaddr": fmt.Sprintf("{\"ipv4\": \"%s\", \"ipv6\": \"%s\"}", nodeIPv4CIDR, ""), + "k8s.ovn.org/node-subnets": parsedNodeSubnets, + util.OVNNodeHostCIDRs: fmt.Sprintf("[\"%s\"]", nodeIPv4CIDR), + "k8s.ovn.org/zone-name": "global", + "k8s.ovn.org/l3-gateway-config": fmt.Sprintf("{\"default\":{\"mode\":\"shared\",\"bridge-id\":\"breth0\",\"interface-id\":\"breth0_ovn-worker\",\"mac-address\":%q,\"ip-addresses\":[%[2]q],\"ip-address\":%[2]q,\"next-hops\":[%[3]q],\"next-hop\":%[3]q,\"node-port-enable\":\"true\",\"vlan-id\":\"0\"}}", util.IPAddrToHWAddr(nodeIP), nodeCIDR, nextHopIP), + util.OvnNodeChassisID: "abdcef", + "k8s.ovn.org/network-ids": fmt.Sprintf("{\"default\":\"0\",\"isolatednet\":\"%s\"}", secondaryNetworkID), + util.OVNNodeGRLRPAddrs: fmt.Sprintf("{\"default\":{\"ipv4\":\"100.64.0.2/16\"},\"isolatednet\":{\"ipv4\":%q}}", gwRouterJoinIPAddress()), "k8s.ovn.org/udn-layer2-node-gateway-router-lrp-tunnel-ids": "{\"isolatednet\":\"25\"}", }, Labels: map[string]string{ diff --git a/go-controller/pkg/ovn/secondary_localnet_network_controller.go b/go-controller/pkg/ovn/secondary_localnet_network_controller.go index 24cb69f631..4046f819ce 100644 --- a/go-controller/pkg/ovn/secondary_localnet_network_controller.go +++ b/go-controller/pkg/ovn/secondary_localnet_network_controller.go @@ -279,7 +279,7 @@ func (oc *SecondaryLocalnetNetworkController) Cleanup() error { func (oc *SecondaryLocalnetNetworkController) init() error { switchName := oc.GetNetworkScopedSwitchName(types.OVNLocalnetSwitch) - logicalSwitch, err := oc.initializeLogicalSwitch(switchName, oc.Subnets(), oc.ExcludeSubnets(), oc.ReservedSubnets(), "", "") + logicalSwitch, err := oc.initializeLogicalSwitch(switchName, oc.Subnets(), oc.ExcludeSubnets(), "", "") if err != nil { return err } diff --git a/go-controller/pkg/ovn/udn_isolation.go b/go-controller/pkg/ovn/udn_isolation.go index 3403b0a9a7..0230f665b6 100644 --- a/go-controller/pkg/ovn/udn_isolation.go +++ b/go-controller/pkg/ovn/udn_isolation.go @@ -371,45 +371,38 @@ func (bnc *BaseNetworkController) addAdvertisedNetworkIsolation(nodeName string) // It removes the network CIDRs from the global advertised networks addresset together with the ACLs on the node switch. func (bnc *BaseNetworkController) deleteAdvertisedNetworkIsolation(nodeName string) error { addrSet, err := bnc.addressSetFactory.GetAddressSet(GetAdvertisedNetworkSubnetsAddressSetDBIDs()) - if err != nil && !errors.Is(err, libovsdbclient.ErrNotFound) { + if err != nil { return fmt.Errorf("failed to get advertised subnets addresset %s for network %s: %w", GetAdvertisedNetworkSubnetsAddressSetDBIDs(), bnc.GetNetworkName(), err) } - var ops []ovsdb.Operation - if addrSet != nil { - var cidrs []string - for _, subnet := range bnc.Subnets() { - cidrs = append(cidrs, subnet.CIDR.String()) - } - ops, err = addrSet.DeleteAddressesReturnOps(cidrs) - if err != nil { - return fmt.Errorf("failed to create ovsdb ops for deleting the addresses from %s addresset for network %s: %w", GetAdvertisedNetworkSubnetsAddressSetDBIDs(), bnc.GetNetworkName(), err) - } + var cidrs []string + for _, subnet := range bnc.Subnets() { + cidrs = append(cidrs, subnet.CIDR.String()) + } + ops, err := addrSet.DeleteAddressesReturnOps(cidrs) + if err != nil { + return fmt.Errorf("failed to create ovsdb ops for deleting the addresses from %s addresset for network %s: %w", GetAdvertisedNetworkSubnetsAddressSetDBIDs(), bnc.GetNetworkName(), err) } passACLIDs := GetAdvertisedNetworkSubnetsPassACLdbIDs(bnc.controllerName, bnc.GetNetworkName(), bnc.GetNetworkID()) - dropACLIDs := GetAdvertisedNetworkSubnetsDropACLdbIDs() passACLPredicate := libovsdbops.GetPredicate[*nbdb.ACL](passACLIDs, nil) - dropACLPredicate := libovsdbops.GetPredicate[*nbdb.ACL](dropACLIDs, nil) - // Create a combined predicate to find both ACLs in a single lookup - combinedACLPredicate := func(acl *nbdb.ACL) bool { - // Check if ACL matches either pass or drop ACL IDs - return passACLPredicate(acl) || dropACLPredicate(acl) + passACLs, err := libovsdbops.FindACLsWithPredicate(bnc.nbClient, passACLPredicate) + if err != nil { + return fmt.Errorf("unable to find the pass ACL for advertised network %s: %w", bnc.GetNetworkName(), err) } - // Find both ACLs in a single lookup - allACLsToRemove, err := libovsdbops.FindACLsWithPredicate(bnc.nbClient, combinedACLPredicate) + dropACLIDs := GetAdvertisedNetworkSubnetsDropACLdbIDs() + dropACLPredicate := libovsdbops.GetPredicate[*nbdb.ACL](dropACLIDs, nil) + dropACLs, err := libovsdbops.FindACLsWithPredicate(bnc.nbClient, dropACLPredicate) if err != nil { - return fmt.Errorf("unable to find pass and/or drop ACLs for advertised network %s: %w", bnc.GetNetworkName(), err) + return fmt.Errorf("unable to find the drop ACL for advertised network %s: %w", bnc.GetNetworkName(), err) } // ACLs referenced by the switch will be deleted by db if there are no other references p := func(sw *nbdb.LogicalSwitch) bool { return sw.Name == bnc.GetNetworkScopedSwitchName(nodeName) } - if len(allACLsToRemove) > 0 { - ops, err = libovsdbops.RemoveACLsFromLogicalSwitchesWithPredicateOps(bnc.nbClient, ops, p, allACLsToRemove...) - if err != nil { - return fmt.Errorf("failed to create ovsdb ops for removing network isolation ACLs from the %s switch for network %s: %w", bnc.GetNetworkScopedSwitchName(nodeName), bnc.GetNetworkName(), err) - } + ops, err = libovsdbops.RemoveACLsFromLogicalSwitchesWithPredicateOps(bnc.nbClient, ops, p, append(passACLs, dropACLs...)...) + if err != nil { + return fmt.Errorf("failed to create ovsdb ops for removing network isolation ACLs from the %s switch for network %s: %w", bnc.GetNetworkScopedSwitchName(nodeName), bnc.GetNetworkName(), err) } _, err = libovsdbops.TransactAndCheck(bnc.nbClient, ops) diff --git a/go-controller/pkg/ovn/zone_interconnect/zone_ic_handler.go b/go-controller/pkg/ovn/zone_interconnect/zone_ic_handler.go index 4c144d65cc..ab366c7931 100644 --- a/go-controller/pkg/ovn/zone_interconnect/zone_ic_handler.go +++ b/go-controller/pkg/ovn/zone_interconnect/zone_ic_handler.go @@ -16,7 +16,6 @@ import ( "github.com/ovn-kubernetes/libovsdb/ovsdb" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/generator/udn" libovsdbops "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/ops" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" @@ -192,7 +191,7 @@ func (zic *ZoneInterconnectHandler) ensureTransitSwitch(nodes []*corev1.Node) er // See createLocalZoneNodeResources() below for more details. func (zic *ZoneInterconnectHandler) AddLocalZoneNode(node *corev1.Node) error { klog.Infof("Creating interconnect resources for local zone node %s for the network %s", node.Name, zic.GetNetworkName()) - nodeID, _ := util.GetNodeID(node) + nodeID := util.GetNodeID(node) if nodeID == -1 { // Don't consider this node as cluster-manager has not allocated node id yet. return fmt.Errorf("failed to get node id for node - %s", node.Name) @@ -210,7 +209,7 @@ func (zic *ZoneInterconnectHandler) AddLocalZoneNode(node *corev1.Node) error { func (zic *ZoneInterconnectHandler) AddRemoteZoneNode(node *corev1.Node) error { start := time.Now() - nodeID, _ := util.GetNodeID(node) + nodeID := util.GetNodeID(node) if nodeID == -1 { // Don't consider this node as cluster-manager has not allocated node id yet. return fmt.Errorf("failed to get node id for node - %s", node.Name) @@ -239,7 +238,7 @@ func (zic *ZoneInterconnectHandler) AddRemoteZoneNode(node *corev1.Node) error { // only primary networks have cluster router connected to join switch+GR // used for adding routes to GR if !zic.IsSecondary() || (util.IsNetworkSegmentationSupportEnabled() && zic.IsPrimaryNetwork()) { - nodeGRPIPs, err = udn.GetGWRouterIPs(node, zic.GetNetInfo()) + nodeGRPIPs, err = util.ParseNodeGatewayRouterJoinAddrs(node, zic.GetNetworkName()) if err != nil { if util.IsAnnotationNotSetError(err) { // FIXME(tssurya): This is present for backwards compatibility @@ -654,7 +653,7 @@ func (zic *ZoneInterconnectHandler) deleteLocalNodeStaticRoutes(node *corev1.Nod } // Clear the routes connecting to the GW Router for the default network - nodeGRPIPs, err := udn.GetGWRouterIPs(node, zic.GetNetInfo()) + nodeGRPIPs, err := util.ParseNodeGatewayRouterJoinAddrs(node, zic.GetNetworkName()) if err != nil { if util.IsAnnotationNotSetError(err) { // FIXME(tssurya): This is present for backwards compatibility diff --git a/go-controller/pkg/ovn/zone_interconnect/zone_ic_handler_test.go b/go-controller/pkg/ovn/zone_interconnect/zone_ic_handler_test.go index 0b6570173f..c0a54a1d61 100644 --- a/go-controller/pkg/ovn/zone_interconnect/zone_ic_handler_test.go +++ b/go-controller/pkg/ovn/zone_interconnect/zone_ic_handler_test.go @@ -303,6 +303,7 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { ovnNodeIDAnnotaton: "2", ovnNodeSubnetsAnnotation: "{\"default\":[\"10.244.2.0/24\"]}", ovnTransitSwitchPortAddrAnnotation: "{\"ipv4\":\"100.88.0.2/16\"}", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.2/16\"}}", ovnNodeNetworkIDsAnnotation: "{\"default\":\"0\"}", }, }, @@ -320,6 +321,7 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { ovnNodeIDAnnotaton: "3", ovnNodeSubnetsAnnotation: "{\"default\":[\"10.244.3.0/24\"]}", ovnTransitSwitchPortAddrAnnotation: "{\"ipv4\":\"100.88.0.3/16\"}", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.3/16\"}}", ovnNodeNetworkIDsAnnotation: "{\"default\":\"0\"}", }, }, @@ -337,6 +339,7 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { ovnNodeIDAnnotaton: "4", ovnNodeSubnetsAnnotation: "{\"default\":[\"10.244.4.0/24\"]}", ovnTransitSwitchPortAddrAnnotation: "{\"ipv4\":\"100.88.0.4/16\"}", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.4/16\"}}", ovnNodeNetworkIDsAnnotation: "{\"default\":\"0\"}", }, }, @@ -596,6 +599,7 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { ovnNodeIDAnnotaton: "2", ovnNodeSubnetsAnnotation: "{\"blue\":[\"10.244.2.0/24\"]}", ovnTransitSwitchPortAddrAnnotation: "{\"ipv4\":\"100.88.0.2/16\"}", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.2/16\"}}", ovnNodeNetworkIDsAnnotation: "{\"blue\":\"1\"}", }, }, @@ -613,6 +617,7 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { ovnNodeIDAnnotaton: "3", ovnNodeSubnetsAnnotation: "{\"blue\":[\"10.244.3.0/24\"]}", ovnTransitSwitchPortAddrAnnotation: "{\"ipv4\":\"100.88.0.3/16\"}", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.3/16\"}}", ovnNodeNetworkIDsAnnotation: "{\"blue\":\"1\"}", }, }, @@ -630,6 +635,7 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { ovnNodeIDAnnotaton: "4", ovnNodeSubnetsAnnotation: "{\"blue\":[\"10.244.4.0/24\"]}", ovnTransitSwitchPortAddrAnnotation: "{\"ipv4\":\"100.88.0.4/16\"}", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.4/16\"}}", ovnNodeNetworkIDsAnnotation: "{\"blue\":\"1\"}", }, }, @@ -751,6 +757,7 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { ovnNodeIDAnnotaton: "2", ovnNodeSubnetsAnnotation: "{\"red\":[\"10.244.2.0/24\"], \"blue\":[\"11.244.2.0/24\"]}", ovnTransitSwitchPortAddrAnnotation: "{\"ipv4\":\"100.88.0.2/16\"}", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.2/16\"}}", ovnNodeNetworkIDsAnnotation: "{\"red\":\"2\", \"blue\":\"1\"}", }, }, @@ -768,6 +775,7 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { ovnNodeIDAnnotaton: "3", ovnNodeSubnetsAnnotation: "{\"red\":[\"10.244.3.0/24\"], \"blue\":[\"11.244.3.0/24\"]}", ovnTransitSwitchPortAddrAnnotation: "{\"ipv4\":\"100.88.0.3/16\"}", + util.OVNNodeGRLRPAddrs: "{\"defalut\":{\"ipv4\":\"100.64.0.3/16\"}}", ovnNodeNetworkIDsAnnotation: "{\"red\":\"2\", \"blue\":\"1\"}", }, }, @@ -785,6 +793,7 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { ovnNodeIDAnnotaton: "4", ovnNodeSubnetsAnnotation: "{\"red\":[\"10.244.4.0/24\"], \"blue\":[\"11.244.4.0/24\"]}", ovnTransitSwitchPortAddrAnnotation: "{\"ipv4\":\"100.88.0.4/16\"}", + util.OVNNodeGRLRPAddrs: "{\"default\":{\"ipv4\":\"100.64.0.4/16\"}}", ovnNodeNetworkIDsAnnotation: "{\"red\":\"2\", \"blue\":\"1\"}", }, }, @@ -931,6 +940,11 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { // Set node subnet annotation testNode4.Annotations[ovnNodeSubnetsAnnotation] = "{\"default\":[\"10.244.5.0/24\"]}" + err = zoneICHandler.AddLocalZoneNode(&testNode4) + gomega.Expect(err).To(gomega.HaveOccurred(), "failed to parse node node4 GR IPs annotation") + + // Set node ovn-gw-router-port-ips annotation + testNode4.Annotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.64.0.5/16\"}}" err = zoneICHandler.AddLocalZoneNode(&testNode4) gomega.Expect(err).NotTo(gomega.HaveOccurred()) @@ -1030,8 +1044,12 @@ var _ = ginkgo.Describe("Zone Interconnect Operations", func() { err = libovsdbops.CreateOrUpdateLogicalRouter(libovsdbOvnNBClient, r) gomega.Expect(err).NotTo(gomega.HaveOccurred()) err = zoneICHandler.AddRemoteZoneNode(&testNode4) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(err).To(gomega.HaveOccurred(), "failed to parse node node4 GR IPs annotation") + // Set node ovn-gw-router-port-ips annotation + testNode4.Annotations[util.OVNNodeGRLRPAddrs] = "{\"default\":{\"ipv4\":\"100.64.0.5/16\"}}" + err = zoneICHandler.AddRemoteZoneNode(&testNode4) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) testNodesRouteInfo = map[string]map[string]string{ "node4": {"node-subnets": "10.244.5.0/24", "ts-ip": "100.88.0.5", "host-route": "100.64.0.5/32"}, } diff --git a/go-controller/pkg/ovnwebhook/nodeadmission.go b/go-controller/pkg/ovnwebhook/nodeadmission.go index 15b98db2fc..08509903c9 100644 --- a/go-controller/pkg/ovnwebhook/nodeadmission.go +++ b/go-controller/pkg/ovnwebhook/nodeadmission.go @@ -35,7 +35,6 @@ var commonNodeAnnotationChecks = map[string]checkNodeAnnot{ util.OvnNodeGatewayMtuSupport: nil, util.OvnNodeManagementPort: nil, util.OvnNodeDontSNATSubnets: nil, - util.OVNNodePrimaryDPUHostAddr: nil, util.OvnNodeChassisID: func(v annotationChange, _ string) error { if v.action == removed { return fmt.Errorf("%s cannot be removed", util.OvnNodeChassisID) diff --git a/go-controller/pkg/persistentips/allocator_test.go b/go-controller/pkg/persistentips/allocator_test.go index 46a2cd34b0..9ae081b461 100644 --- a/go-controller/pkg/persistentips/allocator_test.go +++ b/go-controller/pkg/persistentips/allocator_test.go @@ -67,10 +67,10 @@ var _ = Describe("Persistent IP allocator operations", func() { } ipAllocator := subnet.NewAllocator() - Expect(ipAllocator.AddOrUpdateSubnet(subnet.SubnetConfig{Name: subnetName, Subnets: ovntest.MustParseIPNets("192.168.200.0/24", "fd10::/64")})).To(Succeed()) + Expect(ipAllocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets("192.168.200.0/24", "fd10::/64"))).To(Succeed()) namedAllocator = ipAllocator.ForSubnet(subnetName) ipamClaimsReconciler = NewIPAMClaimReconciler(ovnkapiclient, netInfo, nil) - Expect(ipAllocator.AddOrUpdateSubnet(subnet.SubnetConfig{Name: subnetName, Subnets: ovntest.MustParseIPNets("192.168.200.0/24", "fd10::/64")})).To(Succeed()) + Expect(ipAllocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets("192.168.200.0/24", "fd10::/64"))).To(Succeed()) }) It("nothing to do when reconciling nil IPAMClaims", func() { @@ -140,7 +140,7 @@ var _ = Describe("Persistent IP allocator operations", func() { toRuntimeObj(originalClaims)..., ), } - Expect(ipAllocator.AddOrUpdateSubnet(subnet.SubnetConfig{Name: subnetName, Subnets: ovntest.MustParseIPNets("192.168.200.0/24", "fd10::/64")})).To(Succeed()) + Expect(ipAllocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets("192.168.200.0/24", "fd10::/64"))).To(Succeed()) namedAllocator = ipAllocator.ForSubnet(subnetName) ipamClaimsReconciler = NewIPAMClaimReconciler(ovnkapiclient, netInfo, nil) }) @@ -166,7 +166,7 @@ var _ = Describe("Persistent IP allocator operations", func() { BeforeEach(func() { initialIPs = []string{"192.168.200.2/24", "fd10::1/64"} ipAllocator := subnet.NewAllocator() - Expect(ipAllocator.AddOrUpdateSubnet(subnet.SubnetConfig{Name: subnetName, Subnets: ovntest.MustParseIPNets("192.168.200.0/24", "fd10::/64")})).To(Succeed()) + Expect(ipAllocator.AddOrUpdateSubnet(subnetName, ovntest.MustParseIPNets("192.168.200.0/24", "fd10::/64"))).To(Succeed()) Expect(ipAllocator.AllocateIPPerSubnet(subnetName, ovntest.MustParseIPNets(initialIPs...))).To(Succeed()) namedAllocator = ipAllocator.ForSubnet(subnetName) diff --git a/go-controller/pkg/sbdb/acl_id.go b/go-controller/pkg/sbdb/acl_id.go deleted file mode 100644 index 5c62c53fe2..0000000000 --- a/go-controller/pkg/sbdb/acl_id.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by "libovsdb.modelgen" -// DO NOT EDIT. - -package sbdb - -import "github.com/ovn-kubernetes/libovsdb/model" - -const ACLIDTable = "ACL_ID" - -// ACLID defines an object in ACL_ID table -type ACLID struct { - UUID string `ovsdb:"_uuid"` - ID int `ovsdb:"id"` -} - -func (a *ACLID) GetUUID() string { - return a.UUID -} - -func (a *ACLID) GetID() int { - return a.ID -} - -func (a *ACLID) DeepCopyInto(b *ACLID) { - *b = *a -} - -func (a *ACLID) DeepCopy() *ACLID { - b := new(ACLID) - a.DeepCopyInto(b) - return b -} - -func (a *ACLID) CloneModelInto(b model.Model) { - c := b.(*ACLID) - a.DeepCopyInto(c) -} - -func (a *ACLID) CloneModel() model.Model { - return a.DeepCopy() -} - -func (a *ACLID) Equals(b *ACLID) bool { - return a.UUID == b.UUID && - a.ID == b.ID -} - -func (a *ACLID) EqualsModel(b model.Model) bool { - c := b.(*ACLID) - return a.Equals(c) -} - -var _ model.CloneableModel = &ACLID{} -var _ model.ComparableModel = &ACLID{} diff --git a/go-controller/pkg/sbdb/advertised_route.go b/go-controller/pkg/sbdb/advertised_route.go deleted file mode 100644 index 6704be7d4d..0000000000 --- a/go-controller/pkg/sbdb/advertised_route.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by "libovsdb.modelgen" -// DO NOT EDIT. - -package sbdb - -import "github.com/ovn-kubernetes/libovsdb/model" - -const AdvertisedRouteTable = "Advertised_Route" - -// AdvertisedRoute defines an object in Advertised_Route table -type AdvertisedRoute struct { - UUID string `ovsdb:"_uuid"` - Datapath string `ovsdb:"datapath"` - ExternalIDs map[string]string `ovsdb:"external_ids"` - IPPrefix string `ovsdb:"ip_prefix"` - LogicalPort string `ovsdb:"logical_port"` - TrackedPort *string `ovsdb:"tracked_port"` -} - -func (a *AdvertisedRoute) GetUUID() string { - return a.UUID -} - -func (a *AdvertisedRoute) GetDatapath() string { - return a.Datapath -} - -func (a *AdvertisedRoute) GetExternalIDs() map[string]string { - return a.ExternalIDs -} - -func copyAdvertisedRouteExternalIDs(a map[string]string) map[string]string { - if a == nil { - return nil - } - b := make(map[string]string, len(a)) - for k, v := range a { - b[k] = v - } - return b -} - -func equalAdvertisedRouteExternalIDs(a, b map[string]string) bool { - if (a == nil) != (b == nil) { - return false - } - if len(a) != len(b) { - return false - } - for k, v := range a { - if w, ok := b[k]; !ok || v != w { - return false - } - } - return true -} - -func (a *AdvertisedRoute) GetIPPrefix() string { - return a.IPPrefix -} - -func (a *AdvertisedRoute) GetLogicalPort() string { - return a.LogicalPort -} - -func (a *AdvertisedRoute) GetTrackedPort() *string { - return a.TrackedPort -} - -func copyAdvertisedRouteTrackedPort(a *string) *string { - if a == nil { - return nil - } - b := *a - return &b -} - -func equalAdvertisedRouteTrackedPort(a, b *string) bool { - if (a == nil) != (b == nil) { - return false - } - if a == b { - return true - } - return *a == *b -} - -func (a *AdvertisedRoute) DeepCopyInto(b *AdvertisedRoute) { - *b = *a - b.ExternalIDs = copyAdvertisedRouteExternalIDs(a.ExternalIDs) - b.TrackedPort = copyAdvertisedRouteTrackedPort(a.TrackedPort) -} - -func (a *AdvertisedRoute) DeepCopy() *AdvertisedRoute { - b := new(AdvertisedRoute) - a.DeepCopyInto(b) - return b -} - -func (a *AdvertisedRoute) CloneModelInto(b model.Model) { - c := b.(*AdvertisedRoute) - a.DeepCopyInto(c) -} - -func (a *AdvertisedRoute) CloneModel() model.Model { - return a.DeepCopy() -} - -func (a *AdvertisedRoute) Equals(b *AdvertisedRoute) bool { - return a.UUID == b.UUID && - a.Datapath == b.Datapath && - equalAdvertisedRouteExternalIDs(a.ExternalIDs, b.ExternalIDs) && - a.IPPrefix == b.IPPrefix && - a.LogicalPort == b.LogicalPort && - equalAdvertisedRouteTrackedPort(a.TrackedPort, b.TrackedPort) -} - -func (a *AdvertisedRoute) EqualsModel(b model.Model) bool { - c := b.(*AdvertisedRoute) - return a.Equals(c) -} - -var _ model.CloneableModel = &AdvertisedRoute{} -var _ model.ComparableModel = &AdvertisedRoute{} diff --git a/go-controller/pkg/sbdb/ecmp_nexthop.go b/go-controller/pkg/sbdb/ecmp_nexthop.go deleted file mode 100644 index 2b0124a788..0000000000 --- a/go-controller/pkg/sbdb/ecmp_nexthop.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by "libovsdb.modelgen" -// DO NOT EDIT. - -package sbdb - -import "github.com/ovn-kubernetes/libovsdb/model" - -const ECMPNexthopTable = "ECMP_Nexthop" - -// ECMPNexthop defines an object in ECMP_Nexthop table -type ECMPNexthop struct { - UUID string `ovsdb:"_uuid"` - Datapath string `ovsdb:"datapath"` - ExternalIDs map[string]string `ovsdb:"external_ids"` - MAC string `ovsdb:"mac"` - Nexthop string `ovsdb:"nexthop"` - Port string `ovsdb:"port"` -} - -func (a *ECMPNexthop) GetUUID() string { - return a.UUID -} - -func (a *ECMPNexthop) GetDatapath() string { - return a.Datapath -} - -func (a *ECMPNexthop) GetExternalIDs() map[string]string { - return a.ExternalIDs -} - -func copyECMPNexthopExternalIDs(a map[string]string) map[string]string { - if a == nil { - return nil - } - b := make(map[string]string, len(a)) - for k, v := range a { - b[k] = v - } - return b -} - -func equalECMPNexthopExternalIDs(a, b map[string]string) bool { - if (a == nil) != (b == nil) { - return false - } - if len(a) != len(b) { - return false - } - for k, v := range a { - if w, ok := b[k]; !ok || v != w { - return false - } - } - return true -} - -func (a *ECMPNexthop) GetMAC() string { - return a.MAC -} - -func (a *ECMPNexthop) GetNexthop() string { - return a.Nexthop -} - -func (a *ECMPNexthop) GetPort() string { - return a.Port -} - -func (a *ECMPNexthop) DeepCopyInto(b *ECMPNexthop) { - *b = *a - b.ExternalIDs = copyECMPNexthopExternalIDs(a.ExternalIDs) -} - -func (a *ECMPNexthop) DeepCopy() *ECMPNexthop { - b := new(ECMPNexthop) - a.DeepCopyInto(b) - return b -} - -func (a *ECMPNexthop) CloneModelInto(b model.Model) { - c := b.(*ECMPNexthop) - a.DeepCopyInto(c) -} - -func (a *ECMPNexthop) CloneModel() model.Model { - return a.DeepCopy() -} - -func (a *ECMPNexthop) Equals(b *ECMPNexthop) bool { - return a.UUID == b.UUID && - a.Datapath == b.Datapath && - equalECMPNexthopExternalIDs(a.ExternalIDs, b.ExternalIDs) && - a.MAC == b.MAC && - a.Nexthop == b.Nexthop && - a.Port == b.Port -} - -func (a *ECMPNexthop) EqualsModel(b model.Model) bool { - c := b.(*ECMPNexthop) - return a.Equals(c) -} - -var _ model.CloneableModel = &ECMPNexthop{} -var _ model.ComparableModel = &ECMPNexthop{} diff --git a/go-controller/pkg/sbdb/learned_route.go b/go-controller/pkg/sbdb/learned_route.go deleted file mode 100644 index 8cab3636de..0000000000 --- a/go-controller/pkg/sbdb/learned_route.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by "libovsdb.modelgen" -// DO NOT EDIT. - -package sbdb - -import "github.com/ovn-kubernetes/libovsdb/model" - -const LearnedRouteTable = "Learned_Route" - -// LearnedRoute defines an object in Learned_Route table -type LearnedRoute struct { - UUID string `ovsdb:"_uuid"` - Datapath string `ovsdb:"datapath"` - ExternalIDs map[string]string `ovsdb:"external_ids"` - IPPrefix string `ovsdb:"ip_prefix"` - LogicalPort string `ovsdb:"logical_port"` - Nexthop string `ovsdb:"nexthop"` -} - -func (a *LearnedRoute) GetUUID() string { - return a.UUID -} - -func (a *LearnedRoute) GetDatapath() string { - return a.Datapath -} - -func (a *LearnedRoute) GetExternalIDs() map[string]string { - return a.ExternalIDs -} - -func copyLearnedRouteExternalIDs(a map[string]string) map[string]string { - if a == nil { - return nil - } - b := make(map[string]string, len(a)) - for k, v := range a { - b[k] = v - } - return b -} - -func equalLearnedRouteExternalIDs(a, b map[string]string) bool { - if (a == nil) != (b == nil) { - return false - } - if len(a) != len(b) { - return false - } - for k, v := range a { - if w, ok := b[k]; !ok || v != w { - return false - } - } - return true -} - -func (a *LearnedRoute) GetIPPrefix() string { - return a.IPPrefix -} - -func (a *LearnedRoute) GetLogicalPort() string { - return a.LogicalPort -} - -func (a *LearnedRoute) GetNexthop() string { - return a.Nexthop -} - -func (a *LearnedRoute) DeepCopyInto(b *LearnedRoute) { - *b = *a - b.ExternalIDs = copyLearnedRouteExternalIDs(a.ExternalIDs) -} - -func (a *LearnedRoute) DeepCopy() *LearnedRoute { - b := new(LearnedRoute) - a.DeepCopyInto(b) - return b -} - -func (a *LearnedRoute) CloneModelInto(b model.Model) { - c := b.(*LearnedRoute) - a.DeepCopyInto(c) -} - -func (a *LearnedRoute) CloneModel() model.Model { - return a.DeepCopy() -} - -func (a *LearnedRoute) Equals(b *LearnedRoute) bool { - return a.UUID == b.UUID && - a.Datapath == b.Datapath && - equalLearnedRouteExternalIDs(a.ExternalIDs, b.ExternalIDs) && - a.IPPrefix == b.IPPrefix && - a.LogicalPort == b.LogicalPort && - a.Nexthop == b.Nexthop -} - -func (a *LearnedRoute) EqualsModel(b model.Model) bool { - c := b.(*LearnedRoute) - return a.Equals(c) -} - -var _ model.CloneableModel = &LearnedRoute{} -var _ model.ComparableModel = &LearnedRoute{} diff --git a/go-controller/pkg/sbdb/model.go b/go-controller/pkg/sbdb/model.go index 0d9fe177bf..c5420638e5 100644 --- a/go-controller/pkg/sbdb/model.go +++ b/go-controller/pkg/sbdb/model.go @@ -13,9 +13,7 @@ import ( // FullDatabaseModel returns the DatabaseModel object to be used in libovsdb func FullDatabaseModel() (model.ClientDBModel, error) { return model.NewClientDBModel("OVN_Southbound", map[string]model.Model{ - "ACL_ID": &ACLID{}, "Address_Set": &AddressSet{}, - "Advertised_Route": &AdvertisedRoute{}, "BFD": &BFD{}, "Chassis": &Chassis{}, "Chassis_Private": &ChassisPrivate{}, @@ -26,7 +24,6 @@ func FullDatabaseModel() (model.ClientDBModel, error) { "DHCPv6_Options": &DHCPv6Options{}, "DNS": &DNS{}, "Datapath_Binding": &DatapathBinding{}, - "ECMP_Nexthop": &ECMPNexthop{}, "Encap": &Encap{}, "FDB": &FDB{}, "Gateway_Chassis": &GatewayChassis{}, @@ -34,7 +31,6 @@ func FullDatabaseModel() (model.ClientDBModel, error) { "HA_Chassis_Group": &HAChassisGroup{}, "IGMP_Group": &IGMPGroup{}, "IP_Multicast": &IPMulticast{}, - "Learned_Route": &LearnedRoute{}, "Load_Balancer": &LoadBalancer{}, "Logical_DP_Group": &LogicalDPGroup{}, "Logical_Flow": &LogicalFlow{}, @@ -56,22 +52,8 @@ func FullDatabaseModel() (model.ClientDBModel, error) { var schema = `{ "name": "OVN_Southbound", - "version": "20.41.0", + "version": "20.37.0", "tables": { - "ACL_ID": { - "columns": { - "id": { - "type": { - "key": { - "type": "integer", - "minInteger": 0, - "maxInteger": 32767 - } - } - } - }, - "isRoot": true - }, "Address_Set": { "columns": { "addresses": { @@ -94,63 +76,6 @@ var schema = `{ ], "isRoot": true }, - "Advertised_Route": { - "columns": { - "datapath": { - "type": { - "key": { - "type": "uuid", - "refTable": "Datapath_Binding", - "refType": "strong" - } - } - }, - "external_ids": { - "type": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - }, - "min": 0, - "max": "unlimited" - } - }, - "ip_prefix": { - "type": "string" - }, - "logical_port": { - "type": { - "key": { - "type": "uuid", - "refTable": "Port_Binding", - "refType": "strong" - } - } - }, - "tracked_port": { - "type": { - "key": { - "type": "uuid", - "refTable": "Port_Binding", - "refType": "strong" - }, - "min": 0, - "max": 1 - } - } - }, - "indexes": [ - [ - "datapath", - "logical_port", - "ip_prefix", - "tracked_port" - ] - ], - "isRoot": true - }, "BFD": { "columns": { "chassis_name": { @@ -651,57 +576,6 @@ var schema = `{ ], "isRoot": true }, - "ECMP_Nexthop": { - "columns": { - "datapath": { - "type": { - "key": { - "type": "uuid", - "refTable": "Datapath_Binding", - "refType": "strong" - }, - "min": 1, - "max": 1 - } - }, - "external_ids": { - "type": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - }, - "min": 0, - "max": "unlimited" - } - }, - "mac": { - "type": "string" - }, - "nexthop": { - "type": "string" - }, - "port": { - "type": { - "key": { - "type": "uuid", - "refTable": "Port_Binding", - "refType": "strong" - }, - "min": 1, - "max": 1 - } - } - }, - "indexes": [ - [ - "nexthop", - "port" - ] - ], - "isRoot": true - }, "Encap": { "columns": { "chassis_name": { @@ -1058,55 +932,6 @@ var schema = `{ ], "isRoot": true }, - "Learned_Route": { - "columns": { - "datapath": { - "type": { - "key": { - "type": "uuid", - "refTable": "Datapath_Binding", - "refType": "strong" - } - } - }, - "external_ids": { - "type": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - }, - "min": 0, - "max": "unlimited" - } - }, - "ip_prefix": { - "type": "string" - }, - "logical_port": { - "type": { - "key": { - "type": "uuid", - "refTable": "Port_Binding", - "refType": "strong" - } - } - }, - "nexthop": { - "type": "string" - } - }, - "indexes": [ - [ - "datapath", - "logical_port", - "ip_prefix", - "nexthop" - ] - ], - "isRoot": true - }, "Load_Balancer": { "columns": { "datapath_group": { @@ -1916,9 +1741,6 @@ var schema = `{ "ssl_ciphers": { "type": "string" }, - "ssl_ciphersuites": { - "type": "string" - }, "ssl_protocols": { "type": "string" } diff --git a/go-controller/pkg/sbdb/ssl.go b/go-controller/pkg/sbdb/ssl.go index eccda6dff3..08c8e641cf 100644 --- a/go-controller/pkg/sbdb/ssl.go +++ b/go-controller/pkg/sbdb/ssl.go @@ -16,7 +16,6 @@ type SSL struct { ExternalIDs map[string]string `ovsdb:"external_ids"` PrivateKey string `ovsdb:"private_key"` SSLCiphers string `ovsdb:"ssl_ciphers"` - SSLCiphersuites string `ovsdb:"ssl_ciphersuites"` SSLProtocols string `ovsdb:"ssl_protocols"` } @@ -74,10 +73,6 @@ func (a *SSL) GetSSLCiphers() string { return a.SSLCiphers } -func (a *SSL) GetSSLCiphersuites() string { - return a.SSLCiphersuites -} - func (a *SSL) GetSSLProtocols() string { return a.SSLProtocols } @@ -110,7 +105,6 @@ func (a *SSL) Equals(b *SSL) bool { equalSSLExternalIDs(a.ExternalIDs, b.ExternalIDs) && a.PrivateKey == b.PrivateKey && a.SSLCiphers == b.SSLCiphers && - a.SSLCiphersuites == b.SSLCiphersuites && a.SSLProtocols == b.SSLProtocols } diff --git a/go-controller/pkg/testing/libovsdb/libovsdb.go b/go-controller/pkg/testing/libovsdb/libovsdb.go index d62fa18486..a6836811d1 100644 --- a/go-controller/pkg/testing/libovsdb/libovsdb.go +++ b/go-controller/pkg/testing/libovsdb/libovsdb.go @@ -368,7 +368,7 @@ func newOVSDBServer(cfg config.OvnAuthConfig, dbModel model.ClientDBModel, schem db := inmemory.NewDatabase(map[string]model.ClientDBModel{ schema.Name: dbModel, serverSchema.Name: serverDBModel, - }, nil) + }) dbMod, errs := model.NewDatabaseModel(schema, dbModel) if len(errs) > 0 { @@ -380,7 +380,7 @@ func newOVSDBServer(cfg config.OvnAuthConfig, dbModel model.ClientDBModel, schem log.Fatal(errs) } - s, err := server.NewOvsdbServer(db, nil, dbMod, servMod) + s, err := server.NewOvsdbServer(db, dbMod, servMod) if err != nil { return nil, err } diff --git a/go-controller/pkg/testing/networkmanager/fake.go b/go-controller/pkg/testing/networkmanager/fake.go index d96580396f..5857d5b98c 100644 --- a/go-controller/pkg/testing/networkmanager/fake.go +++ b/go-controller/pkg/testing/networkmanager/fake.go @@ -78,10 +78,6 @@ func (fnm *FakeNetworkManager) GetNetwork(networkName string) util.NetInfo { return &util.DefaultNetInfo{} } -func (fnm *FakeNetworkManager) GetActiveNetwork(networkName string) util.NetInfo { - return fnm.GetNetwork(networkName) -} - func (fnm *FakeNetworkManager) GetActiveNetworkNamespaces(networkName string) ([]string, error) { namespaces := make([]string, 0) for namespaceName, primaryNAD := range fnm.PrimaryNetworks { diff --git a/go-controller/pkg/types/const.go b/go-controller/pkg/types/const.go index 523da8e27b..8ba7269cad 100644 --- a/go-controller/pkg/types/const.go +++ b/go-controller/pkg/types/const.go @@ -312,13 +312,13 @@ const ( // CUDNPrefix of all CUDN network names CUDNPrefix = "cluster_udn_" - // NFTRemoteNodeIPsv4 is a set used to track remote node v4IPs that do not belong to + // NFTNoPMTUDRemoteNodeIPsv4 is a set used to track remote node IPs that do not belong to // the local node's subnet. - NFTRemoteNodeIPsv4 = "remote-node-ips-v4" + NFTNoPMTUDRemoteNodeIPsv4 = "no-pmtud-remote-node-ips-v4" - // NFTRemoteNodeIPsv6 is a set used to track remote node v6IPs that do not belong to + // NFTNoPMTUDRemoteNodeIPsv6 is a set used to track remote node IPs that do not belong to // the local node's subnet. - NFTRemoteNodeIPsv6 = "remote-node-ips-v6" + NFTNoPMTUDRemoteNodeIPsv6 = "no-pmtud-remote-node-ips-v6" // Metrics MetricOvnkubeNamespace = "ovnkube" diff --git a/go-controller/pkg/util/mocks/multinetwork/NetInfo.go b/go-controller/pkg/util/mocks/multinetwork/NetInfo.go index e94a82edd5..5eaee07694 100644 --- a/go-controller/pkg/util/mocks/multinetwork/NetInfo.go +++ b/go-controller/pkg/util/mocks/multinetwork/NetInfo.go @@ -16,44 +16,6 @@ type NetInfo struct { mock.Mock } -func (_m *NetInfo) GetNodeGatewayIP(hostSubnet *net.IPNet) *net.IPNet { - ret := _m.Called(hostSubnet) - - if len(ret) == 0 { - panic("no return value specified for GetNodeGatewayIP") - } - - var r0 *net.IPNet - if rf, ok := ret.Get(0).(func(*net.IPNet) *net.IPNet); ok { - r0 = rf(hostSubnet) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*net.IPNet) - } - } - - return r0 -} - -func (_m *NetInfo) GetNodeManagementIP(hostSubnet *net.IPNet) *net.IPNet { - ret := _m.Called(hostSubnet) - - if len(ret) == 0 { - panic("no return value specified for GetNodeManagementIP") - } - - var r0 *net.IPNet - if rf, ok := ret.Get(0).(func(*net.IPNet) *net.IPNet); ok { - r0 = rf(hostSubnet) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*net.IPNet) - } - } - - return r0 -} - // AllowsPersistentIPs provides a mock function with given fields: func (_m *NetInfo) AllowsPersistentIPs() bool { ret := _m.Called() @@ -116,46 +78,6 @@ func (_m *NetInfo) ExcludeSubnets() []*net.IPNet { return r0 } -// InfrastructureSubnets provides a mock function with given fields: -func (_m *NetInfo) InfrastructureSubnets() []*net.IPNet { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for InfrastructureSubnets") - } - - var r0 []*net.IPNet - if rf, ok := ret.Get(0).(func() []*net.IPNet); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*net.IPNet) - } - } - - return r0 -} - -// ReservedSubnets provides a mock function with given fields: -func (_m *NetInfo) ReservedSubnets() []*net.IPNet { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ReservedSubnets") - } - - var r0 []*net.IPNet - if rf, ok := ret.Get(0).(func() []*net.IPNet); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*net.IPNet) - } - } - - return r0 -} - // GetEgressIPAdvertisedNodes provides a mock function with given fields: func (_m *NetInfo) GetEgressIPAdvertisedNodes() []string { ret := _m.Called() diff --git a/go-controller/pkg/util/multi_network.go b/go-controller/pkg/util/multi_network.go index 1073954bc4..fd91edd3be 100644 --- a/go-controller/pkg/util/multi_network.go +++ b/go-controller/pkg/util/multi_network.go @@ -9,7 +9,6 @@ import ( "strings" "sync" - iputils "github.com/containernetworking/plugins/pkg/ip" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" nettypes "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" @@ -42,16 +41,12 @@ type NetInfo interface { IPMode() (bool, bool) Subnets() []config.CIDRNetworkEntry ExcludeSubnets() []*net.IPNet - ReservedSubnets() []*net.IPNet - InfrastructureSubnets() []*net.IPNet JoinSubnetV4() *net.IPNet JoinSubnetV6() *net.IPNet JoinSubnets() []*net.IPNet Vlan() uint AllowsPersistentIPs() bool PhysicalNetworkName() string - GetNodeGatewayIP(hostSubnet *net.IPNet) *net.IPNet - GetNodeManagementIP(hostSubnet *net.IPNet) *net.IPNet // dynamic information, can change over time GetNADs() []string @@ -87,6 +82,7 @@ type NetInfo interface { GetNetworkScopedExtPortName(bridgeID, nodeName string) string GetNetworkScopedLoadBalancerName(lbName string) string GetNetworkScopedLoadBalancerGroupName(lbGroupName string) string + GetNetworkScopedClusterSubnetSNATMatch(nodeName string) string // GetNetInfo is an identity method used to get the specific NetInfo // implementation @@ -547,6 +543,10 @@ func (nInfo *DefaultNetInfo) GetNetworkScopedLoadBalancerGroupName(lbGroupName s return nInfo.GetNetworkScopedName(lbGroupName) } +func (nInfo *DefaultNetInfo) GetNetworkScopedClusterSubnetSNATMatch(_ string) string { + return "" +} + func (nInfo *DefaultNetInfo) canReconcile(netInfo NetInfo) bool { _, ok := netInfo.(*DefaultNetInfo) return ok @@ -578,16 +578,6 @@ func (nInfo *DefaultNetInfo) ExcludeSubnets() []*net.IPNet { return nil } -// ReservedSubnets returns the defaultNetConfInfo's ReservedSubnets value -func (nInfo *DefaultNetInfo) ReservedSubnets() []*net.IPNet { - return nil -} - -// InfrastructureSubnets returns the defaultNetConfInfo's InfrastructureSubnets value -func (nInfo *DefaultNetInfo) InfrastructureSubnets() []*net.IPNet { - return nil -} - // JoinSubnetV4 returns the defaultNetConfInfo's JoinSubnetV4 value // call when ipv4mode=true func (nInfo *DefaultNetInfo) JoinSubnetV4() *net.IPNet { @@ -644,14 +634,6 @@ func (nInfo *DefaultNetInfo) PhysicalNetworkName() string { return "" } -func (nInfo *DefaultNetInfo) GetNodeGatewayIP(hostSubnet *net.IPNet) *net.IPNet { - return GetNodeGatewayIfAddr(hostSubnet) -} - -func (nInfo *DefaultNetInfo) GetNodeManagementIP(hostSubnet *net.IPNet) *net.IPNet { - return GetNodeManagementIfAddr(hostSubnet) -} - // SecondaryNetInfo holds the network name information for secondary network if non-nil type secondaryNetInfo struct { mutableNetInfo @@ -665,16 +647,12 @@ type secondaryNetInfo struct { vlan uint allowPersistentIPs bool - ipv4mode, ipv6mode bool - subnets []config.CIDRNetworkEntry - excludeSubnets []*net.IPNet - reservedSubnets []*net.IPNet - infrastructureSubnets []*net.IPNet - joinSubnets []*net.IPNet + ipv4mode, ipv6mode bool + subnets []config.CIDRNetworkEntry + excludeSubnets []*net.IPNet + joinSubnets []*net.IPNet physicalNetworkName string - defaultGatewayIPs []net.IP - managementIPs []net.IP } func (nInfo *secondaryNetInfo) GetNetInfo() NetInfo { @@ -760,6 +738,13 @@ func (nInfo *secondaryNetInfo) GetNetworkScopedLoadBalancerGroupName(lbGroupName return nInfo.GetNetworkScopedName(lbGroupName) } +func (nInfo *secondaryNetInfo) GetNetworkScopedClusterSubnetSNATMatch(nodeName string) string { + if nInfo.TopologyType() != types.Layer2Topology { + return "" + } + return fmt.Sprintf("outport == %q", types.GWRouterToExtSwitchPrefix+nInfo.GetNetworkScopedGWRouterName(nodeName)) +} + // getPrefix returns if the logical entities prefix for this network func (nInfo *secondaryNetInfo) getPrefix() string { return GetSecondaryNetworkPrefix(nInfo.netName) @@ -790,30 +775,6 @@ func (nInfo *secondaryNetInfo) PhysicalNetworkName() string { return nInfo.physicalNetworkName } -func (nInfo *secondaryNetInfo) GetNodeGatewayIP(hostSubnet *net.IPNet) *net.IPNet { - if IsPreconfiguredUDNAddressesEnabled() && nInfo.TopologyType() == types.Layer2Topology && nInfo.IsPrimaryNetwork() { - isIPV6 := knet.IsIPv6CIDR(hostSubnet) - gwIP, _ := MatchFirstIPFamily(isIPV6, nInfo.defaultGatewayIPs) - return &net.IPNet{ - IP: gwIP, - Mask: hostSubnet.Mask, - } - } - return GetNodeGatewayIfAddr(hostSubnet) -} - -func (nInfo *secondaryNetInfo) GetNodeManagementIP(hostSubnet *net.IPNet) *net.IPNet { - if IsPreconfiguredUDNAddressesEnabled() && nInfo.TopologyType() == types.Layer2Topology && nInfo.IsPrimaryNetwork() { - isIPV6 := knet.IsIPv6CIDR(hostSubnet) - mgmtIP, _ := MatchFirstIPFamily(isIPV6, nInfo.managementIPs) - return &net.IPNet{ - IP: mgmtIP, - Mask: hostSubnet.Mask, - } - } - return GetNodeManagementIfAddr(hostSubnet) -} - // IPMode returns the ipv4/ipv6 mode func (nInfo *secondaryNetInfo) IPMode() (bool, bool) { return nInfo.ipv4mode, nInfo.ipv6mode @@ -829,16 +790,6 @@ func (nInfo *secondaryNetInfo) ExcludeSubnets() []*net.IPNet { return nInfo.excludeSubnets } -// ReservedSubnets returns the ReservedSubnets value -func (nInfo *secondaryNetInfo) ReservedSubnets() []*net.IPNet { - return nInfo.reservedSubnets -} - -// InfrastructureSubnets returns the InfrastructureSubnets value -func (nInfo *secondaryNetInfo) InfrastructureSubnets() []*net.IPNet { - return nInfo.infrastructureSubnets -} - // JoinSubnetV4 returns the defaultNetConfInfo's JoinSubnetV4 value // call when ipv4mode=true func (nInfo *secondaryNetInfo) JoinSubnetV4() *net.IPNet { @@ -907,34 +858,24 @@ func (nInfo *secondaryNetInfo) canReconcile(other NetInfo) bool { if !cmp.Equal(nInfo.excludeSubnets, other.ExcludeSubnets(), cmpopts.SortSlices(lessIPNet)) { return false } - if !cmp.Equal(nInfo.reservedSubnets, other.ReservedSubnets(), cmpopts.SortSlices(lessIPNet)) { - return false - } - if !cmp.Equal(nInfo.infrastructureSubnets, other.InfrastructureSubnets(), cmpopts.SortSlices(lessIPNet)) { - return false - } return cmp.Equal(nInfo.joinSubnets, other.JoinSubnets(), cmpopts.SortSlices(lessIPNet)) } func (nInfo *secondaryNetInfo) copy() *secondaryNetInfo { // everything here is immutable c := &secondaryNetInfo{ - netName: nInfo.netName, - primaryNetwork: nInfo.primaryNetwork, - topology: nInfo.topology, - mtu: nInfo.mtu, - vlan: nInfo.vlan, - allowPersistentIPs: nInfo.allowPersistentIPs, - ipv4mode: nInfo.ipv4mode, - ipv6mode: nInfo.ipv6mode, - subnets: nInfo.subnets, - excludeSubnets: nInfo.excludeSubnets, - reservedSubnets: nInfo.reservedSubnets, - infrastructureSubnets: nInfo.infrastructureSubnets, - joinSubnets: nInfo.joinSubnets, - physicalNetworkName: nInfo.physicalNetworkName, - defaultGatewayIPs: nInfo.defaultGatewayIPs, - managementIPs: nInfo.managementIPs, + netName: nInfo.netName, + primaryNetwork: nInfo.primaryNetwork, + topology: nInfo.topology, + mtu: nInfo.mtu, + vlan: nInfo.vlan, + allowPersistentIPs: nInfo.allowPersistentIPs, + ipv4mode: nInfo.ipv4mode, + ipv6mode: nInfo.ipv6mode, + subnets: nInfo.subnets, + excludeSubnets: nInfo.excludeSubnets, + joinSubnets: nInfo.joinSubnets, + physicalNetworkName: nInfo.physicalNetworkName, } // copy mutables c.mutableNetInfo.copyFrom(&nInfo.mutableNetInfo) @@ -943,7 +884,7 @@ func (nInfo *secondaryNetInfo) copy() *secondaryNetInfo { } func newLayer3NetConfInfo(netconf *ovncnitypes.NetConf) (MutableNetInfo, error) { - subnets, err := parseNetworkSubnets(netconf.Subnets, types.Layer3Topology) + subnets, _, err := parseSubnets(netconf.Subnets, "", types.Layer3Topology) if err != nil { return nil, err } @@ -968,65 +909,23 @@ func newLayer3NetConfInfo(netconf *ovncnitypes.NetConf) (MutableNetInfo, error) } func newLayer2NetConfInfo(netconf *ovncnitypes.NetConf) (MutableNetInfo, error) { - subnets, err := parseNetworkSubnets(netconf.Subnets, types.Layer2Topology) - if err != nil { - return nil, fmt.Errorf("invalid network subnets for %s netconf %s: %v", netconf.Topology, netconf.Name, err) - } - - excludes, err := parseSubnetList(netconf.ExcludeSubnets) + subnets, excludes, err := parseSubnets(netconf.Subnets, netconf.ExcludeSubnets, types.Layer2Topology) if err != nil { - return nil, fmt.Errorf("invalid exclude subnets for %s netconf %s: %v", netconf.Topology, netconf.Name, err) - } - if err := validateSubnetContainment(excludes, subnets, config.NewExcludedSubnetNotContainedError); err != nil { - return nil, err - } - - var reserved, infra []*net.IPNet - if IsPreconfiguredUDNAddressesEnabled() { - reserved, err = parseSubnetList(netconf.ReservedSubnets) - if err != nil { - return nil, fmt.Errorf("invalid reserved subnets for %s netconf %s: %v", netconf.Topology, netconf.Name, err) - } - if err := validateSubnetContainment(reserved, subnets, config.NewReservedSubnetNotContainedError); err != nil { - return nil, err - } - - infra, err = parseSubnetList(netconf.InfrastructureSubnets) - if err != nil { - return nil, fmt.Errorf("invalid infrastructure subnets for %s netconf %s: %v", netconf.Topology, netconf.Name, err) - } - if err := validateSubnetContainment(infra, subnets, config.NewInfrastructureSubnetNotContainedError); err != nil { - return nil, err - } + return nil, fmt.Errorf("invalid %s netconf %s: %v", netconf.Topology, netconf.Name, err) } - joinSubnets, err := parseJoinSubnet(netconf.JoinSubnet) if err != nil { return nil, err } - - // Allocate infrastructure IPs for primary networks - var defaultGatewayIPs, managementIPs []net.IP - if IsPreconfiguredUDNAddressesEnabled() && netconf.Role == types.NetworkRolePrimary { - defaultGatewayIPs, managementIPs, err = allocateInfrastructureIPs(netconf) - if err != nil { - return nil, fmt.Errorf("failed to allocate infrastructure IPs: %v", err) - } - } - ni := &secondaryNetInfo{ - netName: netconf.Name, - primaryNetwork: netconf.Role == types.NetworkRolePrimary, - topology: types.Layer2Topology, - subnets: subnets, - joinSubnets: joinSubnets, - excludeSubnets: excludes, - reservedSubnets: reserved, - infrastructureSubnets: infra, - mtu: netconf.MTU, - allowPersistentIPs: netconf.AllowPersistentIPs, - defaultGatewayIPs: defaultGatewayIPs, - managementIPs: managementIPs, + netName: netconf.Name, + primaryNetwork: netconf.Role == types.NetworkRolePrimary, + topology: types.Layer2Topology, + subnets: subnets, + joinSubnets: joinSubnets, + excludeSubnets: excludes, + mtu: netconf.MTU, + allowPersistentIPs: netconf.AllowPersistentIPs, mutableNetInfo: mutableNetInfo{ id: types.InvalidID, nads: sets.Set[string]{}, @@ -1037,20 +936,11 @@ func newLayer2NetConfInfo(netconf *ovncnitypes.NetConf) (MutableNetInfo, error) } func newLocalnetNetConfInfo(netconf *ovncnitypes.NetConf) (MutableNetInfo, error) { - subnets, err := parseNetworkSubnets(netconf.Subnets, types.LocalnetTopology) + subnets, excludes, err := parseSubnets(netconf.Subnets, netconf.ExcludeSubnets, types.LocalnetTopology) if err != nil { return nil, fmt.Errorf("invalid %s netconf %s: %v", netconf.Topology, netconf.Name, err) } - excludes, err := parseSubnetList(netconf.ExcludeSubnets) - if err != nil { - return nil, fmt.Errorf("invalid %s netconf %s: %v", netconf.Topology, netconf.Name, err) - } - - if err := validateSubnetContainment(excludes, subnets, config.NewExcludedSubnetNotContainedError); err != nil { - return nil, err - } - ni := &secondaryNetInfo{ netName: netconf.Name, topology: types.LocalnetTopology, @@ -1069,60 +959,55 @@ func newLocalnetNetConfInfo(netconf *ovncnitypes.NetConf) (MutableNetInfo, error return ni, nil } -// parseNetworkSubnets parses network subnets based on the topology, returns nil if subnets is an empty string -func parseNetworkSubnets(subnets, topology string) ([]config.CIDRNetworkEntry, error) { - if strings.TrimSpace(subnets) == "" { - return nil, nil - } - +func parseSubnets(subnetsString, excludeSubnetsString, topology string) ([]config.CIDRNetworkEntry, []*net.IPNet, error) { + var parseSubnets func(clusterSubnetCmd string) ([]config.CIDRNetworkEntry, error) switch topology { case types.Layer3Topology: // For L3 topology, subnet is validated - return config.ParseClusterSubnetEntries(subnets) + parseSubnets = config.ParseClusterSubnetEntries case types.LocalnetTopology, types.Layer2Topology: - // For L2 topologies, host specific prefix length is ignored (using 0 as prefix length) - return config.ParseClusterSubnetEntriesWithDefaults(subnets, 0, 0) - default: - return nil, fmt.Errorf("unsupported topology: %s", topology) - } -} - -// parseSubnetList parses a list of subnets, returns nil if subnets is an empty string -func parseSubnetList(subnets string) ([]*net.IPNet, error) { - if strings.TrimSpace(subnets) == "" { - return nil, nil - } - - // For subnet lists, host specific prefix length is ignored (using 0 as prefix length) - entries, err := config.ParseClusterSubnetEntriesWithDefaults(subnets, 0, 0) - if err != nil { - return nil, err + // For L2 topologies, host specific prefix length is ignored (using 0 as + // prefix length) + parseSubnets = func(clusterSubnetCmd string) ([]config.CIDRNetworkEntry, error) { + return config.ParseClusterSubnetEntriesWithDefaults(clusterSubnetCmd, 0, 0) + } } - nets := make([]*net.IPNet, 0, len(entries)) - for _, entry := range entries { - nets = append(nets, entry.CIDR) + var subnets []config.CIDRNetworkEntry + if strings.TrimSpace(subnetsString) != "" { + var err error + subnets, err = parseSubnets(subnetsString) + if err != nil { + return nil, nil, err + } } - return nets, nil -} -// validateSubnetContainment checks if every subnet in subnets is contained in containerSubnets -// and returns a typed error using the provided error constructor function -func validateSubnetContainment(subnets []*net.IPNet, containerSubnets []config.CIDRNetworkEntry, - errorConstructor func(interface{}) *config.ValidationError) error { - for _, subnet := range subnets { - found := false - for _, containerSubnet := range containerSubnets { - if ContainsCIDR(containerSubnet.CIDR, subnet) { - found = true - break - } + var excludeIPNets []*net.IPNet + if strings.TrimSpace(excludeSubnetsString) != "" { + // For L2 topologies, host specific prefix length is ignored (using 0 as + // prefix length) + excludeSubnets, err := config.ParseClusterSubnetEntriesWithDefaults(excludeSubnetsString, 0, 0) + if err != nil { + return nil, nil, err } - if !found { - return errorConstructor(subnet) + excludeIPNets = make([]*net.IPNet, 0, len(excludeSubnets)) + for _, excludeSubnet := range excludeSubnets { + found := false + for _, subnet := range subnets { + if ContainsCIDR(subnet.CIDR, excludeSubnet.CIDR) { + found = true + break + } + } + if !found { + return nil, nil, fmt.Errorf("the provided network subnets %v do not contain exluded subnets %v", + subnets, excludeSubnet.CIDR) + } + excludeIPNets = append(excludeIPNets, excludeSubnet.CIDR) } } - return nil + + return subnets, excludeIPNets, nil } func parseJoinSubnet(joinSubnet string) ([]*net.IPNet, error) { @@ -1321,18 +1206,6 @@ func ValidateNetConf(nadName string, netconf *ovncnitypes.NetConf) error { return fmt.Errorf("the subnet attribute must be defined for layer2 primary user defined networks") } - if netconf.InfrastructureSubnets != "" && netconf.Topology != types.Layer2Topology { - return fmt.Errorf("infrastructureSubnets is only supported for layer2 topology") - } - - if netconf.ReservedSubnets != "" && netconf.Topology != types.Layer2Topology { - return fmt.Errorf("reservedSubnets is only supported for layer2 topology") - } - - if netconf.DefaultGatewayIPs != "" && netconf.Topology != types.Layer2Topology { - return fmt.Errorf("defaultGatewayIPs is only supported for layer2 topology") - } - if netconf.Topology != types.LocalnetTopology && netconf.Name != types.DefaultNetworkName { if err := subnetOverlapCheck(netconf); err != nil { return fmt.Errorf("invalid subnet configuration: %w", err) @@ -1385,7 +1258,7 @@ func subnetOverlapCheck(netconf *ovncnitypes.NetConf) error { } err = allSubnets.CheckForOverlaps() if err != nil { - return fmt.Errorf("pod or join subnet overlaps with already configured internal subnets: %w", err) + return fmt.Errorf("pod or join subnet overlaps with already configured internal subnets: %v", err) } return nil @@ -1448,21 +1321,6 @@ func GetPodNADToNetworkMapping(pod *corev1.Pod, nInfo NetInfo) (bool, map[string return true, networkSelections, nil } -// overrideActiveNSEWithDefaultNSE overrides the provided active NetworkSelectionElement with the IP and MAC requests from -// the default NetworkSelectionElement after validating its namespace and name. -func overrideActiveNSEWithDefaultNSE(defaultNSE, activeNSE *nettypes.NetworkSelectionElement) error { - if defaultNSE.Namespace != config.Kubernetes.OVNConfigNamespace { - return fmt.Errorf("unexpected default NSE namespace %q, expected %q", defaultNSE.Namespace, config.Kubernetes.OVNConfigNamespace) - } - if defaultNSE.Name != types.DefaultNetworkName { - return fmt.Errorf("unexpected default NSE name %q, expected %q", defaultNSE.Name, types.DefaultNetworkName) - } - activeNSE.IPRequest = defaultNSE.IPRequest - activeNSE.MacRequest = defaultNSE.MacRequest - activeNSE.IPAMClaimReference = defaultNSE.IPAMClaimReference - return nil -} - // GetPodNADToNetworkMappingWithActiveNetwork will call `GetPodNADToNetworkMapping` passing "nInfo" which correspond // to the NetInfo representing the NAD, the resulting NetworkSelectingElements will be decorated with the ones // from found active network @@ -1491,39 +1349,18 @@ func GetPodNADToNetworkMappingWithActiveNetwork(pod *corev1.Pod, nInfo NetInfo, if len(networkSelections) == 0 { networkSelections = map[string]*nettypes.NetworkSelectionElement{} } - - activeNSE := &nettypes.NetworkSelectionElement{ + networkSelections[activeNetworkNADs[0]] = &nettypes.NetworkSelectionElement{ Namespace: activeNetworkNADKey[0], Name: activeNetworkNADKey[1], } - // Feature gate integration: EnablePreconfiguredUDNAddresses controls default network IP/MAC transfer to active network - if IsPreconfiguredUDNAddressesEnabled() { - // Limit the static ip and mac requests to the layer2 primary UDN when EnablePreconfiguredUDNAddresses is enabled, we - // don't need to explicitly check this is primary UDN since - // the "active network" concept is exactly that. - if activeNetwork.TopologyType() == types.Layer2Topology { - defaultNSE, err := GetK8sPodDefaultNetworkSelection(pod) - if err != nil { - return false, nil, fmt.Errorf("failed getting default-network annotation for pod %q: %w", pod.Namespace+"/"+pod.Name, err) - } - // If there are static IPs and MACs at the default NSE, override the active NSE with them - if defaultNSE != nil { - if err := overrideActiveNSEWithDefaultNSE(defaultNSE, activeNSE); err != nil { - return false, nil, err - } - } - } - } - - if nInfo.IsPrimaryNetwork() && AllowsPersistentIPs(nInfo) && activeNSE.IPAMClaimReference == "" { + if nInfo.IsPrimaryNetwork() && AllowsPersistentIPs(nInfo) { ipamClaimName, wasPersistentIPRequested := pod.Annotations[OvnUDNIPAMClaimName] if wasPersistentIPRequested { - activeNSE.IPAMClaimReference = ipamClaimName + networkSelections[activeNetworkNADs[0]].IPAMClaimReference = ipamClaimName } } - networkSelections[activeNetworkNADs[0]] = activeNSE return true, networkSelections, nil } @@ -1541,12 +1378,6 @@ func IsRouteAdvertisementsEnabled() bool { return config.OVNKubernetesFeature.EnableMultiNetwork && config.OVNKubernetesFeature.EnableRouteAdvertisements } -// IsPreconfiguredUDNAddressesEnabled indicates if user defined IPs / MAC -// addresses can be set in primary UDNs -func IsPreconfiguredUDNAddressesEnabled() bool { - return IsNetworkSegmentationSupportEnabled() && config.OVNKubernetesFeature.EnablePreconfiguredUDNAddresses -} - func DoesNetworkRequireIPAM(netInfo NetInfo) bool { return !((netInfo.TopologyType() == types.Layer2Topology || netInfo.TopologyType() == types.LocalnetTopology) && len(netInfo.Subnets()) == 0) } @@ -1617,7 +1448,7 @@ func ParseNetworkIDFromVRFName(vrf string) int { // CanServeNamespace determines whether the given network can serve a specific namespace. // // For default and secondary networks it always returns true. -// For primary networks, it checks if the namespace is explicitly listed in the network's +// For primary networks, it checks if the namespace is explicitly listed in the network’s // associated namespaces. func CanServeNamespace(network NetInfo, namespace string) bool { // Default network handles all namespaces @@ -1731,94 +1562,3 @@ func ParseNetworkName(networkName string) (udnNamespace, udnName string) { } return "", "" } - -// allocateInfrastructureIPs attempts to allocate gateway and management IPs from infrastructure subnets. -// It searches through infrastructure subnets sequentially for each network subnet, allocating the first -// available IP as gateway IP (if not already provided) and the second available IP as management IP. -// If it isn't able to find the IPs in the infrastructure subnets it defers back to default values. -func allocateInfrastructureIPs(netconf *ovncnitypes.NetConf) ([]net.IP, []net.IP, error) { - // Parse network subnets - subnets, err := parseNetworkSubnets(netconf.Subnets, types.Layer2Topology) - if err != nil { - return nil, nil, fmt.Errorf("failed to parse subnets: %w", err) - } - - // Parse infrastructure subnets - infra, err := parseSubnetList(netconf.InfrastructureSubnets) - if err != nil { - return nil, nil, fmt.Errorf("failed to parse infrastructure subnets: %w", err) - } - - // Parse default gateway IPs - defaultGatewayIPs, err := ParseIPList(netconf.DefaultGatewayIPs) - if err != nil { - return nil, nil, fmt.Errorf("invalid default gateway IPs: %w", err) - } - - var gatewayIPs, managementIPs []net.IP - - for _, netSubnet := range subnets { - isIPV6 := knet.IsIPv6CIDR(netSubnet.CIDR) - var gwIP, mgmtIP net.IP - - gwIP, _ = MatchFirstIPFamily(isIPV6, defaultGatewayIPs) - infraSubnets := MatchAllIPNetFamily(isIPV6, infra) - - // Try to allocate the gateway/management IPs from infra subnets - // Build set of IPs to exclude (network IP, broadcast IP, and existing gateway IP) - // NOTE: Even though the network IP is technically allowed for IPv6 we exclude it to be consistent the legacy behavior - excludeIPs := sets.New(netSubnet.CIDR.IP.String()) - if !isIPV6 { - // Exclude the broadcast IP for IPv4, there is no broadcast IP for IPv6 - excludeIPs.Insert(SubnetBroadcastIP(*netSubnet.CIDR).String()) - } - - if len(infraSubnets) > 0 { - if gwIP != nil { - excludeIPs.Insert(gwIP.String()) - } - - // Find gateway IP if not already set - if gwIP == nil { - gwIP = getFirstAvailableIP(infraSubnets, excludeIPs) - if gwIP != nil { - excludeIPs.Insert(gwIP.String()) - } - } - - // Find management IP - mgmtIP = getFirstAvailableIP(infraSubnets, excludeIPs) - } - - // fallback to defaults - if gwIP == nil { - gwIP = GetNodeGatewayIfAddr(netSubnet.CIDR).IP - } - if mgmtIP == nil { - mgmtIP = GetNodeManagementIfAddr(netSubnet.CIDR).IP - if mgmtIP.Equal(gwIP) { - // Corner case: if the default management IP(.2) conflicts with the custom gateway IP, - // use the .1 address for the management IP. - mgmtIP = GetNodeGatewayIfAddr(netSubnet.CIDR).IP - } - } - - gatewayIPs = append(gatewayIPs, gwIP) - managementIPs = append(managementIPs, mgmtIP) - } - - return gatewayIPs, managementIPs, nil -} - -// getFirstAvailableIP returns the first available IP in the given subnets that is not in the exclude set. -// Returns nil if no available IP is found. -func getFirstAvailableIP(subnets []*net.IPNet, excludeIPs sets.Set[string]) net.IP { - for _, subnet := range subnets { - for currentIP := subnet.IP; subnet.Contains(currentIP); currentIP = iputils.NextIP(currentIP) { - if !excludeIPs.Has(currentIP.String()) { - return currentIP - } - } - } - return nil -} diff --git a/go-controller/pkg/util/multi_network_test.go b/go-controller/pkg/util/multi_network_test.go index 24746599de..daaaf920a5 100644 --- a/go-controller/pkg/util/multi_network_test.go +++ b/go-controller/pkg/util/multi_network_test.go @@ -18,13 +18,15 @@ import ( ovntypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" ) -func TestParseNetworkSubnets(t *testing.T) { +func TestParseSubnets(t *testing.T) { tests := []struct { - desc string - topology string - subnets string - expectedSubnets []config.CIDRNetworkEntry - expectError bool + desc string + topology string + subnets string + excludes string + expectedSubnets []config.CIDRNetworkEntry + expectedExcludes []*net.IPNet + expectError bool }{ { desc: "multiple subnets layer 3 topology", @@ -46,9 +48,10 @@ func TestParseNetworkSubnets(t *testing.T) { topology: ovntypes.Layer3Topology, }, { - desc: "multiple subnets layer 2 topology", + desc: "multiple subnets and excludes layer 2 topology", topology: ovntypes.Layer2Topology, subnets: "192.168.1.1/26, fda6::/48", + excludes: "192.168.1.38/32, fda6::38/128", expectedSubnets: []config.CIDRNetworkEntry{ { CIDR: ovntest.MustParseIPNet("192.168.1.0/26"), @@ -57,16 +60,31 @@ func TestParseNetworkSubnets(t *testing.T) { CIDR: ovntest.MustParseIPNet("fda6::/48"), }, }, + expectedExcludes: ovntest.MustParseIPNets("192.168.1.38/32", "fda6::38/128"), }, { desc: "empty subnets layer 2 topology", topology: ovntypes.Layer2Topology, - subnets: "", }, { - desc: "multiple subnets localnet topology", + desc: "invalid formatted excludes layer 2 topology", + topology: ovntypes.Layer2Topology, + subnets: "192.168.1.1/26", + excludes: "192.168.1.1/26/32", + expectError: true, + }, + { + desc: "invalid not contained excludes layer 2 topology", + topology: ovntypes.Layer2Topology, + subnets: "fda6::/48", + excludes: "fda7::38/128", + expectError: true, + }, + { + desc: "multiple subnets and excludes localnet topology", topology: ovntypes.LocalnetTopology, subnets: "192.168.1.1/26, fda6::/48", + excludes: "192.168.1.38/32, fda6::38/128", expectedSubnets: []config.CIDRNetworkEntry{ { CIDR: ovntest.MustParseIPNet("192.168.1.0/26"), @@ -75,53 +93,24 @@ func TestParseNetworkSubnets(t *testing.T) { CIDR: ovntest.MustParseIPNet("fda6::/48"), }, }, + expectedExcludes: ovntest.MustParseIPNets("192.168.1.38/32", "fda6::38/128"), }, { desc: "empty subnets localnet topology", topology: ovntypes.LocalnetTopology, - subnets: "", }, { - desc: "unsupported topology", - topology: "unsupported", - subnets: "192.168.1.1/26", + desc: "invalid formatted excludes localnet topology", + topology: ovntypes.LocalnetTopology, + subnets: "fda6::/48", + excludes: "fda6::1/48/128", expectError: true, }, - } - - for _, tc := range tests { - t.Run(tc.desc, func(t *testing.T) { - g := gomega.NewWithT(t) - - subnets, err := parseNetworkSubnets(tc.subnets, tc.topology) - if tc.expectError { - g.Expect(err).To(gomega.HaveOccurred()) - return - } - g.Expect(err).NotTo(gomega.HaveOccurred()) - g.Expect(subnets).To(gomega.ConsistOf(tc.expectedSubnets)) - }) - } -} - -func TestParseSubnetList(t *testing.T) { - tests := []struct { - desc string - subnets string - expectedSubnets []*net.IPNet - expectError bool - }{ { - desc: "multiple subnets", - subnets: "192.168.1.38/32, fda6::38/128", - expectedSubnets: ovntest.MustParseIPNets("192.168.1.38/32", "fda6::38/128"), - }, - { - desc: "empty subnets", - }, - { - desc: "invalid formatted subnets", - subnets: "192.168.1.1/26/32", + desc: "invalid not contained excludes localnet topology", + topology: ovntypes.LocalnetTopology, + subnets: "192.168.1.1/26", + excludes: "192.168.2.38/32", expectError: true, }, } @@ -129,58 +118,14 @@ func TestParseSubnetList(t *testing.T) { for _, tc := range tests { t.Run(tc.desc, func(t *testing.T) { g := gomega.NewWithT(t) - - subnets, err := parseSubnetList(tc.subnets) + subnets, excludes, err := parseSubnets(tc.subnets, tc.excludes, tc.topology) if tc.expectError { g.Expect(err).To(gomega.HaveOccurred()) return } g.Expect(err).NotTo(gomega.HaveOccurred()) g.Expect(subnets).To(gomega.ConsistOf(tc.expectedSubnets)) - }) - } -} - -func TestValidateSubnetContainment(t *testing.T) { - tests := []struct { - desc string - subnets []*net.IPNet - containerSubnets []config.CIDRNetworkEntry - expectError bool - }{ - { - desc: "valid containment", - subnets: ovntest.MustParseIPNets("192.168.1.38/32", "fda6::38/128"), - containerSubnets: []config.CIDRNetworkEntry{ - {CIDR: ovntest.MustParseIPNet("192.168.1.0/26")}, - {CIDR: ovntest.MustParseIPNet("fda6::/48")}, - }, - }, - { - desc: "invalid containment", - subnets: ovntest.MustParseIPNets("fda7::38/128"), - containerSubnets: []config.CIDRNetworkEntry{ - {CIDR: ovntest.MustParseIPNet("fda6::/48")}, - }, - expectError: true, - }, - { - desc: "empty subnets", - containerSubnets: []config.CIDRNetworkEntry{{CIDR: ovntest.MustParseIPNet("192.168.1.0/26")}}, - }, - } - - for _, tc := range tests { - t.Run(tc.desc, func(t *testing.T) { - g := gomega.NewWithT(t) - - err := validateSubnetContainment(tc.subnets, tc.containerSubnets, config.NewExcludedSubnetNotContainedError) - if tc.expectError { - g.Expect(err).To(gomega.HaveOccurred()) - g.Expect(err).To(gomega.BeAssignableToTypeOf(&config.ValidationError{})) - } else { - g.Expect(err).NotTo(gomega.HaveOccurred()) - } + g.Expect(excludes).To(gomega.ConsistOf(tc.expectedExcludes)) }) } } @@ -249,7 +194,7 @@ func TestParseNetconf(t *testing.T) { "ipam": "this is wrong" } `, - expectedError: fmt.Errorf("error parsing Network Attachment Definition ns1/nad1: json: cannot unmarshal string into Go struct field NetConf.NetConf.ipam of type types.IPAM"), + expectedError: fmt.Errorf("error parsing Network Attachment Definition ns1/nad1: json: cannot unmarshal string into Go struct field NetConf.ipam of type types.IPAM"), }, { desc: "attachment definition with IPAM key defined", @@ -513,116 +458,12 @@ func TestParseNetconf(t *testing.T) { }`, expectedError: fmt.Errorf("the subnet attribute must be defined for layer2 primary user defined networks"), }, - { - desc: "invalid not contained excludes layer 2 topology", - inputNetAttachDefConfigSpec: ` - { - "name": "tenantred", - "type": "ovn-k8s-cni-overlay", - "topology": "layer2", - "subnets": "fda6::/48", - "excludeSubnets": "fda7::38/128", - "netAttachDefName": "ns1/nad1" - } -`, - expectedError: fmt.Errorf("invalid subnet configuration: error while parsing subnets: the provided network subnets do not contain excluded subnets fda7::38/128"), - }, - { - desc: "multiple subnets and excludes localnet topology", - inputNetAttachDefConfigSpec: ` - { - "name": "tenantred", - "type": "ovn-k8s-cni-overlay", - "topology": "localnet", - "subnets": "192.168.1.1/26, fda6::/48", - "excludeSubnets": "192.168.1.38/32, fda6::38/128", - "netAttachDefName": "ns1/nad1" - } -`, - expectedNetConf: &ovncnitypes.NetConf{ - Topology: "localnet", - NADName: "ns1/nad1", - MTU: 1400, - Subnets: "192.168.1.1/26, fda6::/48", - ExcludeSubnets: "192.168.1.38/32, fda6::38/128", - NetConf: cnitypes.NetConf{Name: "tenantred", Type: "ovn-k8s-cni-overlay"}, - }, - }, - { - desc: "multiple subnets and reserved subnets layer 2 topology", - inputNetAttachDefConfigSpec: ` - { - "name": "tenantred", - "type": "ovn-k8s-cni-overlay", - "topology": "layer2", - "subnets": "192.168.1.0/24, fda6::/64", - "reservedSubnets": "192.168.1.0/28, fda6::0/80", - "netAttachDefName": "ns1/nad1" - } -`, - expectedNetConf: &ovncnitypes.NetConf{ - Topology: "layer2", - NADName: "ns1/nad1", - MTU: 1400, - Subnets: "192.168.1.0/24, fda6::/64", - ReservedSubnets: "192.168.1.0/28, fda6::0/80", - NetConf: cnitypes.NetConf{Name: "tenantred", Type: "ovn-k8s-cni-overlay"}, - }, - }, - { - desc: "layer 2 with both excludes and reserved subnets", - inputNetAttachDefConfigSpec: ` - { - "name": "tenantred", - "type": "ovn-k8s-cni-overlay", - "topology": "layer2", - "subnets": "192.168.1.0/24", - "excludeSubnets": "192.168.1.200/29", - "reservedSubnets": "192.168.1.0/28", - "netAttachDefName": "ns1/nad1" - } -`, - expectedNetConf: &ovncnitypes.NetConf{ - Topology: "layer2", - NADName: "ns1/nad1", - MTU: 1400, - Subnets: "192.168.1.0/24", - ExcludeSubnets: "192.168.1.200/29", - ReservedSubnets: "192.168.1.0/28", - NetConf: cnitypes.NetConf{Name: "tenantred", Type: "ovn-k8s-cni-overlay"}, - }, - }, - { - desc: "dual-stack reserved subnets layer 2 topology", - inputNetAttachDefConfigSpec: ` - { - "name": "tenantred", - "type": "ovn-k8s-cni-overlay", - "topology": "layer2", - "subnets": "192.168.1.0/24, 2001:db8::/64", - "reservedSubnets": "192.168.1.0/28, 2001:db8::/80", - "netAttachDefName": "ns1/nad1" - } -`, - expectedNetConf: &ovncnitypes.NetConf{ - Topology: "layer2", - NADName: "ns1/nad1", - MTU: 1400, - Subnets: "192.168.1.0/24, 2001:db8::/64", - ReservedSubnets: "192.168.1.0/28, 2001:db8::/80", - NetConf: cnitypes.NetConf{Name: "tenantred", Type: "ovn-k8s-cni-overlay"}, - }, - }, } for _, test := range tests { t.Run(test.desc, func(t *testing.T) { config.IPv4Mode = true config.IPv6Mode = true - // Enable feature flags for reserved subnets tests - config.OVNKubernetesFeature.EnableMultiNetwork = true - config.OVNKubernetesFeature.EnableNetworkSegmentation = true - config.OVNKubernetesFeature.EnablePreconfiguredUDNAddresses = true if test.unsupportedReason != "" { t.Skip(test.unsupportedReason) } @@ -1021,7 +862,6 @@ func TestGetPodNADToNetworkMappingWithActiveNetwork(t *testing.T) { expectedError error expectedIsAttachmentRequested bool expectedNetworkSelectionElements map[string]*nadv1.NetworkSelectionElement - enablePreconfiguredUDNAddresses bool } tests := []testConfig{ @@ -1171,143 +1011,10 @@ func TestGetPodNADToNetworkMappingWithActiveNetwork(t *testing.T) { }, }, }, - { - desc: "the network configuration for a primary layer2 UDN receive pod requesting IP, MAC and IPAMClaimRef on default network annotation for it", - inputNetConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer2Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPrimaryUDNConfig: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer2Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPodAnnotations: map[string]string{ - nadv1.NetworkAttachmentAnnot: GetNADName(namespaceName, "another-network"), - DefNetworkAnnotation: `[{"namespace": "ovn-kubernetes", "name": "default", "ips": ["192.168.0.3/24", "fda6::3/48"], "mac": "aa:bb:cc:dd:ee:ff", "ipam-claim-reference": "my-ipam-claim"}]`, - }, - expectedIsAttachmentRequested: true, - expectedNetworkSelectionElements: map[string]*nadv1.NetworkSelectionElement{ - "ns1/attachment1": { - Name: "attachment1", - Namespace: "ns1", - IPRequest: []string{"192.168.0.3/24", "fda6::3/48"}, - MacRequest: "aa:bb:cc:dd:ee:ff", - IPAMClaimReference: "my-ipam-claim", - }, - }, - enablePreconfiguredUDNAddresses: true, - }, - { - desc: "the network configuration for a primary layer2 UDN receive pod requesting IP and MAC on default network annotation for it, but with unexpected namespace", - inputNetConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer2Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPrimaryUDNConfig: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer2Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPodAnnotations: map[string]string{ - DefNetworkAnnotation: `[{"namespace": "other-namespace", "name": "default", "ips": ["192.168.0.3/24", "fda6::3/48"], "mac": "aa:bb:cc:dd:ee:ff"}]`, - }, - enablePreconfiguredUDNAddresses: true, - expectedError: fmt.Errorf(`unexpected default NSE namespace "other-namespace", expected "ovn-kubernetes"`), - }, - { - desc: "the network configuration for a primary layer2 UDN receive pod requesting IP and MAC on default network annotation for it, but with unexpected name", - inputNetConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer2Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPrimaryUDNConfig: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer2Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPodAnnotations: map[string]string{ - DefNetworkAnnotation: `[{"namespace": "ovn-kubernetes", "name": "unexpected-name", "ips": ["192.168.0.3/24", "fda6::3/48"], "mac": "aa:bb:cc:dd:ee:ff"}]`, - }, - enablePreconfiguredUDNAddresses: true, - expectedError: fmt.Errorf(`unexpected default NSE name "unexpected-name", expected "default"`), - }, - - { - desc: "default-network ips and mac is is ignored for Layer3 topology", - inputNetConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer3Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPrimaryUDNConfig: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer3Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPodAnnotations: map[string]string{ - nadv1.NetworkAttachmentAnnot: GetNADName(namespaceName, "another-network"), - DefNetworkAnnotation: `[{"namespace": "ovn-kubernetes", "name": "default", "ips": ["192.168.0.3/24", "fda6::3/48"], "mac": "aa:bb:cc:dd:ee:ff"}]`, - }, - expectedIsAttachmentRequested: true, - expectedNetworkSelectionElements: map[string]*nadv1.NetworkSelectionElement{ - "ns1/attachment1": { - Name: "attachment1", - Namespace: "ns1", - IPRequest: nil, - MacRequest: "", - }, - }, - enablePreconfiguredUDNAddresses: true, - }, - { - desc: "default-network with bad format", - inputNetConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer2Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPrimaryUDNConfig: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: networkName}, - Topology: ovntypes.Layer2Topology, - NADName: GetNADName(namespaceName, attachmentName), - Role: ovntypes.NetworkRolePrimary, - }, - inputPodAnnotations: map[string]string{ - nadv1.NetworkAttachmentAnnot: GetNADName(namespaceName, "another-network"), - DefNetworkAnnotation: `[{"foo}`, - }, - enablePreconfiguredUDNAddresses: true, - expectedError: fmt.Errorf(`failed getting default-network annotation for pod "/test-pod": %w`, fmt.Errorf(`GetK8sPodDefaultNetwork: failed to parse CRD object: parsePodNetworkAnnotation: failed to parse pod Network Attachment Selection Annotation JSON format: unexpected end of JSON input`)), - }, } for _, test := range tests { t.Run(test.desc, func(t *testing.T) { g := gomega.NewWithT(t) - - t.Cleanup(func() { - _ = config.PrepareTestConfig() - }) - - // Set custom network config based on test requirements - config.OVNKubernetesFeature.EnablePreconfiguredUDNAddresses = test.enablePreconfiguredUDNAddresses - if test.enablePreconfiguredUDNAddresses { - config.OVNKubernetesFeature.EnableMultiNetwork = true - config.OVNKubernetesFeature.EnableNetworkSegmentation = true - } - netInfo, err := NewNetInfo(test.inputNetConf) g.Expect(err).ToNot(gomega.HaveOccurred()) if test.inputNetConf.NADName != "" { @@ -1341,14 +1048,11 @@ func TestGetPodNADToNetworkMappingWithActiveNetwork(t *testing.T) { primaryUDNNetInfo, ) - if test.expectedError != nil { - g.Expect(err).To(gomega.HaveOccurred(), "unexpected success operation, epecting error") + if err != nil { g.Expect(err).To(gomega.MatchError(test.expectedError)) - } else { - g.Expect(err).ToNot(gomega.HaveOccurred()) - g.Expect(isAttachmentRequested).To(gomega.Equal(test.expectedIsAttachmentRequested)) - g.Expect(networkSelectionElements).To(gomega.Equal(test.expectedNetworkSelectionElements)) } + g.Expect(isAttachmentRequested).To(gomega.Equal(test.expectedIsAttachmentRequested)) + g.Expect(networkSelectionElements).To(gomega.Equal(test.expectedNetworkSelectionElements)) }) } } @@ -1384,9 +1088,8 @@ func TestSubnetOverlapCheck(t *testing.T) { "netAttachDefName": "ns1/nad1" } `, - expectedError: config.NewSubnetOverlapError( - config.ConfigSubnet{SubnetType: config.UserDefinedSubnets, Subnet: MustParseCIDR("10.129.0.0/16")}, - config.ConfigSubnet{SubnetType: config.ConfigSubnetCluster, Subnet: cidr4}), + expectedError: fmt.Errorf("invalid subnet configuration: pod or join subnet overlaps with already configured internal subnets: " + + "illegal network configuration: user defined subnet \"10.129.0.0/16\" overlaps cluster subnet \"10.128.0.0/14\""), }, { desc: "return error when IPv4 join subnet in net-attach-def overlaps other subnets", @@ -1401,9 +1104,8 @@ func TestSubnetOverlapCheck(t *testing.T) { "netAttachDefName": "ns1/nad1" } `, - expectedError: config.NewSubnetOverlapError( - config.ConfigSubnet{SubnetType: config.UserDefinedJoinSubnet, Subnet: MustParseCIDR("100.64.0.0/24")}, - config.ConfigSubnet{SubnetType: config.ConfigSubnetJoin, Subnet: MustParseCIDR(config.Gateway.V4JoinSubnet)}), + expectedError: fmt.Errorf("invalid subnet configuration: pod or join subnet overlaps with already configured internal subnets: " + + "illegal network configuration: user defined join subnet \"100.64.0.0/24\" overlaps built-in join subnet \"100.64.0.0/16\""), }, { desc: "return error when IPv6 POD subnet in net-attach-def overlaps other subnets", @@ -1418,10 +1120,8 @@ func TestSubnetOverlapCheck(t *testing.T) { "netAttachDefName": "ns1/nad1" } `, - expectedError: config.NewSubnetOverlapError( - config.ConfigSubnet{SubnetType: config.UserDefinedSubnets, Subnet: MustParseCIDR("fe01::/24")}, - config.ConfigSubnet{SubnetType: config.ConfigSubnetService, Subnet: svcCidr6}, - ), + expectedError: fmt.Errorf("invalid subnet configuration: pod or join subnet overlaps with already configured internal subnets: " + + "illegal network configuration: user defined subnet \"fe01::/24\" overlaps service subnet \"fe01::/16\""), }, { desc: "return error when IPv6 join subnet in net-attach-def overlaps other subnets", @@ -1436,10 +1136,8 @@ func TestSubnetOverlapCheck(t *testing.T) { "netAttachDefName": "ns1/nad1" } `, - expectedError: config.NewSubnetOverlapError( - config.ConfigSubnet{SubnetType: config.UserDefinedJoinSubnet, Subnet: MustParseCIDR("fd69::/112")}, - config.ConfigSubnet{SubnetType: config.ConfigSubnetMasquerade, Subnet: MustParseCIDR(config.Gateway.V6MasqueradeSubnet)}, - ), + expectedError: fmt.Errorf("invalid subnet configuration: pod or join subnet overlaps with already configured internal subnets: " + + "illegal network configuration: user defined join subnet \"fd69::/112\" overlaps masquerade subnet \"fd69::/125\""), }, { desc: "excluded subnet should not be considered for overlap check", @@ -1479,7 +1177,7 @@ func TestSubnetOverlapCheck(t *testing.T) { }) if test.expectedError != nil { _, err := ParseNADInfo(networkAttachmentDefinition) - g.Expect(err).To(gomega.MatchError(gomega.ContainSubstring(test.expectedError.Error()))) + g.Expect(err).To(gomega.MatchError(test.expectedError.Error())) } else { _, err := ParseNADInfo(networkAttachmentDefinition) g.Expect(err).NotTo(gomega.HaveOccurred()) @@ -1563,10 +1261,10 @@ func TestNewNetInfo(t *testing.T) { config.IPv6Mode = test.ipv6Cluster g := gomega.NewWithT(t) _, err := NewNetInfo(inputNetConf) - if test.expectedError != nil { - g.Expect(err).To(gomega.MatchError(test.expectedError), "should return an error for invalid network configuration") + if test.expectedError == nil { + g.Expect(err).ToNot(gomega.HaveOccurred()) } else { - g.Expect(err).NotTo(gomega.HaveOccurred(), "should not return an error for valid network configuration") + g.Expect(err).To(gomega.MatchError(test.expectedError.Error())) } }) } @@ -1609,286 +1307,3 @@ func applyNADDefaults(nad *nadv1.NetworkAttachmentDefinition) *nadv1.NetworkAtta nad.Namespace = namespace return nad } - -func TestGetNodeManagementIP(t *testing.T) { - testCases := []struct { - name string - netConf *ovncnitypes.NetConf - hostSubnet string - expectedIP *net.IPNet - }{ - { - name: "DefaultNetInfo should return traditional .2 address", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: ovntypes.DefaultNetworkName}, - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.2/24"), - }, - { - name: "Layer3 UDN should return traditional .2 address", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l3-network"}, - Topology: ovntypes.Layer3Topology, - Role: ovntypes.NetworkRolePrimary, - InfrastructureSubnets: "10.0.0.0/30", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.2/24"), - }, - { - name: "Layer2 primary UDN without infrastructure subnets should return traditional .2 address", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - Subnets: "10.0.0.0/24", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.2/24"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets should allocate the second usable IP from infrastructure subnet", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - Subnets: "10.0.0.0/24", - InfrastructureSubnets: "10.0.0.4/30", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.5/24"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets should allocate from infrastructure subnet skipping the broadcast IP", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - DefaultGatewayIPs: "10.0.0.5", - Subnets: "10.0.0.0/24", - InfrastructureSubnets: "10.0.0.255/32, 10.0.0.100/32", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.100/24"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets should allocate from infrastructure subnet without conflicting with default gateway", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - DefaultGatewayIPs: "10.0.0.2", - Subnets: "10.0.0.0/24", - InfrastructureSubnets: "10.0.0.0/30", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.1/24"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets should allocate from infrastructure subnet without conflicting with the default GW ip", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - DefaultGatewayIPs: "10.0.0.2", - Subnets: "10.0.0.0/24", - InfrastructureSubnets: "10.0.0.0/30", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.1/24"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets IPv6", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - Subnets: "2001:db8::/64", - InfrastructureSubnets: "2001:db8::/126", - }, - hostSubnet: "2001:db8::/64", - expectedIP: ovntest.MustParseIPNet("2001:db8::2/64"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets IPv6 - last available IP", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - DefaultGatewayIPs: "2001:db8::ffff:ffff:ffff:fffe", - Subnets: "2001:db8::/64", - InfrastructureSubnets: "2001:db8::ffff:ffff:ffff:fffe/127", - }, - hostSubnet: "2001:db8::/64", - expectedIP: ovntest.MustParseIPNet("2001:db8::ffff:ffff:ffff:ffff/64"), - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - g := gomega.NewWithT(t) - config.IPv4Mode = true - config.IPv6Mode = true - config.OVNKubernetesFeature.EnableMultiNetwork = true - config.OVNKubernetesFeature.EnableNetworkSegmentation = true - config.OVNKubernetesFeature.EnablePreconfiguredUDNAddresses = true - - netInfo, err := NewNetInfo(tc.netConf) - g.Expect(err).ToNot(gomega.HaveOccurred()) - - hostSubnet := ovntest.MustParseIPNet(tc.hostSubnet) - - result := netInfo.GetNodeManagementIP(hostSubnet) - if result == nil { - t.Fatalf("GetNodeManagementIP returned nil") - } - - if !result.IP.Equal(tc.expectedIP.IP) { - t.Errorf("Expected IP %s, got %s", tc.expectedIP.IP.String(), result.IP.String()) - } - - if result.Mask.String() != tc.expectedIP.Mask.String() { - t.Errorf("Expected mask %s, got %s", tc.expectedIP.Mask.String(), result.Mask.String()) - } - }) - } -} - -func TestGetNodeGatewayIP(t *testing.T) { - testCases := []struct { - name string - netConf *ovncnitypes.NetConf - hostSubnet string - expectedIP *net.IPNet - }{ - { - name: "DefaultNetInfo should return traditional .1 address", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: ovntypes.DefaultNetworkName}, - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.1/24"), - }, - { - name: "Layer3 UDN should return traditional .1 address", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l3-network"}, - Topology: ovntypes.Layer3Topology, - Role: ovntypes.NetworkRolePrimary, - InfrastructureSubnets: "10.0.0.0/30", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.1/24"), - }, - { - name: "Layer2 primary UDN without infrastructure subnets should return traditional .1 address", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - Subnets: "10.0.0.0/24", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.1/24"), - }, - { - name: "Layer2 primary UDN with custom default gateway IP should return that custom IP", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - DefaultGatewayIPs: "10.0.0.5", - Subnets: "10.0.0.0/24", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.5/24"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets should allocate the first usable IP from infrastructure subnet", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - Subnets: "10.0.0.0/24", - InfrastructureSubnets: "10.0.0.4/30", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.4/24"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets should allocate from infrastructure subnet skipping the network IP", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - Subnets: "10.0.0.0/24", - InfrastructureSubnets: "10.0.0.0/30", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.1/24"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets should allocate from infrastructure subnet skipping the broadcast IP", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - Subnets: "10.0.0.0/24", - InfrastructureSubnets: "10.0.0.255/32, 10.0.0.9/32", - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.9/24"), - }, - { - name: "Layer2 primary UDN with infrastructure subnets IPv6", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "l2-network"}, - Topology: ovntypes.Layer2Topology, - Role: ovntypes.NetworkRolePrimary, - - Subnets: "2001:db8::/64", - InfrastructureSubnets: "2001:db8::/126", - }, - hostSubnet: "2001:db8::/64", - expectedIP: ovntest.MustParseIPNet("2001:db8::1/64"), - }, - { - name: "Localnet topology should return traditional .1 address", - netConf: &ovncnitypes.NetConf{ - NetConf: cnitypes.NetConf{Name: "localnet-network"}, - Topology: ovntypes.LocalnetTopology, - }, - hostSubnet: "10.0.0.0/24", - expectedIP: ovntest.MustParseIPNet("10.0.0.1/24"), - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - g := gomega.NewWithT(t) - netInfo, err := NewNetInfo(tc.netConf) - g.Expect(err).ToNot(gomega.HaveOccurred()) - config.IPv4Mode = true - config.IPv6Mode = true - config.OVNKubernetesFeature.EnableMultiNetwork = true - config.OVNKubernetesFeature.EnableNetworkSegmentation = true - config.OVNKubernetesFeature.EnablePreconfiguredUDNAddresses = true - - hostSubnet := ovntest.MustParseIPNet(tc.hostSubnet) - - result := netInfo.GetNodeGatewayIP(hostSubnet) - if result == nil { - t.Fatalf("GetNodeGatewayIP returned nil") - } - - if !result.IP.Equal(tc.expectedIP.IP) { - t.Errorf("Expected IP %s, got %s", tc.expectedIP.IP.String(), result.IP.String()) - } - - if result.Mask.String() != tc.expectedIP.Mask.String() { - t.Errorf("Expected mask %s, got %s", tc.expectedIP.Mask.String(), result.Mask.String()) - } - }) - } -} diff --git a/go-controller/pkg/util/nad.go b/go-controller/pkg/util/nad.go deleted file mode 100644 index 3a220e2b82..0000000000 --- a/go-controller/pkg/util/nad.go +++ /dev/null @@ -1,46 +0,0 @@ -package util - -import ( - "context" - "fmt" - - nadtypes "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" - nadclientset "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/clientset/versioned" - nadlisters "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/listers/k8s.cni.cncf.io/v1" - - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" - "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" -) - -// EnsureDefaultNetworkNAD ensures that a well-known NAD exists for the -// default network in ovn-k namespace. This will allow the users to customize -// the primary UDN attachments with static IPs, and/or MAC address requests, by -// using the multus-cni `default network` feature. -func EnsureDefaultNetworkNAD(nadLister nadlisters.NetworkAttachmentDefinitionLister, nadClient nadclientset.Interface) (*nadtypes.NetworkAttachmentDefinition, error) { - nad, err := nadLister.NetworkAttachmentDefinitions(config.Kubernetes.OVNConfigNamespace).Get(types.DefaultNetworkName) - if err != nil && !apierrors.IsNotFound(err) { - return nil, err - } - if nad != nil { - return nad, nil - } - return nadClient.K8sCniCncfIoV1().NetworkAttachmentDefinitions(config.Kubernetes.OVNConfigNamespace).Create( - context.Background(), - &nadtypes.NetworkAttachmentDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: types.DefaultNetworkName, - Namespace: config.Kubernetes.OVNConfigNamespace, - }, - Spec: nadtypes.NetworkAttachmentDefinitionSpec{ - Config: fmt.Sprintf("{\"cniVersion\": \"0.4.0\", \"name\": \"ovn-kubernetes\", \"type\": \"%s\"}", config.CNI.Plugin), - }, - }, - // note we don't set ourselves as field manager for this create as we - // want to process the resulting event that would otherwise be filtered - // out in nadNeedsUpdate - metav1.CreateOptions{}, - ) -} diff --git a/go-controller/pkg/util/net.go b/go-controller/pkg/util/net.go index 94f7610cd0..eb9ac6380c 100644 --- a/go-controller/pkg/util/net.go +++ b/go-controller/pkg/util/net.go @@ -389,45 +389,3 @@ func RouteEqual(l, r *netlink.Route) bool { l.Congctl == r.Congctl && l.FastOpenNoCookie == r.FastOpenNoCookie } - -// SubnetBroadcastIP returns the IP network's broadcast IP. -func SubnetBroadcastIP(ipnet net.IPNet) net.IP { - ip := ipnet.IP - mask := ipnet.Mask - - // Handle IPv4 addresses in 16-byte representation - if ip4 := ip.To4(); ip4 != nil { - ip = ip4 - } - - result := make(net.IP, len(ip)) - - // broadcastIP = (networkIP) | (inverted mask) - for i := range ip { - result[i] = (ip[i] & mask[i]) | (mask[i] ^ 0xff) - } - return result -} - -// ParseIPList parses a comma-separated string of IP addresses ignoring spaces. -// Returns an empty slice if the input string is empty. -func ParseIPList(ipsStr string) ([]net.IP, error) { - if strings.TrimSpace(ipsStr) == "" { - return nil, nil - } - - var ips []net.IP - ipStrings := strings.Split(ipsStr, ",") - for _, ipStr := range ipStrings { - ipStr = strings.TrimSpace(ipStr) - if ipStr == "" { - continue - } - ip := net.ParseIP(ipStr) - if ip == nil { - return nil, fmt.Errorf("invalid IP address %q", ipStr) - } - ips = append(ips, ip) - } - return ips, nil -} diff --git a/go-controller/pkg/util/node_annotations.go b/go-controller/pkg/util/node_annotations.go index 5e77a26acf..4e9a984748 100644 --- a/go-controller/pkg/util/node_annotations.go +++ b/go-controller/pkg/util/node_annotations.go @@ -12,6 +12,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" + utilnet "k8s.io/utils/net" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" @@ -85,7 +86,6 @@ const ( // \"l2-network\":{\"ipv4\":\"100.65.0.4/16\",\"ipv6\":\"fd99::4/64\"}, // \"l3-network\":{\"ipv4\":\"100.65.0.4/16\",\"ipv6\":\"fd99::4/64\"} // }", - // deprecated, only used for cleanup OVNNodeGRLRPAddrs = "k8s.ovn.org/node-gateway-router-lrp-ifaddrs" // OvnNodeMasqCIDR is the CIDR form representation of the masquerade subnet that is currently configured on this node (i.e. 169.254.169.0/29) @@ -97,9 +97,6 @@ const ( // OVNNodeHostCIDRs is used to track the different host IP addresses and subnet masks on the node OVNNodeHostCIDRs = "k8s.ovn.org/host-cidrs" - // OVNNodePrimaryDPUHostAddr is used to track the primary DPU host address on the node - OVNNodePrimaryDPUHostAddr = "k8s.ovn.org/primary-dpu-host-addr" - // OVNNodeSecondaryHostEgressIPs contains EgressIP addresses that aren't managed by OVN. The EIP addresses are assigned to // standard linux interfaces and not interfaces of type OVS. OVNNodeSecondaryHostEgressIPs = "k8s.ovn.org/secondary-host-egress-ips" @@ -510,10 +507,7 @@ func UpdateUDNLayer2NodeGRLRPTunnelIDs(annotations map[string]string, netName st return annotations, nil } -// PrimaryIfAddrAnnotation represents IPv4 and/or IPv6 addresses stored in node annotations. -// It is used for JSON marshalling/unmarshalling of node interface address information, -// including primary interface addresses and other node IP configurations. -type PrimaryIfAddrAnnotation struct { +type primaryIfAddrAnnotation struct { IPv4 string `json:"ipv4,omitempty"` IPv6 string `json:"ipv6,omitempty"` } @@ -523,7 +517,7 @@ func SetNodePrimaryIfAddrs(nodeAnnotator kube.Annotator, ifAddrs []*net.IPNet) ( nodeIPNetv4, _ := MatchFirstIPNetFamily(false, ifAddrs) nodeIPNetv6, _ := MatchFirstIPNetFamily(true, ifAddrs) - primaryIfAddrAnnotation := PrimaryIfAddrAnnotation{} + primaryIfAddrAnnotation := primaryIfAddrAnnotation{} if nodeIPNetv4 != nil { primaryIfAddrAnnotation.IPv4 = nodeIPNetv4.String() } @@ -541,7 +535,7 @@ func createPrimaryIfAddrAnnotation(annotationName string, nodeAnnotation map[str if nodeAnnotation == nil { nodeAnnotation = make(map[string]interface{}) } - primaryIfAddrAnnotation := PrimaryIfAddrAnnotation{} + primaryIfAddrAnnotation := primaryIfAddrAnnotation{} if nodeIPNetv4 != nil { primaryIfAddrAnnotation.IPv4 = nodeIPNetv4.String() } @@ -556,6 +550,114 @@ func createPrimaryIfAddrAnnotation(annotationName string, nodeAnnotation map[str return nodeAnnotation, nil } +func NodeGatewayRouterLRPAddrsAnnotationChanged(oldNode, newNode *corev1.Node) bool { + return oldNode.Annotations[OVNNodeGRLRPAddrs] != newNode.Annotations[OVNNodeGRLRPAddrs] +} + +// UpdateNodeGatewayRouterLRPAddrsAnnotation updates a "k8s.ovn.org/node-gateway-router-lrp-ifaddrs" annotation for network "netName", +// with the specified network, suitable for passing to kube.SetAnnotationsOnNode. If joinSubnets is empty, +// it deletes the "k8s.ovn.org/node-gateway-router-lrp-ifaddrs" annotation for network "netName" +func UpdateNodeGatewayRouterLRPAddrsAnnotation(annotations map[string]string, joinSubnets []*net.IPNet, netName string) (map[string]string, error) { + if annotations == nil { + annotations = map[string]string{} + } + err := updateJoinSubnetAnnotation(annotations, OVNNodeGRLRPAddrs, netName, joinSubnets) + if err != nil { + return nil, err + } + return annotations, nil +} + +// updateJoinSubnetAnnotation add the joinSubnets of the given network to the input node annotations; +// input annotations is not nil +// if joinSubnets is empty, deletes the existing subnet annotation for given network from the input node annotations. +func updateJoinSubnetAnnotation(annotations map[string]string, annotationName, netName string, joinSubnets []*net.IPNet) error { + var bytes []byte + + // First get the all host subnets for all existing networks + subnetsMap, err := parseJoinSubnetAnnotation(annotations, annotationName) + if err != nil { + if !IsAnnotationNotSetError(err) { + return fmt.Errorf("failed to parse join subnet annotation %q: %w", + annotations, err) + } + // in the case that the annotation does not exist + subnetsMap = map[string]primaryIfAddrAnnotation{} + } + + // add or delete host subnet of the specified network + if len(joinSubnets) != 0 { + subnetVal := primaryIfAddrAnnotation{} + for _, net := range joinSubnets { + if utilnet.IsIPv4CIDR(net) { + subnetVal.IPv4 = net.String() + } else { + subnetVal.IPv6 = net.String() + } + } + subnetsMap[netName] = subnetVal + } else { + delete(subnetsMap, netName) + } + + // if no host subnet left, just delete the host subnet annotation from node annotations. + if len(subnetsMap) == 0 { + delete(annotations, annotationName) + return nil + } + + // Marshal all host subnets of all networks back to annotations. + bytes, err = json.Marshal(subnetsMap) + if err != nil { + return err + } + annotations[annotationName] = string(bytes) + return nil +} + +func parseJoinSubnetAnnotation(nodeAnnotations map[string]string, annotationName string) (map[string]primaryIfAddrAnnotation, error) { + annotation, ok := nodeAnnotations[annotationName] + if !ok { + return nil, newAnnotationNotSetError("could not find %q annotation", annotationName) + } + joinSubnetsNetworkMap := make(map[string]primaryIfAddrAnnotation) + if err := json.Unmarshal([]byte(annotation), &joinSubnetsNetworkMap); err != nil { + return nil, fmt.Errorf("failed to unmarshal annotation: %s, err: %w", annotationName, err) + } + + if len(joinSubnetsNetworkMap) == 0 { + return nil, fmt.Errorf("unexpected empty %s annotation", annotationName) + } + + joinsubnetMap := make(map[string]primaryIfAddrAnnotation) + for netName, subnetsStr := range joinSubnetsNetworkMap { + subnetVal := primaryIfAddrAnnotation{} + if subnetsStr.IPv4 == "" && subnetsStr.IPv6 == "" { + return nil, fmt.Errorf("annotation: %s does not have any IP information set", annotationName) + } + if subnetsStr.IPv4 != "" && config.IPv4Mode { + ip, ipNet, err := net.ParseCIDR(subnetsStr.IPv4) + if err != nil { + return nil, fmt.Errorf("failed to parse IPv4 address %s from annotation: %s, err: %w", + subnetsStr.IPv4, annotationName, err) + } + joinIP := &net.IPNet{IP: ip, Mask: ipNet.Mask} + subnetVal.IPv4 = joinIP.String() + } + if subnetsStr.IPv6 != "" && config.IPv6Mode { + ip, ipNet, err := net.ParseCIDR(subnetsStr.IPv6) + if err != nil { + return nil, fmt.Errorf("failed to parse IPv6 address %s from annotation: %s, err: %w", + subnetsStr.IPv4, annotationName, err) + } + joinIP := &net.IPNet{IP: ip, Mask: ipNet.Mask} + subnetVal.IPv6 = joinIP.String() + } + joinsubnetMap[netName] = subnetVal + } + return joinsubnetMap, nil +} + // CreateNodeTransitSwitchPortAddrAnnotation creates the node annotation for the node's Transit switch port addresses. func CreateNodeTransitSwitchPortAddrAnnotation(nodeAnnotation map[string]interface{}, nodeIPNetv4, nodeIPNetv6 *net.IPNet) (map[string]interface{}, error) { @@ -602,12 +704,12 @@ type ParsedNodeEgressIPConfiguration struct { Capacity Capacity } -func GetNodeIfAddrAnnotation(node *corev1.Node) (*PrimaryIfAddrAnnotation, error) { +func GetNodeIfAddrAnnotation(node *corev1.Node) (*primaryIfAddrAnnotation, error) { nodeIfAddrAnnotation, ok := node.Annotations[OvnNodeIfAddr] if !ok { return nil, newAnnotationNotSetError("%s annotation not found for node %q", OvnNodeIfAddr, node.Name) } - nodeIfAddr := &PrimaryIfAddrAnnotation{} + nodeIfAddr := &primaryIfAddrAnnotation{} if err := json.Unmarshal([]byte(nodeIfAddrAnnotation), nodeIfAddr); err != nil { return nil, fmt.Errorf("failed to unmarshal annotation: %s for node %q, err: %v", OvnNodeIfAddr, node.Name, err) } @@ -645,7 +747,7 @@ func ParseNodeGatewayRouterLRPAddr(node *corev1.Node) (net.IP, error) { if !ok { return nil, newAnnotationNotSetError("%s annotation not found for node %q", ovnNodeGRLRPAddr, node.Name) } - nodeIfAddr := PrimaryIfAddrAnnotation{} + nodeIfAddr := primaryIfAddrAnnotation{} if err := json.Unmarshal([]byte(nodeIfAddrAnnotation), &nodeIfAddr); err != nil { return nil, fmt.Errorf("failed to unmarshal annotation: %s for node %q, err: %v", ovnNodeGRLRPAddr, node.Name, err) } @@ -667,7 +769,7 @@ func parsePrimaryIfAddrAnnotation(node *corev1.Node, annotationName string) ([]* if !ok { return nil, newAnnotationNotSetError("%s annotation not found for node %q", annotationName, node.Name) } - nodeIfAddr := PrimaryIfAddrAnnotation{} + nodeIfAddr := primaryIfAddrAnnotation{} if err := json.Unmarshal([]byte(nodeIfAddrAnnotation), &nodeIfAddr); err != nil { return nil, fmt.Errorf("failed to unmarshal annotation: %s for node %q, err: %w", annotationName, node.Name, err) } @@ -681,7 +783,7 @@ func parsePrimaryIfAddrAnnotation(node *corev1.Node, annotationName string) ([]* return ipAddrs, nil } -func convertPrimaryIfAddrAnnotationToIPNet(ifAddr PrimaryIfAddrAnnotation) ([]*net.IPNet, error) { +func convertPrimaryIfAddrAnnotationToIPNet(ifAddr primaryIfAddrAnnotation) ([]*net.IPNet, error) { var ipAddrs []*net.IPNet if ifAddr.IPv4 != "" { ip, ipNet, err := net.ParseCIDR(ifAddr.IPv4) @@ -707,6 +809,95 @@ func ParseNodeGatewayRouterLRPAddrs(node *corev1.Node) ([]*net.IPNet, error) { return parsePrimaryIfAddrAnnotation(node, ovnNodeGRLRPAddr) } +func HasNodeGatewayRouterJoinNetwork(node *corev1.Node, netName string) bool { + var joinSubnetMap map[string]json.RawMessage + annotation, ok := node.Annotations[OVNNodeGRLRPAddrs] + if !ok { + return false + } + if err := json.Unmarshal([]byte(annotation), &joinSubnetMap); err != nil { + return false + } + if _, ok := joinSubnetMap[netName]; ok { + return true + } + + return false +} + +func ParseNodeGatewayRouterJoinNetwork(node *corev1.Node, netName string) (primaryIfAddrAnnotation, error) { + var joinSubnetMap map[string]json.RawMessage + var ret primaryIfAddrAnnotation + + annotation, ok := node.Annotations[OVNNodeGRLRPAddrs] + if !ok { + return primaryIfAddrAnnotation{}, newAnnotationNotSetError("could not find %q annotation", OVNNodeGRLRPAddrs) + } + + if err := json.Unmarshal([]byte(annotation), &joinSubnetMap); err != nil { + return primaryIfAddrAnnotation{}, fmt.Errorf("failed to unmarshal %q annotation on node %s: %v", OVNNodeGRLRPAddrs, node.Name, err) + } + val, ok := joinSubnetMap[netName] + if !ok { + return primaryIfAddrAnnotation{}, newAnnotationNotSetError("unable to fetch annotation value on node %s for network %s", + node.Name, netName) + } + + if err := json.Unmarshal(val, &ret); err != nil { + return primaryIfAddrAnnotation{}, fmt.Errorf("failed to unmarshal the %q annotation on node %s for %s network err: %w", OVNNodeGRLRPAddrs, node.Name, netName, err) + } + + return ret, nil +} + +// ParseNodeGatewayRouterJoinIPv4 returns the IPv4 address for the node's gateway router port +// stored in the 'OVNNodeGRLRPAddrs' annotation +func ParseNodeGatewayRouterJoinIPv4(node *corev1.Node, netName string) (net.IP, error) { + primaryIfAddr, err := ParseNodeGatewayRouterJoinNetwork(node, netName) + if err != nil { + return nil, err + } + if primaryIfAddr.IPv4 == "" { + return nil, fmt.Errorf("failed to find an IPv4 address for gateway route interface in node: %s, net: %s, "+ + "annotation values: %+v", node, netName, primaryIfAddr) + } + + ip, _, err := net.ParseCIDR(primaryIfAddr.IPv4) + if err != nil { + return nil, fmt.Errorf("failed to parse gateway router IPv4 address %s, err: %w", primaryIfAddr.IPv4, err) + } + return ip, nil +} + +// ParseNodeGatewayRouterJoinIPv6 returns the IPv6 address for the node's gateway router port +// stored in the 'OVNNodeGRLRPAddrs' annotation +func ParseNodeGatewayRouterJoinIPv6(node *corev1.Node, netName string) (net.IP, error) { + primaryIfAddr, err := ParseNodeGatewayRouterJoinNetwork(node, netName) + if err != nil { + return nil, err + } + if primaryIfAddr.IPv6 == "" { + return nil, fmt.Errorf("failed to find an IPv6 address for gateway route interface in node: %s, net: %s, "+ + "annotation values: %+v", node, netName, primaryIfAddr) + } + + ip, _, err := net.ParseCIDR(primaryIfAddr.IPv6) + if err != nil { + return nil, fmt.Errorf("failed to parse gateway router IPv6 address %s, err: %w", primaryIfAddr.IPv6, err) + } + return ip, nil +} + +// ParseNodeGatewayRouterJoinAddrs returns the IPv4 and/or IPv6 addresses for the node's gateway router port +// stored in the 'OVNNodeGRLRPAddrs' annotation +func ParseNodeGatewayRouterJoinAddrs(node *corev1.Node, netName string) ([]*net.IPNet, error) { + primaryIfAddr, err := ParseNodeGatewayRouterJoinNetwork(node, netName) + if err != nil { + return nil, err + } + return convertPrimaryIfAddrAnnotationToIPNet(primaryIfAddr) +} + // ParseNodeTransitSwitchPortAddrs returns the IPv4 and/or IPv6 addresses for the node's transit switch port // stored in the 'ovnTransitSwitchPortAddr' annotation func ParseNodeTransitSwitchPortAddrs(node *corev1.Node) ([]*net.IPNet, error) { @@ -843,6 +1034,38 @@ func ParseNodeHostCIDRs(node *corev1.Node) (sets.Set[string], error) { return sets.New(cfg...), nil } +// ParseNodeHostIPDropNetMask returns the parsed host IP addresses found on a node's host CIDR annotation. Removes the mask. +func ParseNodeHostIPDropNetMask(node *corev1.Node) (sets.Set[string], error) { + nodeIfAddrAnnotation, ok := node.Annotations[OvnNodeIfAddr] + if !ok { + return nil, newAnnotationNotSetError("%s annotation not found for node %q", OvnNodeIfAddr, node.Name) + } + nodeIfAddr := &primaryIfAddrAnnotation{} + if err := json.Unmarshal([]byte(nodeIfAddrAnnotation), nodeIfAddr); err != nil { + return nil, fmt.Errorf("failed to unmarshal annotation: %s for node %q, err: %v", OvnNodeIfAddr, node.Name, err) + } + + var cfg []string + if nodeIfAddr.IPv4 != "" { + cfg = append(cfg, nodeIfAddr.IPv4) + } + if nodeIfAddr.IPv6 != "" { + cfg = append(cfg, nodeIfAddr.IPv6) + } + if len(cfg) == 0 { + return nil, fmt.Errorf("node: %q does not have any IP information set", node.Name) + } + + for i, cidr := range cfg { + ip, _, err := net.ParseCIDR(cidr) + if err != nil || ip == nil { + return nil, fmt.Errorf("failed to parse node host cidr: %v", err) + } + cfg[i] = ip.String() + } + return sets.New(cfg...), nil +} + // ParseNodeHostCIDRsDropNetMask returns the parsed host IP addresses found on a node's host CIDR annotation. Removes the mask. func ParseNodeHostCIDRsDropNetMask(node *corev1.Node) (sets.Set[string], error) { addrAnnotation, ok := node.Annotations[OVNNodeHostCIDRs] @@ -1079,20 +1302,18 @@ func UpdateNodeIDAnnotation(annotations map[string]interface{}, nodeID int) map[ // GetNodeID returns the id of the node set in the 'OvnNodeID' node annotation. // Returns InvalidNodeID (-1) if the 'OvnNodeID' node annotation is not set or if the value is -// not an integer value. On error also returns: -// - NewAnnotationNotSetError if the annotation is missing -// - strconv.Atoi error if the annotation value is not a valid integer -func GetNodeID(node *corev1.Node) (int, error) { +// not an integer value. +func GetNodeID(node *corev1.Node) int { nodeID, ok := node.Annotations[OvnNodeID] if !ok { - return InvalidNodeID, newAnnotationNotSetError("%s annotation not found for node %s", OvnNodeID, node.Name) + return InvalidNodeID } id, err := strconv.Atoi(nodeID) if err != nil { - return InvalidNodeID, err + return InvalidNodeID } - return id, nil + return id } // NodeIDAnnotationChanged returns true if the OvnNodeID in the corev1.Nodes doesn't match @@ -1313,39 +1534,3 @@ func ParseNodeEncapIPsAnnotation(node *corev1.Node) ([]string, error) { func NodeEncapIPsChanged(oldNode, newNode *corev1.Node) bool { return oldNode.Annotations[OVNNodeEncapIPs] != newNode.Annotations[OVNNodeEncapIPs] } - -// SetNodePrimaryDPUHostAddr sets the primary DPU host address annotation on a node -func SetNodePrimaryDPUHostAddr(nodeAnnotator kube.Annotator, ifAddrs []*net.IPNet) error { - nodeIPNetv4, _ := MatchFirstIPNetFamily(false, ifAddrs) - nodeIPNetv6, _ := MatchFirstIPNetFamily(true, ifAddrs) - - ifAddrAnnotation := ifAddr{} - if nodeIPNetv4 != nil { - ifAddrAnnotation.IPv4 = nodeIPNetv4.String() - } - if nodeIPNetv6 != nil { - ifAddrAnnotation.IPv6 = nodeIPNetv6.String() - } - return nodeAnnotator.Set(OVNNodePrimaryDPUHostAddr, ifAddrAnnotation) -} - -// NodePrimaryDPUHostAddrAnnotationChanged returns true if the primary DPU host address annotation changed -func NodePrimaryDPUHostAddrAnnotationChanged(oldNode, newNode *corev1.Node) bool { - return oldNode.Annotations[OVNNodePrimaryDPUHostAddr] != newNode.Annotations[OVNNodePrimaryDPUHostAddr] -} - -// GetNodePrimaryDPUHostAddrAnnotation returns the raw primary DPU host address annotation from a node -func GetNodePrimaryDPUHostAddrAnnotation(node *corev1.Node) (*ifAddr, error) { - addrAnnotation, ok := node.Annotations[OVNNodePrimaryDPUHostAddr] - if !ok { - return nil, newAnnotationNotSetError("%s annotation not found for node %q", OVNNodePrimaryDPUHostAddr, node.Name) - } - nodeIfAddr := &ifAddr{} - if err := json.Unmarshal([]byte(addrAnnotation), nodeIfAddr); err != nil { - return nil, fmt.Errorf("failed to unmarshal annotation: %s for node %q, err: %v", OVNNodePrimaryDPUHostAddr, node.Name, err) - } - if nodeIfAddr.IPv4 == "" && nodeIfAddr.IPv6 == "" { - return nil, fmt.Errorf("node: %q does not have any IP information set", node.Name) - } - return nodeIfAddr, nil -} diff --git a/go-controller/pkg/util/node_annotations_unit_test.go b/go-controller/pkg/util/node_annotations_unit_test.go index 4e0ec03a34..f987684e82 100644 --- a/go-controller/pkg/util/node_annotations_unit_test.go +++ b/go-controller/pkg/util/node_annotations_unit_test.go @@ -541,6 +541,126 @@ func TestParseNodeGatewayRouterLRPAddr(t *testing.T) { } } +func TestParseNodeGatewayRouterJoinAddrs(t *testing.T) { + tests := []struct { + desc string + inpNode corev1.Node + netName string + errExpected bool + expOutput bool + }{ + { + desc: "Gateway router LPR IP address annotation not found for node, however, does not return error", + inpNode: corev1.Node{}, + expOutput: false, + }, + { + desc: "success: Gateway router parse LPR IP address", + inpNode: corev1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{"k8s.ovn.org/node-gateway-router-lrp-ifaddrs": `{"default":{"ipv4":"100.64.0.4/16"}}`}, + }, + }, + netName: types.DefaultNetworkName, + expOutput: true, + }, + { + desc: "success: Gateway router parse LPR IP address dual stack", + inpNode: corev1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{"k8s.ovn.org/node-gateway-router-lrp-ifaddrs": `{"default":{"ipv4":"100.64.0.5/16","ipv6":"fd:98::/64"}}`}, + }, + }, + netName: types.DefaultNetworkName, + expOutput: true, + }, + { + desc: "success: Gateway router parse LPR IP address dual stack for the right network name", + inpNode: corev1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{"k8s.ovn.org/node-gateway-router-lrp-ifaddrs": `{"default":{"ipv4":"100.64.0.5/16","ipv6":"fd:98::/64"},"l3-network":{"ipv4":"100.65.0.5/16","ipv6":"fd:99::/64"}}`}, + }, + }, + netName: "l3-network", + expOutput: true, + }, + { + desc: "error: Gateway router parse LPR IP address dual stack cannot find the requested network name", + inpNode: corev1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{"k8s.ovn.org/node-gateway-router-lrp-ifaddrs": `{"default":{"ipv4":"100.64.0.5/16","ipv6":"fd:98::/64"},"l3-network":{"ipv4":"100.65.0.5/16","ipv6":"fd:99::/64"}}`}, + }, + }, + netName: "l2-network", + errExpected: true, + }, + { + desc: "error: Gateway router parse LPR IP address error", + inpNode: corev1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{"k8s.ovn.org/node-gateway-router-lrp-ifaddrs": `{"default":{"ipv4":"100.64.0.5"}}`}, + }, + }, + netName: types.DefaultNetworkName, + errExpected: true, + }, + } + config.IPv4Mode = true + config.IPv6Mode = true + for i, tc := range tests { + t.Run(fmt.Sprintf("%d:%s", i, tc.desc), func(t *testing.T) { + cfg, e := ParseNodeGatewayRouterJoinAddrs(&tc.inpNode, tc.netName) + if tc.errExpected { + t.Log(e) + require.Error(t, e) + assert.Nil(t, cfg) + } + if tc.expOutput { + assert.NotNil(t, cfg) + } + }) + } +} + +func TestCreateNodeGatewayRouterLRPAddrsAnnotation(t *testing.T) { + tests := []struct { + desc string + inpDefSubnetIps []*net.IPNet + outExp map[string]string + errExp bool + }{ + { + desc: "success path, valid default subnets", + inpDefSubnetIps: ovntest.MustParseIPNets("192.168.1.12/24"), + outExp: map[string]string{ + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": "{\"default\":{\"ipv4\":\"192.168.1.12/24\"}}", + }, + }, + { + desc: "success path, valid default dualstack subnets", + inpDefSubnetIps: ovntest.MustParseIPNets("192.168.1.12/24", "fd:98::5/64"), + outExp: map[string]string{ + "k8s.ovn.org/node-gateway-router-lrp-ifaddrs": "{\"default\":{\"ipv4\":\"192.168.1.12/24\",\"ipv6\":\"fd:98::5/64\"}}", + }, + }, + { + desc: "success path, inpDefSubnetIps is nil", + outExp: map[string]string{}, + }, + } + for i, tc := range tests { + t.Run(fmt.Sprintf("%d:%s", i, tc.desc), func(t *testing.T) { + res, err := UpdateNodeGatewayRouterLRPAddrsAnnotation(nil, tc.inpDefSubnetIps, types.DefaultNetworkName) + t.Log(res, err) + if tc.errExp { + assert.Error(t, err) + } else { + assert.True(t, reflect.DeepEqual(res, tc.outExp)) + } + }) + } +} + func TestSetGatewayMTUSupport(t *testing.T) { mockAnnotator := new(annotatorMock.Annotator) diff --git a/go-controller/pkg/util/pod_annotation.go b/go-controller/pkg/util/pod_annotation.go index ba565571bc..b5c46a804f 100644 --- a/go-controller/pkg/util/pod_annotation.go +++ b/go-controller/pkg/util/pod_annotation.go @@ -16,6 +16,7 @@ import ( utilnet "k8s.io/utils/net" "sigs.k8s.io/yaml" + "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube" "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types" ) @@ -52,7 +53,7 @@ import ( const ( // OvnPodAnnotationName is the constant string representing the POD annotation key OvnPodAnnotationName = "k8s.ovn.org/pod-networks" - // DefNetworkAnnotation is the pod annotation for the cluster-wide active network + // DefNetworkAnnotation is the pod annotation for the cluster-wide default network DefNetworkAnnotation = "v1.multus-cni.io/default-network" // OvnUDNIPAMClaimName is used for workload owners to instruct OVN-K which // IPAMClaim will hold the allocation for the workload @@ -227,7 +228,7 @@ func UnmarshalPodAnnotation(annotations map[string]string, nadName string) (*Pod tempA, ok := podNetworks[nadName] if !ok { - return nil, newAnnotationNotSetError("no ovn pod annotation for NAD %s: %q", + return nil, fmt.Errorf("no ovn pod annotation for network %s: %q", nadName, ovnAnnotation) } @@ -513,6 +514,190 @@ func IsValidPodAnnotation(podAnnotation *PodAnnotation) bool { return podAnnotation != nil && len(podAnnotation.MAC) > 0 } +func joinSubnetToRoute(netinfo NetInfo, isIPv6 bool, gatewayIP net.IP) PodRoute { + joinSubnet := netinfo.JoinSubnetV4() + if isIPv6 { + joinSubnet = netinfo.JoinSubnetV6() + } + return PodRoute{ + Dest: joinSubnet, + NextHop: gatewayIP, + } +} + +func serviceCIDRToRoute(isIPv6 bool, gatewayIP net.IP) []PodRoute { + var podRoutes []PodRoute + for _, serviceSubnet := range config.Kubernetes.ServiceCIDRs { + if isIPv6 == utilnet.IsIPv6CIDR(serviceSubnet) { + podRoutes = append(podRoutes, PodRoute{ + Dest: serviceSubnet, + NextHop: gatewayIP, + }) + } + } + return podRoutes +} + +func hairpinMasqueradeIPToRoute(isIPv6 bool, gatewayIP net.IP) PodRoute { + ip := config.Gateway.MasqueradeIPs.V4OVNServiceHairpinMasqueradeIP + if isIPv6 { + ip = config.Gateway.MasqueradeIPs.V6OVNServiceHairpinMasqueradeIP + } + return PodRoute{ + Dest: &net.IPNet{ + IP: ip, + Mask: GetIPFullMask(ip), + }, + NextHop: gatewayIP, + } +} + +// addRoutesGatewayIP updates the provided pod annotation for the provided pod +// with the gateways derived from the allocated IPs +func AddRoutesGatewayIP( + netinfo NetInfo, + node *corev1.Node, + pod *corev1.Pod, + podAnnotation *PodAnnotation, + network *nadapi.NetworkSelectionElement) error { + + // generate the nodeSubnets from the allocated IPs + nodeSubnets := IPsToNetworkIPs(podAnnotation.IPs...) + + if netinfo.IsSecondary() { + // for secondary network, see if its network-attachment's annotation has default-route key. + // If present, then we need to add default route for it + podAnnotation.Gateways = append(podAnnotation.Gateways, network.GatewayRequest...) + topoType := netinfo.TopologyType() + switch topoType { + case types.LocalnetTopology: + // no route needed for directly connected subnets + return nil + case types.Layer2Topology: + if !IsNetworkSegmentationSupportEnabled() || !netinfo.IsPrimaryNetwork() { + return nil + } + for _, podIfAddr := range podAnnotation.IPs { + isIPv6 := utilnet.IsIPv6CIDR(podIfAddr) + nodeSubnet, err := MatchFirstIPNetFamily(isIPv6, nodeSubnets) + if err != nil { + return err + } + gatewayIPnet := GetNodeGatewayIfAddr(nodeSubnet) + // Ensure default service network traffic always goes to OVN + podAnnotation.Routes = append(podAnnotation.Routes, serviceCIDRToRoute(isIPv6, gatewayIPnet.IP)...) + // Ensure UDN join subnet traffic always goes to UDN LSP + podAnnotation.Routes = append(podAnnotation.Routes, joinSubnetToRoute(netinfo, isIPv6, gatewayIPnet.IP)) + if network != nil && len(network.GatewayRequest) == 0 { // if specific default route for pod was not requested then add gatewayIP + podAnnotation.Gateways = append(podAnnotation.Gateways, gatewayIPnet.IP) + } + } + // Until https://github.com/ovn-kubernetes/ovn-kubernetes/issues/4876 is fixed, it is limited to IC only + if config.OVNKubernetesFeature.EnableInterconnect { + if _, isIPv6Mode := netinfo.IPMode(); isIPv6Mode { + joinAddrs, err := ParseNodeGatewayRouterJoinAddrs(node, netinfo.GetNetworkName()) + if err != nil { + if IsAnnotationNotSetError(err) { + return types.NewSuppressedError(err) + } + return fmt.Errorf("failed parsing node gateway router join addresses, network %q, %w", netinfo.GetNetworkName(), err) + } + podAnnotation.GatewayIPv6LLA = HWAddrToIPv6LLA(IPAddrToHWAddr(joinAddrs[0].IP)) + } + } + return nil + case types.Layer3Topology: + for _, podIfAddr := range podAnnotation.IPs { + isIPv6 := utilnet.IsIPv6CIDR(podIfAddr) + nodeSubnet, err := MatchFirstIPNetFamily(isIPv6, nodeSubnets) + if err != nil { + return err + } + gatewayIPnet := GetNodeGatewayIfAddr(nodeSubnet) + for _, clusterSubnet := range netinfo.Subnets() { + if isIPv6 == utilnet.IsIPv6CIDR(clusterSubnet.CIDR) { + podAnnotation.Routes = append(podAnnotation.Routes, PodRoute{ + Dest: clusterSubnet.CIDR, + NextHop: gatewayIPnet.IP, + }) + } + } + if !IsNetworkSegmentationSupportEnabled() || !netinfo.IsPrimaryNetwork() { + continue + } + // Ensure default service network traffic always goes to OVN + podAnnotation.Routes = append(podAnnotation.Routes, serviceCIDRToRoute(isIPv6, gatewayIPnet.IP)...) + // Ensure UDN join subnet traffic always goes to UDN LSP + podAnnotation.Routes = append(podAnnotation.Routes, joinSubnetToRoute(netinfo, isIPv6, gatewayIPnet.IP)) + if network != nil && len(network.GatewayRequest) == 0 { // if specific default route for pod was not requested then add gatewayIP + podAnnotation.Gateways = append(podAnnotation.Gateways, gatewayIPnet.IP) + } + } + return nil + } + return fmt.Errorf("topology type %s not supported", topoType) + } + + // if there are other network attachments for the pod, then check if those network-attachment's + // annotation has default-route key. If present, then we need to skip adding default route for + // OVN interface + networks, err := GetK8sPodAllNetworkSelections(pod) + if err != nil { + return fmt.Errorf("error while getting network attachment definition for [%s/%s]: %v", + pod.Namespace, pod.Name, err) + } + otherDefaultRouteV4 := false + otherDefaultRouteV6 := false + for _, network := range networks { + for _, gatewayRequest := range network.GatewayRequest { + if utilnet.IsIPv6(gatewayRequest) { + otherDefaultRouteV6 = true + } else { + otherDefaultRouteV4 = true + } + } + } + + for _, podIfAddr := range podAnnotation.IPs { + isIPv6 := utilnet.IsIPv6CIDR(podIfAddr) + nodeSubnet, err := MatchFirstIPNetFamily(isIPv6, nodeSubnets) + if err != nil { + return err + } + + gatewayIPnet := GetNodeGatewayIfAddr(nodeSubnet) + + // Ensure default pod network traffic always goes to OVN + for _, clusterSubnet := range config.Default.ClusterSubnets { + if isIPv6 == utilnet.IsIPv6CIDR(clusterSubnet.CIDR) { + podAnnotation.Routes = append(podAnnotation.Routes, PodRoute{ + Dest: clusterSubnet.CIDR, + NextHop: gatewayIPnet.IP, + }) + } + } + + if podAnnotation.Role == types.NetworkRolePrimary { + // Ensure default service network traffic always goes to OVN + podAnnotation.Routes = append(podAnnotation.Routes, serviceCIDRToRoute(isIPv6, gatewayIPnet.IP)...) + // Ensure service hairpin masquerade traffic always goes to OVN + podAnnotation.Routes = append(podAnnotation.Routes, hairpinMasqueradeIPToRoute(isIPv6, gatewayIPnet.IP)) + otherDefaultRoute := otherDefaultRouteV4 + if isIPv6 { + otherDefaultRoute = otherDefaultRouteV6 + } + if !otherDefaultRoute { + podAnnotation.Gateways = append(podAnnotation.Gateways, gatewayIPnet.IP) + } + } + + // Ensure default join subnet traffic always goes to OVN + podAnnotation.Routes = append(podAnnotation.Routes, joinSubnetToRoute(netinfo, isIPv6, gatewayIPnet.IP)) + } + + return nil +} + // UnmarshalUDNOpenPortsAnnotation returns the OpenPorts from the pod annotation. If annotation is not present, // empty list with no error is returned. func UnmarshalUDNOpenPortsAnnotation(annotations map[string]string) ([]*OpenPort, error) { diff --git a/go-controller/pkg/util/util.go b/go-controller/pkg/util/util.go index 4455de04c9..cdcface465 100644 --- a/go-controller/pkg/util/util.go +++ b/go-controller/pkg/util/util.go @@ -671,11 +671,3 @@ func GetMirroredEndpointSlices(controller, sourceName, namespace string, endpoin } return mirroredEndpointSlices, nil } - -func MustParseCIDR(cidr string) *net.IPNet { - _, ipNet, err := net.ParseCIDR(cidr) - if err != nil { - panic(fmt.Sprintf("failed to parse CIDR %q: %v", cidr, err)) - } - return ipNet -} diff --git a/go-controller/vendor/github.com/blang/semver/v4/LICENSE b/go-controller/vendor/github.com/blang/semver/v4/LICENSE deleted file mode 100644 index 5ba5c86fcb..0000000000 --- a/go-controller/vendor/github.com/blang/semver/v4/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2014 Benedikt Lang - -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. - diff --git a/go-controller/vendor/github.com/blang/semver/v4/json.go b/go-controller/vendor/github.com/blang/semver/v4/json.go deleted file mode 100644 index a74bf7c449..0000000000 --- a/go-controller/vendor/github.com/blang/semver/v4/json.go +++ /dev/null @@ -1,23 +0,0 @@ -package semver - -import ( - "encoding/json" -) - -// MarshalJSON implements the encoding/json.Marshaler interface. -func (v Version) MarshalJSON() ([]byte, error) { - return json.Marshal(v.String()) -} - -// UnmarshalJSON implements the encoding/json.Unmarshaler interface. -func (v *Version) UnmarshalJSON(data []byte) (err error) { - var versionString string - - if err = json.Unmarshal(data, &versionString); err != nil { - return - } - - *v, err = Parse(versionString) - - return -} diff --git a/go-controller/vendor/github.com/blang/semver/v4/range.go b/go-controller/vendor/github.com/blang/semver/v4/range.go deleted file mode 100644 index 95f7139b97..0000000000 --- a/go-controller/vendor/github.com/blang/semver/v4/range.go +++ /dev/null @@ -1,416 +0,0 @@ -package semver - -import ( - "fmt" - "strconv" - "strings" - "unicode" -) - -type wildcardType int - -const ( - noneWildcard wildcardType = iota - majorWildcard wildcardType = 1 - minorWildcard wildcardType = 2 - patchWildcard wildcardType = 3 -) - -func wildcardTypefromInt(i int) wildcardType { - switch i { - case 1: - return majorWildcard - case 2: - return minorWildcard - case 3: - return patchWildcard - default: - return noneWildcard - } -} - -type comparator func(Version, Version) bool - -var ( - compEQ comparator = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) == 0 - } - compNE = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) != 0 - } - compGT = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) == 1 - } - compGE = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) >= 0 - } - compLT = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) == -1 - } - compLE = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) <= 0 - } -) - -type versionRange struct { - v Version - c comparator -} - -// rangeFunc creates a Range from the given versionRange. -func (vr *versionRange) rangeFunc() Range { - return Range(func(v Version) bool { - return vr.c(v, vr.v) - }) -} - -// Range represents a range of versions. -// A Range can be used to check if a Version satisfies it: -// -// range, err := semver.ParseRange(">1.0.0 <2.0.0") -// range(semver.MustParse("1.1.1") // returns true -type Range func(Version) bool - -// OR combines the existing Range with another Range using logical OR. -func (rf Range) OR(f Range) Range { - return Range(func(v Version) bool { - return rf(v) || f(v) - }) -} - -// AND combines the existing Range with another Range using logical AND. -func (rf Range) AND(f Range) Range { - return Range(func(v Version) bool { - return rf(v) && f(v) - }) -} - -// ParseRange parses a range and returns a Range. -// If the range could not be parsed an error is returned. -// -// Valid ranges are: -// - "<1.0.0" -// - "<=1.0.0" -// - ">1.0.0" -// - ">=1.0.0" -// - "1.0.0", "=1.0.0", "==1.0.0" -// - "!1.0.0", "!=1.0.0" -// -// A Range can consist of multiple ranges separated by space: -// Ranges can be linked by logical AND: -// - ">1.0.0 <2.0.0" would match between both ranges, so "1.1.1" and "1.8.7" but not "1.0.0" or "2.0.0" -// - ">1.0.0 <3.0.0 !2.0.3-beta.2" would match every version between 1.0.0 and 3.0.0 except 2.0.3-beta.2 -// -// Ranges can also be linked by logical OR: -// - "<2.0.0 || >=3.0.0" would match "1.x.x" and "3.x.x" but not "2.x.x" -// -// AND has a higher precedence than OR. It's not possible to use brackets. -// -// Ranges can be combined by both AND and OR -// -// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` -func ParseRange(s string) (Range, error) { - parts := splitAndTrim(s) - orParts, err := splitORParts(parts) - if err != nil { - return nil, err - } - expandedParts, err := expandWildcardVersion(orParts) - if err != nil { - return nil, err - } - var orFn Range - for _, p := range expandedParts { - var andFn Range - for _, ap := range p { - opStr, vStr, err := splitComparatorVersion(ap) - if err != nil { - return nil, err - } - vr, err := buildVersionRange(opStr, vStr) - if err != nil { - return nil, fmt.Errorf("Could not parse Range %q: %s", ap, err) - } - rf := vr.rangeFunc() - - // Set function - if andFn == nil { - andFn = rf - } else { // Combine with existing function - andFn = andFn.AND(rf) - } - } - if orFn == nil { - orFn = andFn - } else { - orFn = orFn.OR(andFn) - } - - } - return orFn, nil -} - -// splitORParts splits the already cleaned parts by '||'. -// Checks for invalid positions of the operator and returns an -// error if found. -func splitORParts(parts []string) ([][]string, error) { - var ORparts [][]string - last := 0 - for i, p := range parts { - if p == "||" { - if i == 0 { - return nil, fmt.Errorf("First element in range is '||'") - } - ORparts = append(ORparts, parts[last:i]) - last = i + 1 - } - } - if last == len(parts) { - return nil, fmt.Errorf("Last element in range is '||'") - } - ORparts = append(ORparts, parts[last:]) - return ORparts, nil -} - -// buildVersionRange takes a slice of 2: operator and version -// and builds a versionRange, otherwise an error. -func buildVersionRange(opStr, vStr string) (*versionRange, error) { - c := parseComparator(opStr) - if c == nil { - return nil, fmt.Errorf("Could not parse comparator %q in %q", opStr, strings.Join([]string{opStr, vStr}, "")) - } - v, err := Parse(vStr) - if err != nil { - return nil, fmt.Errorf("Could not parse version %q in %q: %s", vStr, strings.Join([]string{opStr, vStr}, ""), err) - } - - return &versionRange{ - v: v, - c: c, - }, nil - -} - -// inArray checks if a byte is contained in an array of bytes -func inArray(s byte, list []byte) bool { - for _, el := range list { - if el == s { - return true - } - } - return false -} - -// splitAndTrim splits a range string by spaces and cleans whitespaces -func splitAndTrim(s string) (result []string) { - last := 0 - var lastChar byte - excludeFromSplit := []byte{'>', '<', '='} - for i := 0; i < len(s); i++ { - if s[i] == ' ' && !inArray(lastChar, excludeFromSplit) { - if last < i-1 { - result = append(result, s[last:i]) - } - last = i + 1 - } else if s[i] != ' ' { - lastChar = s[i] - } - } - if last < len(s)-1 { - result = append(result, s[last:]) - } - - for i, v := range result { - result[i] = strings.Replace(v, " ", "", -1) - } - - // parts := strings.Split(s, " ") - // for _, x := range parts { - // if s := strings.TrimSpace(x); len(s) != 0 { - // result = append(result, s) - // } - // } - return -} - -// splitComparatorVersion splits the comparator from the version. -// Input must be free of leading or trailing spaces. -func splitComparatorVersion(s string) (string, string, error) { - i := strings.IndexFunc(s, unicode.IsDigit) - if i == -1 { - return "", "", fmt.Errorf("Could not get version from string: %q", s) - } - return strings.TrimSpace(s[0:i]), s[i:], nil -} - -// getWildcardType will return the type of wildcard that the -// passed version contains -func getWildcardType(vStr string) wildcardType { - parts := strings.Split(vStr, ".") - nparts := len(parts) - wildcard := parts[nparts-1] - - possibleWildcardType := wildcardTypefromInt(nparts) - if wildcard == "x" { - return possibleWildcardType - } - - return noneWildcard -} - -// createVersionFromWildcard will convert a wildcard version -// into a regular version, replacing 'x's with '0's, handling -// special cases like '1.x.x' and '1.x' -func createVersionFromWildcard(vStr string) string { - // handle 1.x.x - vStr2 := strings.Replace(vStr, ".x.x", ".x", 1) - vStr2 = strings.Replace(vStr2, ".x", ".0", 1) - parts := strings.Split(vStr2, ".") - - // handle 1.x - if len(parts) == 2 { - return vStr2 + ".0" - } - - return vStr2 -} - -// incrementMajorVersion will increment the major version -// of the passed version -func incrementMajorVersion(vStr string) (string, error) { - parts := strings.Split(vStr, ".") - i, err := strconv.Atoi(parts[0]) - if err != nil { - return "", err - } - parts[0] = strconv.Itoa(i + 1) - - return strings.Join(parts, "."), nil -} - -// incrementMajorVersion will increment the minor version -// of the passed version -func incrementMinorVersion(vStr string) (string, error) { - parts := strings.Split(vStr, ".") - i, err := strconv.Atoi(parts[1]) - if err != nil { - return "", err - } - parts[1] = strconv.Itoa(i + 1) - - return strings.Join(parts, "."), nil -} - -// expandWildcardVersion will expand wildcards inside versions -// following these rules: -// -// * when dealing with patch wildcards: -// >= 1.2.x will become >= 1.2.0 -// <= 1.2.x will become < 1.3.0 -// > 1.2.x will become >= 1.3.0 -// < 1.2.x will become < 1.2.0 -// != 1.2.x will become < 1.2.0 >= 1.3.0 -// -// * when dealing with minor wildcards: -// >= 1.x will become >= 1.0.0 -// <= 1.x will become < 2.0.0 -// > 1.x will become >= 2.0.0 -// < 1.0 will become < 1.0.0 -// != 1.x will become < 1.0.0 >= 2.0.0 -// -// * when dealing with wildcards without -// version operator: -// 1.2.x will become >= 1.2.0 < 1.3.0 -// 1.x will become >= 1.0.0 < 2.0.0 -func expandWildcardVersion(parts [][]string) ([][]string, error) { - var expandedParts [][]string - for _, p := range parts { - var newParts []string - for _, ap := range p { - if strings.Contains(ap, "x") { - opStr, vStr, err := splitComparatorVersion(ap) - if err != nil { - return nil, err - } - - versionWildcardType := getWildcardType(vStr) - flatVersion := createVersionFromWildcard(vStr) - - var resultOperator string - var shouldIncrementVersion bool - switch opStr { - case ">": - resultOperator = ">=" - shouldIncrementVersion = true - case ">=": - resultOperator = ">=" - case "<": - resultOperator = "<" - case "<=": - resultOperator = "<" - shouldIncrementVersion = true - case "", "=", "==": - newParts = append(newParts, ">="+flatVersion) - resultOperator = "<" - shouldIncrementVersion = true - case "!=", "!": - newParts = append(newParts, "<"+flatVersion) - resultOperator = ">=" - shouldIncrementVersion = true - } - - var resultVersion string - if shouldIncrementVersion { - switch versionWildcardType { - case patchWildcard: - resultVersion, _ = incrementMinorVersion(flatVersion) - case minorWildcard: - resultVersion, _ = incrementMajorVersion(flatVersion) - } - } else { - resultVersion = flatVersion - } - - ap = resultOperator + resultVersion - } - newParts = append(newParts, ap) - } - expandedParts = append(expandedParts, newParts) - } - - return expandedParts, nil -} - -func parseComparator(s string) comparator { - switch s { - case "==": - fallthrough - case "": - fallthrough - case "=": - return compEQ - case ">": - return compGT - case ">=": - return compGE - case "<": - return compLT - case "<=": - return compLE - case "!": - fallthrough - case "!=": - return compNE - } - - return nil -} - -// MustParseRange is like ParseRange but panics if the range cannot be parsed. -func MustParseRange(s string) Range { - r, err := ParseRange(s) - if err != nil { - panic(`semver: ParseRange(` + s + `): ` + err.Error()) - } - return r -} diff --git a/go-controller/vendor/github.com/blang/semver/v4/semver.go b/go-controller/vendor/github.com/blang/semver/v4/semver.go deleted file mode 100644 index 307de610f9..0000000000 --- a/go-controller/vendor/github.com/blang/semver/v4/semver.go +++ /dev/null @@ -1,476 +0,0 @@ -package semver - -import ( - "errors" - "fmt" - "strconv" - "strings" -) - -const ( - numbers string = "0123456789" - alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" - alphanum = alphas + numbers -) - -// SpecVersion is the latest fully supported spec version of semver -var SpecVersion = Version{ - Major: 2, - Minor: 0, - Patch: 0, -} - -// Version represents a semver compatible version -type Version struct { - Major uint64 - Minor uint64 - Patch uint64 - Pre []PRVersion - Build []string //No Precedence -} - -// Version to string -func (v Version) String() string { - b := make([]byte, 0, 5) - b = strconv.AppendUint(b, v.Major, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Minor, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Patch, 10) - - if len(v.Pre) > 0 { - b = append(b, '-') - b = append(b, v.Pre[0].String()...) - - for _, pre := range v.Pre[1:] { - b = append(b, '.') - b = append(b, pre.String()...) - } - } - - if len(v.Build) > 0 { - b = append(b, '+') - b = append(b, v.Build[0]...) - - for _, build := range v.Build[1:] { - b = append(b, '.') - b = append(b, build...) - } - } - - return string(b) -} - -// FinalizeVersion discards prerelease and build number and only returns -// major, minor and patch number. -func (v Version) FinalizeVersion() string { - b := make([]byte, 0, 5) - b = strconv.AppendUint(b, v.Major, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Minor, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Patch, 10) - return string(b) -} - -// Equals checks if v is equal to o. -func (v Version) Equals(o Version) bool { - return (v.Compare(o) == 0) -} - -// EQ checks if v is equal to o. -func (v Version) EQ(o Version) bool { - return (v.Compare(o) == 0) -} - -// NE checks if v is not equal to o. -func (v Version) NE(o Version) bool { - return (v.Compare(o) != 0) -} - -// GT checks if v is greater than o. -func (v Version) GT(o Version) bool { - return (v.Compare(o) == 1) -} - -// GTE checks if v is greater than or equal to o. -func (v Version) GTE(o Version) bool { - return (v.Compare(o) >= 0) -} - -// GE checks if v is greater than or equal to o. -func (v Version) GE(o Version) bool { - return (v.Compare(o) >= 0) -} - -// LT checks if v is less than o. -func (v Version) LT(o Version) bool { - return (v.Compare(o) == -1) -} - -// LTE checks if v is less than or equal to o. -func (v Version) LTE(o Version) bool { - return (v.Compare(o) <= 0) -} - -// LE checks if v is less than or equal to o. -func (v Version) LE(o Version) bool { - return (v.Compare(o) <= 0) -} - -// Compare compares Versions v to o: -// -1 == v is less than o -// 0 == v is equal to o -// 1 == v is greater than o -func (v Version) Compare(o Version) int { - if v.Major != o.Major { - if v.Major > o.Major { - return 1 - } - return -1 - } - if v.Minor != o.Minor { - if v.Minor > o.Minor { - return 1 - } - return -1 - } - if v.Patch != o.Patch { - if v.Patch > o.Patch { - return 1 - } - return -1 - } - - // Quick comparison if a version has no prerelease versions - if len(v.Pre) == 0 && len(o.Pre) == 0 { - return 0 - } else if len(v.Pre) == 0 && len(o.Pre) > 0 { - return 1 - } else if len(v.Pre) > 0 && len(o.Pre) == 0 { - return -1 - } - - i := 0 - for ; i < len(v.Pre) && i < len(o.Pre); i++ { - if comp := v.Pre[i].Compare(o.Pre[i]); comp == 0 { - continue - } else if comp == 1 { - return 1 - } else { - return -1 - } - } - - // If all pr versions are the equal but one has further prversion, this one greater - if i == len(v.Pre) && i == len(o.Pre) { - return 0 - } else if i == len(v.Pre) && i < len(o.Pre) { - return -1 - } else { - return 1 - } - -} - -// IncrementPatch increments the patch version -func (v *Version) IncrementPatch() error { - v.Patch++ - return nil -} - -// IncrementMinor increments the minor version -func (v *Version) IncrementMinor() error { - v.Minor++ - v.Patch = 0 - return nil -} - -// IncrementMajor increments the major version -func (v *Version) IncrementMajor() error { - v.Major++ - v.Minor = 0 - v.Patch = 0 - return nil -} - -// Validate validates v and returns error in case -func (v Version) Validate() error { - // Major, Minor, Patch already validated using uint64 - - for _, pre := range v.Pre { - if !pre.IsNum { //Numeric prerelease versions already uint64 - if len(pre.VersionStr) == 0 { - return fmt.Errorf("Prerelease can not be empty %q", pre.VersionStr) - } - if !containsOnly(pre.VersionStr, alphanum) { - return fmt.Errorf("Invalid character(s) found in prerelease %q", pre.VersionStr) - } - } - } - - for _, build := range v.Build { - if len(build) == 0 { - return fmt.Errorf("Build meta data can not be empty %q", build) - } - if !containsOnly(build, alphanum) { - return fmt.Errorf("Invalid character(s) found in build meta data %q", build) - } - } - - return nil -} - -// New is an alias for Parse and returns a pointer, parses version string and returns a validated Version or error -func New(s string) (*Version, error) { - v, err := Parse(s) - vp := &v - return vp, err -} - -// Make is an alias for Parse, parses version string and returns a validated Version or error -func Make(s string) (Version, error) { - return Parse(s) -} - -// ParseTolerant allows for certain version specifications that do not strictly adhere to semver -// specs to be parsed by this library. It does so by normalizing versions before passing them to -// Parse(). It currently trims spaces, removes a "v" prefix, adds a 0 patch number to versions -// with only major and minor components specified, and removes leading 0s. -func ParseTolerant(s string) (Version, error) { - s = strings.TrimSpace(s) - s = strings.TrimPrefix(s, "v") - - // Split into major.minor.(patch+pr+meta) - parts := strings.SplitN(s, ".", 3) - // Remove leading zeros. - for i, p := range parts { - if len(p) > 1 { - p = strings.TrimLeft(p, "0") - if len(p) == 0 || !strings.ContainsAny(p[0:1], "0123456789") { - p = "0" + p - } - parts[i] = p - } - } - // Fill up shortened versions. - if len(parts) < 3 { - if strings.ContainsAny(parts[len(parts)-1], "+-") { - return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data") - } - for len(parts) < 3 { - parts = append(parts, "0") - } - } - s = strings.Join(parts, ".") - - return Parse(s) -} - -// Parse parses version string and returns a validated Version or error -func Parse(s string) (Version, error) { - if len(s) == 0 { - return Version{}, errors.New("Version string empty") - } - - // Split into major.minor.(patch+pr+meta) - parts := strings.SplitN(s, ".", 3) - if len(parts) != 3 { - return Version{}, errors.New("No Major.Minor.Patch elements found") - } - - // Major - if !containsOnly(parts[0], numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in major number %q", parts[0]) - } - if hasLeadingZeroes(parts[0]) { - return Version{}, fmt.Errorf("Major number must not contain leading zeroes %q", parts[0]) - } - major, err := strconv.ParseUint(parts[0], 10, 64) - if err != nil { - return Version{}, err - } - - // Minor - if !containsOnly(parts[1], numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in minor number %q", parts[1]) - } - if hasLeadingZeroes(parts[1]) { - return Version{}, fmt.Errorf("Minor number must not contain leading zeroes %q", parts[1]) - } - minor, err := strconv.ParseUint(parts[1], 10, 64) - if err != nil { - return Version{}, err - } - - v := Version{} - v.Major = major - v.Minor = minor - - var build, prerelease []string - patchStr := parts[2] - - if buildIndex := strings.IndexRune(patchStr, '+'); buildIndex != -1 { - build = strings.Split(patchStr[buildIndex+1:], ".") - patchStr = patchStr[:buildIndex] - } - - if preIndex := strings.IndexRune(patchStr, '-'); preIndex != -1 { - prerelease = strings.Split(patchStr[preIndex+1:], ".") - patchStr = patchStr[:preIndex] - } - - if !containsOnly(patchStr, numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in patch number %q", patchStr) - } - if hasLeadingZeroes(patchStr) { - return Version{}, fmt.Errorf("Patch number must not contain leading zeroes %q", patchStr) - } - patch, err := strconv.ParseUint(patchStr, 10, 64) - if err != nil { - return Version{}, err - } - - v.Patch = patch - - // Prerelease - for _, prstr := range prerelease { - parsedPR, err := NewPRVersion(prstr) - if err != nil { - return Version{}, err - } - v.Pre = append(v.Pre, parsedPR) - } - - // Build meta data - for _, str := range build { - if len(str) == 0 { - return Version{}, errors.New("Build meta data is empty") - } - if !containsOnly(str, alphanum) { - return Version{}, fmt.Errorf("Invalid character(s) found in build meta data %q", str) - } - v.Build = append(v.Build, str) - } - - return v, nil -} - -// MustParse is like Parse but panics if the version cannot be parsed. -func MustParse(s string) Version { - v, err := Parse(s) - if err != nil { - panic(`semver: Parse(` + s + `): ` + err.Error()) - } - return v -} - -// PRVersion represents a PreRelease Version -type PRVersion struct { - VersionStr string - VersionNum uint64 - IsNum bool -} - -// NewPRVersion creates a new valid prerelease version -func NewPRVersion(s string) (PRVersion, error) { - if len(s) == 0 { - return PRVersion{}, errors.New("Prerelease is empty") - } - v := PRVersion{} - if containsOnly(s, numbers) { - if hasLeadingZeroes(s) { - return PRVersion{}, fmt.Errorf("Numeric PreRelease version must not contain leading zeroes %q", s) - } - num, err := strconv.ParseUint(s, 10, 64) - - // Might never be hit, but just in case - if err != nil { - return PRVersion{}, err - } - v.VersionNum = num - v.IsNum = true - } else if containsOnly(s, alphanum) { - v.VersionStr = s - v.IsNum = false - } else { - return PRVersion{}, fmt.Errorf("Invalid character(s) found in prerelease %q", s) - } - return v, nil -} - -// IsNumeric checks if prerelease-version is numeric -func (v PRVersion) IsNumeric() bool { - return v.IsNum -} - -// Compare compares two PreRelease Versions v and o: -// -1 == v is less than o -// 0 == v is equal to o -// 1 == v is greater than o -func (v PRVersion) Compare(o PRVersion) int { - if v.IsNum && !o.IsNum { - return -1 - } else if !v.IsNum && o.IsNum { - return 1 - } else if v.IsNum && o.IsNum { - if v.VersionNum == o.VersionNum { - return 0 - } else if v.VersionNum > o.VersionNum { - return 1 - } else { - return -1 - } - } else { // both are Alphas - if v.VersionStr == o.VersionStr { - return 0 - } else if v.VersionStr > o.VersionStr { - return 1 - } else { - return -1 - } - } -} - -// PreRelease version to string -func (v PRVersion) String() string { - if v.IsNum { - return strconv.FormatUint(v.VersionNum, 10) - } - return v.VersionStr -} - -func containsOnly(s string, set string) bool { - return strings.IndexFunc(s, func(r rune) bool { - return !strings.ContainsRune(set, r) - }) == -1 -} - -func hasLeadingZeroes(s string) bool { - return len(s) > 1 && s[0] == '0' -} - -// NewBuildVersion creates a new valid build version -func NewBuildVersion(s string) (string, error) { - if len(s) == 0 { - return "", errors.New("Buildversion is empty") - } - if !containsOnly(s, alphanum) { - return "", fmt.Errorf("Invalid character(s) found in build meta data %q", s) - } - return s, nil -} - -// FinalizeVersion returns the major, minor and patch number only and discards -// prerelease and build number. -func FinalizeVersion(s string) (string, error) { - v, err := Parse(s) - if err != nil { - return "", err - } - v.Pre = nil - v.Build = nil - - finalVer := v.String() - return finalVer, nil -} diff --git a/go-controller/vendor/github.com/blang/semver/v4/sort.go b/go-controller/vendor/github.com/blang/semver/v4/sort.go deleted file mode 100644 index e18f880826..0000000000 --- a/go-controller/vendor/github.com/blang/semver/v4/sort.go +++ /dev/null @@ -1,28 +0,0 @@ -package semver - -import ( - "sort" -) - -// Versions represents multiple versions. -type Versions []Version - -// Len returns length of version collection -func (s Versions) Len() int { - return len(s) -} - -// Swap swaps two versions inside the collection by its indices -func (s Versions) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Less checks if version at index i is less than version at index j -func (s Versions) Less(i, j int) bool { - return s[i].LT(s[j]) -} - -// Sort sorts a slice of versions -func Sort(versions []Version) { - sort.Sort(Versions(versions)) -} diff --git a/go-controller/vendor/github.com/blang/semver/v4/sql.go b/go-controller/vendor/github.com/blang/semver/v4/sql.go deleted file mode 100644 index db958134f3..0000000000 --- a/go-controller/vendor/github.com/blang/semver/v4/sql.go +++ /dev/null @@ -1,30 +0,0 @@ -package semver - -import ( - "database/sql/driver" - "fmt" -) - -// Scan implements the database/sql.Scanner interface. -func (v *Version) Scan(src interface{}) (err error) { - var str string - switch src := src.(type) { - case string: - str = src - case []byte: - str = string(src) - default: - return fmt.Errorf("version.Scan: cannot convert %T to string", src) - } - - if t, err := Parse(str); err == nil { - *v = t - } - - return -} - -// Value implements the database/sql/driver.Valuer interface. -func (v Version) Value() (driver.Value, error) { - return v.String(), nil -} diff --git a/go-controller/vendor/github.com/cenkalti/hub/.travis.yml b/go-controller/vendor/github.com/cenkalti/hub/.travis.yml index d8cecb0dfe..b05e4c53fa 100644 --- a/go-controller/vendor/github.com/cenkalti/hub/.travis.yml +++ b/go-controller/vendor/github.com/cenkalti/hub/.travis.yml @@ -1,5 +1,3 @@ language: go -go: 1.13 -arch: - - amd64 - - ppc64le +go: 1.2 + diff --git a/go-controller/vendor/github.com/cenkalti/rpc2/README.md b/go-controller/vendor/github.com/cenkalti/rpc2/README.md index da7ffdc417..3dffd26e43 100644 --- a/go-controller/vendor/github.com/cenkalti/rpc2/README.md +++ b/go-controller/vendor/github.com/cenkalti/rpc2/README.md @@ -2,6 +2,7 @@ rpc2 ==== [![GoDoc](https://godoc.org/github.com/cenkalti/rpc2?status.png)](https://godoc.org/github.com/cenkalti/rpc2) +[![Build Status](https://travis-ci.org/cenkalti/rpc2.png)](https://travis-ci.org/cenkalti/rpc2) rpc2 is a fork of net/rpc package in the standard library. The main goal is to add bi-directional support to calls. diff --git a/go-controller/vendor/github.com/cenkalti/rpc2/server.go b/go-controller/vendor/github.com/cenkalti/rpc2/server.go index df4cdc832d..2a5be7ed67 100644 --- a/go-controller/vendor/github.com/cenkalti/rpc2/server.go +++ b/go-controller/vendor/github.com/cenkalti/rpc2/server.go @@ -1,7 +1,6 @@ package rpc2 import ( - "errors" "io" "log" "net" @@ -143,9 +142,7 @@ func (s *Server) Accept(lis net.Listener) { for { conn, err := lis.Accept() if err != nil { - if !errors.Is(err, net.ErrClosed) { - log.Print("rpc.Serve: accept:", err.Error()) - } + log.Print("rpc.Serve: accept:", err.Error()) return } go s.ServeConn(conn) diff --git a/go-controller/vendor/github.com/containernetworking/cni/libcni/api.go b/go-controller/vendor/github.com/containernetworking/cni/libcni/api.go index 201a12e977..0d82a2dd3c 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/libcni/api.go +++ b/go-controller/vendor/github.com/containernetworking/cni/libcni/api.go @@ -15,7 +15,7 @@ package libcni // Note this is the actual implementation of the CNI specification, which -// is reflected in the SPEC.md file. +// is reflected in the https://github.com/containernetworking/cni/blob/master/SPEC.md file // it is typically bundled into runtime providers (i.e. containerd or cri-o would use this // before calling runc or hcsshim). It is also bundled into CNI providers as well, for example, // to add an IP to a container, to parse the configuration of the CNI and so on. @@ -23,11 +23,10 @@ package libcni import ( "context" "encoding/json" - "errors" "fmt" + "io/ioutil" "os" "path/filepath" - "sort" "strings" "github.com/containernetworking/cni/pkg/invoke" @@ -39,8 +38,6 @@ import ( var ( CacheDir = "/var/lib/cni" - // slightly awkward wording to preserve anyone matching on error strings - ErrorCheckNotSupp = fmt.Errorf("does not support the CHECK command") ) const ( @@ -76,25 +73,10 @@ type NetworkConfigList struct { Name string CNIVersion string DisableCheck bool - DisableGC bool Plugins []*NetworkConfig Bytes []byte } -type NetworkAttachment struct { - ContainerID string - Network string - IfName string - Config []byte - NetNS string - CniArgs [][2]string - CapabilityArgs map[string]interface{} -} - -type GCArgs struct { - ValidAttachments []types.GCAttachment -} - type CNI interface { AddNetworkList(ctx context.Context, net *NetworkConfigList, rt *RuntimeConf) (types.Result, error) CheckNetworkList(ctx context.Context, net *NetworkConfigList, rt *RuntimeConf) error @@ -110,13 +92,6 @@ type CNI interface { ValidateNetworkList(ctx context.Context, net *NetworkConfigList) ([]string, error) ValidateNetwork(ctx context.Context, net *NetworkConfig) ([]string, error) - - GCNetworkList(ctx context.Context, net *NetworkConfigList, args *GCArgs) error - GetStatusNetworkList(ctx context.Context, net *NetworkConfigList) error - - GetCachedAttachments(containerID string) ([]*NetworkAttachment, error) - - GetVersionInfo(ctx context.Context, pluginType string) (version.PluginInfo, error) } type CNIConfig struct { @@ -164,11 +139,8 @@ func buildOneConfig(name, cniVersion string, orig *NetworkConfig, prevResult typ if err != nil { return nil, err } - if rt != nil { - return injectRuntimeConfig(orig, rt) - } - return orig, nil + return injectRuntimeConfig(orig, rt) } // This function takes a libcni RuntimeConf structure and injects values into @@ -223,7 +195,6 @@ type cachedInfo struct { Config []byte `json:"config"` IfName string `json:"ifName"` NetworkName string `json:"networkName"` - NetNS string `json:"netns,omitempty"` CniArgs [][2]string `json:"cniArgs,omitempty"` CapabilityArgs map[string]interface{} `json:"capabilityArgs,omitempty"` RawResult map[string]interface{} `json:"result,omitempty"` @@ -258,7 +229,6 @@ func (c *CNIConfig) cacheAdd(result types.Result, config []byte, netName string, Config: config, IfName: rt.IfName, NetworkName: netName, - NetNS: rt.NetNS, CniArgs: rt.Args, CapabilityArgs: rt.CapabilityArgs, } @@ -284,11 +254,11 @@ func (c *CNIConfig) cacheAdd(result types.Result, config []byte, netName string, if err != nil { return err } - if err := os.MkdirAll(filepath.Dir(fname), 0o700); err != nil { + if err := os.MkdirAll(filepath.Dir(fname), 0700); err != nil { return err } - return os.WriteFile(fname, newBytes, 0o600) + return ioutil.WriteFile(fname, newBytes, 0600) } func (c *CNIConfig) cacheDel(netName string, rt *RuntimeConf) error { @@ -307,7 +277,7 @@ func (c *CNIConfig) getCachedConfig(netName string, rt *RuntimeConf) ([]byte, *R if err != nil { return nil, nil, err } - bytes, err = os.ReadFile(fname) + bytes, err = ioutil.ReadFile(fname) if err != nil { // Ignore read errors; the cached result may not exist on-disk return nil, nil, nil @@ -335,7 +305,7 @@ func (c *CNIConfig) getLegacyCachedResult(netName, cniVersion string, rt *Runtim if err != nil { return nil, err } - data, err := os.ReadFile(fname) + data, err := ioutil.ReadFile(fname) if err != nil { // Ignore read errors; the cached result may not exist on-disk return nil, nil @@ -363,7 +333,7 @@ func (c *CNIConfig) getCachedResult(netName, cniVersion string, rt *RuntimeConf) if err != nil { return nil, err } - fdata, err := os.ReadFile(fname) + fdata, err := ioutil.ReadFile(fname) if err != nil { // Ignore read errors; the cached result may not exist on-disk return nil, nil @@ -420,68 +390,6 @@ func (c *CNIConfig) GetNetworkCachedConfig(net *NetworkConfig, rt *RuntimeConf) return c.getCachedConfig(net.Network.Name, rt) } -// GetCachedAttachments returns a list of network attachments from the cache. -// The returned list will be filtered by the containerID if the value is not empty. -func (c *CNIConfig) GetCachedAttachments(containerID string) ([]*NetworkAttachment, error) { - dirPath := filepath.Join(c.getCacheDir(&RuntimeConf{}), "results") - entries, err := os.ReadDir(dirPath) - if err != nil { - if os.IsNotExist(err) { - return nil, nil - } - return nil, err - } - - fileNames := make([]string, 0, len(entries)) - for _, e := range entries { - fileNames = append(fileNames, e.Name()) - } - sort.Strings(fileNames) - - attachments := []*NetworkAttachment{} - for _, fname := range fileNames { - if len(containerID) > 0 { - part := fmt.Sprintf("-%s-", containerID) - pos := strings.Index(fname, part) - if pos <= 0 || pos+len(part) >= len(fname) { - continue - } - } - - cacheFile := filepath.Join(dirPath, fname) - bytes, err := os.ReadFile(cacheFile) - if err != nil { - continue - } - - cachedInfo := cachedInfo{} - - if err := json.Unmarshal(bytes, &cachedInfo); err != nil { - continue - } - if cachedInfo.Kind != CNICacheV1 { - continue - } - if len(containerID) > 0 && cachedInfo.ContainerID != containerID { - continue - } - if cachedInfo.IfName == "" || cachedInfo.NetworkName == "" { - continue - } - - attachments = append(attachments, &NetworkAttachment{ - ContainerID: cachedInfo.ContainerID, - Network: cachedInfo.NetworkName, - IfName: cachedInfo.IfName, - Config: cachedInfo.Config, - NetNS: cachedInfo.NetNS, - CniArgs: cachedInfo.CniArgs, - CapabilityArgs: cachedInfo.CapabilityArgs, - }) - } - return attachments, nil -} - func (c *CNIConfig) addNetwork(ctx context.Context, name, cniVersion string, net *NetworkConfig, prevResult types.Result, rt *RuntimeConf) (types.Result, error) { c.ensureExec() pluginPath, err := c.exec.FindInPath(net.Network.Type, c.Path) @@ -545,7 +453,7 @@ func (c *CNIConfig) CheckNetworkList(ctx context.Context, list *NetworkConfigLis if gtet, err := version.GreaterThanOrEqualTo(list.CNIVersion, "0.4.0"); err != nil { return err } else if !gtet { - return fmt.Errorf("configuration version %q %w", list.CNIVersion, ErrorCheckNotSupp) + return fmt.Errorf("configuration version %q does not support the CHECK command", list.CNIVersion) } if list.DisableCheck { @@ -589,9 +497,9 @@ func (c *CNIConfig) DelNetworkList(ctx context.Context, list *NetworkConfigList, if gtet, err := version.GreaterThanOrEqualTo(list.CNIVersion, "0.4.0"); err != nil { return err } else if gtet { - if cachedResult, err = c.getCachedResult(list.Name, list.CNIVersion, rt); err != nil { - _ = c.cacheDel(list.Name, rt) - cachedResult = nil + cachedResult, err = c.getCachedResult(list.Name, list.CNIVersion, rt) + if err != nil { + return fmt.Errorf("failed to get network %q cached result: %w", list.Name, err) } } @@ -601,7 +509,6 @@ func (c *CNIConfig) DelNetworkList(ctx context.Context, list *NetworkConfigList, return fmt.Errorf("plugin %s failed (delete): %w", pluginDescription(net.Network), err) } } - _ = c.cacheDel(list.Name, rt) return nil @@ -640,7 +547,7 @@ func (c *CNIConfig) CheckNetwork(ctx context.Context, net *NetworkConfig, rt *Ru if gtet, err := version.GreaterThanOrEqualTo(net.Network.CNIVersion, "0.4.0"); err != nil { return err } else if !gtet { - return fmt.Errorf("configuration version %q %w", net.Network.CNIVersion, ErrorCheckNotSupp) + return fmt.Errorf("configuration version %q does not support the CHECK command", net.Network.CNIVersion) } cachedResult, err := c.getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) @@ -759,129 +666,6 @@ func (c *CNIConfig) GetVersionInfo(ctx context.Context, pluginType string) (vers return invoke.GetVersionInfo(ctx, pluginPath, c.exec) } -// GCNetworkList will do two things -// - dump the list of cached attachments, and issue deletes as necessary -// - issue a GC to the underlying plugins (if the version is high enough) -func (c *CNIConfig) GCNetworkList(ctx context.Context, list *NetworkConfigList, args *GCArgs) error { - // If DisableGC is set, then don't bother GCing at all. - if list.DisableGC { - return nil - } - - // First, get the list of cached attachments - cachedAttachments, err := c.GetCachedAttachments("") - if err != nil { - return nil - } - - var validAttachments map[types.GCAttachment]interface{} - if args != nil { - validAttachments = make(map[types.GCAttachment]interface{}, len(args.ValidAttachments)) - for _, a := range args.ValidAttachments { - validAttachments[a] = nil - } - } - - var errs []error - - for _, cachedAttachment := range cachedAttachments { - if cachedAttachment.Network != list.Name { - continue - } - // we found this attachment - gca := types.GCAttachment{ - ContainerID: cachedAttachment.ContainerID, - IfName: cachedAttachment.IfName, - } - if _, ok := validAttachments[gca]; ok { - continue - } - // otherwise, this attachment wasn't valid and we should issue a CNI DEL - rt := RuntimeConf{ - ContainerID: cachedAttachment.ContainerID, - NetNS: cachedAttachment.NetNS, - IfName: cachedAttachment.IfName, - Args: cachedAttachment.CniArgs, - CapabilityArgs: cachedAttachment.CapabilityArgs, - } - if err := c.DelNetworkList(ctx, list, &rt); err != nil { - errs = append(errs, fmt.Errorf("failed to delete stale attachment %s %s: %w", rt.ContainerID, rt.IfName, err)) - } - } - - // now, if the version supports it, issue a GC - if gt, _ := version.GreaterThanOrEqualTo(list.CNIVersion, "1.1.0"); gt { - inject := map[string]interface{}{ - "name": list.Name, - "cniVersion": list.CNIVersion, - } - if args != nil { - inject["cni.dev/valid-attachments"] = args.ValidAttachments - // #1101: spec used incorrect variable name - inject["cni.dev/attachments"] = args.ValidAttachments - } - - for _, plugin := range list.Plugins { - // build config here - pluginConfig, err := InjectConf(plugin, inject) - if err != nil { - errs = append(errs, fmt.Errorf("failed to generate configuration to GC plugin %s: %w", plugin.Network.Type, err)) - } - if err := c.gcNetwork(ctx, pluginConfig); err != nil { - errs = append(errs, fmt.Errorf("failed to GC plugin %s: %w", plugin.Network.Type, err)) - } - } - } - - return errors.Join(errs...) -} - -func (c *CNIConfig) gcNetwork(ctx context.Context, net *NetworkConfig) error { - c.ensureExec() - pluginPath, err := c.exec.FindInPath(net.Network.Type, c.Path) - if err != nil { - return err - } - args := c.args("GC", &RuntimeConf{}) - - return invoke.ExecPluginWithoutResult(ctx, pluginPath, net.Bytes, args, c.exec) -} - -func (c *CNIConfig) GetStatusNetworkList(ctx context.Context, list *NetworkConfigList) error { - // If the version doesn't support status, abort. - if gt, _ := version.GreaterThanOrEqualTo(list.CNIVersion, "1.1.0"); !gt { - return nil - } - - inject := map[string]interface{}{ - "name": list.Name, - "cniVersion": list.CNIVersion, - } - - for _, plugin := range list.Plugins { - // build config here - pluginConfig, err := InjectConf(plugin, inject) - if err != nil { - return fmt.Errorf("failed to generate configuration to get plugin STATUS %s: %w", plugin.Network.Type, err) - } - if err := c.getStatusNetwork(ctx, pluginConfig); err != nil { - return err // Don't collect errors here, so we return a clean error code. - } - } - return nil -} - -func (c *CNIConfig) getStatusNetwork(ctx context.Context, net *NetworkConfig) error { - c.ensureExec() - pluginPath, err := c.exec.FindInPath(net.Network.Type, c.Path) - if err != nil { - return err - } - args := c.args("STATUS", &RuntimeConf{}) - - return invoke.ExecPluginWithoutResult(ctx, pluginPath, net.Bytes, args, c.exec) -} - // ===== func (c *CNIConfig) args(action string, rt *RuntimeConf) *invoke.Args { return &invoke.Args{ diff --git a/go-controller/vendor/github.com/containernetworking/cni/libcni/conf.go b/go-controller/vendor/github.com/containernetworking/cni/libcni/conf.go index 1d1b821c63..3cd6a59d1c 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/libcni/conf.go +++ b/go-controller/vendor/github.com/containernetworking/cni/libcni/conf.go @@ -16,16 +16,13 @@ package libcni import ( "encoding/json" - "errors" "fmt" + "io/ioutil" "os" "path/filepath" - "slices" "sort" - "strings" "github.com/containernetworking/cni/pkg/types" - "github.com/containernetworking/cni/pkg/version" ) type NotFoundError struct { @@ -57,7 +54,7 @@ func ConfFromBytes(bytes []byte) (*NetworkConfig, error) { } func ConfFromFile(filename string) (*NetworkConfig, error) { - bytes, err := os.ReadFile(filename) + bytes, err := ioutil.ReadFile(filename) if err != nil { return nil, fmt.Errorf("error reading %s: %w", filename, err) } @@ -88,89 +85,17 @@ func ConfListFromBytes(bytes []byte) (*NetworkConfigList, error) { } } - rawVersions, ok := rawList["cniVersions"] - if ok { - // Parse the current package CNI version - rvs, ok := rawVersions.([]interface{}) - if !ok { - return nil, fmt.Errorf("error parsing configuration list: invalid type for cniVersions: %T", rvs) - } - vs := make([]string, 0, len(rvs)) - for i, rv := range rvs { - v, ok := rv.(string) - if !ok { - return nil, fmt.Errorf("error parsing configuration list: invalid type for cniVersions index %d: %T", i, rv) - } - gt, err := version.GreaterThan(v, version.Current()) - if err != nil { - return nil, fmt.Errorf("error parsing configuration list: invalid cniVersions entry %s at index %d: %w", v, i, err) - } else if !gt { - // Skip versions "greater" than this implementation of the spec - vs = append(vs, v) - } - } - - // if cniVersion was already set, append it to the list for sorting. - if cniVersion != "" { - gt, err := version.GreaterThan(cniVersion, version.Current()) - if err != nil { - return nil, fmt.Errorf("error parsing configuration list: invalid cniVersion %s: %w", cniVersion, err) - } else if !gt { - // ignore any versions higher than the current implemented spec version - vs = append(vs, cniVersion) - } - } - slices.SortFunc[[]string](vs, func(v1, v2 string) int { - if v1 == v2 { - return 0 - } - if gt, _ := version.GreaterThan(v1, v2); gt { - return 1 - } - return -1 - }) - if len(vs) > 0 { - cniVersion = vs[len(vs)-1] - } - } - - readBool := func(key string) (bool, error) { - rawVal, ok := rawList[key] + disableCheck := false + if rawDisableCheck, ok := rawList["disableCheck"]; ok { + disableCheck, ok = rawDisableCheck.(bool) if !ok { - return false, nil + return nil, fmt.Errorf("error parsing configuration list: invalid disableCheck type %T", rawDisableCheck) } - if b, ok := rawVal.(bool); ok { - return b, nil - } - - s, ok := rawVal.(string) - if !ok { - return false, fmt.Errorf("error parsing configuration list: invalid type %T for %s", rawVal, key) - } - s = strings.ToLower(s) - switch s { - case "false": - return false, nil - case "true": - return true, nil - } - return false, fmt.Errorf("error parsing configuration list: invalid value %q for %s", s, key) - } - - disableCheck, err := readBool("disableCheck") - if err != nil { - return nil, err - } - - disableGC, err := readBool("disableGC") - if err != nil { - return nil, err } list := &NetworkConfigList{ Name: name, DisableCheck: disableCheck, - DisableGC: disableGC, CNIVersion: cniVersion, Bytes: bytes, } @@ -204,7 +129,7 @@ func ConfListFromBytes(bytes []byte) (*NetworkConfigList, error) { } func ConfListFromFile(filename string) (*NetworkConfigList, error) { - bytes, err := os.ReadFile(filename) + bytes, err := ioutil.ReadFile(filename) if err != nil { return nil, fmt.Errorf("error reading %s: %w", filename, err) } @@ -213,7 +138,7 @@ func ConfListFromFile(filename string) (*NetworkConfigList, error) { func ConfFiles(dir string, extensions []string) ([]string, error) { // In part, adapted from rkt/networking/podenv.go#listFiles - files, err := os.ReadDir(dir) + files, err := ioutil.ReadDir(dir) switch { case err == nil: // break case os.IsNotExist(err): @@ -281,8 +206,7 @@ func LoadConfList(dir, name string) (*NetworkConfigList, error) { singleConf, err := LoadConf(dir, name) if err != nil { // A little extra logic so the error makes sense - var ncfErr NoConfigsFoundError - if len(files) != 0 && errors.As(err, &ncfErr) { + if _, ok := err.(NoConfigsFoundError); len(files) != 0 && ok { // Config lists found but no config files found return nil, NotFoundError{dir, name} } diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/delegate.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/delegate.go index c8b548e7c6..8defe4dd39 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/delegate.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/delegate.go @@ -51,34 +51,25 @@ func DelegateAdd(ctx context.Context, delegatePlugin string, netconf []byte, exe // DelegateCheck calls the given delegate plugin with the CNI CHECK action and // JSON configuration func DelegateCheck(ctx context.Context, delegatePlugin string, netconf []byte, exec Exec) error { - return delegateNoResult(ctx, delegatePlugin, netconf, exec, "CHECK") -} - -func delegateNoResult(ctx context.Context, delegatePlugin string, netconf []byte, exec Exec, verb string) error { pluginPath, realExec, err := delegateCommon(delegatePlugin, exec) if err != nil { return err } - return ExecPluginWithoutResult(ctx, pluginPath, netconf, delegateArgs(verb), realExec) + // DelegateCheck will override the original CNI_COMMAND env from process with CHECK + return ExecPluginWithoutResult(ctx, pluginPath, netconf, delegateArgs("CHECK"), realExec) } // DelegateDel calls the given delegate plugin with the CNI DEL action and // JSON configuration func DelegateDel(ctx context.Context, delegatePlugin string, netconf []byte, exec Exec) error { - return delegateNoResult(ctx, delegatePlugin, netconf, exec, "DEL") -} - -// DelegateStatus calls the given delegate plugin with the CNI STATUS action and -// JSON configuration -func DelegateStatus(ctx context.Context, delegatePlugin string, netconf []byte, exec Exec) error { - return delegateNoResult(ctx, delegatePlugin, netconf, exec, "STATUS") -} + pluginPath, realExec, err := delegateCommon(delegatePlugin, exec) + if err != nil { + return err + } -// DelegateGC calls the given delegate plugin with the CNI GC action and -// JSON configuration -func DelegateGC(ctx context.Context, delegatePlugin string, netconf []byte, exec Exec) error { - return delegateNoResult(ctx, delegatePlugin, netconf, exec, "GC") + // DelegateDel will override the original CNI_COMMAND env from process with DEL + return ExecPluginWithoutResult(ctx, pluginPath, netconf, delegateArgs("DEL"), realExec) } // return CNIArgs used by delegation diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go index a5e015fc92..3ad07aa8f2 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go @@ -81,17 +81,17 @@ func fixupResultVersion(netconf, result []byte) (string, []byte, error) { // object to ExecPluginWithResult() to verify the incoming stdin and environment // and provide a tailored response: // -// import ( +//import ( // "encoding/json" // "path" // "strings" -// ) +//) // -// type fakeExec struct { +//type fakeExec struct { // version.PluginDecoder -// } +//} // -// func (f *fakeExec) ExecPlugin(pluginPath string, stdinData []byte, environ []string) ([]byte, error) { +//func (f *fakeExec) ExecPlugin(pluginPath string, stdinData []byte, environ []string) ([]byte, error) { // net := &types.NetConf{} // err := json.Unmarshal(stdinData, net) // if err != nil { @@ -109,14 +109,14 @@ func fixupResultVersion(netconf, result []byte) (string, []byte, error) { // } // } // return []byte("{\"CNIVersion\":\"0.4.0\"}"), nil -// } +//} // -// func (f *fakeExec) FindInPath(plugin string, paths []string) (string, error) { +//func (f *fakeExec) FindInPath(plugin string, paths []string) (string, error) { // if len(paths) > 0 { // return path.Join(paths[0], plugin), nil // } // return "", fmt.Errorf("failed to find plugin %s in paths %v", plugin, paths) -// } +//} func ExecPluginWithResult(ctx context.Context, pluginPath string, netconf []byte, args CNIArgs, exec Exec) (types.Result, error) { if exec == nil { diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/os_unix.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/os_unix.go index ed0999bd0e..9bcfb45536 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/os_unix.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/invoke/os_unix.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build darwin dragonfly freebsd linux netbsd openbsd solaris package invoke diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/ns/ns_darwin.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/ns/ns_darwin.go deleted file mode 100644 index cffe136178..0000000000 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/ns/ns_darwin.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2022 CNI 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 ns - -import "github.com/containernetworking/cni/pkg/types" - -func CheckNetNS(nsPath string) (bool, *types.Error) { - return false, nil -} diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/ns/ns_linux.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/ns/ns_linux.go deleted file mode 100644 index 3d58e75d6c..0000000000 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/ns/ns_linux.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 CNI 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 ns - -import ( - "runtime" - - "github.com/vishvananda/netns" - - "github.com/containernetworking/cni/pkg/types" -) - -// Returns an object representing the current OS thread's network namespace -func getCurrentNS() (netns.NsHandle, error) { - // Lock the thread in case other goroutine executes in it and changes its - // network namespace after getCurrentThreadNetNSPath(), otherwise it might - // return an unexpected network namespace. - runtime.LockOSThread() - defer runtime.UnlockOSThread() - return netns.Get() -} - -func CheckNetNS(nsPath string) (bool, *types.Error) { - ns, err := netns.GetFromPath(nsPath) - // Let plugins check whether nsPath from args is valid. Also support CNI DEL for empty nsPath as already-deleted nsPath. - if err != nil { - return false, nil - } - defer ns.Close() - - pluginNS, err := getCurrentNS() - if err != nil { - return false, types.NewError(types.ErrInvalidNetNS, "get plugin's netns failed", "") - } - defer pluginNS.Close() - - return pluginNS.Equal(ns), nil -} diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/skel/skel.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/skel/skel.go index f29cf34594..cb8781972d 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/skel/skel.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/skel/skel.go @@ -19,14 +19,13 @@ package skel import ( "bytes" "encoding/json" - "errors" "fmt" "io" + "io/ioutil" "log" "os" "strings" - "github.com/containernetworking/cni/pkg/ns" "github.com/containernetworking/cni/pkg/types" "github.com/containernetworking/cni/pkg/utils" "github.com/containernetworking/cni/pkg/version" @@ -35,13 +34,12 @@ import ( // CmdArgs captures all the arguments passed in to the plugin // via both env vars and stdin type CmdArgs struct { - ContainerID string - Netns string - IfName string - Args string - Path string - NetnsOverride string - StdinData []byte + ContainerID string + Netns string + IfName string + Args string + Path string + StdinData []byte } type dispatcher struct { @@ -57,25 +55,21 @@ type dispatcher struct { type reqForCmdEntry map[string]bool func (t *dispatcher) getCmdArgsFromEnv() (string, *CmdArgs, *types.Error) { - var cmd, contID, netns, ifName, args, path, netnsOverride string + var cmd, contID, netns, ifName, args, path string vars := []struct { - name string - val *string - reqForCmd reqForCmdEntry - validateFn func(string) *types.Error + name string + val *string + reqForCmd reqForCmdEntry }{ { "CNI_COMMAND", &cmd, reqForCmdEntry{ - "ADD": true, - "CHECK": true, - "DEL": true, - "GC": true, - "STATUS": true, + "ADD": true, + "CHECK": true, + "DEL": true, }, - nil, }, { "CNI_CONTAINERID", @@ -85,7 +79,6 @@ func (t *dispatcher) getCmdArgsFromEnv() (string, *CmdArgs, *types.Error) { "CHECK": true, "DEL": true, }, - utils.ValidateContainerID, }, { "CNI_NETNS", @@ -95,7 +88,6 @@ func (t *dispatcher) getCmdArgsFromEnv() (string, *CmdArgs, *types.Error) { "CHECK": true, "DEL": false, }, - nil, }, { "CNI_IFNAME", @@ -105,7 +97,6 @@ func (t *dispatcher) getCmdArgsFromEnv() (string, *CmdArgs, *types.Error) { "CHECK": true, "DEL": true, }, - utils.ValidateInterfaceName, }, { "CNI_ARGS", @@ -115,29 +106,15 @@ func (t *dispatcher) getCmdArgsFromEnv() (string, *CmdArgs, *types.Error) { "CHECK": false, "DEL": false, }, - nil, }, { "CNI_PATH", &path, reqForCmdEntry{ - "ADD": true, - "CHECK": true, - "DEL": true, - "GC": true, - "STATUS": true, - }, - nil, - }, - { - "CNI_NETNS_OVERRIDE", - &netnsOverride, - reqForCmdEntry{ - "ADD": false, - "CHECK": false, - "DEL": false, + "ADD": true, + "CHECK": true, + "DEL": true, }, - nil, }, } @@ -148,10 +125,6 @@ func (t *dispatcher) getCmdArgsFromEnv() (string, *CmdArgs, *types.Error) { if v.reqForCmd[cmd] || v.name == "CNI_COMMAND" { argsMissing = append(argsMissing, v.name) } - } else if v.reqForCmd[cmd] && v.validateFn != nil { - if err := v.validateFn(*v.val); err != nil { - return "", nil, err - } } } @@ -164,25 +137,18 @@ func (t *dispatcher) getCmdArgsFromEnv() (string, *CmdArgs, *types.Error) { t.Stdin = bytes.NewReader(nil) } - stdinData, err := io.ReadAll(t.Stdin) + stdinData, err := ioutil.ReadAll(t.Stdin) if err != nil { return "", nil, types.NewError(types.ErrIOFailure, fmt.Sprintf("error reading from stdin: %v", err), "") } - if cmd != "VERSION" { - if err := validateConfig(stdinData); err != nil { - return "", nil, err - } - } - cmdArgs := &CmdArgs{ - ContainerID: contID, - Netns: netns, - IfName: ifName, - Args: args, - Path: path, - StdinData: stdinData, - NetnsOverride: netnsOverride, + ContainerID: contID, + Netns: netns, + IfName: ifName, + Args: args, + Path: path, + StdinData: stdinData, } return cmd, cmdArgs, nil } @@ -197,13 +163,8 @@ func (t *dispatcher) checkVersionAndCall(cmdArgs *CmdArgs, pluginVersionInfo ver return types.NewError(types.ErrIncompatibleCNIVersion, "incompatible CNI versions", verErr.Details()) } - if toCall == nil { - return nil - } - if err = toCall(cmdArgs); err != nil { - var e *types.Error - if errors.As(err, &e) { + if e, ok := err.(*types.Error); ok { // don't wrap Error in Error return e } @@ -229,7 +190,7 @@ func validateConfig(jsonBytes []byte) *types.Error { return nil } -func (t *dispatcher) pluginMain(funcs CNIFuncs, versionInfo version.PluginInfo, about string) *types.Error { +func (t *dispatcher) pluginMain(cmdAdd, cmdCheck, cmdDel func(_ *CmdArgs) error, versionInfo version.PluginInfo, about string) *types.Error { cmd, cmdArgs, err := t.getCmdArgsFromEnv() if err != nil { // Print the about string to stderr when no command is set @@ -241,20 +202,21 @@ func (t *dispatcher) pluginMain(funcs CNIFuncs, versionInfo version.PluginInfo, return err } - switch cmd { - case "ADD": - err = t.checkVersionAndCall(cmdArgs, versionInfo, funcs.Add) - if err != nil { + if cmd != "VERSION" { + if err = validateConfig(cmdArgs.StdinData); err != nil { return err } - if strings.ToUpper(cmdArgs.NetnsOverride) != "TRUE" && cmdArgs.NetnsOverride != "1" { - isPluginNetNS, checkErr := ns.CheckNetNS(cmdArgs.Netns) - if checkErr != nil { - return checkErr - } else if isPluginNetNS { - return types.NewError(types.ErrInvalidNetNS, "plugin's netns and netns from CNI_NETNS should not be the same", "") - } + if err = utils.ValidateContainerID(cmdArgs.ContainerID); err != nil { + return err } + if err = utils.ValidateInterfaceName(cmdArgs.IfName); err != nil { + return err + } + } + + switch cmd { + case "ADD": + err = t.checkVersionAndCall(cmdArgs, versionInfo, cmdAdd) case "CHECK": configVersion, err := t.ConfVersionDecoder.Decode(cmdArgs.StdinData) if err != nil { @@ -270,7 +232,7 @@ func (t *dispatcher) pluginMain(funcs CNIFuncs, versionInfo version.PluginInfo, if err != nil { return types.NewError(types.ErrDecodingFailure, err.Error(), "") } else if gtet { - if err := t.checkVersionAndCall(cmdArgs, versionInfo, funcs.Check); err != nil { + if err := t.checkVersionAndCall(cmdArgs, versionInfo, cmdCheck); err != nil { return err } return nil @@ -278,62 +240,7 @@ func (t *dispatcher) pluginMain(funcs CNIFuncs, versionInfo version.PluginInfo, } return types.NewError(types.ErrIncompatibleCNIVersion, "plugin version does not allow CHECK", "") case "DEL": - err = t.checkVersionAndCall(cmdArgs, versionInfo, funcs.Del) - if err != nil { - return err - } - if strings.ToUpper(cmdArgs.NetnsOverride) != "TRUE" && cmdArgs.NetnsOverride != "1" { - isPluginNetNS, checkErr := ns.CheckNetNS(cmdArgs.Netns) - if checkErr != nil { - return checkErr - } else if isPluginNetNS { - return types.NewError(types.ErrInvalidNetNS, "plugin's netns and netns from CNI_NETNS should not be the same", "") - } - } - case "GC": - configVersion, err := t.ConfVersionDecoder.Decode(cmdArgs.StdinData) - if err != nil { - return types.NewError(types.ErrDecodingFailure, err.Error(), "") - } - if gtet, err := version.GreaterThanOrEqualTo(configVersion, "1.1.0"); err != nil { - return types.NewError(types.ErrDecodingFailure, err.Error(), "") - } else if !gtet { - return types.NewError(types.ErrIncompatibleCNIVersion, "config version does not allow GC", "") - } - for _, pluginVersion := range versionInfo.SupportedVersions() { - gtet, err := version.GreaterThanOrEqualTo(pluginVersion, configVersion) - if err != nil { - return types.NewError(types.ErrDecodingFailure, err.Error(), "") - } else if gtet { - if err := t.checkVersionAndCall(cmdArgs, versionInfo, funcs.GC); err != nil { - return err - } - return nil - } - } - return types.NewError(types.ErrIncompatibleCNIVersion, "plugin version does not allow GC", "") - case "STATUS": - configVersion, err := t.ConfVersionDecoder.Decode(cmdArgs.StdinData) - if err != nil { - return types.NewError(types.ErrDecodingFailure, err.Error(), "") - } - if gtet, err := version.GreaterThanOrEqualTo(configVersion, "1.1.0"); err != nil { - return types.NewError(types.ErrDecodingFailure, err.Error(), "") - } else if !gtet { - return types.NewError(types.ErrIncompatibleCNIVersion, "config version does not allow STATUS", "") - } - for _, pluginVersion := range versionInfo.SupportedVersions() { - gtet, err := version.GreaterThanOrEqualTo(pluginVersion, configVersion) - if err != nil { - return types.NewError(types.ErrDecodingFailure, err.Error(), "") - } else if gtet { - if err := t.checkVersionAndCall(cmdArgs, versionInfo, funcs.Status); err != nil { - return err - } - return nil - } - } - return types.NewError(types.ErrIncompatibleCNIVersion, "plugin version does not allow STATUS", "") + err = t.checkVersionAndCall(cmdArgs, versionInfo, cmdDel) case "VERSION": if err := versionInfo.Encode(t.Stdout); err != nil { return types.NewError(types.ErrIOFailure, err.Error(), "") @@ -357,63 +264,13 @@ func (t *dispatcher) pluginMain(funcs CNIFuncs, versionInfo version.PluginInfo, // // To let this package automatically handle errors and call os.Exit(1) for you, // use PluginMain() instead. -// -// Deprecated: Use github.com/containernetworking/cni/pkg/skel.PluginMainFuncsWithError instead. func PluginMainWithError(cmdAdd, cmdCheck, cmdDel func(_ *CmdArgs) error, versionInfo version.PluginInfo, about string) *types.Error { - return PluginMainFuncsWithError(CNIFuncs{Add: cmdAdd, Check: cmdCheck, Del: cmdDel}, versionInfo, about) -} - -// CNIFuncs contains a group of callback command funcs to be passed in as -// parameters to the core "main" for a plugin. -type CNIFuncs struct { - Add func(_ *CmdArgs) error - Del func(_ *CmdArgs) error - Check func(_ *CmdArgs) error - GC func(_ *CmdArgs) error - Status func(_ *CmdArgs) error -} - -// PluginMainFuncsWithError is the core "main" for a plugin. It accepts -// callback functions defined within CNIFuncs and returns an error. -// -// The caller must also specify what CNI spec versions the plugin supports. -// -// It is the responsibility of the caller to check for non-nil error return. -// -// For a plugin to comply with the CNI spec, it must print any error to stdout -// as JSON and then exit with nonzero status code. -// -// To let this package automatically handle errors and call os.Exit(1) for you, -// use PluginMainFuncs() instead. -func PluginMainFuncsWithError(funcs CNIFuncs, versionInfo version.PluginInfo, about string) *types.Error { return (&dispatcher{ Getenv: os.Getenv, Stdin: os.Stdin, Stdout: os.Stdout, Stderr: os.Stderr, - }).pluginMain(funcs, versionInfo, about) -} - -// PluginMainFuncs is the core "main" for a plugin which includes automatic error handling. -// This is a newer alternative func to PluginMain which abstracts CNI commands within a -// CNIFuncs interface. -// -// The caller must also specify what CNI spec versions the plugin supports. -// -// The caller can specify an "about" string, which is printed on stderr -// when no CNI_COMMAND is specified. The recommended output is "CNI plugin v" -// -// When an error occurs in any func in CNIFuncs, PluginMainFuncs will print the error -// as JSON to stdout and call os.Exit(1). -// -// To have more control over error handling, use PluginMainFuncsWithError() instead. -func PluginMainFuncs(funcs CNIFuncs, versionInfo version.PluginInfo, about string) { - if e := PluginMainFuncsWithError(funcs, versionInfo, about); e != nil { - if err := e.Print(); err != nil { - log.Print("Error writing error JSON to stdout: ", err) - } - os.Exit(1) - } + }).pluginMain(cmdAdd, cmdCheck, cmdDel, versionInfo, about) } // PluginMain is the core "main" for a plugin which includes automatic error handling. @@ -427,8 +284,6 @@ func PluginMainFuncs(funcs CNIFuncs, versionInfo version.PluginInfo, about strin // as JSON to stdout and call os.Exit(1). // // To have more control over error handling, use PluginMainWithError() instead. -// -// Deprecated: Use github.com/containernetworking/cni/pkg/skel.PluginMainFuncs instead. func PluginMain(cmdAdd, cmdCheck, cmdDel func(_ *CmdArgs) error, versionInfo version.PluginInfo, about string) { if e := PluginMainWithError(cmdAdd, cmdCheck, cmdDel, versionInfo, about); e != nil { if err := e.Print(); err != nil { diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/types/100/types.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/types/100/types.go index f58b91206d..0e1e8b857b 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/types/100/types.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/types/100/types.go @@ -26,10 +26,9 @@ import ( convert "github.com/containernetworking/cni/pkg/types/internal" ) -// The types did not change between v1.0 and v1.1 -const ImplementedSpecVersion string = "1.1.0" +const ImplementedSpecVersion string = "1.0.0" -var supportedVersions = []string{"1.0.0", "1.1.0"} +var supportedVersions = []string{ImplementedSpecVersion} // Register converters for all versions less than the implemented spec version func init() { @@ -39,14 +38,10 @@ func init() { convert.RegisterConverter("0.3.0", supportedVersions, convertFrom04x) convert.RegisterConverter("0.3.1", supportedVersions, convertFrom04x) convert.RegisterConverter("0.4.0", supportedVersions, convertFrom04x) - convert.RegisterConverter("1.0.0", []string{"1.1.0"}, convertFrom100) // Down-converters convert.RegisterConverter("1.0.0", []string{"0.3.0", "0.3.1", "0.4.0"}, convertTo04x) convert.RegisterConverter("1.0.0", []string{"0.1.0", "0.2.0"}, convertTo02x) - convert.RegisterConverter("1.1.0", []string{"0.3.0", "0.3.1", "0.4.0"}, convertTo04x) - convert.RegisterConverter("1.1.0", []string{"0.1.0", "0.2.0"}, convertTo02x) - convert.RegisterConverter("1.1.0", []string{"1.0.0"}, convertFrom100) // Creator convert.RegisterCreator(supportedVersions, NewResult) @@ -95,49 +90,12 @@ type Result struct { DNS types.DNS `json:"dns,omitempty"` } -// Note: DNS should be omit if DNS is empty but default Marshal function -// will output empty structure hence need to write a Marshal function -func (r *Result) MarshalJSON() ([]byte, error) { - // use type alias to escape recursion for json.Marshal() to MarshalJSON() - type fixObjType = Result - - bytes, err := json.Marshal(fixObjType(*r)) //nolint:all - if err != nil { - return nil, err - } - - fixupObj := make(map[string]interface{}) - if err := json.Unmarshal(bytes, &fixupObj); err != nil { - return nil, err - } - - if r.DNS.IsEmpty() { - delete(fixupObj, "dns") - } - - return json.Marshal(fixupObj) -} - -// convertFrom100 does nothing except set the version; the types are the same -func convertFrom100(from types.Result, toVersion string) (types.Result, error) { - fromResult := from.(*Result) - - result := &Result{ - CNIVersion: toVersion, - Interfaces: fromResult.Interfaces, - IPs: fromResult.IPs, - Routes: fromResult.Routes, - DNS: fromResult.DNS, - } - return result, nil -} - func convertFrom02x(from types.Result, toVersion string) (types.Result, error) { result040, err := convert.Convert(from, "0.4.0") if err != nil { return nil, err } - result100, err := convertFrom04x(result040, toVersion) + result100, err := convertFrom04x(result040, ImplementedSpecVersion) if err != nil { return nil, err } @@ -268,12 +226,9 @@ func (r *Result) PrintTo(writer io.Writer) error { // Interface contains values about the created interfaces type Interface struct { - Name string `json:"name"` - Mac string `json:"mac,omitempty"` - Mtu int `json:"mtu,omitempty"` - Sandbox string `json:"sandbox,omitempty"` - SocketPath string `json:"socketPath,omitempty"` - PciID string `json:"pciID,omitempty"` + Name string `json:"name"` + Mac string `json:"mac,omitempty"` + Sandbox string `json:"sandbox,omitempty"` } func (i *Interface) String() string { diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/types/args.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/types/args.go index 68a602bfdb..7516f03ef5 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/types/args.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/types/args.go @@ -26,8 +26,8 @@ import ( type UnmarshallableBool bool // UnmarshalText implements the encoding.TextUnmarshaler interface. -// Returns boolean true if the string is "1" or "true" or "True" -// Returns boolean false if the string is "0" or "false" or "False” +// Returns boolean true if the string is "1" or "[Tt]rue" +// Returns boolean false if the string is "0" or "[Ff]alse" func (b *UnmarshallableBool) UnmarshalText(data []byte) error { s := strings.ToLower(string(data)) switch s { diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/types/create/create.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/types/create/create.go index 452cb62201..ed28b33e8e 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/types/create/create.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/types/create/create.go @@ -19,9 +19,6 @@ import ( "fmt" "github.com/containernetworking/cni/pkg/types" - _ "github.com/containernetworking/cni/pkg/types/020" - _ "github.com/containernetworking/cni/pkg/types/040" - _ "github.com/containernetworking/cni/pkg/types/100" convert "github.com/containernetworking/cni/pkg/types/internal" ) diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/types/types.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/types/types.go index 8453bb5d87..fba17dfc0f 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/types/types.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/types/types.go @@ -56,73 +56,30 @@ func (n *IPNet) UnmarshalJSON(data []byte) error { return nil } -// NetConfType describes a network. -type NetConfType struct { +// NetConf describes a network. +type NetConf struct { CNIVersion string `json:"cniVersion,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Capabilities map[string]bool `json:"capabilities,omitempty"` IPAM IPAM `json:"ipam,omitempty"` - DNS DNS `json:"dns,omitempty"` + DNS DNS `json:"dns"` RawPrevResult map[string]interface{} `json:"prevResult,omitempty"` PrevResult Result `json:"-"` - - // ValidAttachments is only supplied when executing a GC operation - ValidAttachments []GCAttachment `json:"cni.dev/valid-attachments,omitempty"` -} - -// NetConf is defined as different type as custom MarshalJSON() and issue #1096 -type NetConf NetConfType - -// GCAttachment is the parameters to a GC call -- namely, -// the container ID and ifname pair that represents a -// still-valid attachment. -type GCAttachment struct { - ContainerID string `json:"containerID"` - IfName string `json:"ifname"` -} - -// Note: DNS should be omit if DNS is empty but default Marshal function -// will output empty structure hence need to write a Marshal function -func (n *NetConfType) MarshalJSON() ([]byte, error) { - // use type alias to escape recursion for json.Marshal() to MarshalJSON() - type fixObjType = NetConf - - bytes, err := json.Marshal(fixObjType(*n)) - if err != nil { - return nil, err - } - - fixupObj := make(map[string]interface{}) - if err := json.Unmarshal(bytes, &fixupObj); err != nil { - return nil, err - } - - if n.DNS.IsEmpty() { - delete(fixupObj, "dns") - } - - return json.Marshal(fixupObj) } type IPAM struct { Type string `json:"type,omitempty"` } -// IsEmpty returns true if IPAM structure has no value, otherwise return false -func (i *IPAM) IsEmpty() bool { - return i.Type == "" -} - // NetConfList describes an ordered list of networks. type NetConfList struct { CNIVersion string `json:"cniVersion,omitempty"` Name string `json:"name,omitempty"` DisableCheck bool `json:"disableCheck,omitempty"` - DisableGC bool `json:"disableGC,omitempty"` Plugins []*NetConf `json:"plugins,omitempty"` } @@ -159,48 +116,31 @@ type DNS struct { Options []string `json:"options,omitempty"` } -// IsEmpty returns true if DNS structure has no value, otherwise return false -func (d *DNS) IsEmpty() bool { - if len(d.Nameservers) == 0 && d.Domain == "" && len(d.Search) == 0 && len(d.Options) == 0 { - return true - } - return false -} - func (d *DNS) Copy() *DNS { if d == nil { return nil } to := &DNS{Domain: d.Domain} - to.Nameservers = append(to.Nameservers, d.Nameservers...) - to.Search = append(to.Search, d.Search...) - to.Options = append(to.Options, d.Options...) + for _, ns := range d.Nameservers { + to.Nameservers = append(to.Nameservers, ns) + } + for _, s := range d.Search { + to.Search = append(to.Search, s) + } + for _, o := range d.Options { + to.Options = append(to.Options, o) + } return to } type Route struct { - Dst net.IPNet - GW net.IP - MTU int - AdvMSS int - Priority int - Table *int - Scope *int + Dst net.IPNet + GW net.IP } func (r *Route) String() string { - table := "" - if r.Table != nil { - table = fmt.Sprintf("%d", *r.Table) - } - - scope := "" - if r.Scope != nil { - scope = fmt.Sprintf("%d", *r.Scope) - } - - return fmt.Sprintf("{Dst:%+v GW:%v MTU:%d AdvMSS:%d Priority:%d Table:%s Scope:%s}", r.Dst, r.GW, r.MTU, r.AdvMSS, r.Priority, table, scope) + return fmt.Sprintf("%+v", *r) } func (r *Route) Copy() *Route { @@ -208,30 +148,14 @@ func (r *Route) Copy() *Route { return nil } - route := &Route{ - Dst: r.Dst, - GW: r.GW, - MTU: r.MTU, - AdvMSS: r.AdvMSS, - Priority: r.Priority, - Scope: r.Scope, - } - - if r.Table != nil { - table := *r.Table - route.Table = &table + return &Route{ + Dst: r.Dst, + GW: r.GW, } - - if r.Scope != nil { - scope := *r.Scope - route.Scope = &scope - } - - return route } // Well known error codes -// see https://github.com/containernetworking/cni/blob/main/SPEC.md#well-known-error-codes +// see https://github.com/containernetworking/cni/blob/master/SPEC.md#well-known-error-codes const ( ErrUnknown uint = iota // 0 ErrIncompatibleCNIVersion // 1 @@ -241,7 +165,6 @@ const ( ErrIOFailure // 5 ErrDecodingFailure // 6 ErrInvalidNetworkConfig // 7 - ErrInvalidNetNS // 8 ErrTryAgainLater uint = 11 ErrInternal uint = 999 ) @@ -277,13 +200,8 @@ func (e *Error) Print() error { // JSON (un)marshallable types type route struct { - Dst IPNet `json:"dst"` - GW net.IP `json:"gw,omitempty"` - MTU int `json:"mtu,omitempty"` - AdvMSS int `json:"advmss,omitempty"` - Priority int `json:"priority,omitempty"` - Table *int `json:"table,omitempty"` - Scope *int `json:"scope,omitempty"` + Dst IPNet `json:"dst"` + GW net.IP `json:"gw,omitempty"` } func (r *Route) UnmarshalJSON(data []byte) error { @@ -294,24 +212,13 @@ func (r *Route) UnmarshalJSON(data []byte) error { r.Dst = net.IPNet(rt.Dst) r.GW = rt.GW - r.MTU = rt.MTU - r.AdvMSS = rt.AdvMSS - r.Priority = rt.Priority - r.Table = rt.Table - r.Scope = rt.Scope - return nil } func (r Route) MarshalJSON() ([]byte, error) { rt := route{ - Dst: IPNet(r.Dst), - GW: r.GW, - MTU: r.MTU, - AdvMSS: r.AdvMSS, - Priority: r.Priority, - Table: r.Table, - Scope: r.Scope, + Dst: IPNet(r.Dst), + GW: r.GW, } return json.Marshal(rt) diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/utils/utils.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/utils/utils.go index 1981d25569..b8ec388745 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/utils/utils.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/utils/utils.go @@ -36,6 +36,7 @@ var cniReg = regexp.MustCompile(`^` + cniValidNameChars + `*$`) // ValidateContainerID will validate that the supplied containerID is not empty does not contain invalid characters func ValidateContainerID(containerID string) *types.Error { + if containerID == "" { return types.NewError(types.ErrUnknownContainer, "missing containerID", "") } @@ -47,6 +48,7 @@ func ValidateContainerID(containerID string) *types.Error { // ValidateNetworkName will validate that the supplied networkName does not contain invalid characters func ValidateNetworkName(networkName string) *types.Error { + if networkName == "" { return types.NewError(types.ErrInvalidNetworkConfig, "missing network name:", "") } @@ -56,11 +58,11 @@ func ValidateNetworkName(networkName string) *types.Error { return nil } -// ValidateInterfaceName will validate the interface name based on the four rules below +// ValidateInterfaceName will validate the interface name based on the three rules below // 1. The name must not be empty // 2. The name must be less than 16 characters // 3. The name must not be "." or ".." -// 4. The name must not contain / or : or any whitespace characters +// 3. The name must not contain / or : or any whitespace characters // ref to https://github.com/torvalds/linux/blob/master/net/core/dev.c#L1024 func ValidateInterfaceName(ifName string) *types.Error { if len(ifName) == 0 { diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/version/plugin.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/version/plugin.go index e3bd375bca..17b22b6b0c 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/version/plugin.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/version/plugin.go @@ -142,27 +142,3 @@ func GreaterThanOrEqualTo(version, otherVersion string) (bool, error) { } return false, nil } - -// GreaterThan returns true if the first version is greater than the second -func GreaterThan(version, otherVersion string) (bool, error) { - firstMajor, firstMinor, firstMicro, err := ParseVersion(version) - if err != nil { - return false, err - } - - secondMajor, secondMinor, secondMicro, err := ParseVersion(otherVersion) - if err != nil { - return false, err - } - - if firstMajor > secondMajor { - return true, nil - } else if firstMajor == secondMajor { - if firstMinor > secondMinor { - return true, nil - } else if firstMinor == secondMinor && firstMicro > secondMicro { - return true, nil - } - } - return false, nil -} diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/version/version.go b/go-controller/vendor/github.com/containernetworking/cni/pkg/version/version.go index a4d442c8ec..1326f8038e 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/version/version.go +++ b/go-controller/vendor/github.com/containernetworking/cni/pkg/version/version.go @@ -19,12 +19,13 @@ import ( "fmt" "github.com/containernetworking/cni/pkg/types" + types100 "github.com/containernetworking/cni/pkg/types/100" "github.com/containernetworking/cni/pkg/types/create" ) // Current reports the version of the CNI spec implemented by this library func Current() string { - return "1.1.0" + return types100.ImplementedSpecVersion } // Legacy PluginInfo describes a plugin that is backwards compatible with the @@ -34,10 +35,8 @@ func Current() string { // // Any future CNI spec versions which meet this definition should be added to // this list. -var ( - Legacy = PluginSupports("0.1.0", "0.2.0") - All = PluginSupports("0.1.0", "0.2.0", "0.3.0", "0.3.1", "0.4.0", "1.0.0", "1.1.0") -) +var Legacy = PluginSupports("0.1.0", "0.2.0") +var All = PluginSupports("0.1.0", "0.2.0", "0.3.0", "0.3.1", "0.4.0", "1.0.0") // VersionsFrom returns a list of versions starting from min, inclusive func VersionsStartingFrom(min string) PluginInfo { diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/.gitattributes b/go-controller/vendor/github.com/gabriel-vasile/mimetype/.gitattributes deleted file mode 100644 index 0cc26ec01c..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -testdata/* linguist-vendored diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/CODE_OF_CONDUCT.md b/go-controller/vendor/github.com/gabriel-vasile/mimetype/CODE_OF_CONDUCT.md deleted file mode 100644 index 8479cd87d6..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,76 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at vasile.gabriel@email.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/CONTRIBUTING.md b/go-controller/vendor/github.com/gabriel-vasile/mimetype/CONTRIBUTING.md deleted file mode 100644 index 56ae4e57c6..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/CONTRIBUTING.md +++ /dev/null @@ -1,12 +0,0 @@ -## Contribute -Contributions to **mimetype** are welcome. If you find an issue and you consider -contributing, you can use the [Github issues tracker](https://github.com/gabriel-vasile/mimetype/issues) -in order to report it, or better yet, open a pull request. - -Code contributions must respect these rules: - - code must be test covered - - code must be formatted using gofmt tool - - exported names must be documented - -**Important**: By submitting a pull request, you agree to allow the project -owner to license your work under the same license as that used by the project. diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/LICENSE b/go-controller/vendor/github.com/gabriel-vasile/mimetype/LICENSE deleted file mode 100644 index 13b61daa59..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Gabriel Vasile - -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. diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/README.md b/go-controller/vendor/github.com/gabriel-vasile/mimetype/README.md deleted file mode 100644 index aa88b4bda6..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/README.md +++ /dev/null @@ -1,102 +0,0 @@ -

- mimetype -

- -

- A package for detecting MIME types and extensions based on magic numbers -

-
- Goroutine safe, extensible, no C bindings -
- -

- - Go Reference - - - Go report card - - - License - -

- -## Features -- fast and precise MIME type and file extension detection -- long list of [supported MIME types](supported_mimes.md) -- possibility to [extend](https://pkg.go.dev/github.com/gabriel-vasile/mimetype#example-package-Extend) with other file formats -- common file formats are prioritized -- [text vs. binary files differentiation](https://pkg.go.dev/github.com/gabriel-vasile/mimetype#example-package-TextVsBinary) -- safe for concurrent usage - -## Install -```bash -go get github.com/gabriel-vasile/mimetype -``` - -## Usage -```go -mtype := mimetype.Detect([]byte) -// OR -mtype, err := mimetype.DetectReader(io.Reader) -// OR -mtype, err := mimetype.DetectFile("/path/to/file") -fmt.Println(mtype.String(), mtype.Extension()) -``` -See the [runnable Go Playground examples](https://pkg.go.dev/github.com/gabriel-vasile/mimetype#pkg-overview). - -## Usage' -Only use libraries like **mimetype** as a last resort. Content type detection -using magic numbers is slow, inaccurate, and non-standard. Most of the times -protocols have methods for specifying such metadata; e.g., `Content-Type` header -in HTTP and SMTP. - -## FAQ -Q: My file is in the list of [supported MIME types](supported_mimes.md) but -it is not correctly detected. What should I do? - -A: Some file formats (often Microsoft Office documents) keep their signatures -towards the end of the file. Try increasing the number of bytes used for detection -with: -```go -mimetype.SetLimit(1024*1024) // Set limit to 1MB. -// or -mimetype.SetLimit(0) // No limit, whole file content used. -mimetype.DetectFile("file.doc") -``` -If increasing the limit does not help, please -[open an issue](https://github.com/gabriel-vasile/mimetype/issues/new?assignees=&labels=&template=mismatched-mime-type-detected.md&title=). - -## Structure -**mimetype** uses a hierarchical structure to keep the MIME type detection logic. -This reduces the number of calls needed for detecting the file type. The reason -behind this choice is that there are file formats used as containers for other -file formats. For example, Microsoft Office files are just zip archives, -containing specific metadata files. Once a file has been identified as a -zip, there is no need to check if it is a text file, but it is worth checking if -it is an Microsoft Office file. - -To prevent loading entire files into memory, when detecting from a -[reader](https://pkg.go.dev/github.com/gabriel-vasile/mimetype#DetectReader) -or from a [file](https://pkg.go.dev/github.com/gabriel-vasile/mimetype#DetectFile) -**mimetype** limits itself to reading only the header of the input. -
- how project is structured -
- -## Performance -Thanks to the hierarchical structure, searching for common formats first, -and limiting itself to file headers, **mimetype** matches the performance of -stdlib `http.DetectContentType` while outperforming the alternative package. - -```bash - mimetype http.DetectContentType filetype -BenchmarkMatchTar-24 250 ns/op 400 ns/op 3778 ns/op -BenchmarkMatchZip-24 524 ns/op 351 ns/op 4884 ns/op -BenchmarkMatchJpeg-24 103 ns/op 228 ns/op 839 ns/op -BenchmarkMatchGif-24 139 ns/op 202 ns/op 751 ns/op -BenchmarkMatchPng-24 165 ns/op 221 ns/op 1176 ns/op -``` - -## Contributing -See [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/charset/charset.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/charset/charset.go deleted file mode 100644 index 0647f730e5..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/charset/charset.go +++ /dev/null @@ -1,309 +0,0 @@ -package charset - -import ( - "bytes" - "encoding/xml" - "strings" - "unicode/utf8" - - "golang.org/x/net/html" -) - -const ( - F = 0 /* character never appears in text */ - T = 1 /* character appears in plain ASCII text */ - I = 2 /* character appears in ISO-8859 text */ - X = 3 /* character appears in non-ISO extended ASCII (Mac, IBM PC) */ -) - -var ( - boms = []struct { - bom []byte - enc string - }{ - {[]byte{0xEF, 0xBB, 0xBF}, "utf-8"}, - {[]byte{0x00, 0x00, 0xFE, 0xFF}, "utf-32be"}, - {[]byte{0xFF, 0xFE, 0x00, 0x00}, "utf-32le"}, - {[]byte{0xFE, 0xFF}, "utf-16be"}, - {[]byte{0xFF, 0xFE}, "utf-16le"}, - } - - // https://github.com/file/file/blob/fa93fb9f7d21935f1c7644c47d2975d31f12b812/src/encoding.c#L241 - textChars = [256]byte{ - /* BEL BS HT LF VT FF CR */ - F, F, F, F, F, F, F, T, T, T, T, T, T, T, F, F, /* 0x0X */ - /* ESC */ - F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, /* 0x1X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x2X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x3X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x4X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x5X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x6X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, F, /* 0x7X */ - /* NEL */ - X, X, X, X, X, T, X, X, X, X, X, X, X, X, X, X, /* 0x8X */ - X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, /* 0x9X */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xaX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xbX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xcX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xdX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xeX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xfX */ - } -) - -// FromBOM returns the charset declared in the BOM of content. -func FromBOM(content []byte) string { - for _, b := range boms { - if bytes.HasPrefix(content, b.bom) { - return b.enc - } - } - return "" -} - -// FromPlain returns the charset of a plain text. It relies on BOM presence -// and it falls back on checking each byte in content. -func FromPlain(content []byte) string { - if len(content) == 0 { - return "" - } - if cset := FromBOM(content); cset != "" { - return cset - } - origContent := content - // Try to detect UTF-8. - // First eliminate any partial rune at the end. - for i := len(content) - 1; i >= 0 && i > len(content)-4; i-- { - b := content[i] - if b < 0x80 { - break - } - if utf8.RuneStart(b) { - content = content[:i] - break - } - } - hasHighBit := false - for _, c := range content { - if c >= 0x80 { - hasHighBit = true - break - } - } - if hasHighBit && utf8.Valid(content) { - return "utf-8" - } - - // ASCII is a subset of UTF8. Follow W3C recommendation and replace with UTF8. - if ascii(origContent) { - return "utf-8" - } - - return latin(origContent) -} - -func latin(content []byte) string { - hasControlBytes := false - for _, b := range content { - t := textChars[b] - if t != T && t != I { - return "" - } - if b >= 0x80 && b <= 0x9F { - hasControlBytes = true - } - } - // Code range 0x80 to 0x9F is reserved for control characters in ISO-8859-1 - // (so-called C1 Controls). Windows 1252, however, has printable punctuation - // characters in this range. - if hasControlBytes { - return "windows-1252" - } - return "iso-8859-1" -} - -func ascii(content []byte) bool { - for _, b := range content { - if textChars[b] != T { - return false - } - } - return true -} - -// FromXML returns the charset of an XML document. It relies on the XML -// header and falls back on the plain -// text content. -func FromXML(content []byte) string { - if cset := fromXML(content); cset != "" { - return cset - } - return FromPlain(content) -} -func fromXML(content []byte) string { - content = trimLWS(content) - dec := xml.NewDecoder(bytes.NewReader(content)) - rawT, err := dec.RawToken() - if err != nil { - return "" - } - - t, ok := rawT.(xml.ProcInst) - if !ok { - return "" - } - - return strings.ToLower(xmlEncoding(string(t.Inst))) -} - -// FromHTML returns the charset of an HTML document. It first looks if a BOM is -// present and if so uses it to determine the charset. If no BOM is present, -// it relies on the meta tag and falls back on the -// plain text content. -func FromHTML(content []byte) string { - if cset := FromBOM(content); cset != "" { - return cset - } - if cset := fromHTML(content); cset != "" { - return cset - } - return FromPlain(content) -} - -func fromHTML(content []byte) string { - z := html.NewTokenizer(bytes.NewReader(content)) - for { - switch z.Next() { - case html.ErrorToken: - return "" - - case html.StartTagToken, html.SelfClosingTagToken: - tagName, hasAttr := z.TagName() - if !bytes.Equal(tagName, []byte("meta")) { - continue - } - attrList := make(map[string]bool) - gotPragma := false - - const ( - dontKnow = iota - doNeedPragma - doNotNeedPragma - ) - needPragma := dontKnow - - name := "" - for hasAttr { - var key, val []byte - key, val, hasAttr = z.TagAttr() - ks := string(key) - if attrList[ks] { - continue - } - attrList[ks] = true - for i, c := range val { - if 'A' <= c && c <= 'Z' { - val[i] = c + 0x20 - } - } - - switch ks { - case "http-equiv": - if bytes.Equal(val, []byte("content-type")) { - gotPragma = true - } - - case "content": - name = fromMetaElement(string(val)) - if name != "" { - needPragma = doNeedPragma - } - - case "charset": - name = string(val) - needPragma = doNotNeedPragma - } - } - - if needPragma == dontKnow || needPragma == doNeedPragma && !gotPragma { - continue - } - - if strings.HasPrefix(name, "utf-16") { - name = "utf-8" - } - - return name - } - } -} - -func fromMetaElement(s string) string { - for s != "" { - csLoc := strings.Index(s, "charset") - if csLoc == -1 { - return "" - } - s = s[csLoc+len("charset"):] - s = strings.TrimLeft(s, " \t\n\f\r") - if !strings.HasPrefix(s, "=") { - continue - } - s = s[1:] - s = strings.TrimLeft(s, " \t\n\f\r") - if s == "" { - return "" - } - if q := s[0]; q == '"' || q == '\'' { - s = s[1:] - closeQuote := strings.IndexRune(s, rune(q)) - if closeQuote == -1 { - return "" - } - return s[:closeQuote] - } - - end := strings.IndexAny(s, "; \t\n\f\r") - if end == -1 { - end = len(s) - } - return s[:end] - } - return "" -} - -func xmlEncoding(s string) string { - param := "encoding=" - idx := strings.Index(s, param) - if idx == -1 { - return "" - } - v := s[idx+len(param):] - if v == "" { - return "" - } - if v[0] != '\'' && v[0] != '"' { - return "" - } - idx = strings.IndexRune(v[1:], rune(v[0])) - if idx == -1 { - return "" - } - return v[1 : idx+1] -} - -// trimLWS trims whitespace from beginning of the input. -// TODO: find a way to call trimLWS once per detection instead of once in each -// detector which needs the trimmed input. -func trimLWS(in []byte) []byte { - firstNonWS := 0 - for ; firstNonWS < len(in) && isWS(in[firstNonWS]); firstNonWS++ { - } - - return in[firstNonWS:] -} - -func isWS(b byte) bool { - return b == '\t' || b == '\n' || b == '\x0c' || b == '\r' || b == ' ' -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/json/json.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/json/json.go deleted file mode 100644 index 5b2ecee443..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/json/json.go +++ /dev/null @@ -1,567 +0,0 @@ -// Copyright (c) 2009 The Go Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Package json provides a JSON value parser state machine. -// This package is almost entirely copied from the Go stdlib. -// Changes made to it permit users of the package to tell -// if some slice of bytes is a valid beginning of a json string. -package json - -import ( - "fmt" - "sync" -) - -type ( - scanStatus int -) - -const ( - parseObjectKey = iota // parsing object key (before colon) - parseObjectValue // parsing object value (after colon) - parseArrayValue // parsing array value - - scanContinue scanStatus = iota // uninteresting byte - scanBeginLiteral // end implied by next result != scanContinue - scanBeginObject // begin object - scanObjectKey // just finished object key (string) - scanObjectValue // just finished non-last object value - scanEndObject // end object (implies scanObjectValue if possible) - scanBeginArray // begin array - scanArrayValue // just finished array value - scanEndArray // end array (implies scanArrayValue if possible) - scanSkipSpace // space byte; can skip; known to be last "continue" result - scanEnd // top-level value ended *before* this byte; known to be first "stop" result - scanError // hit an error, scanner.err. - - // This limits the max nesting depth to prevent stack overflow. - // This is permitted by https://tools.ietf.org/html/rfc7159#section-9 - maxNestingDepth = 10000 -) - -type ( - scanner struct { - step func(*scanner, byte) scanStatus - parseState []int - endTop bool - err error - index int - } -) - -var scannerPool = sync.Pool{ - New: func() any { - return &scanner{} - }, -} - -func newScanner() *scanner { - s := scannerPool.Get().(*scanner) - s.reset() - return s -} - -func freeScanner(s *scanner) { - // Avoid hanging on to too much memory in extreme cases. - if len(s.parseState) > 1024 { - s.parseState = nil - } - scannerPool.Put(s) -} - -// Scan returns the number of bytes scanned and if there was any error -// in trying to reach the end of data. -func Scan(data []byte) (int, error) { - s := newScanner() - defer freeScanner(s) - _ = checkValid(data, s) - return s.index, s.err -} - -// checkValid verifies that data is valid JSON-encoded data. -// scan is passed in for use by checkValid to avoid an allocation. -func checkValid(data []byte, scan *scanner) error { - for _, c := range data { - scan.index++ - if scan.step(scan, c) == scanError { - return scan.err - } - } - if scan.eof() == scanError { - return scan.err - } - return nil -} - -func isSpace(c byte) bool { - return c == ' ' || c == '\t' || c == '\r' || c == '\n' -} - -func (s *scanner) reset() { - s.step = stateBeginValue - s.parseState = s.parseState[0:0] - s.err = nil - s.endTop = false - s.index = 0 -} - -// eof tells the scanner that the end of input has been reached. -// It returns a scan status just as s.step does. -func (s *scanner) eof() scanStatus { - if s.err != nil { - return scanError - } - if s.endTop { - return scanEnd - } - s.step(s, ' ') - if s.endTop { - return scanEnd - } - if s.err == nil { - s.err = fmt.Errorf("unexpected end of JSON input") - } - return scanError -} - -// pushParseState pushes a new parse state p onto the parse stack. -// an error state is returned if maxNestingDepth was exceeded, otherwise successState is returned. -func (s *scanner) pushParseState(c byte, newParseState int, successState scanStatus) scanStatus { - s.parseState = append(s.parseState, newParseState) - if len(s.parseState) <= maxNestingDepth { - return successState - } - return s.error(c, "exceeded max depth") -} - -// popParseState pops a parse state (already obtained) off the stack -// and updates s.step accordingly. -func (s *scanner) popParseState() { - n := len(s.parseState) - 1 - s.parseState = s.parseState[0:n] - if n == 0 { - s.step = stateEndTop - s.endTop = true - } else { - s.step = stateEndValue - } -} - -// stateBeginValueOrEmpty is the state after reading `[`. -func stateBeginValueOrEmpty(s *scanner, c byte) scanStatus { - if c <= ' ' && isSpace(c) { - return scanSkipSpace - } - if c == ']' { - return stateEndValue(s, c) - } - return stateBeginValue(s, c) -} - -// stateBeginValue is the state at the beginning of the input. -func stateBeginValue(s *scanner, c byte) scanStatus { - if c <= ' ' && isSpace(c) { - return scanSkipSpace - } - switch c { - case '{': - s.step = stateBeginStringOrEmpty - return s.pushParseState(c, parseObjectKey, scanBeginObject) - case '[': - s.step = stateBeginValueOrEmpty - return s.pushParseState(c, parseArrayValue, scanBeginArray) - case '"': - s.step = stateInString - return scanBeginLiteral - case '-': - s.step = stateNeg - return scanBeginLiteral - case '0': // beginning of 0.123 - s.step = state0 - return scanBeginLiteral - case 't': // beginning of true - s.step = stateT - return scanBeginLiteral - case 'f': // beginning of false - s.step = stateF - return scanBeginLiteral - case 'n': // beginning of null - s.step = stateN - return scanBeginLiteral - } - if '1' <= c && c <= '9' { // beginning of 1234.5 - s.step = state1 - return scanBeginLiteral - } - return s.error(c, "looking for beginning of value") -} - -// stateBeginStringOrEmpty is the state after reading `{`. -func stateBeginStringOrEmpty(s *scanner, c byte) scanStatus { - if c <= ' ' && isSpace(c) { - return scanSkipSpace - } - if c == '}' { - n := len(s.parseState) - s.parseState[n-1] = parseObjectValue - return stateEndValue(s, c) - } - return stateBeginString(s, c) -} - -// stateBeginString is the state after reading `{"key": value,`. -func stateBeginString(s *scanner, c byte) scanStatus { - if c <= ' ' && isSpace(c) { - return scanSkipSpace - } - if c == '"' { - s.step = stateInString - return scanBeginLiteral - } - return s.error(c, "looking for beginning of object key string") -} - -// stateEndValue is the state after completing a value, -// such as after reading `{}` or `true` or `["x"`. -func stateEndValue(s *scanner, c byte) scanStatus { - n := len(s.parseState) - if n == 0 { - // Completed top-level before the current byte. - s.step = stateEndTop - s.endTop = true - return stateEndTop(s, c) - } - if c <= ' ' && isSpace(c) { - s.step = stateEndValue - return scanSkipSpace - } - ps := s.parseState[n-1] - switch ps { - case parseObjectKey: - if c == ':' { - s.parseState[n-1] = parseObjectValue - s.step = stateBeginValue - return scanObjectKey - } - return s.error(c, "after object key") - case parseObjectValue: - if c == ',' { - s.parseState[n-1] = parseObjectKey - s.step = stateBeginString - return scanObjectValue - } - if c == '}' { - s.popParseState() - return scanEndObject - } - return s.error(c, "after object key:value pair") - case parseArrayValue: - if c == ',' { - s.step = stateBeginValue - return scanArrayValue - } - if c == ']' { - s.popParseState() - return scanEndArray - } - return s.error(c, "after array element") - } - return s.error(c, "") -} - -// stateEndTop is the state after finishing the top-level value, -// such as after reading `{}` or `[1,2,3]`. -// Only space characters should be seen now. -func stateEndTop(s *scanner, c byte) scanStatus { - if c != ' ' && c != '\t' && c != '\r' && c != '\n' { - // Complain about non-space byte on next call. - s.error(c, "after top-level value") - } - return scanEnd -} - -// stateInString is the state after reading `"`. -func stateInString(s *scanner, c byte) scanStatus { - if c == '"' { - s.step = stateEndValue - return scanContinue - } - if c == '\\' { - s.step = stateInStringEsc - return scanContinue - } - if c < 0x20 { - return s.error(c, "in string literal") - } - return scanContinue -} - -// stateInStringEsc is the state after reading `"\` during a quoted string. -func stateInStringEsc(s *scanner, c byte) scanStatus { - switch c { - case 'b', 'f', 'n', 'r', 't', '\\', '/', '"': - s.step = stateInString - return scanContinue - case 'u': - s.step = stateInStringEscU - return scanContinue - } - return s.error(c, "in string escape code") -} - -// stateInStringEscU is the state after reading `"\u` during a quoted string. -func stateInStringEscU(s *scanner, c byte) scanStatus { - if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' { - s.step = stateInStringEscU1 - return scanContinue - } - // numbers - return s.error(c, "in \\u hexadecimal character escape") -} - -// stateInStringEscU1 is the state after reading `"\u1` during a quoted string. -func stateInStringEscU1(s *scanner, c byte) scanStatus { - if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' { - s.step = stateInStringEscU12 - return scanContinue - } - // numbers - return s.error(c, "in \\u hexadecimal character escape") -} - -// stateInStringEscU12 is the state after reading `"\u12` during a quoted string. -func stateInStringEscU12(s *scanner, c byte) scanStatus { - if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' { - s.step = stateInStringEscU123 - return scanContinue - } - // numbers - return s.error(c, "in \\u hexadecimal character escape") -} - -// stateInStringEscU123 is the state after reading `"\u123` during a quoted string. -func stateInStringEscU123(s *scanner, c byte) scanStatus { - if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' { - s.step = stateInString - return scanContinue - } - // numbers - return s.error(c, "in \\u hexadecimal character escape") -} - -// stateNeg is the state after reading `-` during a number. -func stateNeg(s *scanner, c byte) scanStatus { - if c == '0' { - s.step = state0 - return scanContinue - } - if '1' <= c && c <= '9' { - s.step = state1 - return scanContinue - } - return s.error(c, "in numeric literal") -} - -// state1 is the state after reading a non-zero integer during a number, -// such as after reading `1` or `100` but not `0`. -func state1(s *scanner, c byte) scanStatus { - if '0' <= c && c <= '9' { - s.step = state1 - return scanContinue - } - return state0(s, c) -} - -// state0 is the state after reading `0` during a number. -func state0(s *scanner, c byte) scanStatus { - if c == '.' { - s.step = stateDot - return scanContinue - } - if c == 'e' || c == 'E' { - s.step = stateE - return scanContinue - } - return stateEndValue(s, c) -} - -// stateDot is the state after reading the integer and decimal point in a number, -// such as after reading `1.`. -func stateDot(s *scanner, c byte) scanStatus { - if '0' <= c && c <= '9' { - s.step = stateDot0 - return scanContinue - } - return s.error(c, "after decimal point in numeric literal") -} - -// stateDot0 is the state after reading the integer, decimal point, and subsequent -// digits of a number, such as after reading `3.14`. -func stateDot0(s *scanner, c byte) scanStatus { - if '0' <= c && c <= '9' { - return scanContinue - } - if c == 'e' || c == 'E' { - s.step = stateE - return scanContinue - } - return stateEndValue(s, c) -} - -// stateE is the state after reading the mantissa and e in a number, -// such as after reading `314e` or `0.314e`. -func stateE(s *scanner, c byte) scanStatus { - if c == '+' || c == '-' { - s.step = stateESign - return scanContinue - } - return stateESign(s, c) -} - -// stateESign is the state after reading the mantissa, e, and sign in a number, -// such as after reading `314e-` or `0.314e+`. -func stateESign(s *scanner, c byte) scanStatus { - if '0' <= c && c <= '9' { - s.step = stateE0 - return scanContinue - } - return s.error(c, "in exponent of numeric literal") -} - -// stateE0 is the state after reading the mantissa, e, optional sign, -// and at least one digit of the exponent in a number, -// such as after reading `314e-2` or `0.314e+1` or `3.14e0`. -func stateE0(s *scanner, c byte) scanStatus { - if '0' <= c && c <= '9' { - return scanContinue - } - return stateEndValue(s, c) -} - -// stateT is the state after reading `t`. -func stateT(s *scanner, c byte) scanStatus { - if c == 'r' { - s.step = stateTr - return scanContinue - } - return s.error(c, "in literal true (expecting 'r')") -} - -// stateTr is the state after reading `tr`. -func stateTr(s *scanner, c byte) scanStatus { - if c == 'u' { - s.step = stateTru - return scanContinue - } - return s.error(c, "in literal true (expecting 'u')") -} - -// stateTru is the state after reading `tru`. -func stateTru(s *scanner, c byte) scanStatus { - if c == 'e' { - s.step = stateEndValue - return scanContinue - } - return s.error(c, "in literal true (expecting 'e')") -} - -// stateF is the state after reading `f`. -func stateF(s *scanner, c byte) scanStatus { - if c == 'a' { - s.step = stateFa - return scanContinue - } - return s.error(c, "in literal false (expecting 'a')") -} - -// stateFa is the state after reading `fa`. -func stateFa(s *scanner, c byte) scanStatus { - if c == 'l' { - s.step = stateFal - return scanContinue - } - return s.error(c, "in literal false (expecting 'l')") -} - -// stateFal is the state after reading `fal`. -func stateFal(s *scanner, c byte) scanStatus { - if c == 's' { - s.step = stateFals - return scanContinue - } - return s.error(c, "in literal false (expecting 's')") -} - -// stateFals is the state after reading `fals`. -func stateFals(s *scanner, c byte) scanStatus { - if c == 'e' { - s.step = stateEndValue - return scanContinue - } - return s.error(c, "in literal false (expecting 'e')") -} - -// stateN is the state after reading `n`. -func stateN(s *scanner, c byte) scanStatus { - if c == 'u' { - s.step = stateNu - return scanContinue - } - return s.error(c, "in literal null (expecting 'u')") -} - -// stateNu is the state after reading `nu`. -func stateNu(s *scanner, c byte) scanStatus { - if c == 'l' { - s.step = stateNul - return scanContinue - } - return s.error(c, "in literal null (expecting 'l')") -} - -// stateNul is the state after reading `nul`. -func stateNul(s *scanner, c byte) scanStatus { - if c == 'l' { - s.step = stateEndValue - return scanContinue - } - return s.error(c, "in literal null (expecting 'l')") -} - -// stateError is the state after reaching a syntax error, -// such as after reading `[1}` or `5.1.2`. -func stateError(s *scanner, c byte) scanStatus { - return scanError -} - -// error records an error and switches to the error state. -func (s *scanner) error(c byte, context string) scanStatus { - s.step = stateError - s.err = fmt.Errorf("invalid character <<%c>> %s", c, context) - return scanError -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/archive.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/archive.go deleted file mode 100644 index 068d00f79a..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/archive.go +++ /dev/null @@ -1,163 +0,0 @@ -package magic - -import ( - "bytes" - "encoding/binary" -) - -var ( - // SevenZ matches a 7z archive. - SevenZ = prefix([]byte{0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C}) - // Gzip matches gzip files based on http://www.zlib.org/rfc-gzip.html#header-trailer. - Gzip = prefix([]byte{0x1f, 0x8b}) - // Fits matches an Flexible Image Transport System file. - Fits = prefix([]byte{ - 0x53, 0x49, 0x4D, 0x50, 0x4C, 0x45, 0x20, 0x20, 0x3D, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, - }) - // Xar matches an eXtensible ARchive format file. - Xar = prefix([]byte{0x78, 0x61, 0x72, 0x21}) - // Bz2 matches a bzip2 file. - Bz2 = prefix([]byte{0x42, 0x5A, 0x68}) - // Ar matches an ar (Unix) archive file. - Ar = prefix([]byte{0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E}) - // Deb matches a Debian package file. - Deb = offset([]byte{ - 0x64, 0x65, 0x62, 0x69, 0x61, 0x6E, 0x2D, - 0x62, 0x69, 0x6E, 0x61, 0x72, 0x79, - }, 8) - // Warc matches a Web ARChive file. - Warc = prefix([]byte("WARC/1.0"), []byte("WARC/1.1")) - // Cab matches a Microsoft Cabinet archive file. - Cab = prefix([]byte("MSCF\x00\x00\x00\x00")) - // Xz matches an xz compressed stream based on https://tukaani.org/xz/xz-file-format.txt. - Xz = prefix([]byte{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00}) - // Lzip matches an Lzip compressed file. - Lzip = prefix([]byte{0x4c, 0x5a, 0x49, 0x50}) - // RPM matches an RPM or Delta RPM package file. - RPM = prefix([]byte{0xed, 0xab, 0xee, 0xdb}, []byte("drpm")) - // Cpio matches a cpio archive file. - Cpio = prefix([]byte("070707"), []byte("070701"), []byte("070702")) - // RAR matches a RAR archive file. - RAR = prefix([]byte("Rar!\x1A\x07\x00"), []byte("Rar!\x1A\x07\x01\x00")) -) - -// InstallShieldCab matches an InstallShield Cabinet archive file. -func InstallShieldCab(raw []byte, _ uint32) bool { - return len(raw) > 7 && - bytes.Equal(raw[0:4], []byte("ISc(")) && - raw[6] == 0 && - (raw[7] == 1 || raw[7] == 2 || raw[7] == 4) -} - -// Zstd matches a Zstandard archive file. -// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md -func Zstd(raw []byte, limit uint32) bool { - if len(raw) < 4 { - return false - } - sig := binary.LittleEndian.Uint32(raw) - // Check for Zstandard frames and skippable frames. - return (sig >= 0xFD2FB522 && sig <= 0xFD2FB528) || - (sig >= 0x184D2A50 && sig <= 0x184D2A5F) -} - -// CRX matches a Chrome extension file: a zip archive prepended by a package header. -func CRX(raw []byte, limit uint32) bool { - const minHeaderLen = 16 - if len(raw) < minHeaderLen || !bytes.HasPrefix(raw, []byte("Cr24")) { - return false - } - pubkeyLen := binary.LittleEndian.Uint32(raw[8:12]) - sigLen := binary.LittleEndian.Uint32(raw[12:16]) - zipOffset := minHeaderLen + pubkeyLen + sigLen - if uint32(len(raw)) < zipOffset { - return false - } - return Zip(raw[zipOffset:], limit) -} - -// Tar matches a (t)ape (ar)chive file. -// Tar files are divided into 512 bytes records. First record contains a 257 -// bytes header padded with NUL. -func Tar(raw []byte, _ uint32) bool { - const sizeRecord = 512 - - // The structure of a tar header: - // type TarHeader struct { - // Name [100]byte - // Mode [8]byte - // Uid [8]byte - // Gid [8]byte - // Size [12]byte - // Mtime [12]byte - // Chksum [8]byte - // Linkflag byte - // Linkname [100]byte - // Magic [8]byte - // Uname [32]byte - // Gname [32]byte - // Devmajor [8]byte - // Devminor [8]byte - // } - - if len(raw) < sizeRecord { - return false - } - raw = raw[:sizeRecord] - - // First 100 bytes of the header represent the file name. - // Check if file looks like Gentoo GLEP binary package. - if bytes.Contains(raw[:100], []byte("/gpkg-1\x00")) { - return false - } - - // Get the checksum recorded into the file. - recsum := tarParseOctal(raw[148:156]) - if recsum == -1 { - return false - } - sum1, sum2 := tarChksum(raw) - return recsum == sum1 || recsum == sum2 -} - -// tarParseOctal converts octal string to decimal int. -func tarParseOctal(b []byte) int64 { - // Because unused fields are filled with NULs, we need to skip leading NULs. - // Fields may also be padded with spaces or NULs. - // So we remove leading and trailing NULs and spaces to be sure. - b = bytes.Trim(b, " \x00") - - if len(b) == 0 { - return -1 - } - ret := int64(0) - for _, b := range b { - if b == 0 { - break - } - if !(b >= '0' && b <= '7') { - return -1 - } - ret = (ret << 3) | int64(b-'0') - } - return ret -} - -// tarChksum computes the checksum for the header block b. -// The actual checksum is written to same b block after it has been calculated. -// Before calculation the bytes from b reserved for checksum have placeholder -// value of ASCII space 0x20. -// POSIX specifies a sum of the unsigned byte values, but the Sun tar used -// signed byte values. We compute and return both. -func tarChksum(b []byte) (unsigned, signed int64) { - for i, c := range b { - if 148 <= i && i < 156 { - c = ' ' // Treat the checksum field itself as all spaces. - } - unsigned += int64(c) - signed += int64(int8(c)) - } - return unsigned, signed -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/audio.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/audio.go deleted file mode 100644 index d17e32482c..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/audio.go +++ /dev/null @@ -1,76 +0,0 @@ -package magic - -import ( - "bytes" - "encoding/binary" -) - -var ( - // Flac matches a Free Lossless Audio Codec file. - Flac = prefix([]byte("\x66\x4C\x61\x43\x00\x00\x00\x22")) - // Midi matches a Musical Instrument Digital Interface file. - Midi = prefix([]byte("\x4D\x54\x68\x64")) - // Ape matches a Monkey's Audio file. - Ape = prefix([]byte("\x4D\x41\x43\x20\x96\x0F\x00\x00\x34\x00\x00\x00\x18\x00\x00\x00\x90\xE3")) - // MusePack matches a Musepack file. - MusePack = prefix([]byte("MPCK")) - // Au matches a Sun Microsystems au file. - Au = prefix([]byte("\x2E\x73\x6E\x64")) - // Amr matches an Adaptive Multi-Rate file. - Amr = prefix([]byte("\x23\x21\x41\x4D\x52")) - // Voc matches a Creative Voice file. - Voc = prefix([]byte("Creative Voice File")) - // M3u matches a Playlist file. - M3u = prefix([]byte("#EXTM3U")) - // AAC matches an Advanced Audio Coding file. - AAC = prefix([]byte{0xFF, 0xF1}, []byte{0xFF, 0xF9}) -) - -// Mp3 matches an mp3 file. -func Mp3(raw []byte, limit uint32) bool { - if len(raw) < 3 { - return false - } - - if bytes.HasPrefix(raw, []byte("ID3")) { - // MP3s with an ID3v2 tag will start with "ID3" - // ID3v1 tags, however appear at the end of the file. - return true - } - - // Match MP3 files without tags - switch binary.BigEndian.Uint16(raw[:2]) & 0xFFFE { - case 0xFFFA: - // MPEG ADTS, layer III, v1 - return true - case 0xFFF2: - // MPEG ADTS, layer III, v2 - return true - case 0xFFE2: - // MPEG ADTS, layer III, v2.5 - return true - } - - return false -} - -// Wav matches a Waveform Audio File Format file. -func Wav(raw []byte, limit uint32) bool { - return len(raw) > 12 && - bytes.Equal(raw[:4], []byte("RIFF")) && - bytes.Equal(raw[8:12], []byte{0x57, 0x41, 0x56, 0x45}) -} - -// Aiff matches Audio Interchange File Format file. -func Aiff(raw []byte, limit uint32) bool { - return len(raw) > 12 && - bytes.Equal(raw[:4], []byte{0x46, 0x4F, 0x52, 0x4D}) && - bytes.Equal(raw[8:12], []byte{0x41, 0x49, 0x46, 0x46}) -} - -// Qcp matches a Qualcomm Pure Voice file. -func Qcp(raw []byte, limit uint32) bool { - return len(raw) > 12 && - bytes.Equal(raw[:4], []byte("RIFF")) && - bytes.Equal(raw[8:12], []byte("QLCM")) -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go deleted file mode 100644 index 7697320180..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/binary.go +++ /dev/null @@ -1,203 +0,0 @@ -package magic - -import ( - "bytes" - "debug/macho" - "encoding/binary" -) - -var ( - // Lnk matches Microsoft lnk binary format. - Lnk = prefix([]byte{0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00}) - // Wasm matches a web assembly File Format file. - Wasm = prefix([]byte{0x00, 0x61, 0x73, 0x6D}) - // Exe matches a Windows/DOS executable file. - Exe = prefix([]byte{0x4D, 0x5A}) - // Elf matches an Executable and Linkable Format file. - Elf = prefix([]byte{0x7F, 0x45, 0x4C, 0x46}) - // Nes matches a Nintendo Entertainment system ROM file. - Nes = prefix([]byte{0x4E, 0x45, 0x53, 0x1A}) - // SWF matches an Adobe Flash swf file. - SWF = prefix([]byte("CWS"), []byte("FWS"), []byte("ZWS")) - // Torrent has bencoded text in the beginning. - Torrent = prefix([]byte("d8:announce")) - // PAR1 matches a parquet file. - Par1 = prefix([]byte{0x50, 0x41, 0x52, 0x31}) - // CBOR matches a Concise Binary Object Representation https://cbor.io/ - CBOR = prefix([]byte{0xD9, 0xD9, 0xF7}) -) - -// Java bytecode and Mach-O binaries share the same magic number. -// More info here https://github.com/threatstack/libmagic/blob/master/magic/Magdir/cafebabe -func classOrMachOFat(in []byte) bool { - // There should be at least 8 bytes for both of them because the only way to - // quickly distinguish them is by comparing byte at position 7 - if len(in) < 8 { - return false - } - - return binary.BigEndian.Uint32(in) == macho.MagicFat -} - -// Class matches a java class file. -func Class(raw []byte, limit uint32) bool { - return classOrMachOFat(raw) && raw[7] > 30 -} - -// MachO matches Mach-O binaries format. -func MachO(raw []byte, limit uint32) bool { - if classOrMachOFat(raw) && raw[7] < 0x14 { - return true - } - - if len(raw) < 4 { - return false - } - - be := binary.BigEndian.Uint32(raw) - le := binary.LittleEndian.Uint32(raw) - - return be == macho.Magic32 || - le == macho.Magic32 || - be == macho.Magic64 || - le == macho.Magic64 -} - -// Dbf matches a dBase file. -// https://www.dbase.com/Knowledgebase/INT/db7_file_fmt.htm -func Dbf(raw []byte, limit uint32) bool { - if len(raw) < 68 { - return false - } - - // 3rd and 4th bytes contain the last update month and day of month. - if !(0 < raw[2] && raw[2] < 13 && 0 < raw[3] && raw[3] < 32) { - return false - } - - // 12, 13, 30, 31 are reserved bytes and always filled with 0x00. - if raw[12] != 0x00 || raw[13] != 0x00 || raw[30] != 0x00 || raw[31] != 0x00 { - return false - } - // Production MDX flag; - // 0x01 if a production .MDX file exists for this table; - // 0x00 if no .MDX file exists. - if raw[28] > 0x01 { - return false - } - - // dbf type is dictated by the first byte. - dbfTypes := []byte{ - 0x02, 0x03, 0x04, 0x05, 0x30, 0x31, 0x32, 0x42, 0x62, 0x7B, 0x82, - 0x83, 0x87, 0x8A, 0x8B, 0x8E, 0xB3, 0xCB, 0xE5, 0xF5, 0xF4, 0xFB, - } - for _, b := range dbfTypes { - if raw[0] == b { - return true - } - } - - return false -} - -// ElfObj matches an object file. -func ElfObj(raw []byte, limit uint32) bool { - return len(raw) > 17 && ((raw[16] == 0x01 && raw[17] == 0x00) || - (raw[16] == 0x00 && raw[17] == 0x01)) -} - -// ElfExe matches an executable file. -func ElfExe(raw []byte, limit uint32) bool { - return len(raw) > 17 && ((raw[16] == 0x02 && raw[17] == 0x00) || - (raw[16] == 0x00 && raw[17] == 0x02)) -} - -// ElfLib matches a shared library file. -func ElfLib(raw []byte, limit uint32) bool { - return len(raw) > 17 && ((raw[16] == 0x03 && raw[17] == 0x00) || - (raw[16] == 0x00 && raw[17] == 0x03)) -} - -// ElfDump matches a core dump file. -func ElfDump(raw []byte, limit uint32) bool { - return len(raw) > 17 && ((raw[16] == 0x04 && raw[17] == 0x00) || - (raw[16] == 0x00 && raw[17] == 0x04)) -} - -// Dcm matches a DICOM medical format file. -func Dcm(raw []byte, limit uint32) bool { - return len(raw) > 131 && - bytes.Equal(raw[128:132], []byte{0x44, 0x49, 0x43, 0x4D}) -} - -// Marc matches a MARC21 (MAchine-Readable Cataloging) file. -func Marc(raw []byte, limit uint32) bool { - // File is at least 24 bytes ("leader" field size). - if len(raw) < 24 { - return false - } - - // Fixed bytes at offset 20. - if !bytes.Equal(raw[20:24], []byte("4500")) { - return false - } - - // First 5 bytes are ASCII digits. - for i := 0; i < 5; i++ { - if raw[i] < '0' || raw[i] > '9' { - return false - } - } - - // Field terminator is present in first 2048 bytes. - return bytes.Contains(raw[:min(2048, len(raw))], []byte{0x1E}) -} - -// Glb matches a glTF model format file. -// GLB is the binary file format representation of 3D models saved in -// the GL transmission Format (glTF). -// GLB uses little endian and its header structure is as follows: -// -// <-- 12-byte header --> -// | magic | version | length | -// | (uint32) | (uint32) | (uint32) | -// | \x67\x6C\x54\x46 | \x01\x00\x00\x00 | ... | -// | g l T F | 1 | ... | -// -// Visit [glTF specification] and [IANA glTF entry] for more details. -// -// [glTF specification]: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html -// [IANA glTF entry]: https://www.iana.org/assignments/media-types/model/gltf-binary -var Glb = prefix([]byte("\x67\x6C\x54\x46\x02\x00\x00\x00"), - []byte("\x67\x6C\x54\x46\x01\x00\x00\x00")) - -// TzIf matches a Time Zone Information Format (TZif) file. -// See more: https://tools.ietf.org/id/draft-murchison-tzdist-tzif-00.html#rfc.section.3 -// Its header structure is shown below: -// -// +---------------+---+ -// | magic (4) | <-+-- version (1) -// +---------------+---+---------------------------------------+ -// | [unused - reserved for future use] (15) | -// +---------------+---------------+---------------+-----------+ -// | isutccnt (4) | isstdcnt (4) | leapcnt (4) | -// +---------------+---------------+---------------+ -// | timecnt (4) | typecnt (4) | charcnt (4) | -func TzIf(raw []byte, limit uint32) bool { - // File is at least 44 bytes (header size). - if len(raw) < 44 { - return false - } - - if !bytes.HasPrefix(raw, []byte("TZif")) { - return false - } - - // Field "typecnt" MUST not be zero. - if binary.BigEndian.Uint32(raw[36:40]) == 0 { - return false - } - - // Version has to be NUL (0x00), '2' (0x32) or '3' (0x33). - return raw[4] == 0x00 || raw[4] == 0x32 || raw[4] == 0x33 -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/database.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/database.go deleted file mode 100644 index cb1fed12f7..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/database.go +++ /dev/null @@ -1,13 +0,0 @@ -package magic - -var ( - // Sqlite matches an SQLite database file. - Sqlite = prefix([]byte{ - 0x53, 0x51, 0x4c, 0x69, 0x74, 0x65, 0x20, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x33, 0x00, - }) - // MsAccessAce matches Microsoft Access dababase file. - MsAccessAce = offset([]byte("Standard ACE DB"), 4) - // MsAccessMdb matches legacy Microsoft Access database file (JET, 2003 and earlier). - MsAccessMdb = offset([]byte("Standard Jet DB"), 4) -) diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/document.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/document.go deleted file mode 100644 index b3b26d5a12..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/document.go +++ /dev/null @@ -1,62 +0,0 @@ -package magic - -import "bytes" - -var ( - // Pdf matches a Portable Document Format file. - // https://github.com/file/file/blob/11010cc805546a3e35597e67e1129a481aed40e8/magic/Magdir/pdf - Pdf = prefix( - // usual pdf signature - []byte("%PDF-"), - // new-line prefixed signature - []byte("\012%PDF-"), - // UTF-8 BOM prefixed signature - []byte("\xef\xbb\xbf%PDF-"), - ) - // Fdf matches a Forms Data Format file. - Fdf = prefix([]byte("%FDF")) - // Mobi matches a Mobi file. - Mobi = offset([]byte("BOOKMOBI"), 60) - // Lit matches a Microsoft Lit file. - Lit = prefix([]byte("ITOLITLS")) -) - -// DjVu matches a DjVu file. -func DjVu(raw []byte, limit uint32) bool { - if len(raw) < 12 { - return false - } - if !bytes.HasPrefix(raw, []byte{0x41, 0x54, 0x26, 0x54, 0x46, 0x4F, 0x52, 0x4D}) { - return false - } - return bytes.HasPrefix(raw[12:], []byte("DJVM")) || - bytes.HasPrefix(raw[12:], []byte("DJVU")) || - bytes.HasPrefix(raw[12:], []byte("DJVI")) || - bytes.HasPrefix(raw[12:], []byte("THUM")) -} - -// P7s matches an .p7s signature File (PEM, Base64). -func P7s(raw []byte, limit uint32) bool { - // Check for PEM Encoding. - if bytes.HasPrefix(raw, []byte("-----BEGIN PKCS7")) { - return true - } - // Check if DER Encoding is long enough. - if len(raw) < 20 { - return false - } - // Magic Bytes for the signedData ASN.1 encoding. - startHeader := [][]byte{{0x30, 0x80}, {0x30, 0x81}, {0x30, 0x82}, {0x30, 0x83}, {0x30, 0x84}} - signedDataMatch := []byte{0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07} - // Check if Header is correct. There are multiple valid headers. - for i, match := range startHeader { - // If first bytes match, then check for ASN.1 Object Type. - if bytes.HasPrefix(raw, match) { - if bytes.HasPrefix(raw[i+2:], signedDataMatch) { - return true - } - } - } - - return false -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/font.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/font.go deleted file mode 100644 index 43af28212e..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/font.go +++ /dev/null @@ -1,39 +0,0 @@ -package magic - -import ( - "bytes" -) - -var ( - // Woff matches a Web Open Font Format file. - Woff = prefix([]byte("wOFF")) - // Woff2 matches a Web Open Font Format version 2 file. - Woff2 = prefix([]byte("wOF2")) - // Otf matches an OpenType font file. - Otf = prefix([]byte{0x4F, 0x54, 0x54, 0x4F, 0x00}) -) - -// Ttf matches a TrueType font file. -func Ttf(raw []byte, limit uint32) bool { - if !bytes.HasPrefix(raw, []byte{0x00, 0x01, 0x00, 0x00}) { - return false - } - return !MsAccessAce(raw, limit) && !MsAccessMdb(raw, limit) -} - -// Eot matches an Embedded OpenType font file. -func Eot(raw []byte, limit uint32) bool { - return len(raw) > 35 && - bytes.Equal(raw[34:36], []byte{0x4C, 0x50}) && - (bytes.Equal(raw[8:11], []byte{0x02, 0x00, 0x01}) || - bytes.Equal(raw[8:11], []byte{0x01, 0x00, 0x00}) || - bytes.Equal(raw[8:11], []byte{0x02, 0x00, 0x02})) -} - -// Ttc matches a TrueType Collection font file. -func Ttc(raw []byte, limit uint32) bool { - return len(raw) > 7 && - bytes.HasPrefix(raw, []byte("ttcf")) && - (bytes.Equal(raw[4:8], []byte{0x00, 0x01, 0x00, 0x00}) || - bytes.Equal(raw[4:8], []byte{0x00, 0x02, 0x00, 0x00})) -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ftyp.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ftyp.go deleted file mode 100644 index ac727139ef..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ftyp.go +++ /dev/null @@ -1,109 +0,0 @@ -package magic - -import ( - "bytes" -) - -var ( - // AVIF matches an AV1 Image File Format still or animated. - // Wikipedia page seems outdated listing image/avif-sequence for animations. - // https://github.com/AOMediaCodec/av1-avif/issues/59 - AVIF = ftyp([]byte("avif"), []byte("avis")) - // ThreeGP matches a 3GPP file. - ThreeGP = ftyp( - []byte("3gp1"), []byte("3gp2"), []byte("3gp3"), []byte("3gp4"), - []byte("3gp5"), []byte("3gp6"), []byte("3gp7"), []byte("3gs7"), - []byte("3ge6"), []byte("3ge7"), []byte("3gg6"), - ) - // ThreeG2 matches a 3GPP2 file. - ThreeG2 = ftyp( - []byte("3g24"), []byte("3g25"), []byte("3g26"), []byte("3g2a"), - []byte("3g2b"), []byte("3g2c"), []byte("KDDI"), - ) - // AMp4 matches an audio MP4 file. - AMp4 = ftyp( - // audio for Adobe Flash Player 9+ - []byte("F4A "), []byte("F4B "), - // Apple iTunes AAC-LC (.M4A) Audio - []byte("M4B "), []byte("M4P "), - // MPEG-4 (.MP4) for SonyPSP - []byte("MSNV"), - // Nero Digital AAC Audio - []byte("NDAS"), - ) - // Mqv matches a Sony / Mobile QuickTime file. - Mqv = ftyp([]byte("mqt ")) - // M4a matches an audio M4A file. - M4a = ftyp([]byte("M4A ")) - // M4v matches an Appl4 M4V video file. - M4v = ftyp([]byte("M4V "), []byte("M4VH"), []byte("M4VP")) - // Heic matches a High Efficiency Image Coding (HEIC) file. - Heic = ftyp([]byte("heic"), []byte("heix")) - // HeicSequence matches a High Efficiency Image Coding (HEIC) file sequence. - HeicSequence = ftyp([]byte("hevc"), []byte("hevx")) - // Heif matches a High Efficiency Image File Format (HEIF) file. - Heif = ftyp([]byte("mif1"), []byte("heim"), []byte("heis"), []byte("avic")) - // HeifSequence matches a High Efficiency Image File Format (HEIF) file sequence. - HeifSequence = ftyp([]byte("msf1"), []byte("hevm"), []byte("hevs"), []byte("avcs")) - // Mj2 matches a Motion JPEG 2000 file: https://en.wikipedia.org/wiki/Motion_JPEG_2000. - Mj2 = ftyp([]byte("mj2s"), []byte("mjp2"), []byte("MFSM"), []byte("MGSV")) - // Dvb matches a Digital Video Broadcasting file: https://dvb.org. - // https://cconcolato.github.io/mp4ra/filetype.html - // https://github.com/file/file/blob/512840337ead1076519332d24fefcaa8fac36e06/magic/Magdir/animation#L135-L154 - Dvb = ftyp( - []byte("dby1"), []byte("dsms"), []byte("dts1"), []byte("dts2"), - []byte("dts3"), []byte("dxo "), []byte("dmb1"), []byte("dmpf"), - []byte("drc1"), []byte("dv1a"), []byte("dv1b"), []byte("dv2a"), - []byte("dv2b"), []byte("dv3a"), []byte("dv3b"), []byte("dvr1"), - []byte("dvt1"), []byte("emsg")) - // TODO: add support for remaining video formats at ftyps.com. -) - -// QuickTime matches a QuickTime File Format file. -// https://www.loc.gov/preservation/digital/formats/fdd/fdd000052.shtml -// https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap1/qtff1.html#//apple_ref/doc/uid/TP40000939-CH203-38190 -// https://github.com/apache/tika/blob/0f5570691133c75ac4472c3340354a6c4080b104/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml#L7758-L7777 -func QuickTime(raw []byte, _ uint32) bool { - if len(raw) < 12 { - return false - } - // First 4 bytes represent the size of the atom as unsigned int. - // Next 4 bytes are the type of the atom. - // For `ftyp` atoms check if first byte in size is 0, otherwise, a text file - // which happens to contain 'ftypqt ' at index 4 will trigger a false positive. - if bytes.Equal(raw[4:12], []byte("ftypqt ")) || - bytes.Equal(raw[4:12], []byte("ftypmoov")) { - return raw[0] == 0x00 - } - basicAtomTypes := [][]byte{ - []byte("moov\x00"), - []byte("mdat\x00"), - []byte("free\x00"), - []byte("skip\x00"), - []byte("pnot\x00"), - } - for _, a := range basicAtomTypes { - if bytes.Equal(raw[4:9], a) { - return true - } - } - return bytes.Equal(raw[:8], []byte("\x00\x00\x00\x08wide")) -} - -// Mp4 detects an .mp4 file. Mp4 detections only does a basic ftyp check. -// Mp4 has many registered and unregistered code points so it's hard to keep track -// of all. Detection will default on video/mp4 for all ftyp files. -// ISO_IEC_14496-12 is the specification for the iso container. -func Mp4(raw []byte, _ uint32) bool { - if len(raw) < 12 { - return false - } - // ftyps are made out of boxes. The first 4 bytes of the box represent - // its size in big-endian uint32. First box is the ftyp box and it is small - // in size. Check most significant byte is 0 to filter out false positive - // text files that happen to contain the string "ftyp" at index 4. - if raw[0] != 0 { - return false - } - return bytes.Equal(raw[4:8], []byte("ftyp")) -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/geo.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/geo.go deleted file mode 100644 index f077e16724..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/geo.go +++ /dev/null @@ -1,55 +0,0 @@ -package magic - -import ( - "bytes" - "encoding/binary" -) - -// Shp matches a shape format file. -// https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf -func Shp(raw []byte, limit uint32) bool { - if len(raw) < 112 { - return false - } - - if !(binary.BigEndian.Uint32(raw[0:4]) == 9994 && - binary.BigEndian.Uint32(raw[4:8]) == 0 && - binary.BigEndian.Uint32(raw[8:12]) == 0 && - binary.BigEndian.Uint32(raw[12:16]) == 0 && - binary.BigEndian.Uint32(raw[16:20]) == 0 && - binary.BigEndian.Uint32(raw[20:24]) == 0 && - binary.LittleEndian.Uint32(raw[28:32]) == 1000) { - return false - } - - shapeTypes := []int{ - 0, // Null shape - 1, // Point - 3, // Polyline - 5, // Polygon - 8, // MultiPoint - 11, // PointZ - 13, // PolylineZ - 15, // PolygonZ - 18, // MultiPointZ - 21, // PointM - 23, // PolylineM - 25, // PolygonM - 28, // MultiPointM - 31, // MultiPatch - } - - for _, st := range shapeTypes { - if st == int(binary.LittleEndian.Uint32(raw[108:112])) { - return true - } - } - - return false -} - -// Shx matches a shape index format file. -// https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf -func Shx(raw []byte, limit uint32) bool { - return bytes.HasPrefix(raw, []byte{0x00, 0x00, 0x27, 0x0A}) -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/image.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/image.go deleted file mode 100644 index 0eb7e95f37..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/image.go +++ /dev/null @@ -1,110 +0,0 @@ -package magic - -import "bytes" - -var ( - // Png matches a Portable Network Graphics file. - // https://www.w3.org/TR/PNG/ - Png = prefix([]byte{0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A}) - // Apng matches an Animated Portable Network Graphics file. - // https://wiki.mozilla.org/APNG_Specification - Apng = offset([]byte("acTL"), 37) - // Jpg matches a Joint Photographic Experts Group file. - Jpg = prefix([]byte{0xFF, 0xD8, 0xFF}) - // Jp2 matches a JPEG 2000 Image file (ISO 15444-1). - Jp2 = jpeg2k([]byte{0x6a, 0x70, 0x32, 0x20}) - // Jpx matches a JPEG 2000 Image file (ISO 15444-2). - Jpx = jpeg2k([]byte{0x6a, 0x70, 0x78, 0x20}) - // Jpm matches a JPEG 2000 Image file (ISO 15444-6). - Jpm = jpeg2k([]byte{0x6a, 0x70, 0x6D, 0x20}) - // Gif matches a Graphics Interchange Format file. - Gif = prefix([]byte("GIF87a"), []byte("GIF89a")) - // Bmp matches a bitmap image file. - Bmp = prefix([]byte{0x42, 0x4D}) - // Ps matches a PostScript file. - Ps = prefix([]byte("%!PS-Adobe-")) - // Psd matches a Photoshop Document file. - Psd = prefix([]byte("8BPS")) - // Ico matches an ICO file. - Ico = prefix([]byte{0x00, 0x00, 0x01, 0x00}, []byte{0x00, 0x00, 0x02, 0x00}) - // Icns matches an ICNS (Apple Icon Image format) file. - Icns = prefix([]byte("icns")) - // Tiff matches a Tagged Image File Format file. - Tiff = prefix([]byte{0x49, 0x49, 0x2A, 0x00}, []byte{0x4D, 0x4D, 0x00, 0x2A}) - // Bpg matches a Better Portable Graphics file. - Bpg = prefix([]byte{0x42, 0x50, 0x47, 0xFB}) - // Xcf matches GIMP image data. - Xcf = prefix([]byte("gimp xcf")) - // Pat matches GIMP pattern data. - Pat = offset([]byte("GPAT"), 20) - // Gbr matches GIMP brush data. - Gbr = offset([]byte("GIMP"), 20) - // Hdr matches Radiance HDR image. - // https://web.archive.org/web/20060913152809/http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/ - Hdr = prefix([]byte("#?RADIANCE\n")) - // Xpm matches X PixMap image data. - Xpm = prefix([]byte{0x2F, 0x2A, 0x20, 0x58, 0x50, 0x4D, 0x20, 0x2A, 0x2F}) - // Jxs matches a JPEG XS coded image file (ISO/IEC 21122-3). - Jxs = prefix([]byte{0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x53, 0x20, 0x0D, 0x0A, 0x87, 0x0A}) - // Jxr matches Microsoft HD JXR photo file. - Jxr = prefix([]byte{0x49, 0x49, 0xBC, 0x01}) -) - -func jpeg2k(sig []byte) Detector { - return func(raw []byte, _ uint32) bool { - if len(raw) < 24 { - return false - } - - if !bytes.Equal(raw[4:8], []byte{0x6A, 0x50, 0x20, 0x20}) && - !bytes.Equal(raw[4:8], []byte{0x6A, 0x50, 0x32, 0x20}) { - return false - } - return bytes.Equal(raw[20:24], sig) - } -} - -// Webp matches a WebP file. -func Webp(raw []byte, _ uint32) bool { - return len(raw) > 12 && - bytes.Equal(raw[0:4], []byte("RIFF")) && - bytes.Equal(raw[8:12], []byte{0x57, 0x45, 0x42, 0x50}) -} - -// Dwg matches a CAD drawing file. -func Dwg(raw []byte, _ uint32) bool { - if len(raw) < 6 || raw[0] != 0x41 || raw[1] != 0x43 { - return false - } - dwgVersions := [][]byte{ - {0x31, 0x2E, 0x34, 0x30}, - {0x31, 0x2E, 0x35, 0x30}, - {0x32, 0x2E, 0x31, 0x30}, - {0x31, 0x30, 0x30, 0x32}, - {0x31, 0x30, 0x30, 0x33}, - {0x31, 0x30, 0x30, 0x34}, - {0x31, 0x30, 0x30, 0x36}, - {0x31, 0x30, 0x30, 0x39}, - {0x31, 0x30, 0x31, 0x32}, - {0x31, 0x30, 0x31, 0x34}, - {0x31, 0x30, 0x31, 0x35}, - {0x31, 0x30, 0x31, 0x38}, - {0x31, 0x30, 0x32, 0x31}, - {0x31, 0x30, 0x32, 0x34}, - {0x31, 0x30, 0x33, 0x32}, - } - - for _, d := range dwgVersions { - if bytes.Equal(raw[2:6], d) { - return true - } - } - - return false -} - -// Jxl matches JPEG XL image file. -func Jxl(raw []byte, _ uint32) bool { - return bytes.HasPrefix(raw, []byte{0xFF, 0x0A}) || - bytes.HasPrefix(raw, []byte("\x00\x00\x00\x0cJXL\x20\x0d\x0a\x87\x0a")) -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go deleted file mode 100644 index a34c609842..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/magic.go +++ /dev/null @@ -1,251 +0,0 @@ -// Package magic holds the matching functions used to find MIME types. -package magic - -import ( - "bytes" - "fmt" -) - -type ( - // Detector receiveѕ the raw data of a file and returns whether the data - // meets any conditions. The limit parameter is an upper limit to the number - // of bytes received and is used to tell if the byte slice represents the - // whole file or is just the header of a file: len(raw) < limit or len(raw)>limit. - Detector func(raw []byte, limit uint32) bool - xmlSig struct { - // the local name of the root tag - localName []byte - // the namespace of the XML document - xmlns []byte - } -) - -// prefix creates a Detector which returns true if any of the provided signatures -// is the prefix of the raw input. -func prefix(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - for _, s := range sigs { - if bytes.HasPrefix(raw, s) { - return true - } - } - return false - } -} - -// offset creates a Detector which returns true if the provided signature can be -// found at offset in the raw input. -func offset(sig []byte, offset int) Detector { - return func(raw []byte, limit uint32) bool { - return len(raw) > offset && bytes.HasPrefix(raw[offset:], sig) - } -} - -// ciPrefix is like prefix but the check is case insensitive. -func ciPrefix(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - for _, s := range sigs { - if ciCheck(s, raw) { - return true - } - } - return false - } -} -func ciCheck(sig, raw []byte) bool { - if len(raw) < len(sig)+1 { - return false - } - // perform case insensitive check - for i, b := range sig { - db := raw[i] - if 'A' <= b && b <= 'Z' { - db &= 0xDF - } - if b != db { - return false - } - } - - return true -} - -// xml creates a Detector which returns true if any of the provided XML signatures -// matches the raw input. -func xml(sigs ...xmlSig) Detector { - return func(raw []byte, limit uint32) bool { - raw = trimLWS(raw) - if len(raw) == 0 { - return false - } - for _, s := range sigs { - if xmlCheck(s, raw) { - return true - } - } - return false - } -} -func xmlCheck(sig xmlSig, raw []byte) bool { - raw = raw[:min(len(raw), 512)] - - if len(sig.localName) == 0 { - return bytes.Index(raw, sig.xmlns) > 0 - } - if len(sig.xmlns) == 0 { - return bytes.Index(raw, sig.localName) > 0 - } - - localNameIndex := bytes.Index(raw, sig.localName) - return localNameIndex != -1 && localNameIndex < bytes.Index(raw, sig.xmlns) -} - -// markup creates a Detector which returns true is any of the HTML signatures -// matches the raw input. -func markup(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - if bytes.HasPrefix(raw, []byte{0xEF, 0xBB, 0xBF}) { - // We skip the UTF-8 BOM if present to ensure we correctly - // process any leading whitespace. The presence of the BOM - // is taken into account during charset detection in charset.go. - raw = trimLWS(raw[3:]) - } else { - raw = trimLWS(raw) - } - if len(raw) == 0 { - return false - } - for _, s := range sigs { - if markupCheck(s, raw) { - return true - } - } - return false - } -} -func markupCheck(sig, raw []byte) bool { - if len(raw) < len(sig)+1 { - return false - } - - // perform case insensitive check - for i, b := range sig { - db := raw[i] - if 'A' <= b && b <= 'Z' { - db &= 0xDF - } - if b != db { - return false - } - } - // Next byte must be space or right angle bracket. - if db := raw[len(sig)]; db != ' ' && db != '>' { - return false - } - - return true -} - -// ftyp creates a Detector which returns true if any of the FTYP signatures -// matches the raw input. -func ftyp(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - if len(raw) < 12 { - return false - } - for _, s := range sigs { - if bytes.Equal(raw[8:12], s) { - return true - } - } - return false - } -} - -func newXMLSig(localName, xmlns string) xmlSig { - ret := xmlSig{xmlns: []byte(xmlns)} - if localName != "" { - ret.localName = []byte(fmt.Sprintf("<%s", localName)) - } - - return ret -} - -// A valid shebang starts with the "#!" characters, -// followed by any number of spaces, -// followed by the path to the interpreter, -// and, optionally, followed by the arguments for the interpreter. -// -// Ex: -// -// #! /usr/bin/env php -// -// /usr/bin/env is the interpreter, php is the first and only argument. -func shebang(sigs ...[]byte) Detector { - return func(raw []byte, limit uint32) bool { - for _, s := range sigs { - if shebangCheck(s, firstLine(raw)) { - return true - } - } - return false - } -} - -func shebangCheck(sig, raw []byte) bool { - if len(raw) < len(sig)+2 { - return false - } - if raw[0] != '#' || raw[1] != '!' { - return false - } - - return bytes.Equal(trimLWS(trimRWS(raw[2:])), sig) -} - -// trimLWS trims whitespace from beginning of the input. -func trimLWS(in []byte) []byte { - firstNonWS := 0 - for ; firstNonWS < len(in) && isWS(in[firstNonWS]); firstNonWS++ { - } - - return in[firstNonWS:] -} - -// trimRWS trims whitespace from the end of the input. -func trimRWS(in []byte) []byte { - lastNonWS := len(in) - 1 - for ; lastNonWS > 0 && isWS(in[lastNonWS]); lastNonWS-- { - } - - return in[:lastNonWS+1] -} - -func firstLine(in []byte) []byte { - lineEnd := 0 - for ; lineEnd < len(in) && in[lineEnd] != '\n'; lineEnd++ { - } - - return in[:lineEnd] -} - -func isWS(b byte) bool { - return b == '\t' || b == '\n' || b == '\x0c' || b == '\r' || b == ' ' -} - -func min(a, b int) int { - if a < b { - return a - } - return b -} - -type readBuf []byte - -func (b *readBuf) advance(n int) bool { - if n < 0 || len(*b) < n { - return false - } - *b = (*b)[n:] - return true -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ms_office.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ms_office.go deleted file mode 100644 index 7d60e22e26..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ms_office.go +++ /dev/null @@ -1,186 +0,0 @@ -package magic - -import ( - "bytes" - "encoding/binary" -) - -// Xlsx matches a Microsoft Excel 2007 file. -func Xlsx(raw []byte, limit uint32) bool { - return zipContains(raw, []byte("xl/"), true) -} - -// Docx matches a Microsoft Word 2007 file. -func Docx(raw []byte, limit uint32) bool { - return zipContains(raw, []byte("word/"), true) -} - -// Pptx matches a Microsoft PowerPoint 2007 file. -func Pptx(raw []byte, limit uint32) bool { - return zipContains(raw, []byte("ppt/"), true) -} - -// Ole matches an Open Linking and Embedding file. -// -// https://en.wikipedia.org/wiki/Object_Linking_and_Embedding -func Ole(raw []byte, limit uint32) bool { - return bytes.HasPrefix(raw, []byte{0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1}) -} - -// Aaf matches an Advanced Authoring Format file. -// See: https://pyaaf.readthedocs.io/en/latest/about.html -// See: https://en.wikipedia.org/wiki/Advanced_Authoring_Format -func Aaf(raw []byte, limit uint32) bool { - if len(raw) < 31 { - return false - } - return bytes.HasPrefix(raw[8:], []byte{0x41, 0x41, 0x46, 0x42, 0x0D, 0x00, 0x4F, 0x4D}) && - (raw[30] == 0x09 || raw[30] == 0x0C) -} - -// Doc matches a Microsoft Word 97-2003 file. -// See: https://github.com/decalage2/oletools/blob/412ee36ae45e70f42123e835871bac956d958461/oletools/common/clsid.py -func Doc(raw []byte, _ uint32) bool { - clsids := [][]byte{ - // Microsoft Word 97-2003 Document (Word.Document.8) - {0x06, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}, - // Microsoft Word 6.0-7.0 Document (Word.Document.6) - {0x00, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}, - // Microsoft Word Picture (Word.Picture.8) - {0x07, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}, - } - - for _, clsid := range clsids { - if matchOleClsid(raw, clsid) { - return true - } - } - - return false -} - -// Ppt matches a Microsoft PowerPoint 97-2003 file or a PowerPoint 95 presentation. -func Ppt(raw []byte, limit uint32) bool { - // Root CLSID test is the safest way to detect identify OLE, however, the format - // often places the root CLSID at the end of the file. - if matchOleClsid(raw, []byte{ - 0x10, 0x8d, 0x81, 0x64, 0x9b, 0x4f, 0xcf, 0x11, - 0x86, 0xea, 0x00, 0xaa, 0x00, 0xb9, 0x29, 0xe8, - }) || matchOleClsid(raw, []byte{ - 0x70, 0xae, 0x7b, 0xea, 0x3b, 0xfb, 0xcd, 0x11, - 0xa9, 0x03, 0x00, 0xaa, 0x00, 0x51, 0x0e, 0xa3, - }) { - return true - } - - lin := len(raw) - if lin < 520 { - return false - } - pptSubHeaders := [][]byte{ - {0xA0, 0x46, 0x1D, 0xF0}, - {0x00, 0x6E, 0x1E, 0xF0}, - {0x0F, 0x00, 0xE8, 0x03}, - } - for _, h := range pptSubHeaders { - if bytes.HasPrefix(raw[512:], h) { - return true - } - } - - if bytes.HasPrefix(raw[512:], []byte{0xFD, 0xFF, 0xFF, 0xFF}) && - raw[518] == 0x00 && raw[519] == 0x00 { - return true - } - - return lin > 1152 && bytes.Contains(raw[1152:min(4096, lin)], - []byte("P\x00o\x00w\x00e\x00r\x00P\x00o\x00i\x00n\x00t\x00 D\x00o\x00c\x00u\x00m\x00e\x00n\x00t")) -} - -// Xls matches a Microsoft Excel 97-2003 file. -func Xls(raw []byte, limit uint32) bool { - // Root CLSID test is the safest way to detect identify OLE, however, the format - // often places the root CLSID at the end of the file. - if matchOleClsid(raw, []byte{ - 0x10, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - }) || matchOleClsid(raw, []byte{ - 0x20, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - }) { - return true - } - - lin := len(raw) - if lin < 520 { - return false - } - xlsSubHeaders := [][]byte{ - {0x09, 0x08, 0x10, 0x00, 0x00, 0x06, 0x05, 0x00}, - {0xFD, 0xFF, 0xFF, 0xFF, 0x10}, - {0xFD, 0xFF, 0xFF, 0xFF, 0x1F}, - {0xFD, 0xFF, 0xFF, 0xFF, 0x22}, - {0xFD, 0xFF, 0xFF, 0xFF, 0x23}, - {0xFD, 0xFF, 0xFF, 0xFF, 0x28}, - {0xFD, 0xFF, 0xFF, 0xFF, 0x29}, - } - for _, h := range xlsSubHeaders { - if bytes.HasPrefix(raw[512:], h) { - return true - } - } - - return lin > 1152 && bytes.Contains(raw[1152:min(4096, lin)], - []byte("W\x00k\x00s\x00S\x00S\x00W\x00o\x00r\x00k\x00B\x00o\x00o\x00k")) -} - -// Pub matches a Microsoft Publisher file. -func Pub(raw []byte, limit uint32) bool { - return matchOleClsid(raw, []byte{ - 0x01, 0x12, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, - }) -} - -// Msg matches a Microsoft Outlook email file. -func Msg(raw []byte, limit uint32) bool { - return matchOleClsid(raw, []byte{ - 0x0B, 0x0D, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, - }) -} - -// Msi matches a Microsoft Windows Installer file. -// http://fileformats.archiveteam.org/wiki/Microsoft_Compound_File -func Msi(raw []byte, limit uint32) bool { - return matchOleClsid(raw, []byte{ - 0x84, 0x10, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, - }) -} - -// Helper to match by a specific CLSID of a compound file. -// -// http://fileformats.archiveteam.org/wiki/Microsoft_Compound_File -func matchOleClsid(in []byte, clsid []byte) bool { - // Microsoft Compound files v3 have a sector length of 512, while v4 has 4096. - // Change sector offset depending on file version. - // https://www.loc.gov/preservation/digital/formats/fdd/fdd000392.shtml - sectorLength := 512 - if len(in) < sectorLength { - return false - } - if in[26] == 0x04 && in[27] == 0x00 { - sectorLength = 4096 - } - - // SecID of first sector of the directory stream. - firstSecID := int(binary.LittleEndian.Uint32(in[48:52])) - - // Expected offset of CLSID for root storage object. - clsidOffset := sectorLength*(1+firstSecID) + 80 - - if len(in) <= clsidOffset+16 { - return false - } - - return bytes.HasPrefix(in[clsidOffset:], clsid) -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ogg.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ogg.go deleted file mode 100644 index bb4cd781b6..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/ogg.go +++ /dev/null @@ -1,42 +0,0 @@ -package magic - -import ( - "bytes" -) - -/* - NOTE: - - In May 2003, two Internet RFCs were published relating to the format. - The Ogg bitstream was defined in RFC 3533 (which is classified as - 'informative') and its Internet content type (application/ogg) in RFC - 3534 (which is, as of 2006, a proposed standard protocol). In - September 2008, RFC 3534 was obsoleted by RFC 5334, which added - content types video/ogg, audio/ogg and filename extensions .ogx, .ogv, - .oga, .spx. - - See: - https://tools.ietf.org/html/rfc3533 - https://developer.mozilla.org/en-US/docs/Web/HTTP/Configuring_servers_for_Ogg_media#Serve_media_with_the_correct_MIME_type - https://github.com/file/file/blob/master/magic/Magdir/vorbis -*/ - -// Ogg matches an Ogg file. -func Ogg(raw []byte, limit uint32) bool { - return bytes.HasPrefix(raw, []byte("\x4F\x67\x67\x53\x00")) -} - -// OggAudio matches an audio ogg file. -func OggAudio(raw []byte, limit uint32) bool { - return len(raw) >= 37 && (bytes.HasPrefix(raw[28:], []byte("\x7fFLAC")) || - bytes.HasPrefix(raw[28:], []byte("\x01vorbis")) || - bytes.HasPrefix(raw[28:], []byte("OpusHead")) || - bytes.HasPrefix(raw[28:], []byte("Speex\x20\x20\x20"))) -} - -// OggVideo matches a video ogg file. -func OggVideo(raw []byte, limit uint32) bool { - return len(raw) >= 37 && (bytes.HasPrefix(raw[28:], []byte("\x80theora")) || - bytes.HasPrefix(raw[28:], []byte("fishead\x00")) || - bytes.HasPrefix(raw[28:], []byte("\x01video\x00\x00\x00"))) // OGM video -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text.go deleted file mode 100644 index cf6446397f..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text.go +++ /dev/null @@ -1,381 +0,0 @@ -package magic - -import ( - "bytes" - "strings" - "time" - - "github.com/gabriel-vasile/mimetype/internal/charset" - "github.com/gabriel-vasile/mimetype/internal/json" -) - -var ( - // HTML matches a Hypertext Markup Language file. - HTML = markup( - []byte(" 0 -} - -// GeoJSON matches a RFC 7946 GeoJSON file. -// -// GeoJSON detection implies searching for key:value pairs like: `"type": "Feature"` -// in the input. -// BUG(gabriel-vasile): The "type" key should be searched for in the root object. -func GeoJSON(raw []byte, limit uint32) bool { - raw = trimLWS(raw) - if len(raw) == 0 { - return false - } - // GeoJSON is always a JSON object, not a JSON array or any other JSON value. - if raw[0] != '{' { - return false - } - - s := []byte(`"type"`) - si, sl := bytes.Index(raw, s), len(s) - - if si == -1 { - return false - } - - // If the "type" string is the suffix of the input, - // there is no need to search for the value of the key. - if si+sl == len(raw) { - return false - } - // Skip the "type" part. - raw = raw[si+sl:] - // Skip any whitespace before the colon. - raw = trimLWS(raw) - // Check for colon. - if len(raw) == 0 || raw[0] != ':' { - return false - } - // Skip any whitespace after the colon. - raw = trimLWS(raw[1:]) - - geoJSONTypes := [][]byte{ - []byte(`"Feature"`), - []byte(`"FeatureCollection"`), - []byte(`"Point"`), - []byte(`"LineString"`), - []byte(`"Polygon"`), - []byte(`"MultiPoint"`), - []byte(`"MultiLineString"`), - []byte(`"MultiPolygon"`), - []byte(`"GeometryCollection"`), - } - for _, t := range geoJSONTypes { - if bytes.HasPrefix(raw, t) { - return true - } - } - - return false -} - -// NdJSON matches a Newline delimited JSON file. All complete lines from raw -// must be valid JSON documents meaning they contain one of the valid JSON data -// types. -func NdJSON(raw []byte, limit uint32) bool { - lCount, hasObjOrArr := 0, false - raw = dropLastLine(raw, limit) - var l []byte - for len(raw) != 0 { - l, raw = scanLine(raw) - // Empty lines are allowed in NDJSON. - if l = trimRWS(trimLWS(l)); len(l) == 0 { - continue - } - _, err := json.Scan(l) - if err != nil { - return false - } - if l[0] == '[' || l[0] == '{' { - hasObjOrArr = true - } - lCount++ - } - - return lCount > 1 && hasObjOrArr -} - -// HAR matches a HAR Spec file. -// Spec: http://www.softwareishard.com/blog/har-12-spec/ -func HAR(raw []byte, limit uint32) bool { - s := []byte(`"log"`) - si, sl := bytes.Index(raw, s), len(s) - - if si == -1 { - return false - } - - // If the "log" string is the suffix of the input, - // there is no need to search for the value of the key. - if si+sl == len(raw) { - return false - } - // Skip the "log" part. - raw = raw[si+sl:] - // Skip any whitespace before the colon. - raw = trimLWS(raw) - // Check for colon. - if len(raw) == 0 || raw[0] != ':' { - return false - } - // Skip any whitespace after the colon. - raw = trimLWS(raw[1:]) - - harJSONTypes := [][]byte{ - []byte(`"version"`), - []byte(`"creator"`), - []byte(`"entries"`), - } - for _, t := range harJSONTypes { - si := bytes.Index(raw, t) - if si > -1 { - return true - } - } - - return false -} - -// Svg matches a SVG file. -func Svg(raw []byte, limit uint32) bool { - return bytes.Contains(raw, []byte(" 00:02:19,376) limits secondLine - // length to exactly 29 characters. - if len(secondLine) != 29 { - return false - } - // Decimal separator of fractional seconds in the timestamps must be a - // comma, not a period. - if strings.Contains(secondLine, ".") { - return false - } - // Second line must be a time range. - ts := strings.Split(secondLine, " --> ") - if len(ts) != 2 { - return false - } - const layout = "15:04:05,000" - t0, err := time.Parse(layout, ts[0]) - if err != nil { - return false - } - t1, err := time.Parse(layout, ts[1]) - if err != nil { - return false - } - if t0.After(t1) { - return false - } - - line, _ = scanLine(raw) - // A third line must exist and not be empty. This is the actual subtitle text. - return len(line) != 0 -} - -// Vtt matches a Web Video Text Tracks (WebVTT) file. See -// https://www.iana.org/assignments/media-types/text/vtt. -func Vtt(raw []byte, limit uint32) bool { - // Prefix match. - prefixes := [][]byte{ - {0xEF, 0xBB, 0xBF, 0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x0A}, // UTF-8 BOM, "WEBVTT" and a line feed - {0xEF, 0xBB, 0xBF, 0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x0D}, // UTF-8 BOM, "WEBVTT" and a carriage return - {0xEF, 0xBB, 0xBF, 0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x20}, // UTF-8 BOM, "WEBVTT" and a space - {0xEF, 0xBB, 0xBF, 0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x09}, // UTF-8 BOM, "WEBVTT" and a horizontal tab - {0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x0A}, // "WEBVTT" and a line feed - {0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x0D}, // "WEBVTT" and a carriage return - {0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x20}, // "WEBVTT" and a space - {0x57, 0x45, 0x42, 0x56, 0x54, 0x54, 0x09}, // "WEBVTT" and a horizontal tab - } - for _, p := range prefixes { - if bytes.HasPrefix(raw, p) { - return true - } - } - - // Exact match. - return bytes.Equal(raw, []byte{0xEF, 0xBB, 0xBF, 0x57, 0x45, 0x42, 0x56, 0x54, 0x54}) || // UTF-8 BOM and "WEBVTT" - bytes.Equal(raw, []byte{0x57, 0x45, 0x42, 0x56, 0x54, 0x54}) // "WEBVTT" -} - -// dropCR drops a terminal \r from the data. -func dropCR(data []byte) []byte { - if len(data) > 0 && data[len(data)-1] == '\r' { - return data[0 : len(data)-1] - } - return data -} -func scanLine(b []byte) (line, remainder []byte) { - line, remainder, _ = bytes.Cut(b, []byte("\n")) - return dropCR(line), remainder -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go deleted file mode 100644 index 6083ba8c00..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/text_csv.go +++ /dev/null @@ -1,77 +0,0 @@ -package magic - -import ( - "bufio" - "bytes" - "encoding/csv" - "errors" - "io" - "sync" -) - -// A bufio.Reader pool to alleviate problems with memory allocations. -var readerPool = sync.Pool{ - New: func() any { - // Initiate with empty source reader. - return bufio.NewReader(nil) - }, -} - -func newReader(r io.Reader) *bufio.Reader { - br := readerPool.Get().(*bufio.Reader) - br.Reset(r) - return br -} - -// Csv matches a comma-separated values file. -func Csv(raw []byte, limit uint32) bool { - return sv(raw, ',', limit) -} - -// Tsv matches a tab-separated values file. -func Tsv(raw []byte, limit uint32) bool { - return sv(raw, '\t', limit) -} - -func sv(in []byte, comma rune, limit uint32) bool { - in = dropLastLine(in, limit) - - br := newReader(bytes.NewReader(in)) - defer readerPool.Put(br) - r := csv.NewReader(br) - r.Comma = comma - r.ReuseRecord = true - r.LazyQuotes = true - r.Comment = '#' - - lines := 0 - for { - _, err := r.Read() - if errors.Is(err, io.EOF) { - break - } - if err != nil { - return false - } - lines++ - } - - return r.FieldsPerRecord > 1 && lines > 1 -} - -// dropLastLine drops the last incomplete line from b. -// -// mimetype limits itself to ReadLimit bytes when performing a detection. -// This means, for file formats like CSV for NDJSON, the last line of the input -// can be an incomplete line. -func dropLastLine(b []byte, readLimit uint32) []byte { - if readLimit == 0 || uint32(len(b)) < readLimit { - return b - } - for i := len(b) - 1; i > 0; i-- { - if b[i] == '\n' { - return b[:i] - } - } - return b -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/video.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/video.go deleted file mode 100644 index 9caf55538a..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/video.go +++ /dev/null @@ -1,85 +0,0 @@ -package magic - -import ( - "bytes" -) - -var ( - // Flv matches a Flash video file. - Flv = prefix([]byte("\x46\x4C\x56\x01")) - // Asf matches an Advanced Systems Format file. - Asf = prefix([]byte{ - 0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, - 0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C, - }) - // Rmvb matches a RealMedia Variable Bitrate file. - Rmvb = prefix([]byte{0x2E, 0x52, 0x4D, 0x46}) -) - -// WebM matches a WebM file. -func WebM(raw []byte, limit uint32) bool { - return isMatroskaFileTypeMatched(raw, "webm") -} - -// Mkv matches a mkv file. -func Mkv(raw []byte, limit uint32) bool { - return isMatroskaFileTypeMatched(raw, "matroska") -} - -// isMatroskaFileTypeMatched is used for webm and mkv file matching. -// It checks for .Eߣ sequence. If the sequence is found, -// then it means it is Matroska media container, including WebM. -// Then it verifies which of the file type it is representing by matching the -// file specific string. -func isMatroskaFileTypeMatched(in []byte, flType string) bool { - if bytes.HasPrefix(in, []byte("\x1A\x45\xDF\xA3")) { - return isFileTypeNamePresent(in, flType) - } - return false -} - -// isFileTypeNamePresent accepts the matroska input data stream and searches -// for the given file type in the stream. Return whether a match is found. -// The logic of search is: find first instance of \x42\x82 and then -// search for given string after n bytes of above instance. -func isFileTypeNamePresent(in []byte, flType string) bool { - ind, maxInd, lenIn := 0, 4096, len(in) - if lenIn < maxInd { // restricting length to 4096 - maxInd = lenIn - } - ind = bytes.Index(in[:maxInd], []byte("\x42\x82")) - if ind > 0 && lenIn > ind+2 { - ind += 2 - - // filetype name will be present exactly - // n bytes after the match of the two bytes "\x42\x82" - n := vintWidth(int(in[ind])) - if lenIn > ind+n { - return bytes.HasPrefix(in[ind+n:], []byte(flType)) - } - } - return false -} - -// vintWidth parses the variable-integer width in matroska containers -func vintWidth(v int) int { - mask, max, num := 128, 8, 1 - for num < max && v&mask == 0 { - mask = mask >> 1 - num++ - } - return num -} - -// Mpeg matches a Moving Picture Experts Group file. -func Mpeg(raw []byte, limit uint32) bool { - return len(raw) > 3 && bytes.HasPrefix(raw, []byte{0x00, 0x00, 0x01}) && - raw[3] >= 0xB0 && raw[3] <= 0xBF -} - -// Avi matches an Audio Video Interleaved file. -func Avi(raw []byte, limit uint32) bool { - return len(raw) > 16 && - bytes.Equal(raw[:4], []byte("RIFF")) && - bytes.Equal(raw[8:16], []byte("AVI LIST")) -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/zip.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/zip.go deleted file mode 100644 index f6c64829d9..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/internal/magic/zip.go +++ /dev/null @@ -1,131 +0,0 @@ -package magic - -import ( - "bytes" - "encoding/binary" -) - -var ( - // Odt matches an OpenDocument Text file. - Odt = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.text"), 30) - // Ott matches an OpenDocument Text Template file. - Ott = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.text-template"), 30) - // Ods matches an OpenDocument Spreadsheet file. - Ods = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.spreadsheet"), 30) - // Ots matches an OpenDocument Spreadsheet Template file. - Ots = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.spreadsheet-template"), 30) - // Odp matches an OpenDocument Presentation file. - Odp = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.presentation"), 30) - // Otp matches an OpenDocument Presentation Template file. - Otp = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.presentation-template"), 30) - // Odg matches an OpenDocument Drawing file. - Odg = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.graphics"), 30) - // Otg matches an OpenDocument Drawing Template file. - Otg = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.graphics-template"), 30) - // Odf matches an OpenDocument Formula file. - Odf = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.formula"), 30) - // Odc matches an OpenDocument Chart file. - Odc = offset([]byte("mimetypeapplication/vnd.oasis.opendocument.chart"), 30) - // Epub matches an EPUB file. - Epub = offset([]byte("mimetypeapplication/epub+zip"), 30) - // Sxc matches an OpenOffice Spreadsheet file. - Sxc = offset([]byte("mimetypeapplication/vnd.sun.xml.calc"), 30) -) - -// Zip matches a zip archive. -func Zip(raw []byte, limit uint32) bool { - return len(raw) > 3 && - raw[0] == 0x50 && raw[1] == 0x4B && - (raw[2] == 0x3 || raw[2] == 0x5 || raw[2] == 0x7) && - (raw[3] == 0x4 || raw[3] == 0x6 || raw[3] == 0x8) -} - -// Jar matches a Java archive file. -func Jar(raw []byte, limit uint32) bool { - return zipContains(raw, []byte("META-INF/MANIFEST.MF"), false) -} - -func zipContains(raw, sig []byte, msoCheck bool) bool { - b := readBuf(raw) - pk := []byte("PK\003\004") - if len(b) < 0x1E { - return false - } - - if !b.advance(0x1E) { - return false - } - if bytes.HasPrefix(b, sig) { - return true - } - - if msoCheck { - skipFiles := [][]byte{ - []byte("[Content_Types].xml"), - []byte("_rels/.rels"), - []byte("docProps"), - []byte("customXml"), - []byte("[trash]"), - } - - hasSkipFile := false - for _, sf := range skipFiles { - if bytes.HasPrefix(b, sf) { - hasSkipFile = true - break - } - } - if !hasSkipFile { - return false - } - } - - searchOffset := binary.LittleEndian.Uint32(raw[18:]) + 49 - if !b.advance(int(searchOffset)) { - return false - } - - nextHeader := bytes.Index(raw[searchOffset:], pk) - if !b.advance(nextHeader) { - return false - } - if bytes.HasPrefix(b, sig) { - return true - } - - for i := 0; i < 4; i++ { - if !b.advance(0x1A) { - return false - } - nextHeader = bytes.Index(b, pk) - if nextHeader == -1 { - return false - } - if !b.advance(nextHeader + 0x1E) { - return false - } - if bytes.HasPrefix(b, sig) { - return true - } - } - return false -} - -// APK matches an Android Package Archive. -// The source of signatures is https://github.com/file/file/blob/1778642b8ba3d947a779a36fcd81f8e807220a19/magic/Magdir/archive#L1820-L1887 -func APK(raw []byte, _ uint32) bool { - apkSignatures := [][]byte{ - []byte("AndroidManifest.xml"), - []byte("META-INF/com/android/build/gradle/app-metadata.properties"), - []byte("classes.dex"), - []byte("resources.arsc"), - []byte("res/drawable"), - } - for _, sig := range apkSignatures { - if zipContains(raw, sig, false) { - return true - } - } - - return false -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/mime.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/mime.go deleted file mode 100644 index 62cb15f593..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/mime.go +++ /dev/null @@ -1,186 +0,0 @@ -package mimetype - -import ( - "mime" - - "github.com/gabriel-vasile/mimetype/internal/charset" - "github.com/gabriel-vasile/mimetype/internal/magic" -) - -// MIME struct holds information about a file format: the string representation -// of the MIME type, the extension and the parent file format. -type MIME struct { - mime string - aliases []string - extension string - // detector receives the raw input and a limit for the number of bytes it is - // allowed to check. It returns whether the input matches a signature or not. - detector magic.Detector - children []*MIME - parent *MIME -} - -// String returns the string representation of the MIME type, e.g., "application/zip". -func (m *MIME) String() string { - return m.mime -} - -// Extension returns the file extension associated with the MIME type. -// It includes the leading dot, as in ".html". When the file format does not -// have an extension, the empty string is returned. -func (m *MIME) Extension() string { - return m.extension -} - -// Parent returns the parent MIME type from the hierarchy. -// Each MIME type has a non-nil parent, except for the root MIME type. -// -// For example, the application/json and text/html MIME types have text/plain as -// their parent because they are text files who happen to contain JSON or HTML. -// Another example is the ZIP format, which is used as container -// for Microsoft Office files, EPUB files, JAR files, and others. -func (m *MIME) Parent() *MIME { - return m.parent -} - -// Is checks whether this MIME type, or any of its aliases, is equal to the -// expected MIME type. MIME type equality test is done on the "type/subtype" -// section, ignores any optional MIME parameters, ignores any leading and -// trailing whitespace, and is case insensitive. -func (m *MIME) Is(expectedMIME string) bool { - // Parsing is needed because some detected MIME types contain parameters - // that need to be stripped for the comparison. - expectedMIME, _, _ = mime.ParseMediaType(expectedMIME) - found, _, _ := mime.ParseMediaType(m.mime) - - if expectedMIME == found { - return true - } - - for _, alias := range m.aliases { - if alias == expectedMIME { - return true - } - } - - return false -} - -func newMIME( - mime, extension string, - detector magic.Detector, - children ...*MIME) *MIME { - m := &MIME{ - mime: mime, - extension: extension, - detector: detector, - children: children, - } - - for _, c := range children { - c.parent = m - } - - return m -} - -func (m *MIME) alias(aliases ...string) *MIME { - m.aliases = aliases - return m -} - -// match does a depth-first search on the signature tree. It returns the deepest -// successful node for which all the children detection functions fail. -func (m *MIME) match(in []byte, readLimit uint32) *MIME { - for _, c := range m.children { - if c.detector(in, readLimit) { - return c.match(in, readLimit) - } - } - - needsCharset := map[string]func([]byte) string{ - "text/plain": charset.FromPlain, - "text/html": charset.FromHTML, - "text/xml": charset.FromXML, - } - // ps holds optional MIME parameters. - ps := map[string]string{} - if f, ok := needsCharset[m.mime]; ok { - if cset := f(in); cset != "" { - ps["charset"] = cset - } - } - - return m.cloneHierarchy(ps) -} - -// flatten transforms an hierarchy of MIMEs into a slice of MIMEs. -func (m *MIME) flatten() []*MIME { - out := []*MIME{m} - for _, c := range m.children { - out = append(out, c.flatten()...) - } - - return out -} - -// clone creates a new MIME with the provided optional MIME parameters. -func (m *MIME) clone(ps map[string]string) *MIME { - clonedMIME := m.mime - if len(ps) > 0 { - clonedMIME = mime.FormatMediaType(m.mime, ps) - } - - return &MIME{ - mime: clonedMIME, - aliases: m.aliases, - extension: m.extension, - } -} - -// cloneHierarchy creates a clone of m and all its ancestors. The optional MIME -// parameters are set on the last child of the hierarchy. -func (m *MIME) cloneHierarchy(ps map[string]string) *MIME { - ret := m.clone(ps) - lastChild := ret - for p := m.Parent(); p != nil; p = p.Parent() { - pClone := p.clone(nil) - lastChild.parent = pClone - lastChild = pClone - } - - return ret -} - -func (m *MIME) lookup(mime string) *MIME { - for _, n := range append(m.aliases, m.mime) { - if n == mime { - return m - } - } - - for _, c := range m.children { - if m := c.lookup(mime); m != nil { - return m - } - } - return nil -} - -// Extend adds detection for a sub-format. The detector is a function -// returning true when the raw input file satisfies a signature. -// The sub-format will be detected if all the detectors in the parent chain return true. -// The extension should include the leading dot, as in ".html". -func (m *MIME) Extend(detector func(raw []byte, limit uint32) bool, mime, extension string, aliases ...string) { - c := &MIME{ - mime: mime, - extension: extension, - detector: detector, - parent: m, - aliases: aliases, - } - - mu.Lock() - m.children = append([]*MIME{c}, m.children...) - mu.Unlock() -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/mimetype.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/mimetype.go deleted file mode 100644 index d8d512b806..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/mimetype.go +++ /dev/null @@ -1,126 +0,0 @@ -// Package mimetype uses magic number signatures to detect the MIME type of a file. -// -// File formats are stored in a hierarchy with application/octet-stream at its root. -// For example, the hierarchy for HTML format is application/octet-stream -> -// text/plain -> text/html. -package mimetype - -import ( - "io" - "mime" - "os" - "sync/atomic" -) - -var defaultLimit uint32 = 3072 - -// readLimit is the maximum number of bytes from the input used when detecting. -var readLimit uint32 = defaultLimit - -// Detect returns the MIME type found from the provided byte slice. -// -// The result is always a valid MIME type, with application/octet-stream -// returned when identification failed. -func Detect(in []byte) *MIME { - // Using atomic because readLimit can be written at the same time in other goroutine. - l := atomic.LoadUint32(&readLimit) - if l > 0 && len(in) > int(l) { - in = in[:l] - } - mu.RLock() - defer mu.RUnlock() - return root.match(in, l) -} - -// DetectReader returns the MIME type of the provided reader. -// -// The result is always a valid MIME type, with application/octet-stream -// returned when identification failed with or without an error. -// Any error returned is related to the reading from the input reader. -// -// DetectReader assumes the reader offset is at the start. If the input is an -// io.ReadSeeker you previously read from, it should be rewinded before detection: -// -// reader.Seek(0, io.SeekStart) -func DetectReader(r io.Reader) (*MIME, error) { - var in []byte - var err error - - // Using atomic because readLimit can be written at the same time in other goroutine. - l := atomic.LoadUint32(&readLimit) - if l == 0 { - in, err = io.ReadAll(r) - if err != nil { - return errMIME, err - } - } else { - var n int - in = make([]byte, l) - // io.UnexpectedEOF means len(r) < len(in). It is not an error in this case, - // it just means the input file is smaller than the allocated bytes slice. - n, err = io.ReadFull(r, in) - if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF { - return errMIME, err - } - in = in[:n] - } - - mu.RLock() - defer mu.RUnlock() - return root.match(in, l), nil -} - -// DetectFile returns the MIME type of the provided file. -// -// The result is always a valid MIME type, with application/octet-stream -// returned when identification failed with or without an error. -// Any error returned is related to the opening and reading from the input file. -func DetectFile(path string) (*MIME, error) { - f, err := os.Open(path) - if err != nil { - return errMIME, err - } - defer f.Close() - - return DetectReader(f) -} - -// EqualsAny reports whether s MIME type is equal to any MIME type in mimes. -// MIME type equality test is done on the "type/subtype" section, ignores -// any optional MIME parameters, ignores any leading and trailing whitespace, -// and is case insensitive. -func EqualsAny(s string, mimes ...string) bool { - s, _, _ = mime.ParseMediaType(s) - for _, m := range mimes { - m, _, _ = mime.ParseMediaType(m) - if s == m { - return true - } - } - - return false -} - -// SetLimit sets the maximum number of bytes read from input when detecting the MIME type. -// Increasing the limit provides better detection for file formats which store -// their magical numbers towards the end of the file: docx, pptx, xlsx, etc. -// During detection data is read in a single block of size limit, i.e. it is not buffered. -// A limit of 0 means the whole input file will be used. -func SetLimit(limit uint32) { - // Using atomic because readLimit can be read at the same time in other goroutine. - atomic.StoreUint32(&readLimit, limit) -} - -// Extend adds detection for other file formats. -// It is equivalent to calling Extend() on the root mime type "application/octet-stream". -func Extend(detector func(raw []byte, limit uint32) bool, mime, extension string, aliases ...string) { - root.Extend(detector, mime, extension, aliases...) -} - -// Lookup finds a MIME object by its string representation. -// The representation can be the main mime type, or any of its aliases. -func Lookup(mime string) *MIME { - mu.RLock() - defer mu.RUnlock() - return root.lookup(mime) -} diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md b/go-controller/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md deleted file mode 100644 index f9bf03cba6..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/supported_mimes.md +++ /dev/null @@ -1,183 +0,0 @@ -## 178 Supported MIME types -This file is automatically generated when running tests. Do not edit manually. - -Extension | MIME type | Aliases ---------- | --------- | ------- -**n/a** | application/octet-stream | - -**.xpm** | image/x-xpixmap | - -**.7z** | application/x-7z-compressed | - -**.zip** | application/zip | application/x-zip, application/x-zip-compressed -**.xlsx** | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | - -**.docx** | application/vnd.openxmlformats-officedocument.wordprocessingml.document | - -**.pptx** | application/vnd.openxmlformats-officedocument.presentationml.presentation | - -**.epub** | application/epub+zip | - -**.apk** | application/vnd.android.package-archive | - -**.jar** | application/jar | - -**.odt** | application/vnd.oasis.opendocument.text | application/x-vnd.oasis.opendocument.text -**.ott** | application/vnd.oasis.opendocument.text-template | application/x-vnd.oasis.opendocument.text-template -**.ods** | application/vnd.oasis.opendocument.spreadsheet | application/x-vnd.oasis.opendocument.spreadsheet -**.ots** | application/vnd.oasis.opendocument.spreadsheet-template | application/x-vnd.oasis.opendocument.spreadsheet-template -**.odp** | application/vnd.oasis.opendocument.presentation | application/x-vnd.oasis.opendocument.presentation -**.otp** | application/vnd.oasis.opendocument.presentation-template | application/x-vnd.oasis.opendocument.presentation-template -**.odg** | application/vnd.oasis.opendocument.graphics | application/x-vnd.oasis.opendocument.graphics -**.otg** | application/vnd.oasis.opendocument.graphics-template | application/x-vnd.oasis.opendocument.graphics-template -**.odf** | application/vnd.oasis.opendocument.formula | application/x-vnd.oasis.opendocument.formula -**.odc** | application/vnd.oasis.opendocument.chart | application/x-vnd.oasis.opendocument.chart -**.sxc** | application/vnd.sun.xml.calc | - -**.pdf** | application/pdf | application/x-pdf -**.fdf** | application/vnd.fdf | - -**n/a** | application/x-ole-storage | - -**.msi** | application/x-ms-installer | application/x-windows-installer, application/x-msi -**.aaf** | application/octet-stream | - -**.msg** | application/vnd.ms-outlook | - -**.xls** | application/vnd.ms-excel | application/msexcel -**.pub** | application/vnd.ms-publisher | - -**.ppt** | application/vnd.ms-powerpoint | application/mspowerpoint -**.doc** | application/msword | application/vnd.ms-word -**.ps** | application/postscript | - -**.psd** | image/vnd.adobe.photoshop | image/x-psd, application/photoshop -**.p7s** | application/pkcs7-signature | - -**.ogg** | application/ogg | application/x-ogg -**.oga** | audio/ogg | - -**.ogv** | video/ogg | - -**.png** | image/png | - -**.png** | image/vnd.mozilla.apng | - -**.jpg** | image/jpeg | - -**.jxl** | image/jxl | - -**.jp2** | image/jp2 | - -**.jpf** | image/jpx | - -**.jpm** | image/jpm | video/jpm -**.jxs** | image/jxs | - -**.gif** | image/gif | - -**.webp** | image/webp | - -**.exe** | application/vnd.microsoft.portable-executable | - -**n/a** | application/x-elf | - -**n/a** | application/x-object | - -**n/a** | application/x-executable | - -**.so** | application/x-sharedlib | - -**n/a** | application/x-coredump | - -**.a** | application/x-archive | application/x-unix-archive -**.deb** | application/vnd.debian.binary-package | - -**.tar** | application/x-tar | - -**.xar** | application/x-xar | - -**.bz2** | application/x-bzip2 | - -**.fits** | application/fits | - -**.tiff** | image/tiff | - -**.bmp** | image/bmp | image/x-bmp, image/x-ms-bmp -**.ico** | image/x-icon | - -**.mp3** | audio/mpeg | audio/x-mpeg, audio/mp3 -**.flac** | audio/flac | - -**.midi** | audio/midi | audio/mid, audio/sp-midi, audio/x-mid, audio/x-midi -**.ape** | audio/ape | - -**.mpc** | audio/musepack | - -**.amr** | audio/amr | audio/amr-nb -**.wav** | audio/wav | audio/x-wav, audio/vnd.wave, audio/wave -**.aiff** | audio/aiff | audio/x-aiff -**.au** | audio/basic | - -**.mpeg** | video/mpeg | - -**.mov** | video/quicktime | - -**.mp4** | video/mp4 | - -**.avif** | image/avif | - -**.3gp** | video/3gpp | video/3gp, audio/3gpp -**.3g2** | video/3gpp2 | video/3g2, audio/3gpp2 -**.mp4** | audio/mp4 | audio/x-mp4a -**.mqv** | video/quicktime | - -**.m4a** | audio/x-m4a | - -**.m4v** | video/x-m4v | - -**.heic** | image/heic | - -**.heic** | image/heic-sequence | - -**.heif** | image/heif | - -**.heif** | image/heif-sequence | - -**.mj2** | video/mj2 | - -**.dvb** | video/vnd.dvb.file | - -**.webm** | video/webm | audio/webm -**.avi** | video/x-msvideo | video/avi, video/msvideo -**.flv** | video/x-flv | - -**.mkv** | video/x-matroska | - -**.asf** | video/x-ms-asf | video/asf, video/x-ms-wmv -**.aac** | audio/aac | - -**.voc** | audio/x-unknown | - -**.m3u** | application/vnd.apple.mpegurl | audio/mpegurl -**.rmvb** | application/vnd.rn-realmedia-vbr | - -**.gz** | application/gzip | application/x-gzip, application/x-gunzip, application/gzipped, application/gzip-compressed, application/x-gzip-compressed, gzip/document -**.class** | application/x-java-applet | - -**.swf** | application/x-shockwave-flash | - -**.crx** | application/x-chrome-extension | - -**.ttf** | font/ttf | font/sfnt, application/x-font-ttf, application/font-sfnt -**.woff** | font/woff | - -**.woff2** | font/woff2 | - -**.otf** | font/otf | - -**.ttc** | font/collection | - -**.eot** | application/vnd.ms-fontobject | - -**.wasm** | application/wasm | - -**.shx** | application/vnd.shx | - -**.shp** | application/vnd.shp | - -**.dbf** | application/x-dbf | - -**.dcm** | application/dicom | - -**.rar** | application/x-rar-compressed | application/x-rar -**.djvu** | image/vnd.djvu | - -**.mobi** | application/x-mobipocket-ebook | - -**.lit** | application/x-ms-reader | - -**.bpg** | image/bpg | - -**.cbor** | application/cbor | - -**.sqlite** | application/vnd.sqlite3 | application/x-sqlite3 -**.dwg** | image/vnd.dwg | image/x-dwg, application/acad, application/x-acad, application/autocad_dwg, application/dwg, application/x-dwg, application/x-autocad, drawing/dwg -**.nes** | application/vnd.nintendo.snes.rom | - -**.lnk** | application/x-ms-shortcut | - -**.macho** | application/x-mach-binary | - -**.qcp** | audio/qcelp | - -**.icns** | image/x-icns | - -**.hdr** | image/vnd.radiance | - -**.mrc** | application/marc | - -**.mdb** | application/x-msaccess | - -**.accdb** | application/x-msaccess | - -**.zst** | application/zstd | - -**.cab** | application/vnd.ms-cab-compressed | - -**.rpm** | application/x-rpm | - -**.xz** | application/x-xz | - -**.lz** | application/lzip | application/x-lzip -**.torrent** | application/x-bittorrent | - -**.cpio** | application/x-cpio | - -**n/a** | application/tzif | - -**.xcf** | image/x-xcf | - -**.pat** | image/x-gimp-pat | - -**.gbr** | image/x-gimp-gbr | - -**.glb** | model/gltf-binary | - -**.cab** | application/x-installshield | - -**.jxr** | image/jxr | image/vnd.ms-photo -**.parquet** | application/vnd.apache.parquet | application/x-parquet -**.txt** | text/plain | - -**.html** | text/html | - -**.svg** | image/svg+xml | - -**.xml** | text/xml | application/xml -**.rss** | application/rss+xml | text/rss -**.atom** | application/atom+xml | - -**.x3d** | model/x3d+xml | - -**.kml** | application/vnd.google-earth.kml+xml | - -**.xlf** | application/x-xliff+xml | - -**.dae** | model/vnd.collada+xml | - -**.gml** | application/gml+xml | - -**.gpx** | application/gpx+xml | - -**.tcx** | application/vnd.garmin.tcx+xml | - -**.amf** | application/x-amf | - -**.3mf** | application/vnd.ms-package.3dmanufacturing-3dmodel+xml | - -**.xfdf** | application/vnd.adobe.xfdf | - -**.owl** | application/owl+xml | - -**.php** | text/x-php | - -**.js** | text/javascript | application/x-javascript, application/javascript -**.lua** | text/x-lua | - -**.pl** | text/x-perl | - -**.py** | text/x-python | text/x-script.python, application/x-python -**.json** | application/json | - -**.geojson** | application/geo+json | - -**.har** | application/json | - -**.ndjson** | application/x-ndjson | - -**.rtf** | text/rtf | application/rtf -**.srt** | application/x-subrip | application/x-srt, text/x-srt -**.tcl** | text/x-tcl | application/x-tcl -**.csv** | text/csv | - -**.tsv** | text/tab-separated-values | - -**.vcf** | text/vcard | - -**.ics** | text/calendar | - -**.warc** | application/warc | - -**.vtt** | text/vtt | - diff --git a/go-controller/vendor/github.com/gabriel-vasile/mimetype/tree.go b/go-controller/vendor/github.com/gabriel-vasile/mimetype/tree.go deleted file mode 100644 index b5f5662277..0000000000 --- a/go-controller/vendor/github.com/gabriel-vasile/mimetype/tree.go +++ /dev/null @@ -1,270 +0,0 @@ -package mimetype - -import ( - "sync" - - "github.com/gabriel-vasile/mimetype/internal/magic" -) - -// mimetype stores the list of MIME types in a tree structure with -// "application/octet-stream" at the root of the hierarchy. The hierarchy -// approach minimizes the number of checks that need to be done on the input -// and allows for more precise results once the base type of file has been -// identified. -// -// root is a detector which passes for any slice of bytes. -// When a detector passes the check, the children detectors -// are tried in order to find a more accurate MIME type. -var root = newMIME("application/octet-stream", "", - func([]byte, uint32) bool { return true }, - xpm, sevenZ, zip, pdf, fdf, ole, ps, psd, p7s, ogg, png, jpg, jxl, jp2, jpx, - jpm, jxs, gif, webp, exe, elf, ar, tar, xar, bz2, fits, tiff, bmp, ico, mp3, - flac, midi, ape, musePack, amr, wav, aiff, au, mpeg, quickTime, mp4, webM, - avi, flv, mkv, asf, aac, voc, m3u, rmvb, gzip, class, swf, crx, ttf, woff, - woff2, otf, ttc, eot, wasm, shx, dbf, dcm, rar, djvu, mobi, lit, bpg, cbor, - sqlite3, dwg, nes, lnk, macho, qcp, icns, hdr, mrc, mdb, accdb, zstd, cab, - rpm, xz, lzip, torrent, cpio, tzif, xcf, pat, gbr, glb, cabIS, jxr, parquet, - // Keep text last because it is the slowest check. - text, -) - -// errMIME is returned from Detect functions when err is not nil. -// Detect could return root for erroneous cases, but it needs to lock mu in order to do so. -// errMIME is same as root but it does not require locking. -var errMIME = newMIME("application/octet-stream", "", func([]byte, uint32) bool { return false }) - -// mu guards access to the root MIME tree. Access to root must be synchronized with this lock. -var mu = &sync.RWMutex{} - -// The list of nodes appended to the root node. -var ( - xz = newMIME("application/x-xz", ".xz", magic.Xz) - gzip = newMIME("application/gzip", ".gz", magic.Gzip).alias( - "application/x-gzip", "application/x-gunzip", "application/gzipped", - "application/gzip-compressed", "application/x-gzip-compressed", - "gzip/document") - sevenZ = newMIME("application/x-7z-compressed", ".7z", magic.SevenZ) - // APK must be checked before JAR because APK is a subset of JAR. - // This means APK should be a child of JAR detector, but in practice, - // the decisive signature for JAR might be located at the end of the file - // and not reachable because of library readLimit. - zip = newMIME("application/zip", ".zip", magic.Zip, xlsx, docx, pptx, epub, apk, jar, odt, ods, odp, odg, odf, odc, sxc). - alias("application/x-zip", "application/x-zip-compressed") - tar = newMIME("application/x-tar", ".tar", magic.Tar) - xar = newMIME("application/x-xar", ".xar", magic.Xar) - bz2 = newMIME("application/x-bzip2", ".bz2", magic.Bz2) - pdf = newMIME("application/pdf", ".pdf", magic.Pdf). - alias("application/x-pdf") - fdf = newMIME("application/vnd.fdf", ".fdf", magic.Fdf) - xlsx = newMIME("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ".xlsx", magic.Xlsx) - docx = newMIME("application/vnd.openxmlformats-officedocument.wordprocessingml.document", ".docx", magic.Docx) - pptx = newMIME("application/vnd.openxmlformats-officedocument.presentationml.presentation", ".pptx", magic.Pptx) - epub = newMIME("application/epub+zip", ".epub", magic.Epub) - jar = newMIME("application/jar", ".jar", magic.Jar) - apk = newMIME("application/vnd.android.package-archive", ".apk", magic.APK) - ole = newMIME("application/x-ole-storage", "", magic.Ole, msi, aaf, msg, xls, pub, ppt, doc) - msi = newMIME("application/x-ms-installer", ".msi", magic.Msi). - alias("application/x-windows-installer", "application/x-msi") - aaf = newMIME("application/octet-stream", ".aaf", magic.Aaf) - doc = newMIME("application/msword", ".doc", magic.Doc). - alias("application/vnd.ms-word") - ppt = newMIME("application/vnd.ms-powerpoint", ".ppt", magic.Ppt). - alias("application/mspowerpoint") - pub = newMIME("application/vnd.ms-publisher", ".pub", magic.Pub) - xls = newMIME("application/vnd.ms-excel", ".xls", magic.Xls). - alias("application/msexcel") - msg = newMIME("application/vnd.ms-outlook", ".msg", magic.Msg) - ps = newMIME("application/postscript", ".ps", magic.Ps) - fits = newMIME("application/fits", ".fits", magic.Fits) - ogg = newMIME("application/ogg", ".ogg", magic.Ogg, oggAudio, oggVideo). - alias("application/x-ogg") - oggAudio = newMIME("audio/ogg", ".oga", magic.OggAudio) - oggVideo = newMIME("video/ogg", ".ogv", magic.OggVideo) - text = newMIME("text/plain", ".txt", magic.Text, html, svg, xml, php, js, lua, perl, python, json, ndJSON, rtf, srt, tcl, csv, tsv, vCard, iCalendar, warc, vtt) - xml = newMIME("text/xml", ".xml", magic.XML, rss, atom, x3d, kml, xliff, collada, gml, gpx, tcx, amf, threemf, xfdf, owl2). - alias("application/xml") - json = newMIME("application/json", ".json", magic.JSON, geoJSON, har) - har = newMIME("application/json", ".har", magic.HAR) - csv = newMIME("text/csv", ".csv", magic.Csv) - tsv = newMIME("text/tab-separated-values", ".tsv", magic.Tsv) - geoJSON = newMIME("application/geo+json", ".geojson", magic.GeoJSON) - ndJSON = newMIME("application/x-ndjson", ".ndjson", magic.NdJSON) - html = newMIME("text/html", ".html", magic.HTML) - php = newMIME("text/x-php", ".php", magic.Php) - rtf = newMIME("text/rtf", ".rtf", magic.Rtf).alias("application/rtf") - js = newMIME("text/javascript", ".js", magic.Js). - alias("application/x-javascript", "application/javascript") - srt = newMIME("application/x-subrip", ".srt", magic.Srt). - alias("application/x-srt", "text/x-srt") - vtt = newMIME("text/vtt", ".vtt", magic.Vtt) - lua = newMIME("text/x-lua", ".lua", magic.Lua) - perl = newMIME("text/x-perl", ".pl", magic.Perl) - python = newMIME("text/x-python", ".py", magic.Python). - alias("text/x-script.python", "application/x-python") - tcl = newMIME("text/x-tcl", ".tcl", magic.Tcl). - alias("application/x-tcl") - vCard = newMIME("text/vcard", ".vcf", magic.VCard) - iCalendar = newMIME("text/calendar", ".ics", magic.ICalendar) - svg = newMIME("image/svg+xml", ".svg", magic.Svg) - rss = newMIME("application/rss+xml", ".rss", magic.Rss). - alias("text/rss") - owl2 = newMIME("application/owl+xml", ".owl", magic.Owl2) - atom = newMIME("application/atom+xml", ".atom", magic.Atom) - x3d = newMIME("model/x3d+xml", ".x3d", magic.X3d) - kml = newMIME("application/vnd.google-earth.kml+xml", ".kml", magic.Kml) - xliff = newMIME("application/x-xliff+xml", ".xlf", magic.Xliff) - collada = newMIME("model/vnd.collada+xml", ".dae", magic.Collada) - gml = newMIME("application/gml+xml", ".gml", magic.Gml) - gpx = newMIME("application/gpx+xml", ".gpx", magic.Gpx) - tcx = newMIME("application/vnd.garmin.tcx+xml", ".tcx", magic.Tcx) - amf = newMIME("application/x-amf", ".amf", magic.Amf) - threemf = newMIME("application/vnd.ms-package.3dmanufacturing-3dmodel+xml", ".3mf", magic.Threemf) - png = newMIME("image/png", ".png", magic.Png, apng) - apng = newMIME("image/vnd.mozilla.apng", ".png", magic.Apng) - jpg = newMIME("image/jpeg", ".jpg", magic.Jpg) - jxl = newMIME("image/jxl", ".jxl", magic.Jxl) - jp2 = newMIME("image/jp2", ".jp2", magic.Jp2) - jpx = newMIME("image/jpx", ".jpf", magic.Jpx) - jpm = newMIME("image/jpm", ".jpm", magic.Jpm). - alias("video/jpm") - jxs = newMIME("image/jxs", ".jxs", magic.Jxs) - xpm = newMIME("image/x-xpixmap", ".xpm", magic.Xpm) - bpg = newMIME("image/bpg", ".bpg", magic.Bpg) - gif = newMIME("image/gif", ".gif", magic.Gif) - webp = newMIME("image/webp", ".webp", magic.Webp) - tiff = newMIME("image/tiff", ".tiff", magic.Tiff) - bmp = newMIME("image/bmp", ".bmp", magic.Bmp). - alias("image/x-bmp", "image/x-ms-bmp") - ico = newMIME("image/x-icon", ".ico", magic.Ico) - icns = newMIME("image/x-icns", ".icns", magic.Icns) - psd = newMIME("image/vnd.adobe.photoshop", ".psd", magic.Psd). - alias("image/x-psd", "application/photoshop") - heic = newMIME("image/heic", ".heic", magic.Heic) - heicSeq = newMIME("image/heic-sequence", ".heic", magic.HeicSequence) - heif = newMIME("image/heif", ".heif", magic.Heif) - heifSeq = newMIME("image/heif-sequence", ".heif", magic.HeifSequence) - hdr = newMIME("image/vnd.radiance", ".hdr", magic.Hdr) - avif = newMIME("image/avif", ".avif", magic.AVIF) - mp3 = newMIME("audio/mpeg", ".mp3", magic.Mp3). - alias("audio/x-mpeg", "audio/mp3") - flac = newMIME("audio/flac", ".flac", magic.Flac) - midi = newMIME("audio/midi", ".midi", magic.Midi). - alias("audio/mid", "audio/sp-midi", "audio/x-mid", "audio/x-midi") - ape = newMIME("audio/ape", ".ape", magic.Ape) - musePack = newMIME("audio/musepack", ".mpc", magic.MusePack) - wav = newMIME("audio/wav", ".wav", magic.Wav). - alias("audio/x-wav", "audio/vnd.wave", "audio/wave") - aiff = newMIME("audio/aiff", ".aiff", magic.Aiff).alias("audio/x-aiff") - au = newMIME("audio/basic", ".au", magic.Au) - amr = newMIME("audio/amr", ".amr", magic.Amr). - alias("audio/amr-nb") - aac = newMIME("audio/aac", ".aac", magic.AAC) - voc = newMIME("audio/x-unknown", ".voc", magic.Voc) - aMp4 = newMIME("audio/mp4", ".mp4", magic.AMp4). - alias("audio/x-mp4a") - m4a = newMIME("audio/x-m4a", ".m4a", magic.M4a) - m3u = newMIME("application/vnd.apple.mpegurl", ".m3u", magic.M3u). - alias("audio/mpegurl") - m4v = newMIME("video/x-m4v", ".m4v", magic.M4v) - mj2 = newMIME("video/mj2", ".mj2", magic.Mj2) - dvb = newMIME("video/vnd.dvb.file", ".dvb", magic.Dvb) - mp4 = newMIME("video/mp4", ".mp4", magic.Mp4, avif, threeGP, threeG2, aMp4, mqv, m4a, m4v, heic, heicSeq, heif, heifSeq, mj2, dvb) - webM = newMIME("video/webm", ".webm", magic.WebM). - alias("audio/webm") - mpeg = newMIME("video/mpeg", ".mpeg", magic.Mpeg) - quickTime = newMIME("video/quicktime", ".mov", magic.QuickTime) - mqv = newMIME("video/quicktime", ".mqv", magic.Mqv) - threeGP = newMIME("video/3gpp", ".3gp", magic.ThreeGP). - alias("video/3gp", "audio/3gpp") - threeG2 = newMIME("video/3gpp2", ".3g2", magic.ThreeG2). - alias("video/3g2", "audio/3gpp2") - avi = newMIME("video/x-msvideo", ".avi", magic.Avi). - alias("video/avi", "video/msvideo") - flv = newMIME("video/x-flv", ".flv", magic.Flv) - mkv = newMIME("video/x-matroska", ".mkv", magic.Mkv) - asf = newMIME("video/x-ms-asf", ".asf", magic.Asf). - alias("video/asf", "video/x-ms-wmv") - rmvb = newMIME("application/vnd.rn-realmedia-vbr", ".rmvb", magic.Rmvb) - class = newMIME("application/x-java-applet", ".class", magic.Class) - swf = newMIME("application/x-shockwave-flash", ".swf", magic.SWF) - crx = newMIME("application/x-chrome-extension", ".crx", magic.CRX) - ttf = newMIME("font/ttf", ".ttf", magic.Ttf). - alias("font/sfnt", "application/x-font-ttf", "application/font-sfnt") - woff = newMIME("font/woff", ".woff", magic.Woff) - woff2 = newMIME("font/woff2", ".woff2", magic.Woff2) - otf = newMIME("font/otf", ".otf", magic.Otf) - ttc = newMIME("font/collection", ".ttc", magic.Ttc) - eot = newMIME("application/vnd.ms-fontobject", ".eot", magic.Eot) - wasm = newMIME("application/wasm", ".wasm", magic.Wasm) - shp = newMIME("application/vnd.shp", ".shp", magic.Shp) - shx = newMIME("application/vnd.shx", ".shx", magic.Shx, shp) - dbf = newMIME("application/x-dbf", ".dbf", magic.Dbf) - exe = newMIME("application/vnd.microsoft.portable-executable", ".exe", magic.Exe) - elf = newMIME("application/x-elf", "", magic.Elf, elfObj, elfExe, elfLib, elfDump) - elfObj = newMIME("application/x-object", "", magic.ElfObj) - elfExe = newMIME("application/x-executable", "", magic.ElfExe) - elfLib = newMIME("application/x-sharedlib", ".so", magic.ElfLib) - elfDump = newMIME("application/x-coredump", "", magic.ElfDump) - ar = newMIME("application/x-archive", ".a", magic.Ar, deb). - alias("application/x-unix-archive") - deb = newMIME("application/vnd.debian.binary-package", ".deb", magic.Deb) - rpm = newMIME("application/x-rpm", ".rpm", magic.RPM) - dcm = newMIME("application/dicom", ".dcm", magic.Dcm) - odt = newMIME("application/vnd.oasis.opendocument.text", ".odt", magic.Odt, ott). - alias("application/x-vnd.oasis.opendocument.text") - ott = newMIME("application/vnd.oasis.opendocument.text-template", ".ott", magic.Ott). - alias("application/x-vnd.oasis.opendocument.text-template") - ods = newMIME("application/vnd.oasis.opendocument.spreadsheet", ".ods", magic.Ods, ots). - alias("application/x-vnd.oasis.opendocument.spreadsheet") - ots = newMIME("application/vnd.oasis.opendocument.spreadsheet-template", ".ots", magic.Ots). - alias("application/x-vnd.oasis.opendocument.spreadsheet-template") - odp = newMIME("application/vnd.oasis.opendocument.presentation", ".odp", magic.Odp, otp). - alias("application/x-vnd.oasis.opendocument.presentation") - otp = newMIME("application/vnd.oasis.opendocument.presentation-template", ".otp", magic.Otp). - alias("application/x-vnd.oasis.opendocument.presentation-template") - odg = newMIME("application/vnd.oasis.opendocument.graphics", ".odg", magic.Odg, otg). - alias("application/x-vnd.oasis.opendocument.graphics") - otg = newMIME("application/vnd.oasis.opendocument.graphics-template", ".otg", magic.Otg). - alias("application/x-vnd.oasis.opendocument.graphics-template") - odf = newMIME("application/vnd.oasis.opendocument.formula", ".odf", magic.Odf). - alias("application/x-vnd.oasis.opendocument.formula") - odc = newMIME("application/vnd.oasis.opendocument.chart", ".odc", magic.Odc). - alias("application/x-vnd.oasis.opendocument.chart") - sxc = newMIME("application/vnd.sun.xml.calc", ".sxc", magic.Sxc) - rar = newMIME("application/x-rar-compressed", ".rar", magic.RAR). - alias("application/x-rar") - djvu = newMIME("image/vnd.djvu", ".djvu", magic.DjVu) - mobi = newMIME("application/x-mobipocket-ebook", ".mobi", magic.Mobi) - lit = newMIME("application/x-ms-reader", ".lit", magic.Lit) - sqlite3 = newMIME("application/vnd.sqlite3", ".sqlite", magic.Sqlite). - alias("application/x-sqlite3") - dwg = newMIME("image/vnd.dwg", ".dwg", magic.Dwg). - alias("image/x-dwg", "application/acad", "application/x-acad", - "application/autocad_dwg", "application/dwg", "application/x-dwg", - "application/x-autocad", "drawing/dwg") - warc = newMIME("application/warc", ".warc", magic.Warc) - nes = newMIME("application/vnd.nintendo.snes.rom", ".nes", magic.Nes) - lnk = newMIME("application/x-ms-shortcut", ".lnk", magic.Lnk) - macho = newMIME("application/x-mach-binary", ".macho", magic.MachO) - qcp = newMIME("audio/qcelp", ".qcp", magic.Qcp) - mrc = newMIME("application/marc", ".mrc", magic.Marc) - mdb = newMIME("application/x-msaccess", ".mdb", magic.MsAccessMdb) - accdb = newMIME("application/x-msaccess", ".accdb", magic.MsAccessAce) - zstd = newMIME("application/zstd", ".zst", magic.Zstd) - cab = newMIME("application/vnd.ms-cab-compressed", ".cab", magic.Cab) - cabIS = newMIME("application/x-installshield", ".cab", magic.InstallShieldCab) - lzip = newMIME("application/lzip", ".lz", magic.Lzip).alias("application/x-lzip") - torrent = newMIME("application/x-bittorrent", ".torrent", magic.Torrent) - cpio = newMIME("application/x-cpio", ".cpio", magic.Cpio) - tzif = newMIME("application/tzif", "", magic.TzIf) - p7s = newMIME("application/pkcs7-signature", ".p7s", magic.P7s) - xcf = newMIME("image/x-xcf", ".xcf", magic.Xcf) - pat = newMIME("image/x-gimp-pat", ".pat", magic.Pat) - gbr = newMIME("image/x-gimp-gbr", ".gbr", magic.Gbr) - xfdf = newMIME("application/vnd.adobe.xfdf", ".xfdf", magic.Xfdf) - glb = newMIME("model/gltf-binary", ".glb", magic.Glb) - jxr = newMIME("image/jxr", ".jxr", magic.Jxr).alias("image/vnd.ms-photo") - parquet = newMIME("application/vnd.apache.parquet", ".parquet", magic.Par1). - alias("application/x-parquet") - cbor = newMIME("application/cbor", ".cbor", magic.CBOR) -) diff --git a/go-controller/vendor/github.com/go-logr/logr/.golangci.yaml b/go-controller/vendor/github.com/go-logr/logr/.golangci.yaml index 0ed62c1a18..0cffafa7bf 100644 --- a/go-controller/vendor/github.com/go-logr/logr/.golangci.yaml +++ b/go-controller/vendor/github.com/go-logr/logr/.golangci.yaml @@ -1,28 +1,26 @@ -version: "2" - run: timeout: 1m tests: true linters: - default: none - enable: # please keep this alphabetized - - asasalint + disable-all: true + enable: - asciicheck - - copyloopvar - - dupl - errcheck - forcetypeassert - - goconst - gocritic + - gofmt + - goimports + - gosimple - govet - ineffassign - misspell - - musttag - revive - staticcheck + - typecheck - unused issues: + exclude-use-default: false max-issues-per-linter: 0 max-same-issues: 10 diff --git a/go-controller/vendor/github.com/go-logr/logr/funcr/funcr.go b/go-controller/vendor/github.com/go-logr/logr/funcr/funcr.go index b22c57d713..30568e768d 100644 --- a/go-controller/vendor/github.com/go-logr/logr/funcr/funcr.go +++ b/go-controller/vendor/github.com/go-logr/logr/funcr/funcr.go @@ -77,7 +77,7 @@ func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink { write: fn, } // For skipping fnlogger.Info and fnlogger.Error. - l.AddCallDepth(1) // via Formatter + l.Formatter.AddCallDepth(1) return l } @@ -164,17 +164,17 @@ type fnlogger struct { } func (l fnlogger) WithName(name string) logr.LogSink { - l.AddName(name) // via Formatter + l.Formatter.AddName(name) return &l } func (l fnlogger) WithValues(kvList ...any) logr.LogSink { - l.AddValues(kvList) // via Formatter + l.Formatter.AddValues(kvList) return &l } func (l fnlogger) WithCallDepth(depth int) logr.LogSink { - l.AddCallDepth(depth) // via Formatter + l.Formatter.AddCallDepth(depth) return &l } diff --git a/go-controller/vendor/github.com/go-logr/logr/testr/testr.go b/go-controller/vendor/github.com/go-logr/logr/testr/testr.go index 28168e0ae7..5eabe2b6fd 100644 --- a/go-controller/vendor/github.com/go-logr/logr/testr/testr.go +++ b/go-controller/vendor/github.com/go-logr/logr/testr/testr.go @@ -130,12 +130,12 @@ type testloggerInterface struct { } func (l testloggerInterface) WithName(name string) logr.LogSink { - l.AddName(name) // via Formatter + l.Formatter.AddName(name) return &l } func (l testloggerInterface) WithValues(kvList ...any) logr.LogSink { - l.AddValues(kvList) // via Formatter + l.Formatter.AddValues(kvList) return &l } diff --git a/go-controller/vendor/github.com/go-playground/locales/.gitignore b/go-controller/vendor/github.com/go-playground/locales/.gitignore deleted file mode 100644 index daf913b1b3..0000000000 --- a/go-controller/vendor/github.com/go-playground/locales/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/go-controller/vendor/github.com/go-playground/locales/.travis.yml b/go-controller/vendor/github.com/go-playground/locales/.travis.yml deleted file mode 100644 index d50237a608..0000000000 --- a/go-controller/vendor/github.com/go-playground/locales/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: go -go: - - 1.13.1 - - tip -matrix: - allow_failures: - - go: tip - -notifications: - email: - recipients: dean.karn@gmail.com - on_success: change - on_failure: always - -before_install: - - go install github.com/mattn/goveralls - -# Only clone the most recent commit. -git: - depth: 1 - -script: - - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... - -after_success: | - goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN \ No newline at end of file diff --git a/go-controller/vendor/github.com/go-playground/locales/LICENSE b/go-controller/vendor/github.com/go-playground/locales/LICENSE deleted file mode 100644 index 75854ac4f0..0000000000 --- a/go-controller/vendor/github.com/go-playground/locales/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Go Playground - -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. \ No newline at end of file diff --git a/go-controller/vendor/github.com/go-playground/locales/README.md b/go-controller/vendor/github.com/go-playground/locales/README.md deleted file mode 100644 index 7b6be2c647..0000000000 --- a/go-controller/vendor/github.com/go-playground/locales/README.md +++ /dev/null @@ -1,170 +0,0 @@ -## locales -![Project status](https://img.shields.io/badge/version-0.14.1-green.svg) -[![Build Status](https://travis-ci.org/go-playground/locales.svg?branch=master)](https://travis-ci.org/go-playground/locales) -[![GoDoc](https://godoc.org/github.com/go-playground/locales?status.svg)](https://godoc.org/github.com/go-playground/locales) -![License](https://img.shields.io/dub/l/vibe-d.svg) - -Locales is a set of locales generated from the [Unicode CLDR Project](http://cldr.unicode.org/) which can be used independently or within -an i18n package; these were built for use with, but not exclusive to, [Universal Translator](https://github.com/go-playground/universal-translator). - -Features --------- -- [x] Rules generated from the latest [CLDR](http://cldr.unicode.org/index/downloads) data, v36.0.1 -- [x] Contains Cardinal, Ordinal and Range Plural Rules -- [x] Contains Month, Weekday and Timezone translations built in -- [x] Contains Date & Time formatting functions -- [x] Contains Number, Currency, Accounting and Percent formatting functions -- [x] Supports the "Gregorian" calendar only ( my time isn't unlimited, had to draw the line somewhere ) - -Full Tests --------------------- -I could sure use your help adding tests for every locale, it is a huge undertaking and I just don't have the free time to do it all at the moment; -any help would be **greatly appreciated!!!!** please see [issue](https://github.com/go-playground/locales/issues/1) for details. - -Installation ------------ - -Use go get - -```shell -go get github.com/go-playground/locales -``` - -NOTES --------- -You'll notice most return types are []byte, this is because most of the time the results will be concatenated with a larger body -of text and can avoid some allocations if already appending to a byte array, otherwise just cast as string. - -Usage -------- -```go -package main - -import ( - "fmt" - "time" - - "github.com/go-playground/locales/currency" - "github.com/go-playground/locales/en_CA" -) - -func main() { - - loc, _ := time.LoadLocation("America/Toronto") - datetime := time.Date(2016, 02, 03, 9, 0, 1, 0, loc) - - l := en_CA.New() - - // Dates - fmt.Println(l.FmtDateFull(datetime)) - fmt.Println(l.FmtDateLong(datetime)) - fmt.Println(l.FmtDateMedium(datetime)) - fmt.Println(l.FmtDateShort(datetime)) - - // Times - fmt.Println(l.FmtTimeFull(datetime)) - fmt.Println(l.FmtTimeLong(datetime)) - fmt.Println(l.FmtTimeMedium(datetime)) - fmt.Println(l.FmtTimeShort(datetime)) - - // Months Wide - fmt.Println(l.MonthWide(time.January)) - fmt.Println(l.MonthWide(time.February)) - fmt.Println(l.MonthWide(time.March)) - // ... - - // Months Abbreviated - fmt.Println(l.MonthAbbreviated(time.January)) - fmt.Println(l.MonthAbbreviated(time.February)) - fmt.Println(l.MonthAbbreviated(time.March)) - // ... - - // Months Narrow - fmt.Println(l.MonthNarrow(time.January)) - fmt.Println(l.MonthNarrow(time.February)) - fmt.Println(l.MonthNarrow(time.March)) - // ... - - // Weekdays Wide - fmt.Println(l.WeekdayWide(time.Sunday)) - fmt.Println(l.WeekdayWide(time.Monday)) - fmt.Println(l.WeekdayWide(time.Tuesday)) - // ... - - // Weekdays Abbreviated - fmt.Println(l.WeekdayAbbreviated(time.Sunday)) - fmt.Println(l.WeekdayAbbreviated(time.Monday)) - fmt.Println(l.WeekdayAbbreviated(time.Tuesday)) - // ... - - // Weekdays Short - fmt.Println(l.WeekdayShort(time.Sunday)) - fmt.Println(l.WeekdayShort(time.Monday)) - fmt.Println(l.WeekdayShort(time.Tuesday)) - // ... - - // Weekdays Narrow - fmt.Println(l.WeekdayNarrow(time.Sunday)) - fmt.Println(l.WeekdayNarrow(time.Monday)) - fmt.Println(l.WeekdayNarrow(time.Tuesday)) - // ... - - var f64 float64 - - f64 = -10356.4523 - - // Number - fmt.Println(l.FmtNumber(f64, 2)) - - // Currency - fmt.Println(l.FmtCurrency(f64, 2, currency.CAD)) - fmt.Println(l.FmtCurrency(f64, 2, currency.USD)) - - // Accounting - fmt.Println(l.FmtAccounting(f64, 2, currency.CAD)) - fmt.Println(l.FmtAccounting(f64, 2, currency.USD)) - - f64 = 78.12 - - // Percent - fmt.Println(l.FmtPercent(f64, 0)) - - // Plural Rules for locale, so you know what rules you must cover - fmt.Println(l.PluralsCardinal()) - fmt.Println(l.PluralsOrdinal()) - - // Cardinal Plural Rules - fmt.Println(l.CardinalPluralRule(1, 0)) - fmt.Println(l.CardinalPluralRule(1.0, 0)) - fmt.Println(l.CardinalPluralRule(1.0, 1)) - fmt.Println(l.CardinalPluralRule(3, 0)) - - // Ordinal Plural Rules - fmt.Println(l.OrdinalPluralRule(21, 0)) // 21st - fmt.Println(l.OrdinalPluralRule(22, 0)) // 22nd - fmt.Println(l.OrdinalPluralRule(33, 0)) // 33rd - fmt.Println(l.OrdinalPluralRule(34, 0)) // 34th - - // Range Plural Rules - fmt.Println(l.RangePluralRule(1, 0, 1, 0)) // 1-1 - fmt.Println(l.RangePluralRule(1, 0, 2, 0)) // 1-2 - fmt.Println(l.RangePluralRule(5, 0, 8, 0)) // 5-8 -} -``` - -NOTES: -------- -These rules were generated from the [Unicode CLDR Project](http://cldr.unicode.org/), if you encounter any issues -I strongly encourage contributing to the CLDR project to get the locale information corrected and the next time -these locales are regenerated the fix will come with. - -I do however realize that time constraints are often important and so there are two options: - -1. Create your own locale, copy, paste and modify, and ensure it complies with the `Translator` interface. -2. Add an exception in the locale generation code directly and once regenerated, fix will be in place. - -Please to not make fixes inside the locale files, they WILL get overwritten when the locales are regenerated. - -License ------- -Distributed under MIT License, please see license file in code for more details. diff --git a/go-controller/vendor/github.com/go-playground/locales/currency/currency.go b/go-controller/vendor/github.com/go-playground/locales/currency/currency.go deleted file mode 100644 index b5a95fb074..0000000000 --- a/go-controller/vendor/github.com/go-playground/locales/currency/currency.go +++ /dev/null @@ -1,311 +0,0 @@ -package currency - -// Type is the currency type associated with the locales currency enum -type Type int - -// locale currencies -const ( - ADP Type = iota - AED - AFA - AFN - ALK - ALL - AMD - ANG - AOA - AOK - AON - AOR - ARA - ARL - ARM - ARP - ARS - ATS - AUD - AWG - AZM - AZN - BAD - BAM - BAN - BBD - BDT - BEC - BEF - BEL - BGL - BGM - BGN - BGO - BHD - BIF - BMD - BND - BOB - BOL - BOP - BOV - BRB - BRC - BRE - BRL - BRN - BRR - BRZ - BSD - BTN - BUK - BWP - BYB - BYN - BYR - BZD - CAD - CDF - CHE - CHF - CHW - CLE - CLF - CLP - CNH - CNX - CNY - COP - COU - CRC - CSD - CSK - CUC - CUP - CVE - CYP - CZK - DDM - DEM - DJF - DKK - DOP - DZD - ECS - ECV - EEK - EGP - ERN - ESA - ESB - ESP - ETB - EUR - FIM - FJD - FKP - FRF - GBP - GEK - GEL - GHC - GHS - GIP - GMD - GNF - GNS - GQE - GRD - GTQ - GWE - GWP - GYD - HKD - HNL - HRD - HRK - HTG - HUF - IDR - IEP - ILP - ILR - ILS - INR - IQD - IRR - ISJ - ISK - ITL - JMD - JOD - JPY - KES - KGS - KHR - KMF - KPW - KRH - KRO - KRW - KWD - KYD - KZT - LAK - LBP - LKR - LRD - LSL - LTL - LTT - LUC - LUF - LUL - LVL - LVR - LYD - MAD - MAF - MCF - MDC - MDL - MGA - MGF - MKD - MKN - MLF - MMK - MNT - MOP - MRO - MRU - MTL - MTP - MUR - MVP - MVR - MWK - MXN - MXP - MXV - MYR - MZE - MZM - MZN - NAD - NGN - NIC - NIO - NLG - NOK - NPR - NZD - OMR - PAB - PEI - PEN - PES - PGK - PHP - PKR - PLN - PLZ - PTE - PYG - QAR - RHD - ROL - RON - RSD - RUB - RUR - RWF - SAR - SBD - SCR - SDD - SDG - SDP - SEK - SGD - SHP - SIT - SKK - SLL - SOS - SRD - SRG - SSP - STD - STN - SUR - SVC - SYP - SZL - THB - TJR - TJS - TMM - TMT - TND - TOP - TPE - TRL - TRY - TTD - TWD - TZS - UAH - UAK - UGS - UGX - USD - USN - USS - UYI - UYP - UYU - UYW - UZS - VEB - VEF - VES - VND - VNN - VUV - WST - XAF - XAG - XAU - XBA - XBB - XBC - XBD - XCD - XDR - XEU - XFO - XFU - XOF - XPD - XPF - XPT - XRE - XSU - XTS - XUA - XXX - YDD - YER - YUD - YUM - YUN - YUR - ZAL - ZAR - ZMK - ZMW - ZRN - ZRZ - ZWD - ZWL - ZWR -) diff --git a/go-controller/vendor/github.com/go-playground/locales/logo.png b/go-controller/vendor/github.com/go-playground/locales/logo.png deleted file mode 100644 index 3038276e68..0000000000 Binary files a/go-controller/vendor/github.com/go-playground/locales/logo.png and /dev/null differ diff --git a/go-controller/vendor/github.com/go-playground/locales/rules.go b/go-controller/vendor/github.com/go-playground/locales/rules.go deleted file mode 100644 index 9202900149..0000000000 --- a/go-controller/vendor/github.com/go-playground/locales/rules.go +++ /dev/null @@ -1,293 +0,0 @@ -package locales - -import ( - "strconv" - "time" - - "github.com/go-playground/locales/currency" -) - -// // ErrBadNumberValue is returned when the number passed for -// // plural rule determination cannot be parsed -// type ErrBadNumberValue struct { -// NumberValue string -// InnerError error -// } - -// // Error returns ErrBadNumberValue error string -// func (e *ErrBadNumberValue) Error() string { -// return fmt.Sprintf("Invalid Number Value '%s' %s", e.NumberValue, e.InnerError) -// } - -// var _ error = new(ErrBadNumberValue) - -// PluralRule denotes the type of plural rules -type PluralRule int - -// PluralRule's -const ( - PluralRuleUnknown PluralRule = iota - PluralRuleZero // zero - PluralRuleOne // one - singular - PluralRuleTwo // two - dual - PluralRuleFew // few - paucal - PluralRuleMany // many - also used for fractions if they have a separate class - PluralRuleOther // other - required—general plural form—also used if the language only has a single form -) - -const ( - pluralsString = "UnknownZeroOneTwoFewManyOther" -) - -// Translator encapsulates an instance of a locale -// NOTE: some values are returned as a []byte just in case the caller -// wishes to add more and can help avoid allocations; otherwise just cast as string -type Translator interface { - - // The following Functions are for overriding, debugging or developing - // with a Translator Locale - - // Locale returns the string value of the translator - Locale() string - - // returns an array of cardinal plural rules associated - // with this translator - PluralsCardinal() []PluralRule - - // returns an array of ordinal plural rules associated - // with this translator - PluralsOrdinal() []PluralRule - - // returns an array of range plural rules associated - // with this translator - PluralsRange() []PluralRule - - // returns the cardinal PluralRule given 'num' and digits/precision of 'v' for locale - CardinalPluralRule(num float64, v uint64) PluralRule - - // returns the ordinal PluralRule given 'num' and digits/precision of 'v' for locale - OrdinalPluralRule(num float64, v uint64) PluralRule - - // returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for locale - RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) PluralRule - - // returns the locales abbreviated month given the 'month' provided - MonthAbbreviated(month time.Month) string - - // returns the locales abbreviated months - MonthsAbbreviated() []string - - // returns the locales narrow month given the 'month' provided - MonthNarrow(month time.Month) string - - // returns the locales narrow months - MonthsNarrow() []string - - // returns the locales wide month given the 'month' provided - MonthWide(month time.Month) string - - // returns the locales wide months - MonthsWide() []string - - // returns the locales abbreviated weekday given the 'weekday' provided - WeekdayAbbreviated(weekday time.Weekday) string - - // returns the locales abbreviated weekdays - WeekdaysAbbreviated() []string - - // returns the locales narrow weekday given the 'weekday' provided - WeekdayNarrow(weekday time.Weekday) string - - // WeekdaysNarrowreturns the locales narrow weekdays - WeekdaysNarrow() []string - - // returns the locales short weekday given the 'weekday' provided - WeekdayShort(weekday time.Weekday) string - - // returns the locales short weekdays - WeekdaysShort() []string - - // returns the locales wide weekday given the 'weekday' provided - WeekdayWide(weekday time.Weekday) string - - // returns the locales wide weekdays - WeekdaysWide() []string - - // The following Functions are common Formatting functionsfor the Translator's Locale - - // returns 'num' with digits/precision of 'v' for locale and handles both Whole and Real numbers based on 'v' - FmtNumber(num float64, v uint64) string - - // returns 'num' with digits/precision of 'v' for locale and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - FmtPercent(num float64, v uint64) string - - // returns the currency representation of 'num' with digits/precision of 'v' for locale - FmtCurrency(num float64, v uint64, currency currency.Type) string - - // returns the currency representation of 'num' with digits/precision of 'v' for locale - // in accounting notation. - FmtAccounting(num float64, v uint64, currency currency.Type) string - - // returns the short date representation of 't' for locale - FmtDateShort(t time.Time) string - - // returns the medium date representation of 't' for locale - FmtDateMedium(t time.Time) string - - // returns the long date representation of 't' for locale - FmtDateLong(t time.Time) string - - // returns the full date representation of 't' for locale - FmtDateFull(t time.Time) string - - // returns the short time representation of 't' for locale - FmtTimeShort(t time.Time) string - - // returns the medium time representation of 't' for locale - FmtTimeMedium(t time.Time) string - - // returns the long time representation of 't' for locale - FmtTimeLong(t time.Time) string - - // returns the full time representation of 't' for locale - FmtTimeFull(t time.Time) string -} - -// String returns the string value of PluralRule -func (p PluralRule) String() string { - - switch p { - case PluralRuleZero: - return pluralsString[7:11] - case PluralRuleOne: - return pluralsString[11:14] - case PluralRuleTwo: - return pluralsString[14:17] - case PluralRuleFew: - return pluralsString[17:20] - case PluralRuleMany: - return pluralsString[20:24] - case PluralRuleOther: - return pluralsString[24:] - default: - return pluralsString[:7] - } -} - -// -// Precision Notes: -// -// must specify a precision >= 0, and here is why https://play.golang.org/p/LyL90U0Vyh -// -// v := float64(3.141) -// i := float64(int64(v)) -// -// fmt.Println(v - i) -// -// or -// -// s := strconv.FormatFloat(v-i, 'f', -1, 64) -// fmt.Println(s) -// -// these will not print what you'd expect: 0.14100000000000001 -// and so this library requires a precision to be specified, or -// inaccurate plural rules could be applied. -// -// -// -// n - absolute value of the source number (integer and decimals). -// i - integer digits of n. -// v - number of visible fraction digits in n, with trailing zeros. -// w - number of visible fraction digits in n, without trailing zeros. -// f - visible fractional digits in n, with trailing zeros. -// t - visible fractional digits in n, without trailing zeros. -// -// -// Func(num float64, v uint64) // v = digits/precision and prevents -1 as a special case as this can lead to very unexpected behaviour, see precision note's above. -// -// n := math.Abs(num) -// i := int64(n) -// v := v -// -// -// w := strconv.FormatFloat(num-float64(i), 'f', int(v), 64) // then parse backwards on string until no more zero's.... -// f := strconv.FormatFloat(n, 'f', int(v), 64) // then turn everything after decimal into an int64 -// t := strconv.FormatFloat(n, 'f', int(v), 64) // then parse backwards on string until no more zero's.... -// -// -// -// General Inclusion Rules -// - v will always be available inherently -// - all require n -// - w requires i -// - -// W returns the number of visible fraction digits in N, without trailing zeros. -func W(n float64, v uint64) (w int64) { - - s := strconv.FormatFloat(n-float64(int64(n)), 'f', int(v), 64) - - // with either be '0' or '0.xxxx', so if 1 then w will be zero - // otherwise need to parse - if len(s) != 1 { - - s = s[2:] - end := len(s) + 1 - - for i := end; i >= 0; i-- { - if s[i] != '0' { - end = i + 1 - break - } - } - - w = int64(len(s[:end])) - } - - return -} - -// F returns the visible fractional digits in N, with trailing zeros. -func F(n float64, v uint64) (f int64) { - - s := strconv.FormatFloat(n-float64(int64(n)), 'f', int(v), 64) - - // with either be '0' or '0.xxxx', so if 1 then f will be zero - // otherwise need to parse - if len(s) != 1 { - - // ignoring error, because it can't fail as we generated - // the string internally from a real number - f, _ = strconv.ParseInt(s[2:], 10, 64) - } - - return -} - -// T returns the visible fractional digits in N, without trailing zeros. -func T(n float64, v uint64) (t int64) { - - s := strconv.FormatFloat(n-float64(int64(n)), 'f', int(v), 64) - - // with either be '0' or '0.xxxx', so if 1 then t will be zero - // otherwise need to parse - if len(s) != 1 { - - s = s[2:] - end := len(s) + 1 - - for i := end; i >= 0; i-- { - if s[i] != '0' { - end = i + 1 - break - } - } - - // ignoring error, because it can't fail as we generated - // the string internally from a real number - t, _ = strconv.ParseInt(s[:end], 10, 64) - } - - return -} diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/.gitignore b/go-controller/vendor/github.com/go-playground/universal-translator/.gitignore deleted file mode 100644 index bc4e07f34e..0000000000 --- a/go-controller/vendor/github.com/go-playground/universal-translator/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof -*.coverprofile \ No newline at end of file diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/.travis.yml b/go-controller/vendor/github.com/go-playground/universal-translator/.travis.yml deleted file mode 100644 index 39b8b923e4..0000000000 --- a/go-controller/vendor/github.com/go-playground/universal-translator/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: go -go: - - 1.13.4 - - tip -matrix: - allow_failures: - - go: tip - -notifications: - email: - recipients: dean.karn@gmail.com - on_success: change - on_failure: always - -before_install: - - go install github.com/mattn/goveralls - -# Only clone the most recent commit. -git: - depth: 1 - -script: - - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... - -after_success: | - [ $TRAVIS_GO_VERSION = 1.13.4 ] && - goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN \ No newline at end of file diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/LICENSE b/go-controller/vendor/github.com/go-playground/universal-translator/LICENSE deleted file mode 100644 index 8d8aba15ba..0000000000 --- a/go-controller/vendor/github.com/go-playground/universal-translator/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Go Playground - -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. diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/Makefile b/go-controller/vendor/github.com/go-playground/universal-translator/Makefile deleted file mode 100644 index ec3455bd59..0000000000 --- a/go-controller/vendor/github.com/go-playground/universal-translator/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -GOCMD=GO111MODULE=on go - -linters-install: - @golangci-lint --version >/dev/null 2>&1 || { \ - echo "installing linting tools..."; \ - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.41.1; \ - } - -lint: linters-install - golangci-lint run - -test: - $(GOCMD) test -cover -race ./... - -bench: - $(GOCMD) test -bench=. -benchmem ./... - -.PHONY: test lint linters-install \ No newline at end of file diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/README.md b/go-controller/vendor/github.com/go-playground/universal-translator/README.md deleted file mode 100644 index d9b6654741..0000000000 --- a/go-controller/vendor/github.com/go-playground/universal-translator/README.md +++ /dev/null @@ -1,87 +0,0 @@ -## universal-translator -![Project status](https://img.shields.io/badge/version-0.18.1-green.svg) -[![Coverage Status](https://coveralls.io/repos/github/go-playground/universal-translator/badge.svg)](https://coveralls.io/github/go-playground/universal-translator) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/universal-translator)](https://goreportcard.com/report/github.com/go-playground/universal-translator) -[![GoDoc](https://godoc.org/github.com/go-playground/universal-translator?status.svg)](https://godoc.org/github.com/go-playground/universal-translator) -![License](https://img.shields.io/dub/l/vibe-d.svg) - -Universal Translator is an i18n Translator for Go/Golang using CLDR data + pluralization rules - -Why another i18n library? --------------------------- -Because none of the plural rules seem to be correct out there, including the previous implementation of this package, -so I took it upon myself to create [locales](https://github.com/go-playground/locales) for everyone to use; this package -is a thin wrapper around [locales](https://github.com/go-playground/locales) in order to store and translate text for -use in your applications. - -Features --------- -- [x] Rules generated from the [CLDR](http://cldr.unicode.org/index/downloads) data, v36.0.1 -- [x] Contains Cardinal, Ordinal and Range Plural Rules -- [x] Contains Month, Weekday and Timezone translations built in -- [x] Contains Date & Time formatting functions -- [x] Contains Number, Currency, Accounting and Percent formatting functions -- [x] Supports the "Gregorian" calendar only ( my time isn't unlimited, had to draw the line somewhere ) -- [x] Support loading translations from files -- [x] Exporting translations to file(s), mainly for getting them professionally translated -- [ ] Code Generation for translation files -> Go code.. i.e. after it has been professionally translated -- [ ] Tests for all languages, I need help with this, please see [here](https://github.com/go-playground/locales/issues/1) - -Installation ------------ - -Use go get - -```shell -go get github.com/go-playground/universal-translator -``` - -Usage & Documentation -------- - -Please see https://godoc.org/github.com/go-playground/universal-translator for usage docs - -##### Examples: - -- [Basic](https://github.com/go-playground/universal-translator/tree/master/_examples/basic) -- [Full - no files](https://github.com/go-playground/universal-translator/tree/master/_examples/full-no-files) -- [Full - with files](https://github.com/go-playground/universal-translator/tree/master/_examples/full-with-files) - -File formatting --------------- -All types, Plain substitution, Cardinal, Ordinal and Range translations can all be contained within the same file(s); -they are only separated for easy viewing. - -##### Examples: - -- [Formats](https://github.com/go-playground/universal-translator/tree/master/_examples/file-formats) - -##### Basic Makeup -NOTE: not all fields are needed for all translation types, see [examples](https://github.com/go-playground/universal-translator/tree/master/_examples/file-formats) -```json -{ - "locale": "en", - "key": "days-left", - "trans": "You have {0} day left.", - "type": "Cardinal", - "rule": "One", - "override": false -} -``` -|Field|Description| -|---|---| -|locale|The locale for which the translation is for.| -|key|The translation key that will be used to store and lookup each translation; normally it is a string or integer.| -|trans|The actual translation text.| -|type|The type of translation Cardinal, Ordinal, Range or "" for a plain substitution(not required to be defined if plain used)| -|rule|The plural rule for which the translation is for eg. One, Two, Few, Many or Other.(not required to be defined if plain used)| -|override|If you wish to override an existing translation that has already been registered, set this to 'true'. 99% of the time there is no need to define it.| - -Help With Tests ---------------- -To anyone interesting in helping or contributing, I sure could use some help creating tests for each language. -Please see issue [here](https://github.com/go-playground/locales/issues/1) for details. - -License ------- -Distributed under MIT License, please see license file in code for more details. diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/errors.go b/go-controller/vendor/github.com/go-playground/universal-translator/errors.go deleted file mode 100644 index 38b163b626..0000000000 --- a/go-controller/vendor/github.com/go-playground/universal-translator/errors.go +++ /dev/null @@ -1,148 +0,0 @@ -package ut - -import ( - "errors" - "fmt" - - "github.com/go-playground/locales" -) - -var ( - // ErrUnknowTranslation indicates the translation could not be found - ErrUnknowTranslation = errors.New("Unknown Translation") -) - -var _ error = new(ErrConflictingTranslation) -var _ error = new(ErrRangeTranslation) -var _ error = new(ErrOrdinalTranslation) -var _ error = new(ErrCardinalTranslation) -var _ error = new(ErrMissingPluralTranslation) -var _ error = new(ErrExistingTranslator) - -// ErrExistingTranslator is the error representing a conflicting translator -type ErrExistingTranslator struct { - locale string -} - -// Error returns ErrExistingTranslator's internal error text -func (e *ErrExistingTranslator) Error() string { - return fmt.Sprintf("error: conflicting translator for locale '%s'", e.locale) -} - -// ErrConflictingTranslation is the error representing a conflicting translation -type ErrConflictingTranslation struct { - locale string - key interface{} - rule locales.PluralRule - text string -} - -// Error returns ErrConflictingTranslation's internal error text -func (e *ErrConflictingTranslation) Error() string { - - if _, ok := e.key.(string); !ok { - return fmt.Sprintf("error: conflicting key '%#v' rule '%s' with text '%s' for locale '%s', value being ignored", e.key, e.rule, e.text, e.locale) - } - - return fmt.Sprintf("error: conflicting key '%s' rule '%s' with text '%s' for locale '%s', value being ignored", e.key, e.rule, e.text, e.locale) -} - -// ErrRangeTranslation is the error representing a range translation error -type ErrRangeTranslation struct { - text string -} - -// Error returns ErrRangeTranslation's internal error text -func (e *ErrRangeTranslation) Error() string { - return e.text -} - -// ErrOrdinalTranslation is the error representing an ordinal translation error -type ErrOrdinalTranslation struct { - text string -} - -// Error returns ErrOrdinalTranslation's internal error text -func (e *ErrOrdinalTranslation) Error() string { - return e.text -} - -// ErrCardinalTranslation is the error representing a cardinal translation error -type ErrCardinalTranslation struct { - text string -} - -// Error returns ErrCardinalTranslation's internal error text -func (e *ErrCardinalTranslation) Error() string { - return e.text -} - -// ErrMissingPluralTranslation is the error signifying a missing translation given -// the locales plural rules. -type ErrMissingPluralTranslation struct { - locale string - key interface{} - rule locales.PluralRule - translationType string -} - -// Error returns ErrMissingPluralTranslation's internal error text -func (e *ErrMissingPluralTranslation) Error() string { - - if _, ok := e.key.(string); !ok { - return fmt.Sprintf("error: missing '%s' plural rule '%s' for translation with key '%#v' and locale '%s'", e.translationType, e.rule, e.key, e.locale) - } - - return fmt.Sprintf("error: missing '%s' plural rule '%s' for translation with key '%s' and locale '%s'", e.translationType, e.rule, e.key, e.locale) -} - -// ErrMissingBracket is the error representing a missing bracket in a translation -// eg. This is a {0 <-- missing ending '}' -type ErrMissingBracket struct { - locale string - key interface{} - text string -} - -// Error returns ErrMissingBracket error message -func (e *ErrMissingBracket) Error() string { - return fmt.Sprintf("error: missing bracket '{}', in translation. locale: '%s' key: '%v' text: '%s'", e.locale, e.key, e.text) -} - -// ErrBadParamSyntax is the error representing a bad parameter definition in a translation -// eg. This is a {must-be-int} -type ErrBadParamSyntax struct { - locale string - param string - key interface{} - text string -} - -// Error returns ErrBadParamSyntax error message -func (e *ErrBadParamSyntax) Error() string { - return fmt.Sprintf("error: bad parameter syntax, missing parameter '%s' in translation. locale: '%s' key: '%v' text: '%s'", e.param, e.locale, e.key, e.text) -} - -// import/export errors - -// ErrMissingLocale is the error representing an expected locale that could -// not be found aka locale not registered with the UniversalTranslator Instance -type ErrMissingLocale struct { - locale string -} - -// Error returns ErrMissingLocale's internal error text -func (e *ErrMissingLocale) Error() string { - return fmt.Sprintf("error: locale '%s' not registered.", e.locale) -} - -// ErrBadPluralDefinition is the error representing an incorrect plural definition -// usually found within translations defined within files during the import process. -type ErrBadPluralDefinition struct { - tl translation -} - -// Error returns ErrBadPluralDefinition's internal error text -func (e *ErrBadPluralDefinition) Error() string { - return fmt.Sprintf("error: bad plural definition '%#v'", e.tl) -} diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/import_export.go b/go-controller/vendor/github.com/go-playground/universal-translator/import_export.go deleted file mode 100644 index 87a1b465cb..0000000000 --- a/go-controller/vendor/github.com/go-playground/universal-translator/import_export.go +++ /dev/null @@ -1,274 +0,0 @@ -package ut - -import ( - "encoding/json" - "fmt" - "os" - "path/filepath" - - "io" - - "github.com/go-playground/locales" -) - -type translation struct { - Locale string `json:"locale"` - Key interface{} `json:"key"` // either string or integer - Translation string `json:"trans"` - PluralType string `json:"type,omitempty"` - PluralRule string `json:"rule,omitempty"` - OverrideExisting bool `json:"override,omitempty"` -} - -const ( - cardinalType = "Cardinal" - ordinalType = "Ordinal" - rangeType = "Range" -) - -// ImportExportFormat is the format of the file import or export -type ImportExportFormat uint8 - -// supported Export Formats -const ( - FormatJSON ImportExportFormat = iota -) - -// Export writes the translations out to a file on disk. -// -// NOTE: this currently only works with string or int translations keys. -func (t *UniversalTranslator) Export(format ImportExportFormat, dirname string) error { - - _, err := os.Stat(dirname) - if err != nil { - - if !os.IsNotExist(err) { - return err - } - - if err = os.MkdirAll(dirname, 0744); err != nil { - return err - } - } - - // build up translations - var trans []translation - var b []byte - var ext string - - for _, locale := range t.translators { - - for k, v := range locale.(*translator).translations { - trans = append(trans, translation{ - Locale: locale.Locale(), - Key: k, - Translation: v.text, - }) - } - - for k, pluralTrans := range locale.(*translator).cardinalTanslations { - - for i, plural := range pluralTrans { - - // leave enough for all plural rules - // but not all are set for all languages. - if plural == nil { - continue - } - - trans = append(trans, translation{ - Locale: locale.Locale(), - Key: k.(string), - Translation: plural.text, - PluralType: cardinalType, - PluralRule: locales.PluralRule(i).String(), - }) - } - } - - for k, pluralTrans := range locale.(*translator).ordinalTanslations { - - for i, plural := range pluralTrans { - - // leave enough for all plural rules - // but not all are set for all languages. - if plural == nil { - continue - } - - trans = append(trans, translation{ - Locale: locale.Locale(), - Key: k.(string), - Translation: plural.text, - PluralType: ordinalType, - PluralRule: locales.PluralRule(i).String(), - }) - } - } - - for k, pluralTrans := range locale.(*translator).rangeTanslations { - - for i, plural := range pluralTrans { - - // leave enough for all plural rules - // but not all are set for all languages. - if plural == nil { - continue - } - - trans = append(trans, translation{ - Locale: locale.Locale(), - Key: k.(string), - Translation: plural.text, - PluralType: rangeType, - PluralRule: locales.PluralRule(i).String(), - }) - } - } - - switch format { - case FormatJSON: - b, err = json.MarshalIndent(trans, "", " ") - ext = ".json" - } - - if err != nil { - return err - } - - err = os.WriteFile(filepath.Join(dirname, fmt.Sprintf("%s%s", locale.Locale(), ext)), b, 0644) - if err != nil { - return err - } - - trans = trans[0:0] - } - - return nil -} - -// Import reads the translations out of a file or directory on disk. -// -// NOTE: this currently only works with string or int translations keys. -func (t *UniversalTranslator) Import(format ImportExportFormat, dirnameOrFilename string) error { - - fi, err := os.Stat(dirnameOrFilename) - if err != nil { - return err - } - - processFn := func(filename string) error { - - f, err := os.Open(filename) - if err != nil { - return err - } - defer f.Close() - - return t.ImportByReader(format, f) - } - - if !fi.IsDir() { - return processFn(dirnameOrFilename) - } - - // recursively go through directory - walker := func(path string, info os.FileInfo, err error) error { - - if info.IsDir() { - return nil - } - - switch format { - case FormatJSON: - // skip non JSON files - if filepath.Ext(info.Name()) != ".json" { - return nil - } - } - - return processFn(path) - } - - return filepath.Walk(dirnameOrFilename, walker) -} - -// ImportByReader imports the the translations found within the contents read from the supplied reader. -// -// NOTE: generally used when assets have been embedded into the binary and are already in memory. -func (t *UniversalTranslator) ImportByReader(format ImportExportFormat, reader io.Reader) error { - - b, err := io.ReadAll(reader) - if err != nil { - return err - } - - var trans []translation - - switch format { - case FormatJSON: - err = json.Unmarshal(b, &trans) - } - - if err != nil { - return err - } - - for _, tl := range trans { - - locale, found := t.FindTranslator(tl.Locale) - if !found { - return &ErrMissingLocale{locale: tl.Locale} - } - - pr := stringToPR(tl.PluralRule) - - if pr == locales.PluralRuleUnknown { - - err = locale.Add(tl.Key, tl.Translation, tl.OverrideExisting) - if err != nil { - return err - } - - continue - } - - switch tl.PluralType { - case cardinalType: - err = locale.AddCardinal(tl.Key, tl.Translation, pr, tl.OverrideExisting) - case ordinalType: - err = locale.AddOrdinal(tl.Key, tl.Translation, pr, tl.OverrideExisting) - case rangeType: - err = locale.AddRange(tl.Key, tl.Translation, pr, tl.OverrideExisting) - default: - return &ErrBadPluralDefinition{tl: tl} - } - - if err != nil { - return err - } - } - - return nil -} - -func stringToPR(s string) locales.PluralRule { - - switch s { - case "Zero": - return locales.PluralRuleZero - case "One": - return locales.PluralRuleOne - case "Two": - return locales.PluralRuleTwo - case "Few": - return locales.PluralRuleFew - case "Many": - return locales.PluralRuleMany - case "Other": - return locales.PluralRuleOther - default: - return locales.PluralRuleUnknown - } - -} diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/logo.png b/go-controller/vendor/github.com/go-playground/universal-translator/logo.png deleted file mode 100644 index a37aa8c0cd..0000000000 Binary files a/go-controller/vendor/github.com/go-playground/universal-translator/logo.png and /dev/null differ diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/translator.go b/go-controller/vendor/github.com/go-playground/universal-translator/translator.go deleted file mode 100644 index 24b18db92a..0000000000 --- a/go-controller/vendor/github.com/go-playground/universal-translator/translator.go +++ /dev/null @@ -1,420 +0,0 @@ -package ut - -import ( - "fmt" - "strconv" - "strings" - - "github.com/go-playground/locales" -) - -const ( - paramZero = "{0}" - paramOne = "{1}" - unknownTranslation = "" -) - -// Translator is universal translators -// translator instance which is a thin wrapper -// around locales.Translator instance providing -// some extra functionality -type Translator interface { - locales.Translator - - // adds a normal translation for a particular language/locale - // {#} is the only replacement type accepted and are ad infinitum - // eg. one: '{0} day left' other: '{0} days left' - Add(key interface{}, text string, override bool) error - - // adds a cardinal plural translation for a particular language/locale - // {0} is the only replacement type accepted and only one variable is accepted as - // multiple cannot be used for a plural rule determination, unless it is a range; - // see AddRange below. - // eg. in locale 'en' one: '{0} day left' other: '{0} days left' - AddCardinal(key interface{}, text string, rule locales.PluralRule, override bool) error - - // adds an ordinal plural translation for a particular language/locale - // {0} is the only replacement type accepted and only one variable is accepted as - // multiple cannot be used for a plural rule determination, unless it is a range; - // see AddRange below. - // eg. in locale 'en' one: '{0}st day of spring' other: '{0}nd day of spring' - // - 1st, 2nd, 3rd... - AddOrdinal(key interface{}, text string, rule locales.PluralRule, override bool) error - - // adds a range plural translation for a particular language/locale - // {0} and {1} are the only replacement types accepted and only these are accepted. - // eg. in locale 'nl' one: '{0}-{1} day left' other: '{0}-{1} days left' - AddRange(key interface{}, text string, rule locales.PluralRule, override bool) error - - // creates the translation for the locale given the 'key' and params passed in - T(key interface{}, params ...string) (string, error) - - // creates the cardinal translation for the locale given the 'key', 'num' and 'digit' arguments - // and param passed in - C(key interface{}, num float64, digits uint64, param string) (string, error) - - // creates the ordinal translation for the locale given the 'key', 'num' and 'digit' arguments - // and param passed in - O(key interface{}, num float64, digits uint64, param string) (string, error) - - // creates the range translation for the locale given the 'key', 'num1', 'digit1', 'num2' and - // 'digit2' arguments and 'param1' and 'param2' passed in - R(key interface{}, num1 float64, digits1 uint64, num2 float64, digits2 uint64, param1, param2 string) (string, error) - - // VerifyTranslations checks to ensures that no plural rules have been - // missed within the translations. - VerifyTranslations() error -} - -var _ Translator = new(translator) -var _ locales.Translator = new(translator) - -type translator struct { - locales.Translator - translations map[interface{}]*transText - cardinalTanslations map[interface{}][]*transText // array index is mapped to locales.PluralRule index + the locales.PluralRuleUnknown - ordinalTanslations map[interface{}][]*transText - rangeTanslations map[interface{}][]*transText -} - -type transText struct { - text string - indexes []int -} - -func newTranslator(trans locales.Translator) Translator { - return &translator{ - Translator: trans, - translations: make(map[interface{}]*transText), // translation text broken up by byte index - cardinalTanslations: make(map[interface{}][]*transText), - ordinalTanslations: make(map[interface{}][]*transText), - rangeTanslations: make(map[interface{}][]*transText), - } -} - -// Add adds a normal translation for a particular language/locale -// {#} is the only replacement type accepted and are ad infinitum -// eg. one: '{0} day left' other: '{0} days left' -func (t *translator) Add(key interface{}, text string, override bool) error { - - if _, ok := t.translations[key]; ok && !override { - return &ErrConflictingTranslation{locale: t.Locale(), key: key, text: text} - } - - lb := strings.Count(text, "{") - rb := strings.Count(text, "}") - - if lb != rb { - return &ErrMissingBracket{locale: t.Locale(), key: key, text: text} - } - - trans := &transText{ - text: text, - } - - var idx int - - for i := 0; i < lb; i++ { - s := "{" + strconv.Itoa(i) + "}" - idx = strings.Index(text, s) - if idx == -1 { - return &ErrBadParamSyntax{locale: t.Locale(), param: s, key: key, text: text} - } - - trans.indexes = append(trans.indexes, idx) - trans.indexes = append(trans.indexes, idx+len(s)) - } - - t.translations[key] = trans - - return nil -} - -// AddCardinal adds a cardinal plural translation for a particular language/locale -// {0} is the only replacement type accepted and only one variable is accepted as -// multiple cannot be used for a plural rule determination, unless it is a range; -// see AddRange below. -// eg. in locale 'en' one: '{0} day left' other: '{0} days left' -func (t *translator) AddCardinal(key interface{}, text string, rule locales.PluralRule, override bool) error { - - var verified bool - - // verify plural rule exists for locale - for _, pr := range t.PluralsCardinal() { - if pr == rule { - verified = true - break - } - } - - if !verified { - return &ErrCardinalTranslation{text: fmt.Sprintf("error: cardinal plural rule '%s' does not exist for locale '%s' key: '%v' text: '%s'", rule, t.Locale(), key, text)} - } - - tarr, ok := t.cardinalTanslations[key] - if ok { - // verify not adding a conflicting record - if len(tarr) > 0 && tarr[rule] != nil && !override { - return &ErrConflictingTranslation{locale: t.Locale(), key: key, rule: rule, text: text} - } - - } else { - tarr = make([]*transText, 7) - t.cardinalTanslations[key] = tarr - } - - trans := &transText{ - text: text, - indexes: make([]int, 2), - } - - tarr[rule] = trans - - idx := strings.Index(text, paramZero) - if idx == -1 { - tarr[rule] = nil - return &ErrCardinalTranslation{text: fmt.Sprintf("error: parameter '%s' not found, may want to use 'Add' instead of 'AddCardinal'. locale: '%s' key: '%v' text: '%s'", paramZero, t.Locale(), key, text)} - } - - trans.indexes[0] = idx - trans.indexes[1] = idx + len(paramZero) - - return nil -} - -// AddOrdinal adds an ordinal plural translation for a particular language/locale -// {0} is the only replacement type accepted and only one variable is accepted as -// multiple cannot be used for a plural rule determination, unless it is a range; -// see AddRange below. -// eg. in locale 'en' one: '{0}st day of spring' other: '{0}nd day of spring' - 1st, 2nd, 3rd... -func (t *translator) AddOrdinal(key interface{}, text string, rule locales.PluralRule, override bool) error { - - var verified bool - - // verify plural rule exists for locale - for _, pr := range t.PluralsOrdinal() { - if pr == rule { - verified = true - break - } - } - - if !verified { - return &ErrOrdinalTranslation{text: fmt.Sprintf("error: ordinal plural rule '%s' does not exist for locale '%s' key: '%v' text: '%s'", rule, t.Locale(), key, text)} - } - - tarr, ok := t.ordinalTanslations[key] - if ok { - // verify not adding a conflicting record - if len(tarr) > 0 && tarr[rule] != nil && !override { - return &ErrConflictingTranslation{locale: t.Locale(), key: key, rule: rule, text: text} - } - - } else { - tarr = make([]*transText, 7) - t.ordinalTanslations[key] = tarr - } - - trans := &transText{ - text: text, - indexes: make([]int, 2), - } - - tarr[rule] = trans - - idx := strings.Index(text, paramZero) - if idx == -1 { - tarr[rule] = nil - return &ErrOrdinalTranslation{text: fmt.Sprintf("error: parameter '%s' not found, may want to use 'Add' instead of 'AddOrdinal'. locale: '%s' key: '%v' text: '%s'", paramZero, t.Locale(), key, text)} - } - - trans.indexes[0] = idx - trans.indexes[1] = idx + len(paramZero) - - return nil -} - -// AddRange adds a range plural translation for a particular language/locale -// {0} and {1} are the only replacement types accepted and only these are accepted. -// eg. in locale 'nl' one: '{0}-{1} day left' other: '{0}-{1} days left' -func (t *translator) AddRange(key interface{}, text string, rule locales.PluralRule, override bool) error { - - var verified bool - - // verify plural rule exists for locale - for _, pr := range t.PluralsRange() { - if pr == rule { - verified = true - break - } - } - - if !verified { - return &ErrRangeTranslation{text: fmt.Sprintf("error: range plural rule '%s' does not exist for locale '%s' key: '%v' text: '%s'", rule, t.Locale(), key, text)} - } - - tarr, ok := t.rangeTanslations[key] - if ok { - // verify not adding a conflicting record - if len(tarr) > 0 && tarr[rule] != nil && !override { - return &ErrConflictingTranslation{locale: t.Locale(), key: key, rule: rule, text: text} - } - - } else { - tarr = make([]*transText, 7) - t.rangeTanslations[key] = tarr - } - - trans := &transText{ - text: text, - indexes: make([]int, 4), - } - - tarr[rule] = trans - - idx := strings.Index(text, paramZero) - if idx == -1 { - tarr[rule] = nil - return &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, are you sure you're adding a Range Translation? locale: '%s' key: '%v' text: '%s'", paramZero, t.Locale(), key, text)} - } - - trans.indexes[0] = idx - trans.indexes[1] = idx + len(paramZero) - - idx = strings.Index(text, paramOne) - if idx == -1 { - tarr[rule] = nil - return &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, a Range Translation requires two parameters. locale: '%s' key: '%v' text: '%s'", paramOne, t.Locale(), key, text)} - } - - trans.indexes[2] = idx - trans.indexes[3] = idx + len(paramOne) - - return nil -} - -// T creates the translation for the locale given the 'key' and params passed in -func (t *translator) T(key interface{}, params ...string) (string, error) { - - trans, ok := t.translations[key] - if !ok { - return unknownTranslation, ErrUnknowTranslation - } - - b := make([]byte, 0, 64) - - var start, end, count int - - for i := 0; i < len(trans.indexes); i++ { - end = trans.indexes[i] - b = append(b, trans.text[start:end]...) - b = append(b, params[count]...) - i++ - start = trans.indexes[i] - count++ - } - - b = append(b, trans.text[start:]...) - - return string(b), nil -} - -// C creates the cardinal translation for the locale given the 'key', 'num' and 'digit' arguments and param passed in -func (t *translator) C(key interface{}, num float64, digits uint64, param string) (string, error) { - - tarr, ok := t.cardinalTanslations[key] - if !ok { - return unknownTranslation, ErrUnknowTranslation - } - - rule := t.CardinalPluralRule(num, digits) - - trans := tarr[rule] - - b := make([]byte, 0, 64) - b = append(b, trans.text[:trans.indexes[0]]...) - b = append(b, param...) - b = append(b, trans.text[trans.indexes[1]:]...) - - return string(b), nil -} - -// O creates the ordinal translation for the locale given the 'key', 'num' and 'digit' arguments and param passed in -func (t *translator) O(key interface{}, num float64, digits uint64, param string) (string, error) { - - tarr, ok := t.ordinalTanslations[key] - if !ok { - return unknownTranslation, ErrUnknowTranslation - } - - rule := t.OrdinalPluralRule(num, digits) - - trans := tarr[rule] - - b := make([]byte, 0, 64) - b = append(b, trans.text[:trans.indexes[0]]...) - b = append(b, param...) - b = append(b, trans.text[trans.indexes[1]:]...) - - return string(b), nil -} - -// R creates the range translation for the locale given the 'key', 'num1', 'digit1', 'num2' and 'digit2' arguments -// and 'param1' and 'param2' passed in -func (t *translator) R(key interface{}, num1 float64, digits1 uint64, num2 float64, digits2 uint64, param1, param2 string) (string, error) { - - tarr, ok := t.rangeTanslations[key] - if !ok { - return unknownTranslation, ErrUnknowTranslation - } - - rule := t.RangePluralRule(num1, digits1, num2, digits2) - - trans := tarr[rule] - - b := make([]byte, 0, 64) - b = append(b, trans.text[:trans.indexes[0]]...) - b = append(b, param1...) - b = append(b, trans.text[trans.indexes[1]:trans.indexes[2]]...) - b = append(b, param2...) - b = append(b, trans.text[trans.indexes[3]:]...) - - return string(b), nil -} - -// VerifyTranslations checks to ensures that no plural rules have been -// missed within the translations. -func (t *translator) VerifyTranslations() error { - - for k, v := range t.cardinalTanslations { - - for _, rule := range t.PluralsCardinal() { - - if v[rule] == nil { - return &ErrMissingPluralTranslation{locale: t.Locale(), translationType: "plural", rule: rule, key: k} - } - } - } - - for k, v := range t.ordinalTanslations { - - for _, rule := range t.PluralsOrdinal() { - - if v[rule] == nil { - return &ErrMissingPluralTranslation{locale: t.Locale(), translationType: "ordinal", rule: rule, key: k} - } - } - } - - for k, v := range t.rangeTanslations { - - for _, rule := range t.PluralsRange() { - - if v[rule] == nil { - return &ErrMissingPluralTranslation{locale: t.Locale(), translationType: "range", rule: rule, key: k} - } - } - } - - return nil -} diff --git a/go-controller/vendor/github.com/go-playground/universal-translator/universal_translator.go b/go-controller/vendor/github.com/go-playground/universal-translator/universal_translator.go deleted file mode 100644 index dbf707f5c7..0000000000 --- a/go-controller/vendor/github.com/go-playground/universal-translator/universal_translator.go +++ /dev/null @@ -1,113 +0,0 @@ -package ut - -import ( - "strings" - - "github.com/go-playground/locales" -) - -// UniversalTranslator holds all locale & translation data -type UniversalTranslator struct { - translators map[string]Translator - fallback Translator -} - -// New returns a new UniversalTranslator instance set with -// the fallback locale and locales it should support -func New(fallback locales.Translator, supportedLocales ...locales.Translator) *UniversalTranslator { - - t := &UniversalTranslator{ - translators: make(map[string]Translator), - } - - for _, v := range supportedLocales { - - trans := newTranslator(v) - t.translators[strings.ToLower(trans.Locale())] = trans - - if fallback.Locale() == v.Locale() { - t.fallback = trans - } - } - - if t.fallback == nil && fallback != nil { - t.fallback = newTranslator(fallback) - } - - return t -} - -// FindTranslator trys to find a Translator based on an array of locales -// and returns the first one it can find, otherwise returns the -// fallback translator. -func (t *UniversalTranslator) FindTranslator(locales ...string) (trans Translator, found bool) { - - for _, locale := range locales { - - if trans, found = t.translators[strings.ToLower(locale)]; found { - return - } - } - - return t.fallback, false -} - -// GetTranslator returns the specified translator for the given locale, -// or fallback if not found -func (t *UniversalTranslator) GetTranslator(locale string) (trans Translator, found bool) { - - if trans, found = t.translators[strings.ToLower(locale)]; found { - return - } - - return t.fallback, false -} - -// GetFallback returns the fallback locale -func (t *UniversalTranslator) GetFallback() Translator { - return t.fallback -} - -// AddTranslator adds the supplied translator, if it already exists the override param -// will be checked and if false an error will be returned, otherwise the translator will be -// overridden; if the fallback matches the supplied translator it will be overridden as well -// NOTE: this is normally only used when translator is embedded within a library -func (t *UniversalTranslator) AddTranslator(translator locales.Translator, override bool) error { - - lc := strings.ToLower(translator.Locale()) - _, ok := t.translators[lc] - if ok && !override { - return &ErrExistingTranslator{locale: translator.Locale()} - } - - trans := newTranslator(translator) - - if t.fallback.Locale() == translator.Locale() { - - // because it's optional to have a fallback, I don't impose that limitation - // don't know why you wouldn't but... - if !override { - return &ErrExistingTranslator{locale: translator.Locale()} - } - - t.fallback = trans - } - - t.translators[lc] = trans - - return nil -} - -// VerifyTranslations runs through all locales and identifies any issues -// eg. missing plural rules for a locale -func (t *UniversalTranslator) VerifyTranslations() (err error) { - - for _, trans := range t.translators { - err = trans.VerifyTranslations() - if err != nil { - return - } - } - - return -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/.gitignore b/go-controller/vendor/github.com/go-playground/validator/v10/.gitignore deleted file mode 100644 index 6305e52900..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test -bin - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof -*.test -*.out -*.txt -/**/*.DS_Store -cover.html -README.html -.idea diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/.golangci.yaml b/go-controller/vendor/github.com/go-playground/validator/v10/.golangci.yaml deleted file mode 100644 index eab557ee24..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/.golangci.yaml +++ /dev/null @@ -1,102 +0,0 @@ -version: "2" -linters: - default: all - disable: - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - cyclop - - decorder - - depguard - - dogsled - - dupl - - dupword - - durationcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - exhaustive - - exhaustruct - - exptostd - - fatcontext - - forbidigo - - forcetypeassert - - funlen - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoglobals - - gochecknoinits - - gochecksumtype - - gocognit - - goconst - - gocritic - - gocyclo - - godot - - godox - - goheader - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosmopolitan - - govet - - grouper - - iface - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - ireturn - - lll - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - mnd - - musttag - - nakedret - - nestif - - nilerr - - nilnesserr - - nilnil - - nlreturn - - noctx - - nolintlint - - nonamedreturns - - nosprintfhostport - - paralleltest - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - recvcheck - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - tagalign - - tagliatelle - - testableexamples - - testifylint - - testpackage - - thelper - - tparallel - - unparam - - varnamelen - - whitespace - - wrapcheck - - wsl - - zerologlint \ No newline at end of file diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/LICENSE b/go-controller/vendor/github.com/go-playground/validator/v10/LICENSE deleted file mode 100644 index 6a2ae9aa4d..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Dean Karn - -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. - diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/MAINTAINERS.md b/go-controller/vendor/github.com/go-playground/validator/v10/MAINTAINERS.md deleted file mode 100644 index b809c4ce12..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/MAINTAINERS.md +++ /dev/null @@ -1,16 +0,0 @@ -## Maintainers Guide - -### Semantic Versioning -Semantic versioning as defined [here](https://semver.org) must be strictly adhered to. - -### External Dependencies -Any new external dependencies MUST: -- Have a compatible LICENSE present. -- Be actively maintained. -- Be approved by @go-playground/admins - -### PR Merge Requirements -- Up-to-date branch. -- Passing tests and linting. -- CODEOWNERS approval. -- Tests that cover both the Happy and Unhappy paths. \ No newline at end of file diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/Makefile b/go-controller/vendor/github.com/go-playground/validator/v10/Makefile deleted file mode 100644 index e7caab7f12..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -GOCMD=go - -linters-install: - @golangci-lint --version >/dev/null 2>&1 || { \ - echo "installing linting tools..."; \ - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v2.0.2; \ - } - -lint: linters-install - golangci-lint run - -test: - $(GOCMD) test -cover -race ./... - -bench: - $(GOCMD) test -run=NONE -bench=. -benchmem ./... - -.PHONY: test lint linters-install diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/README.md b/go-controller/vendor/github.com/go-playground/validator/v10/README.md deleted file mode 100644 index 368b966a65..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/README.md +++ /dev/null @@ -1,379 +0,0 @@ -Package validator -================= -![Project status](https://img.shields.io/badge/version-10.25.0-green.svg) -[![Build Status](https://github.com/go-playground/validator/actions/workflows/workflow.yml/badge.svg)](https://github.com/go-playground/validator/actions) -[![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=master&service=github)](https://coveralls.io/github/go-playground/validator?branch=master) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator) -[![GoDoc](https://godoc.org/github.com/go-playground/validator?status.svg)](https://pkg.go.dev/github.com/go-playground/validator/v10) -![License](https://img.shields.io/dub/l/vibe-d.svg) - -Package validator implements value validations for structs and individual fields based on tags. - -It has the following **unique** features: - -- Cross Field and Cross Struct validations by using validation tags or custom validators. -- Slice, Array and Map diving, which allows any or all levels of a multidimensional field to be validated. -- Ability to dive into both map keys and values for validation -- Handles type interface by determining it's underlying type prior to validation. -- Handles custom field types such as sql driver Valuer see [Valuer](https://golang.org/src/database/sql/driver/types.go?s=1210:1293#L29) -- Alias validation tags, which allows for mapping of several validations to a single tag for easier defining of validations on structs -- Extraction of custom defined Field Name e.g. can specify to extract the JSON name while validating and have it available in the resulting FieldError -- Customizable i18n aware error messages. -- Default validator for the [gin](https://github.com/gin-gonic/gin) web framework; upgrading from v8 to v9 in gin see [here](https://github.com/go-playground/validator/tree/master/_examples/gin-upgrading-overriding) - -A Call for Maintainers ----------------------- - -Please read the discussiong started [here](https://github.com/go-playground/validator/discussions/1330) if you are interested in contributing/helping maintain this package. - -Installation ------------- - -Use go get. - - go get github.com/go-playground/validator/v10 - -Then import the validator package into your own code. - - import "github.com/go-playground/validator/v10" - -Error Return Value -------- - -Validation functions return type error - -They return type error to avoid the issue discussed in the following, where err is always != nil: - -* http://stackoverflow.com/a/29138676/3158232 -* https://github.com/go-playground/validator/issues/134 - -Validator returns only InvalidValidationError for bad validation input, nil or ValidationErrors as type error; so, in your code all you need to do is check if the error returned is not nil, and if it's not check if error is InvalidValidationError ( if necessary, most of the time it isn't ) type cast it to type ValidationErrors like so: - -```go -err := validate.Struct(mystruct) -validationErrors := err.(validator.ValidationErrors) - ``` - -Usage and documentation ------- - -Please see https://pkg.go.dev/github.com/go-playground/validator/v10 for detailed usage docs. - -##### Examples: - -- [Simple](https://github.com/go-playground/validator/blob/master/_examples/simple/main.go) -- [Custom Field Types](https://github.com/go-playground/validator/blob/master/_examples/custom/main.go) -- [Struct Level](https://github.com/go-playground/validator/blob/master/_examples/struct-level/main.go) -- [Translations & Custom Errors](https://github.com/go-playground/validator/blob/master/_examples/translations/main.go) -- [Gin upgrade and/or override validator](https://github.com/go-playground/validator/tree/v9/_examples/gin-upgrading-overriding) -- [wash - an example application putting it all together](https://github.com/bluesuncorp/wash) - -Baked-in Validations ------- - -### Special Notes: -- If new to using validator it is highly recommended to initialize it using the `WithRequiredStructEnabled` option which is opt-in to new behaviour that will become the default behaviour in v11+. See documentation for more details. -```go -validate := validator.New(validator.WithRequiredStructEnabled()) -``` - -### Fields: - -| Tag | Description | -| - | - | -| eqcsfield | Field Equals Another Field (relative)| -| eqfield | Field Equals Another Field | -| fieldcontains | Check the indicated characters are present in the Field | -| fieldexcludes | Check the indicated characters are not present in the field | -| gtcsfield | Field Greater Than Another Relative Field | -| gtecsfield | Field Greater Than or Equal To Another Relative Field | -| gtefield | Field Greater Than or Equal To Another Field | -| gtfield | Field Greater Than Another Field | -| ltcsfield | Less Than Another Relative Field | -| ltecsfield | Less Than or Equal To Another Relative Field | -| ltefield | Less Than or Equal To Another Field | -| ltfield | Less Than Another Field | -| necsfield | Field Does Not Equal Another Field (relative) | -| nefield | Field Does Not Equal Another Field | - -### Network: - -| Tag | Description | -| - | - | -| cidr | Classless Inter-Domain Routing CIDR | -| cidrv4 | Classless Inter-Domain Routing CIDRv4 | -| cidrv6 | Classless Inter-Domain Routing CIDRv6 | -| datauri | Data URL | -| fqdn | Full Qualified Domain Name (FQDN) | -| hostname | Hostname RFC 952 | -| hostname_port | HostPort | -| hostname_rfc1123 | Hostname RFC 1123 | -| ip | Internet Protocol Address IP | -| ip4_addr | Internet Protocol Address IPv4 | -| ip6_addr | Internet Protocol Address IPv6 | -| ip_addr | Internet Protocol Address IP | -| ipv4 | Internet Protocol Address IPv4 | -| ipv6 | Internet Protocol Address IPv6 | -| mac | Media Access Control Address MAC | -| tcp4_addr | Transmission Control Protocol Address TCPv4 | -| tcp6_addr | Transmission Control Protocol Address TCPv6 | -| tcp_addr | Transmission Control Protocol Address TCP | -| udp4_addr | User Datagram Protocol Address UDPv4 | -| udp6_addr | User Datagram Protocol Address UDPv6 | -| udp_addr | User Datagram Protocol Address UDP | -| unix_addr | Unix domain socket end point Address | -| uri | URI String | -| url | URL String | -| http_url | HTTP URL String | -| url_encoded | URL Encoded | -| urn_rfc2141 | Urn RFC 2141 String | - -### Strings: - -| Tag | Description | -| - | - | -| alpha | Alpha Only | -| alphanum | Alphanumeric | -| alphanumunicode | Alphanumeric Unicode | -| alphaunicode | Alpha Unicode | -| ascii | ASCII | -| boolean | Boolean | -| contains | Contains | -| containsany | Contains Any | -| containsrune | Contains Rune | -| endsnotwith | Ends Not With | -| endswith | Ends With | -| excludes | Excludes | -| excludesall | Excludes All | -| excludesrune | Excludes Rune | -| lowercase | Lowercase | -| multibyte | Multi-Byte Characters | -| number | Number | -| numeric | Numeric | -| printascii | Printable ASCII | -| startsnotwith | Starts Not With | -| startswith | Starts With | -| uppercase | Uppercase | - -### Format: -| Tag | Description | -| - | - | -| base64 | Base64 String | -| base64url | Base64URL String | -| base64rawurl | Base64RawURL String | -| bic | Business Identifier Code (ISO 9362) | -| bcp47_language_tag | Language tag (BCP 47) | -| btc_addr | Bitcoin Address | -| btc_addr_bech32 | Bitcoin Bech32 Address (segwit) | -| credit_card | Credit Card Number | -| mongodb | MongoDB ObjectID | -| mongodb_connection_string | MongoDB Connection String | -| cron | Cron | -| spicedb | SpiceDb ObjectID/Permission/Type | -| datetime | Datetime | -| e164 | e164 formatted phone number | -| ein | U.S. Employeer Identification Number | -| email | E-mail String -| eth_addr | Ethereum Address | -| hexadecimal | Hexadecimal String | -| hexcolor | Hexcolor String | -| hsl | HSL String | -| hsla | HSLA String | -| html | HTML Tags | -| html_encoded | HTML Encoded | -| isbn | International Standard Book Number | -| isbn10 | International Standard Book Number 10 | -| isbn13 | International Standard Book Number 13 | -| issn | International Standard Serial Number | -| iso3166_1_alpha2 | Two-letter country code (ISO 3166-1 alpha-2) | -| iso3166_1_alpha3 | Three-letter country code (ISO 3166-1 alpha-3) | -| iso3166_1_alpha_numeric | Numeric country code (ISO 3166-1 numeric) | -| iso3166_2 | Country subdivision code (ISO 3166-2) | -| iso4217 | Currency code (ISO 4217) | -| json | JSON | -| jwt | JSON Web Token (JWT) | -| latitude | Latitude | -| longitude | Longitude | -| luhn_checksum | Luhn Algorithm Checksum (for strings and (u)int) | -| postcode_iso3166_alpha2 | Postcode | -| postcode_iso3166_alpha2_field | Postcode | -| rgb | RGB String | -| rgba | RGBA String | -| ssn | Social Security Number SSN | -| timezone | Timezone | -| uuid | Universally Unique Identifier UUID | -| uuid3 | Universally Unique Identifier UUID v3 | -| uuid3_rfc4122 | Universally Unique Identifier UUID v3 RFC4122 | -| uuid4 | Universally Unique Identifier UUID v4 | -| uuid4_rfc4122 | Universally Unique Identifier UUID v4 RFC4122 | -| uuid5 | Universally Unique Identifier UUID v5 | -| uuid5_rfc4122 | Universally Unique Identifier UUID v5 RFC4122 | -| uuid_rfc4122 | Universally Unique Identifier UUID RFC4122 | -| md4 | MD4 hash | -| md5 | MD5 hash | -| sha256 | SHA256 hash | -| sha384 | SHA384 hash | -| sha512 | SHA512 hash | -| ripemd128 | RIPEMD-128 hash | -| ripemd128 | RIPEMD-160 hash | -| tiger128 | TIGER128 hash | -| tiger160 | TIGER160 hash | -| tiger192 | TIGER192 hash | -| semver | Semantic Versioning 2.0.0 | -| ulid | Universally Unique Lexicographically Sortable Identifier ULID | -| cve | Common Vulnerabilities and Exposures Identifier (CVE id) | - -### Comparisons: -| Tag | Description | -| - | - | -| eq | Equals | -| eq_ignore_case | Equals ignoring case | -| gt | Greater than| -| gte | Greater than or equal | -| lt | Less Than | -| lte | Less Than or Equal | -| ne | Not Equal | -| ne_ignore_case | Not Equal ignoring case | - -### Other: -| Tag | Description | -| - | - | -| dir | Existing Directory | -| dirpath | Directory Path | -| file | Existing File | -| filepath | File Path | -| image | Image | -| isdefault | Is Default | -| len | Length | -| max | Maximum | -| min | Minimum | -| oneof | One Of | -| required | Required | -| required_if | Required If | -| required_unless | Required Unless | -| required_with | Required With | -| required_with_all | Required With All | -| required_without | Required Without | -| required_without_all | Required Without All | -| excluded_if | Excluded If | -| excluded_unless | Excluded Unless | -| excluded_with | Excluded With | -| excluded_with_all | Excluded With All | -| excluded_without | Excluded Without | -| excluded_without_all | Excluded Without All | -| unique | Unique | - -#### Aliases: -| Tag | Description | -| - | - | -| iscolor | hexcolor\|rgb\|rgba\|hsl\|hsla | -| country_code | iso3166_1_alpha2\|iso3166_1_alpha3\|iso3166_1_alpha_numeric | - -Benchmarks ------- -###### Run on MacBook Pro Max M3 -```go -go version go1.23.3 darwin/arm64 -goos: darwin -goarch: arm64 -cpu: Apple M3 Max -pkg: github.com/go-playground/validator/v10 -BenchmarkFieldSuccess-16 42461943 27.88 ns/op 0 B/op 0 allocs/op -BenchmarkFieldSuccessParallel-16 486632887 2.289 ns/op 0 B/op 0 allocs/op -BenchmarkFieldFailure-16 9566167 121.3 ns/op 200 B/op 4 allocs/op -BenchmarkFieldFailureParallel-16 17551471 83.68 ns/op 200 B/op 4 allocs/op -BenchmarkFieldArrayDiveSuccess-16 7602306 155.6 ns/op 97 B/op 5 allocs/op -BenchmarkFieldArrayDiveSuccessParallel-16 20664610 59.80 ns/op 97 B/op 5 allocs/op -BenchmarkFieldArrayDiveFailure-16 4659756 252.9 ns/op 301 B/op 10 allocs/op -BenchmarkFieldArrayDiveFailureParallel-16 8010116 152.9 ns/op 301 B/op 10 allocs/op -BenchmarkFieldMapDiveSuccess-16 2834575 421.2 ns/op 288 B/op 14 allocs/op -BenchmarkFieldMapDiveSuccessParallel-16 7179700 171.8 ns/op 288 B/op 14 allocs/op -BenchmarkFieldMapDiveFailure-16 3081728 384.4 ns/op 376 B/op 13 allocs/op -BenchmarkFieldMapDiveFailureParallel-16 6058137 204.0 ns/op 377 B/op 13 allocs/op -BenchmarkFieldMapDiveWithKeysSuccess-16 2544975 464.8 ns/op 288 B/op 14 allocs/op -BenchmarkFieldMapDiveWithKeysSuccessParallel-16 6661954 181.4 ns/op 288 B/op 14 allocs/op -BenchmarkFieldMapDiveWithKeysFailure-16 2435484 490.7 ns/op 553 B/op 16 allocs/op -BenchmarkFieldMapDiveWithKeysFailureParallel-16 4249617 282.0 ns/op 554 B/op 16 allocs/op -BenchmarkFieldCustomTypeSuccess-16 14943525 77.35 ns/op 32 B/op 2 allocs/op -BenchmarkFieldCustomTypeSuccessParallel-16 64051954 20.61 ns/op 32 B/op 2 allocs/op -BenchmarkFieldCustomTypeFailure-16 10721384 107.1 ns/op 184 B/op 3 allocs/op -BenchmarkFieldCustomTypeFailureParallel-16 18714495 69.77 ns/op 184 B/op 3 allocs/op -BenchmarkFieldOrTagSuccess-16 4063124 294.3 ns/op 16 B/op 1 allocs/op -BenchmarkFieldOrTagSuccessParallel-16 31903756 41.22 ns/op 18 B/op 1 allocs/op -BenchmarkFieldOrTagFailure-16 7748558 146.8 ns/op 216 B/op 5 allocs/op -BenchmarkFieldOrTagFailureParallel-16 13139854 92.05 ns/op 216 B/op 5 allocs/op -BenchmarkStructLevelValidationSuccess-16 16808389 70.25 ns/op 16 B/op 1 allocs/op -BenchmarkStructLevelValidationSuccessParallel-16 90686955 14.47 ns/op 16 B/op 1 allocs/op -BenchmarkStructLevelValidationFailure-16 5818791 200.2 ns/op 264 B/op 7 allocs/op -BenchmarkStructLevelValidationFailureParallel-16 11115874 107.5 ns/op 264 B/op 7 allocs/op -BenchmarkStructSimpleCustomTypeSuccess-16 7764956 151.9 ns/op 32 B/op 2 allocs/op -BenchmarkStructSimpleCustomTypeSuccessParallel-16 52316265 30.37 ns/op 32 B/op 2 allocs/op -BenchmarkStructSimpleCustomTypeFailure-16 4195429 277.2 ns/op 416 B/op 9 allocs/op -BenchmarkStructSimpleCustomTypeFailureParallel-16 7305661 164.6 ns/op 432 B/op 10 allocs/op -BenchmarkStructFilteredSuccess-16 6312625 186.1 ns/op 216 B/op 5 allocs/op -BenchmarkStructFilteredSuccessParallel-16 13684459 93.42 ns/op 216 B/op 5 allocs/op -BenchmarkStructFilteredFailure-16 6751482 171.2 ns/op 216 B/op 5 allocs/op -BenchmarkStructFilteredFailureParallel-16 14146070 86.93 ns/op 216 B/op 5 allocs/op -BenchmarkStructPartialSuccess-16 6544448 177.3 ns/op 224 B/op 4 allocs/op -BenchmarkStructPartialSuccessParallel-16 13951946 88.73 ns/op 224 B/op 4 allocs/op -BenchmarkStructPartialFailure-16 4075833 287.5 ns/op 440 B/op 9 allocs/op -BenchmarkStructPartialFailureParallel-16 7490805 161.3 ns/op 440 B/op 9 allocs/op -BenchmarkStructExceptSuccess-16 4107187 281.4 ns/op 424 B/op 8 allocs/op -BenchmarkStructExceptSuccessParallel-16 15979173 80.86 ns/op 208 B/op 3 allocs/op -BenchmarkStructExceptFailure-16 4434372 264.3 ns/op 424 B/op 8 allocs/op -BenchmarkStructExceptFailureParallel-16 8081367 154.1 ns/op 424 B/op 8 allocs/op -BenchmarkStructSimpleCrossFieldSuccess-16 6459542 183.4 ns/op 56 B/op 3 allocs/op -BenchmarkStructSimpleCrossFieldSuccessParallel-16 41013781 37.95 ns/op 56 B/op 3 allocs/op -BenchmarkStructSimpleCrossFieldFailure-16 4034998 292.1 ns/op 272 B/op 8 allocs/op -BenchmarkStructSimpleCrossFieldFailureParallel-16 11348446 115.3 ns/op 272 B/op 8 allocs/op -BenchmarkStructSimpleCrossStructCrossFieldSuccess-16 4448528 267.7 ns/op 64 B/op 4 allocs/op -BenchmarkStructSimpleCrossStructCrossFieldSuccessParallel-16 26813619 48.33 ns/op 64 B/op 4 allocs/op -BenchmarkStructSimpleCrossStructCrossFieldFailure-16 3090646 384.5 ns/op 288 B/op 9 allocs/op -BenchmarkStructSimpleCrossStructCrossFieldFailureParallel-16 9870906 129.5 ns/op 288 B/op 9 allocs/op -BenchmarkStructSimpleSuccess-16 10675562 109.5 ns/op 0 B/op 0 allocs/op -BenchmarkStructSimpleSuccessParallel-16 131159784 8.932 ns/op 0 B/op 0 allocs/op -BenchmarkStructSimpleFailure-16 4094979 286.6 ns/op 416 B/op 9 allocs/op -BenchmarkStructSimpleFailureParallel-16 7606663 157.9 ns/op 416 B/op 9 allocs/op -BenchmarkStructComplexSuccess-16 2073470 576.0 ns/op 224 B/op 5 allocs/op -BenchmarkStructComplexSuccessParallel-16 7821831 161.3 ns/op 224 B/op 5 allocs/op -BenchmarkStructComplexFailure-16 576358 2001 ns/op 3042 B/op 48 allocs/op -BenchmarkStructComplexFailureParallel-16 1000000 1171 ns/op 3041 B/op 48 allocs/op -BenchmarkOneof-16 22503973 52.82 ns/op 0 B/op 0 allocs/op -BenchmarkOneofParallel-16 8538474 140.4 ns/op 0 B/op 0 allocs/op -``` - -Complementary Software ----------------------- - -Here is a list of software that complements using this library either pre or post validation. - -* [form](https://github.com/go-playground/form) - Decodes url.Values into Go value(s) and Encodes Go value(s) into url.Values. Dual Array and Full map support. -* [mold](https://github.com/go-playground/mold) - A general library to help modify or set data within data structures and other objects - -How to Contribute ------- - -Make a pull request... - -Maintenance and support for SDK major versions ----------------------------------------------- - -See prior discussion [here](https://github.com/go-playground/validator/discussions/1342) for more details. - -This package is aligned with the [Go release policy](https://go.dev/doc/devel/release) in that support is guaranteed for -the two most recent major versions. - -This does not mean the package will not work with older versions of Go, only that we reserve the right to increase the -MSGV(Minimum Supported Go Version) when the need arises to address Security issues/patches, OS issues & support or newly -introduced functionality that would greatly benefit the maintenance and/or usage of this package. - -If and when the MSGV is increased it will be done so in a minimum of a `Minor` release bump. - -License -------- -Distributed under MIT License, please see license file within the code for more details. - -Maintainers ------------ -This project has grown large enough that more than one person is required to properly support the community. -If you are interested in becoming a maintainer please reach out to me https://github.com/deankarn diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/baked_in.go b/go-controller/vendor/github.com/go-playground/validator/v10/baked_in.go deleted file mode 100644 index 5332cf3fa7..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/baked_in.go +++ /dev/null @@ -1,3081 +0,0 @@ -package validator - -import ( - "bytes" - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "io/fs" - "net" - "net/mail" - "net/url" - "os" - "reflect" - "strconv" - "strings" - "sync" - "syscall" - "time" - "unicode/utf8" - - "golang.org/x/crypto/sha3" - "golang.org/x/text/language" - - "github.com/gabriel-vasile/mimetype" - urn "github.com/leodido/go-urn" -) - -// Func accepts a FieldLevel interface for all validation needs. The return -// value should be true when validation succeeds. -type Func func(fl FieldLevel) bool - -// FuncCtx accepts a context.Context and FieldLevel interface for all -// validation needs. The return value should be true when validation succeeds. -type FuncCtx func(ctx context.Context, fl FieldLevel) bool - -// wrapFunc wraps normal Func makes it compatible with FuncCtx -func wrapFunc(fn Func) FuncCtx { - if fn == nil { - return nil // be sure not to wrap a bad function. - } - return func(ctx context.Context, fl FieldLevel) bool { - return fn(fl) - } -} - -var ( - restrictedTags = map[string]struct{}{ - diveTag: {}, - keysTag: {}, - endKeysTag: {}, - structOnlyTag: {}, - omitzero: {}, - omitempty: {}, - omitnil: {}, - skipValidationTag: {}, - utf8HexComma: {}, - utf8Pipe: {}, - noStructLevelTag: {}, - requiredTag: {}, - isdefault: {}, - } - - // bakedInAliases is a default mapping of a single validation tag that - // defines a common or complex set of validation(s) to simplify - // adding validation to structs. - bakedInAliases = map[string]string{ - "iscolor": "hexcolor|rgb|rgba|hsl|hsla", - "country_code": "iso3166_1_alpha2|iso3166_1_alpha3|iso3166_1_alpha_numeric", - "eu_country_code": "iso3166_1_alpha2_eu|iso3166_1_alpha3_eu|iso3166_1_alpha_numeric_eu", - } - - // bakedInValidators is the default map of ValidationFunc - // you can add, remove or even replace items to suite your needs, - // or even disregard and use your own map if so desired. - bakedInValidators = map[string]Func{ - "required": hasValue, - "required_if": requiredIf, - "required_unless": requiredUnless, - "skip_unless": skipUnless, - "required_with": requiredWith, - "required_with_all": requiredWithAll, - "required_without": requiredWithout, - "required_without_all": requiredWithoutAll, - "excluded_if": excludedIf, - "excluded_unless": excludedUnless, - "excluded_with": excludedWith, - "excluded_with_all": excludedWithAll, - "excluded_without": excludedWithout, - "excluded_without_all": excludedWithoutAll, - "isdefault": isDefault, - "len": hasLengthOf, - "min": hasMinOf, - "max": hasMaxOf, - "eq": isEq, - "eq_ignore_case": isEqIgnoreCase, - "ne": isNe, - "ne_ignore_case": isNeIgnoreCase, - "lt": isLt, - "lte": isLte, - "gt": isGt, - "gte": isGte, - "eqfield": isEqField, - "eqcsfield": isEqCrossStructField, - "necsfield": isNeCrossStructField, - "gtcsfield": isGtCrossStructField, - "gtecsfield": isGteCrossStructField, - "ltcsfield": isLtCrossStructField, - "ltecsfield": isLteCrossStructField, - "nefield": isNeField, - "gtefield": isGteField, - "gtfield": isGtField, - "ltefield": isLteField, - "ltfield": isLtField, - "fieldcontains": fieldContains, - "fieldexcludes": fieldExcludes, - "alpha": isAlpha, - "alphanum": isAlphanum, - "alphaunicode": isAlphaUnicode, - "alphanumunicode": isAlphanumUnicode, - "boolean": isBoolean, - "numeric": isNumeric, - "number": isNumber, - "hexadecimal": isHexadecimal, - "hexcolor": isHEXColor, - "rgb": isRGB, - "rgba": isRGBA, - "hsl": isHSL, - "hsla": isHSLA, - "e164": isE164, - "email": isEmail, - "url": isURL, - "http_url": isHttpURL, - "uri": isURI, - "urn_rfc2141": isUrnRFC2141, // RFC 2141 - "file": isFile, - "filepath": isFilePath, - "base32": isBase32, - "base64": isBase64, - "base64url": isBase64URL, - "base64rawurl": isBase64RawURL, - "contains": contains, - "containsany": containsAny, - "containsrune": containsRune, - "excludes": excludes, - "excludesall": excludesAll, - "excludesrune": excludesRune, - "startswith": startsWith, - "endswith": endsWith, - "startsnotwith": startsNotWith, - "endsnotwith": endsNotWith, - "image": isImage, - "isbn": isISBN, - "isbn10": isISBN10, - "isbn13": isISBN13, - "issn": isISSN, - "eth_addr": isEthereumAddress, - "eth_addr_checksum": isEthereumAddressChecksum, - "btc_addr": isBitcoinAddress, - "btc_addr_bech32": isBitcoinBech32Address, - "uuid": isUUID, - "uuid3": isUUID3, - "uuid4": isUUID4, - "uuid5": isUUID5, - "uuid_rfc4122": isUUIDRFC4122, - "uuid3_rfc4122": isUUID3RFC4122, - "uuid4_rfc4122": isUUID4RFC4122, - "uuid5_rfc4122": isUUID5RFC4122, - "ulid": isULID, - "md4": isMD4, - "md5": isMD5, - "sha256": isSHA256, - "sha384": isSHA384, - "sha512": isSHA512, - "ripemd128": isRIPEMD128, - "ripemd160": isRIPEMD160, - "tiger128": isTIGER128, - "tiger160": isTIGER160, - "tiger192": isTIGER192, - "ascii": isASCII, - "printascii": isPrintableASCII, - "multibyte": hasMultiByteCharacter, - "datauri": isDataURI, - "latitude": isLatitude, - "longitude": isLongitude, - "ssn": isSSN, - "ipv4": isIPv4, - "ipv6": isIPv6, - "ip": isIP, - "cidrv4": isCIDRv4, - "cidrv6": isCIDRv6, - "cidr": isCIDR, - "tcp4_addr": isTCP4AddrResolvable, - "tcp6_addr": isTCP6AddrResolvable, - "tcp_addr": isTCPAddrResolvable, - "udp4_addr": isUDP4AddrResolvable, - "udp6_addr": isUDP6AddrResolvable, - "udp_addr": isUDPAddrResolvable, - "ip4_addr": isIP4AddrResolvable, - "ip6_addr": isIP6AddrResolvable, - "ip_addr": isIPAddrResolvable, - "unix_addr": isUnixAddrResolvable, - "mac": isMAC, - "hostname": isHostnameRFC952, // RFC 952 - "hostname_rfc1123": isHostnameRFC1123, // RFC 1123 - "fqdn": isFQDN, - "unique": isUnique, - "oneof": isOneOf, - "oneofci": isOneOfCI, - "html": isHTML, - "html_encoded": isHTMLEncoded, - "url_encoded": isURLEncoded, - "dir": isDir, - "dirpath": isDirPath, - "json": isJSON, - "jwt": isJWT, - "hostname_port": isHostnamePort, - "port": isPort, - "lowercase": isLowercase, - "uppercase": isUppercase, - "datetime": isDatetime, - "timezone": isTimeZone, - "iso3166_1_alpha2": isIso3166Alpha2, - "iso3166_1_alpha2_eu": isIso3166Alpha2EU, - "iso3166_1_alpha3": isIso3166Alpha3, - "iso3166_1_alpha3_eu": isIso3166Alpha3EU, - "iso3166_1_alpha_numeric": isIso3166AlphaNumeric, - "iso3166_1_alpha_numeric_eu": isIso3166AlphaNumericEU, - "iso3166_2": isIso31662, - "iso4217": isIso4217, - "iso4217_numeric": isIso4217Numeric, - "bcp47_language_tag": isBCP47LanguageTag, - "postcode_iso3166_alpha2": isPostcodeByIso3166Alpha2, - "postcode_iso3166_alpha2_field": isPostcodeByIso3166Alpha2Field, - "bic": isIsoBicFormat, - "semver": isSemverFormat, - "dns_rfc1035_label": isDnsRFC1035LabelFormat, - "credit_card": isCreditCard, - "cve": isCveFormat, - "luhn_checksum": hasLuhnChecksum, - "mongodb": isMongoDBObjectId, - "mongodb_connection_string": isMongoDBConnectionString, - "cron": isCron, - "spicedb": isSpiceDB, - "ein": isEIN, - } -) - -var ( - oneofValsCache = map[string][]string{} - oneofValsCacheRWLock = sync.RWMutex{} -) - -func parseOneOfParam2(s string) []string { - oneofValsCacheRWLock.RLock() - vals, ok := oneofValsCache[s] - oneofValsCacheRWLock.RUnlock() - if !ok { - oneofValsCacheRWLock.Lock() - vals = splitParamsRegex().FindAllString(s, -1) - for i := 0; i < len(vals); i++ { - vals[i] = strings.ReplaceAll(vals[i], "'", "") - } - oneofValsCache[s] = vals - oneofValsCacheRWLock.Unlock() - } - return vals -} - -func isURLEncoded(fl FieldLevel) bool { - return uRLEncodedRegex().MatchString(fl.Field().String()) -} - -func isHTMLEncoded(fl FieldLevel) bool { - return hTMLEncodedRegex().MatchString(fl.Field().String()) -} - -func isHTML(fl FieldLevel) bool { - return hTMLRegex().MatchString(fl.Field().String()) -} - -func isOneOf(fl FieldLevel) bool { - vals := parseOneOfParam2(fl.Param()) - - field := fl.Field() - - var v string - switch field.Kind() { - case reflect.String: - v = field.String() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - v = strconv.FormatInt(field.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - v = strconv.FormatUint(field.Uint(), 10) - default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) - } - for i := 0; i < len(vals); i++ { - if vals[i] == v { - return true - } - } - return false -} - -// isOneOfCI is the validation function for validating if the current field's value is one of the provided string values (case insensitive). -func isOneOfCI(fl FieldLevel) bool { - vals := parseOneOfParam2(fl.Param()) - field := fl.Field() - - if field.Kind() != reflect.String { - panic(fmt.Sprintf("Bad field type %T", field.Interface())) - } - v := field.String() - for _, val := range vals { - if strings.EqualFold(val, v) { - return true - } - } - return false -} - -// isUnique is the validation function for validating if each array|slice|map value is unique -func isUnique(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - v := reflect.ValueOf(struct{}{}) - - switch field.Kind() { - case reflect.Slice, reflect.Array: - elem := field.Type().Elem() - if elem.Kind() == reflect.Ptr { - elem = elem.Elem() - } - - if param == "" { - m := reflect.MakeMap(reflect.MapOf(elem, v.Type())) - - for i := 0; i < field.Len(); i++ { - m.SetMapIndex(reflect.Indirect(field.Index(i)), v) - } - return field.Len() == m.Len() - } - - sf, ok := elem.FieldByName(param) - if !ok { - panic(fmt.Sprintf("Bad field name %s", param)) - } - - sfTyp := sf.Type - if sfTyp.Kind() == reflect.Ptr { - sfTyp = sfTyp.Elem() - } - - m := reflect.MakeMap(reflect.MapOf(sfTyp, v.Type())) - var fieldlen int - for i := 0; i < field.Len(); i++ { - key := reflect.Indirect(reflect.Indirect(field.Index(i)).FieldByName(param)) - if key.IsValid() { - fieldlen++ - m.SetMapIndex(key, v) - } - } - return fieldlen == m.Len() - case reflect.Map: - var m reflect.Value - if field.Type().Elem().Kind() == reflect.Ptr { - m = reflect.MakeMap(reflect.MapOf(field.Type().Elem().Elem(), v.Type())) - } else { - m = reflect.MakeMap(reflect.MapOf(field.Type().Elem(), v.Type())) - } - - for _, k := range field.MapKeys() { - m.SetMapIndex(reflect.Indirect(field.MapIndex(k)), v) - } - - return field.Len() == m.Len() - default: - if parent := fl.Parent(); parent.Kind() == reflect.Struct { - uniqueField := parent.FieldByName(param) - if uniqueField == reflect.ValueOf(nil) { - panic(fmt.Sprintf("Bad field name provided %s", param)) - } - - if uniqueField.Kind() != field.Kind() { - panic(fmt.Sprintf("Bad field type %T:%T", field.Interface(), uniqueField.Interface())) - } - - return field.Interface() != uniqueField.Interface() - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) - } -} - -// isMAC is the validation function for validating if the field's value is a valid MAC address. -func isMAC(fl FieldLevel) bool { - _, err := net.ParseMAC(fl.Field().String()) - - return err == nil -} - -// isCIDRv4 is the validation function for validating if the field's value is a valid v4 CIDR address. -func isCIDRv4(fl FieldLevel) bool { - ip, net, err := net.ParseCIDR(fl.Field().String()) - - return err == nil && ip.To4() != nil && net.IP.Equal(ip) -} - -// isCIDRv6 is the validation function for validating if the field's value is a valid v6 CIDR address. -func isCIDRv6(fl FieldLevel) bool { - ip, _, err := net.ParseCIDR(fl.Field().String()) - - return err == nil && ip.To4() == nil -} - -// isCIDR is the validation function for validating if the field's value is a valid v4 or v6 CIDR address. -func isCIDR(fl FieldLevel) bool { - _, _, err := net.ParseCIDR(fl.Field().String()) - - return err == nil -} - -// isIPv4 is the validation function for validating if a value is a valid v4 IP address. -func isIPv4(fl FieldLevel) bool { - ip := net.ParseIP(fl.Field().String()) - - return ip != nil && ip.To4() != nil -} - -// isIPv6 is the validation function for validating if the field's value is a valid v6 IP address. -func isIPv6(fl FieldLevel) bool { - ip := net.ParseIP(fl.Field().String()) - - return ip != nil && ip.To4() == nil -} - -// isIP is the validation function for validating if the field's value is a valid v4 or v6 IP address. -func isIP(fl FieldLevel) bool { - ip := net.ParseIP(fl.Field().String()) - - return ip != nil -} - -// isSSN is the validation function for validating if the field's value is a valid SSN. -func isSSN(fl FieldLevel) bool { - field := fl.Field() - - if field.Len() != 11 { - return false - } - - return sSNRegex().MatchString(field.String()) -} - -// isLongitude is the validation function for validating if the field's value is a valid longitude coordinate. -func isLongitude(fl FieldLevel) bool { - field := fl.Field() - - var v string - switch field.Kind() { - case reflect.String: - v = field.String() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - v = strconv.FormatInt(field.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - v = strconv.FormatUint(field.Uint(), 10) - case reflect.Float32: - v = strconv.FormatFloat(field.Float(), 'f', -1, 32) - case reflect.Float64: - v = strconv.FormatFloat(field.Float(), 'f', -1, 64) - default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) - } - - return longitudeRegex().MatchString(v) -} - -// isLatitude is the validation function for validating if the field's value is a valid latitude coordinate. -func isLatitude(fl FieldLevel) bool { - field := fl.Field() - - var v string - switch field.Kind() { - case reflect.String: - v = field.String() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - v = strconv.FormatInt(field.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - v = strconv.FormatUint(field.Uint(), 10) - case reflect.Float32: - v = strconv.FormatFloat(field.Float(), 'f', -1, 32) - case reflect.Float64: - v = strconv.FormatFloat(field.Float(), 'f', -1, 64) - default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) - } - - return latitudeRegex().MatchString(v) -} - -// isDataURI is the validation function for validating if the field's value is a valid data URI. -func isDataURI(fl FieldLevel) bool { - uri := strings.SplitN(fl.Field().String(), ",", 2) - - if len(uri) != 2 { - return false - } - - if !dataURIRegex().MatchString(uri[0]) { - return false - } - - return base64Regex().MatchString(uri[1]) -} - -// hasMultiByteCharacter is the validation function for validating if the field's value has a multi byte character. -func hasMultiByteCharacter(fl FieldLevel) bool { - field := fl.Field() - - if field.Len() == 0 { - return true - } - - return multibyteRegex().MatchString(field.String()) -} - -// isPrintableASCII is the validation function for validating if the field's value is a valid printable ASCII character. -func isPrintableASCII(fl FieldLevel) bool { - return printableASCIIRegex().MatchString(fl.Field().String()) -} - -// isASCII is the validation function for validating if the field's value is a valid ASCII character. -func isASCII(fl FieldLevel) bool { - return aSCIIRegex().MatchString(fl.Field().String()) -} - -// isUUID5 is the validation function for validating if the field's value is a valid v5 UUID. -func isUUID5(fl FieldLevel) bool { - return fieldMatchesRegexByStringerValOrString(uUID5Regex, fl) -} - -// isUUID4 is the validation function for validating if the field's value is a valid v4 UUID. -func isUUID4(fl FieldLevel) bool { - return fieldMatchesRegexByStringerValOrString(uUID4Regex, fl) -} - -// isUUID3 is the validation function for validating if the field's value is a valid v3 UUID. -func isUUID3(fl FieldLevel) bool { - return fieldMatchesRegexByStringerValOrString(uUID3Regex, fl) -} - -// isUUID is the validation function for validating if the field's value is a valid UUID of any version. -func isUUID(fl FieldLevel) bool { - return fieldMatchesRegexByStringerValOrString(uUIDRegex, fl) -} - -// isUUID5RFC4122 is the validation function for validating if the field's value is a valid RFC4122 v5 UUID. -func isUUID5RFC4122(fl FieldLevel) bool { - return fieldMatchesRegexByStringerValOrString(uUID5RFC4122Regex, fl) -} - -// isUUID4RFC4122 is the validation function for validating if the field's value is a valid RFC4122 v4 UUID. -func isUUID4RFC4122(fl FieldLevel) bool { - return fieldMatchesRegexByStringerValOrString(uUID4RFC4122Regex, fl) -} - -// isUUID3RFC4122 is the validation function for validating if the field's value is a valid RFC4122 v3 UUID. -func isUUID3RFC4122(fl FieldLevel) bool { - return fieldMatchesRegexByStringerValOrString(uUID3RFC4122Regex, fl) -} - -// isUUIDRFC4122 is the validation function for validating if the field's value is a valid RFC4122 UUID of any version. -func isUUIDRFC4122(fl FieldLevel) bool { - return fieldMatchesRegexByStringerValOrString(uUIDRFC4122Regex, fl) -} - -// isULID is the validation function for validating if the field's value is a valid ULID. -func isULID(fl FieldLevel) bool { - return fieldMatchesRegexByStringerValOrString(uLIDRegex, fl) -} - -// isMD4 is the validation function for validating if the field's value is a valid MD4. -func isMD4(fl FieldLevel) bool { - return md4Regex().MatchString(fl.Field().String()) -} - -// isMD5 is the validation function for validating if the field's value is a valid MD5. -func isMD5(fl FieldLevel) bool { - return md5Regex().MatchString(fl.Field().String()) -} - -// isSHA256 is the validation function for validating if the field's value is a valid SHA256. -func isSHA256(fl FieldLevel) bool { - return sha256Regex().MatchString(fl.Field().String()) -} - -// isSHA384 is the validation function for validating if the field's value is a valid SHA384. -func isSHA384(fl FieldLevel) bool { - return sha384Regex().MatchString(fl.Field().String()) -} - -// isSHA512 is the validation function for validating if the field's value is a valid SHA512. -func isSHA512(fl FieldLevel) bool { - return sha512Regex().MatchString(fl.Field().String()) -} - -// isRIPEMD128 is the validation function for validating if the field's value is a valid PIPEMD128. -func isRIPEMD128(fl FieldLevel) bool { - return ripemd128Regex().MatchString(fl.Field().String()) -} - -// isRIPEMD160 is the validation function for validating if the field's value is a valid PIPEMD160. -func isRIPEMD160(fl FieldLevel) bool { - return ripemd160Regex().MatchString(fl.Field().String()) -} - -// isTIGER128 is the validation function for validating if the field's value is a valid TIGER128. -func isTIGER128(fl FieldLevel) bool { - return tiger128Regex().MatchString(fl.Field().String()) -} - -// isTIGER160 is the validation function for validating if the field's value is a valid TIGER160. -func isTIGER160(fl FieldLevel) bool { - return tiger160Regex().MatchString(fl.Field().String()) -} - -// isTIGER192 is the validation function for validating if the field's value is a valid isTIGER192. -func isTIGER192(fl FieldLevel) bool { - return tiger192Regex().MatchString(fl.Field().String()) -} - -// isISBN is the validation function for validating if the field's value is a valid v10 or v13 ISBN. -func isISBN(fl FieldLevel) bool { - return isISBN10(fl) || isISBN13(fl) -} - -// isISBN13 is the validation function for validating if the field's value is a valid v13 ISBN. -func isISBN13(fl FieldLevel) bool { - s := strings.Replace(strings.Replace(fl.Field().String(), "-", "", 4), " ", "", 4) - - if !iSBN13Regex().MatchString(s) { - return false - } - - var checksum int32 - var i int32 - - factor := []int32{1, 3} - - for i = 0; i < 12; i++ { - checksum += factor[i%2] * int32(s[i]-'0') - } - - return (int32(s[12]-'0'))-((10-(checksum%10))%10) == 0 -} - -// isISBN10 is the validation function for validating if the field's value is a valid v10 ISBN. -func isISBN10(fl FieldLevel) bool { - s := strings.Replace(strings.Replace(fl.Field().String(), "-", "", 3), " ", "", 3) - - if !iSBN10Regex().MatchString(s) { - return false - } - - var checksum int32 - var i int32 - - for i = 0; i < 9; i++ { - checksum += (i + 1) * int32(s[i]-'0') - } - - if s[9] == 'X' { - checksum += 10 * 10 - } else { - checksum += 10 * int32(s[9]-'0') - } - - return checksum%11 == 0 -} - -// isISSN is the validation function for validating if the field's value is a valid ISSN. -func isISSN(fl FieldLevel) bool { - s := fl.Field().String() - - if !iSSNRegex().MatchString(s) { - return false - } - s = strings.ReplaceAll(s, "-", "") - - pos := 8 - checksum := 0 - - for i := 0; i < 7; i++ { - checksum += pos * int(s[i]-'0') - pos-- - } - - if s[7] == 'X' { - checksum += 10 - } else { - checksum += int(s[7] - '0') - } - - return checksum%11 == 0 -} - -// isEthereumAddress is the validation function for validating if the field's value is a valid Ethereum address. -func isEthereumAddress(fl FieldLevel) bool { - address := fl.Field().String() - - return ethAddressRegex().MatchString(address) -} - -// isEthereumAddressChecksum is the validation function for validating if the field's value is a valid checksummed Ethereum address. -func isEthereumAddressChecksum(fl FieldLevel) bool { - address := fl.Field().String() - - if !ethAddressRegex().MatchString(address) { - return false - } - // Checksum validation. Reference: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md - address = address[2:] // Skip "0x" prefix. - h := sha3.NewLegacyKeccak256() - // hash.Hash's io.Writer implementation says it never returns an error. https://golang.org/pkg/hash/#Hash - _, _ = h.Write([]byte(strings.ToLower(address))) - hash := hex.EncodeToString(h.Sum(nil)) - - for i := 0; i < len(address); i++ { - if address[i] <= '9' { // Skip 0-9 digits: they don't have upper/lower-case. - continue - } - if hash[i] > '7' && address[i] >= 'a' || hash[i] <= '7' && address[i] <= 'F' { - return false - } - } - - return true -} - -// isBitcoinAddress is the validation function for validating if the field's value is a valid btc address -func isBitcoinAddress(fl FieldLevel) bool { - address := fl.Field().String() - - if !btcAddressRegex().MatchString(address) { - return false - } - - alphabet := []byte("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") - - decode := [25]byte{} - - for _, n := range []byte(address) { - d := bytes.IndexByte(alphabet, n) - - for i := 24; i >= 0; i-- { - d += 58 * int(decode[i]) - decode[i] = byte(d % 256) - d /= 256 - } - } - - h := sha256.New() - _, _ = h.Write(decode[:21]) - d := h.Sum([]byte{}) - h = sha256.New() - _, _ = h.Write(d) - - validchecksum := [4]byte{} - computedchecksum := [4]byte{} - - copy(computedchecksum[:], h.Sum(d[:0])) - copy(validchecksum[:], decode[21:]) - - return validchecksum == computedchecksum -} - -// isBitcoinBech32Address is the validation function for validating if the field's value is a valid bech32 btc address -func isBitcoinBech32Address(fl FieldLevel) bool { - address := fl.Field().String() - - if !btcLowerAddressRegexBech32().MatchString(address) && !btcUpperAddressRegexBech32().MatchString(address) { - return false - } - - am := len(address) % 8 - - if am == 0 || am == 3 || am == 5 { - return false - } - - address = strings.ToLower(address) - - alphabet := "qpzry9x8gf2tvdw0s3jn54khce6mua7l" - - hr := []int{3, 3, 0, 2, 3} // the human readable part will always be bc - addr := address[3:] - dp := make([]int, 0, len(addr)) - - for _, c := range addr { - dp = append(dp, strings.IndexRune(alphabet, c)) - } - - ver := dp[0] - - if ver < 0 || ver > 16 { - return false - } - - if ver == 0 { - if len(address) != 42 && len(address) != 62 { - return false - } - } - - values := append(hr, dp...) - - GEN := []int{0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3} - - p := 1 - - for _, v := range values { - b := p >> 25 - p = (p&0x1ffffff)<<5 ^ v - - for i := 0; i < 5; i++ { - if (b>>uint(i))&1 == 1 { - p ^= GEN[i] - } - } - } - - if p != 1 { - return false - } - - b := uint(0) - acc := 0 - mv := (1 << 5) - 1 - var sw []int - - for _, v := range dp[1 : len(dp)-6] { - acc = (acc << 5) | v - b += 5 - for b >= 8 { - b -= 8 - sw = append(sw, (acc>>b)&mv) - } - } - - if len(sw) < 2 || len(sw) > 40 { - return false - } - - return true -} - -// excludesRune is the validation function for validating that the field's value does not contain the rune specified within the param. -func excludesRune(fl FieldLevel) bool { - return !containsRune(fl) -} - -// excludesAll is the validation function for validating that the field's value does not contain any of the characters specified within the param. -func excludesAll(fl FieldLevel) bool { - return !containsAny(fl) -} - -// excludes is the validation function for validating that the field's value does not contain the text specified within the param. -func excludes(fl FieldLevel) bool { - return !contains(fl) -} - -// containsRune is the validation function for validating that the field's value contains the rune specified within the param. -func containsRune(fl FieldLevel) bool { - r, _ := utf8.DecodeRuneInString(fl.Param()) - - return strings.ContainsRune(fl.Field().String(), r) -} - -// containsAny is the validation function for validating that the field's value contains any of the characters specified within the param. -func containsAny(fl FieldLevel) bool { - return strings.ContainsAny(fl.Field().String(), fl.Param()) -} - -// contains is the validation function for validating that the field's value contains the text specified within the param. -func contains(fl FieldLevel) bool { - return strings.Contains(fl.Field().String(), fl.Param()) -} - -// startsWith is the validation function for validating that the field's value starts with the text specified within the param. -func startsWith(fl FieldLevel) bool { - return strings.HasPrefix(fl.Field().String(), fl.Param()) -} - -// endsWith is the validation function for validating that the field's value ends with the text specified within the param. -func endsWith(fl FieldLevel) bool { - return strings.HasSuffix(fl.Field().String(), fl.Param()) -} - -// startsNotWith is the validation function for validating that the field's value does not start with the text specified within the param. -func startsNotWith(fl FieldLevel) bool { - return !startsWith(fl) -} - -// endsNotWith is the validation function for validating that the field's value does not end with the text specified within the param. -func endsNotWith(fl FieldLevel) bool { - return !endsWith(fl) -} - -// fieldContains is the validation function for validating if the current field's value contains the field specified by the param's value. -func fieldContains(fl FieldLevel) bool { - field := fl.Field() - - currentField, _, ok := fl.GetStructFieldOK() - - if !ok { - return false - } - - return strings.Contains(field.String(), currentField.String()) -} - -// fieldExcludes is the validation function for validating if the current field's value excludes the field specified by the param's value. -func fieldExcludes(fl FieldLevel) bool { - field := fl.Field() - - currentField, _, ok := fl.GetStructFieldOK() - if !ok { - return true - } - - return !strings.Contains(field.String(), currentField.String()) -} - -// isNeField is the validation function for validating if the current field's value is not equal to the field specified by the param's value. -func isNeField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - currentField, currentKind, ok := fl.GetStructFieldOK() - - if !ok || currentKind != kind { - return true - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return field.Int() != currentField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return field.Uint() != currentField.Uint() - - case reflect.Float32, reflect.Float64: - return field.Float() != currentField.Float() - - case reflect.Slice, reflect.Map, reflect.Array: - return int64(field.Len()) != int64(currentField.Len()) - - case reflect.Bool: - return field.Bool() != currentField.Bool() - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Interface().(time.Time) - fieldTime := field.Interface().(time.Time) - - return !fieldTime.Equal(t) - } - - // Not Same underlying type i.e. struct and time - if fieldType != currentField.Type() { - return true - } - } - - // default reflect.String: - return field.String() != currentField.String() -} - -// isNe is the validation function for validating that the field's value does not equal the provided param value. -func isNe(fl FieldLevel) bool { - return !isEq(fl) -} - -// isNeIgnoreCase is the validation function for validating that the field's string value does not equal the -// provided param value. The comparison is case-insensitive -func isNeIgnoreCase(fl FieldLevel) bool { - return !isEqIgnoreCase(fl) -} - -// isLteCrossStructField is the validation function for validating if the current field's value is less than or equal to the field, within a separate struct, specified by the param's value. -func isLteCrossStructField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - topField, topKind, ok := fl.GetStructFieldOK() - if !ok || topKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return field.Int() <= topField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return field.Uint() <= topField.Uint() - - case reflect.Float32, reflect.Float64: - return field.Float() <= topField.Float() - - case reflect.Slice, reflect.Map, reflect.Array: - return int64(field.Len()) <= int64(topField.Len()) - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - fieldTime := field.Convert(timeType).Interface().(time.Time) - topTime := topField.Convert(timeType).Interface().(time.Time) - - return fieldTime.Before(topTime) || fieldTime.Equal(topTime) - } - - // Not Same underlying type i.e. struct and time - if fieldType != topField.Type() { - return false - } - } - - // default reflect.String: - return field.String() <= topField.String() -} - -// isLtCrossStructField is the validation function for validating if the current field's value is less than the field, within a separate struct, specified by the param's value. -// NOTE: This is exposed for use within your own custom functions and not intended to be called directly. -func isLtCrossStructField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - topField, topKind, ok := fl.GetStructFieldOK() - if !ok || topKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return field.Int() < topField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return field.Uint() < topField.Uint() - - case reflect.Float32, reflect.Float64: - return field.Float() < topField.Float() - - case reflect.Slice, reflect.Map, reflect.Array: - return int64(field.Len()) < int64(topField.Len()) - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - fieldTime := field.Convert(timeType).Interface().(time.Time) - topTime := topField.Convert(timeType).Interface().(time.Time) - - return fieldTime.Before(topTime) - } - - // Not Same underlying type i.e. struct and time - if fieldType != topField.Type() { - return false - } - } - - // default reflect.String: - return field.String() < topField.String() -} - -// isGteCrossStructField is the validation function for validating if the current field's value is greater than or equal to the field, within a separate struct, specified by the param's value. -func isGteCrossStructField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - topField, topKind, ok := fl.GetStructFieldOK() - if !ok || topKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return field.Int() >= topField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return field.Uint() >= topField.Uint() - - case reflect.Float32, reflect.Float64: - return field.Float() >= topField.Float() - - case reflect.Slice, reflect.Map, reflect.Array: - return int64(field.Len()) >= int64(topField.Len()) - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - fieldTime := field.Convert(timeType).Interface().(time.Time) - topTime := topField.Convert(timeType).Interface().(time.Time) - - return fieldTime.After(topTime) || fieldTime.Equal(topTime) - } - - // Not Same underlying type i.e. struct and time - if fieldType != topField.Type() { - return false - } - } - - // default reflect.String: - return field.String() >= topField.String() -} - -// isGtCrossStructField is the validation function for validating if the current field's value is greater than the field, within a separate struct, specified by the param's value. -func isGtCrossStructField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - topField, topKind, ok := fl.GetStructFieldOK() - if !ok || topKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return field.Int() > topField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return field.Uint() > topField.Uint() - - case reflect.Float32, reflect.Float64: - return field.Float() > topField.Float() - - case reflect.Slice, reflect.Map, reflect.Array: - return int64(field.Len()) > int64(topField.Len()) - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - fieldTime := field.Convert(timeType).Interface().(time.Time) - topTime := topField.Convert(timeType).Interface().(time.Time) - - return fieldTime.After(topTime) - } - - // Not Same underlying type i.e. struct and time - if fieldType != topField.Type() { - return false - } - } - - // default reflect.String: - return field.String() > topField.String() -} - -// isNeCrossStructField is the validation function for validating that the current field's value is not equal to the field, within a separate struct, specified by the param's value. -func isNeCrossStructField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - topField, currentKind, ok := fl.GetStructFieldOK() - if !ok || currentKind != kind { - return true - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return topField.Int() != field.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return topField.Uint() != field.Uint() - - case reflect.Float32, reflect.Float64: - return topField.Float() != field.Float() - - case reflect.Slice, reflect.Map, reflect.Array: - return int64(topField.Len()) != int64(field.Len()) - - case reflect.Bool: - return topField.Bool() != field.Bool() - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - t := field.Convert(timeType).Interface().(time.Time) - fieldTime := topField.Convert(timeType).Interface().(time.Time) - - return !fieldTime.Equal(t) - } - - // Not Same underlying type i.e. struct and time - if fieldType != topField.Type() { - return true - } - } - - // default reflect.String: - return topField.String() != field.String() -} - -// isEqCrossStructField is the validation function for validating that the current field's value is equal to the field, within a separate struct, specified by the param's value. -func isEqCrossStructField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - topField, topKind, ok := fl.GetStructFieldOK() - if !ok || topKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return topField.Int() == field.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return topField.Uint() == field.Uint() - - case reflect.Float32, reflect.Float64: - return topField.Float() == field.Float() - - case reflect.Slice, reflect.Map, reflect.Array: - return int64(topField.Len()) == int64(field.Len()) - - case reflect.Bool: - return topField.Bool() == field.Bool() - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - t := field.Convert(timeType).Interface().(time.Time) - fieldTime := topField.Convert(timeType).Interface().(time.Time) - - return fieldTime.Equal(t) - } - - // Not Same underlying type i.e. struct and time - if fieldType != topField.Type() { - return false - } - } - - // default reflect.String: - return topField.String() == field.String() -} - -// isEqField is the validation function for validating if the current field's value is equal to the field specified by the param's value. -func isEqField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - currentField, currentKind, ok := fl.GetStructFieldOK() - if !ok || currentKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return field.Int() == currentField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return field.Uint() == currentField.Uint() - - case reflect.Float32, reflect.Float64: - return field.Float() == currentField.Float() - - case reflect.Slice, reflect.Map, reflect.Array: - return int64(field.Len()) == int64(currentField.Len()) - - case reflect.Bool: - return field.Bool() == currentField.Bool() - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) - - return fieldTime.Equal(t) - } - - // Not Same underlying type i.e. struct and time - if fieldType != currentField.Type() { - return false - } - } - - // default reflect.String: - return field.String() == currentField.String() -} - -// isEq is the validation function for validating if the current field's value is equal to the param's value. -func isEq(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - - switch field.Kind() { - - case reflect.String: - return field.String() == param - - case reflect.Slice, reflect.Map, reflect.Array: - p := asInt(param) - - return int64(field.Len()) == p - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - p := asIntFromType(field.Type(), param) - - return field.Int() == p - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - p := asUint(param) - - return field.Uint() == p - - case reflect.Float32: - p := asFloat32(param) - - return field.Float() == p - - case reflect.Float64: - p := asFloat64(param) - - return field.Float() == p - - case reflect.Bool: - p := asBool(param) - - return field.Bool() == p - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isEqIgnoreCase is the validation function for validating if the current field's string value is -// equal to the param's value. -// The comparison is case-insensitive. -func isEqIgnoreCase(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - - switch field.Kind() { - case reflect.String: - return strings.EqualFold(field.String(), param) - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isPostcodeByIso3166Alpha2 validates by value which is country code in iso 3166 alpha 2 -// example: `postcode_iso3166_alpha2=US` -func isPostcodeByIso3166Alpha2(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - - postcodeRegexInit.Do(initPostcodes) - reg, found := postCodeRegexDict[param] - if !found { - return false - } - - return reg.MatchString(field.String()) -} - -// isPostcodeByIso3166Alpha2Field validates by field which represents for a value of country code in iso 3166 alpha 2 -// example: `postcode_iso3166_alpha2_field=CountryCode` -func isPostcodeByIso3166Alpha2Field(fl FieldLevel) bool { - field := fl.Field() - params := parseOneOfParam2(fl.Param()) - - if len(params) != 1 { - return false - } - - currentField, kind, _, found := fl.GetStructFieldOKAdvanced2(fl.Parent(), params[0]) - if !found { - return false - } - - if kind != reflect.String { - panic(fmt.Sprintf("Bad field type %T", currentField.Interface())) - } - - postcodeRegexInit.Do(initPostcodes) - reg, found := postCodeRegexDict[currentField.String()] - if !found { - return false - } - - return reg.MatchString(field.String()) -} - -// isBase32 is the validation function for validating if the current field's value is a valid base 32. -func isBase32(fl FieldLevel) bool { - return base32Regex().MatchString(fl.Field().String()) -} - -// isBase64 is the validation function for validating if the current field's value is a valid base 64. -func isBase64(fl FieldLevel) bool { - return base64Regex().MatchString(fl.Field().String()) -} - -// isBase64URL is the validation function for validating if the current field's value is a valid base64 URL safe string. -func isBase64URL(fl FieldLevel) bool { - return base64URLRegex().MatchString(fl.Field().String()) -} - -// isBase64RawURL is the validation function for validating if the current field's value is a valid base64 URL safe string without '=' padding. -func isBase64RawURL(fl FieldLevel) bool { - return base64RawURLRegex().MatchString(fl.Field().String()) -} - -// isURI is the validation function for validating if the current field's value is a valid URI. -func isURI(fl FieldLevel) bool { - field := fl.Field() - - switch field.Kind() { - case reflect.String: - - s := field.String() - - // checks needed as of Go 1.6 because of change https://github.com/golang/go/commit/617c93ce740c3c3cc28cdd1a0d712be183d0b328#diff-6c2d018290e298803c0c9419d8739885L195 - // emulate browser and strip the '#' suffix prior to validation. see issue-#237 - if i := strings.Index(s, "#"); i > -1 { - s = s[:i] - } - - if len(s) == 0 { - return false - } - - _, err := url.ParseRequestURI(s) - - return err == nil - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isFileURL is the helper function for validating if the `path` valid file URL as per RFC8089 -func isFileURL(path string) bool { - if !strings.HasPrefix(path, "file:/") { - return false - } - _, err := url.ParseRequestURI(path) - return err == nil -} - -// isURL is the validation function for validating if the current field's value is a valid URL. -func isURL(fl FieldLevel) bool { - field := fl.Field() - - switch field.Kind() { - case reflect.String: - - s := strings.ToLower(field.String()) - - if len(s) == 0 { - return false - } - - if isFileURL(s) { - return true - } - - url, err := url.Parse(s) - if err != nil || url.Scheme == "" { - return false - } - - if url.Host == "" && url.Fragment == "" && url.Opaque == "" { - return false - } - - return true - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isHttpURL is the validation function for validating if the current field's value is a valid HTTP(s) URL. -func isHttpURL(fl FieldLevel) bool { - if !isURL(fl) { - return false - } - - field := fl.Field() - switch field.Kind() { - case reflect.String: - - s := strings.ToLower(field.String()) - - url, err := url.Parse(s) - if err != nil || url.Host == "" { - return false - } - - return url.Scheme == "http" || url.Scheme == "https" - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isUrnRFC2141 is the validation function for validating if the current field's value is a valid URN as per RFC 2141. -func isUrnRFC2141(fl FieldLevel) bool { - field := fl.Field() - - switch field.Kind() { - case reflect.String: - - str := field.String() - - _, match := urn.Parse([]byte(str)) - - return match - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isFile is the validation function for validating if the current field's value is a valid existing file path. -func isFile(fl FieldLevel) bool { - field := fl.Field() - - switch field.Kind() { - case reflect.String: - fileInfo, err := os.Stat(field.String()) - if err != nil { - return false - } - - return !fileInfo.IsDir() - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isImage is the validation function for validating if the current field's value contains the path to a valid image file -func isImage(fl FieldLevel) bool { - mimetypes := map[string]bool{ - "image/bmp": true, - "image/cis-cod": true, - "image/gif": true, - "image/ief": true, - "image/jpeg": true, - "image/jp2": true, - "image/jpx": true, - "image/jpm": true, - "image/pipeg": true, - "image/png": true, - "image/svg+xml": true, - "image/tiff": true, - "image/webp": true, - "image/x-cmu-raster": true, - "image/x-cmx": true, - "image/x-icon": true, - "image/x-portable-anymap": true, - "image/x-portable-bitmap": true, - "image/x-portable-graymap": true, - "image/x-portable-pixmap": true, - "image/x-rgb": true, - "image/x-xbitmap": true, - "image/x-xpixmap": true, - "image/x-xwindowdump": true, - } - field := fl.Field() - - switch field.Kind() { - case reflect.String: - filePath := field.String() - fileInfo, err := os.Stat(filePath) - if err != nil { - return false - } - - if fileInfo.IsDir() { - return false - } - - file, err := os.Open(filePath) - if err != nil { - return false - } - defer func() { - _ = file.Close() - }() - - mime, err := mimetype.DetectReader(file) - if err != nil { - return false - } - - if _, ok := mimetypes[mime.String()]; ok { - return true - } - } - return false -} - -// isFilePath is the validation function for validating if the current field's value is a valid file path. -func isFilePath(fl FieldLevel) bool { - var exists bool - var err error - - field := fl.Field() - - // Not valid if it is a directory. - if isDir(fl) { - return false - } - // If it exists, it obviously is valid. - // This is done first to avoid code duplication and unnecessary additional logic. - if exists = isFile(fl); exists { - return true - } - - // It does not exist but may still be a valid filepath. - switch field.Kind() { - case reflect.String: - // Every OS allows for whitespace, but none - // let you use a file with no filename (to my knowledge). - // Unless you're dealing with raw inodes, but I digress. - if strings.TrimSpace(field.String()) == "" { - return false - } - // We make sure it isn't a directory. - if strings.HasSuffix(field.String(), string(os.PathSeparator)) { - return false - } - if _, err = os.Stat(field.String()); err != nil { - switch t := err.(type) { - case *fs.PathError: - if t.Err == syscall.EINVAL { - // It's definitely an invalid character in the filepath. - return false - } - // It could be a permission error, a does-not-exist error, etc. - // Out-of-scope for this validation, though. - return true - default: - // Something went *seriously* wrong. - /* - Per https://pkg.go.dev/os#Stat: - "If there is an error, it will be of type *PathError." - */ - panic(err) - } - } - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isE164 is the validation function for validating if the current field's value is a valid e.164 formatted phone number. -func isE164(fl FieldLevel) bool { - return e164Regex().MatchString(fl.Field().String()) -} - -// isEmail is the validation function for validating if the current field's value is a valid email address. -func isEmail(fl FieldLevel) bool { - _, err := mail.ParseAddress(fl.Field().String()) - if err != nil { - return false - } - return emailRegex().MatchString(fl.Field().String()) -} - -// isHSLA is the validation function for validating if the current field's value is a valid HSLA color. -func isHSLA(fl FieldLevel) bool { - return hslaRegex().MatchString(fl.Field().String()) -} - -// isHSL is the validation function for validating if the current field's value is a valid HSL color. -func isHSL(fl FieldLevel) bool { - return hslRegex().MatchString(fl.Field().String()) -} - -// isRGBA is the validation function for validating if the current field's value is a valid RGBA color. -func isRGBA(fl FieldLevel) bool { - return rgbaRegex().MatchString(fl.Field().String()) -} - -// isRGB is the validation function for validating if the current field's value is a valid RGB color. -func isRGB(fl FieldLevel) bool { - return rgbRegex().MatchString(fl.Field().String()) -} - -// isHEXColor is the validation function for validating if the current field's value is a valid HEX color. -func isHEXColor(fl FieldLevel) bool { - return hexColorRegex().MatchString(fl.Field().String()) -} - -// isHexadecimal is the validation function for validating if the current field's value is a valid hexadecimal. -func isHexadecimal(fl FieldLevel) bool { - return hexadecimalRegex().MatchString(fl.Field().String()) -} - -// isNumber is the validation function for validating if the current field's value is a valid number. -func isNumber(fl FieldLevel) bool { - switch fl.Field().Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.Float32, reflect.Float64: - return true - default: - return numberRegex().MatchString(fl.Field().String()) - } -} - -// isNumeric is the validation function for validating if the current field's value is a valid numeric value. -func isNumeric(fl FieldLevel) bool { - switch fl.Field().Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.Float32, reflect.Float64: - return true - default: - return numericRegex().MatchString(fl.Field().String()) - } -} - -// isAlphanum is the validation function for validating if the current field's value is a valid alphanumeric value. -func isAlphanum(fl FieldLevel) bool { - return alphaNumericRegex().MatchString(fl.Field().String()) -} - -// isAlpha is the validation function for validating if the current field's value is a valid alpha value. -func isAlpha(fl FieldLevel) bool { - return alphaRegex().MatchString(fl.Field().String()) -} - -// isAlphanumUnicode is the validation function for validating if the current field's value is a valid alphanumeric unicode value. -func isAlphanumUnicode(fl FieldLevel) bool { - return alphaUnicodeNumericRegex().MatchString(fl.Field().String()) -} - -// isAlphaUnicode is the validation function for validating if the current field's value is a valid alpha unicode value. -func isAlphaUnicode(fl FieldLevel) bool { - return alphaUnicodeRegex().MatchString(fl.Field().String()) -} - -// isBoolean is the validation function for validating if the current field's value is a valid boolean value or can be safely converted to a boolean value. -func isBoolean(fl FieldLevel) bool { - switch fl.Field().Kind() { - case reflect.Bool: - return true - default: - _, err := strconv.ParseBool(fl.Field().String()) - return err == nil - } -} - -// isDefault is the opposite of required aka hasValue -func isDefault(fl FieldLevel) bool { - return !hasValue(fl) -} - -// hasValue is the validation function for validating if the current field's value is not the default static value. -func hasValue(fl FieldLevel) bool { - field := fl.Field() - switch field.Kind() { - case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func: - return !field.IsNil() - default: - if fl.(*validate).fldIsPointer && field.Interface() != nil { - return true - } - return field.IsValid() && !field.IsZero() - } -} - -// hasNotZeroValue is the validation function for validating if the current field's value is not the zero value for its type. -func hasNotZeroValue(fl FieldLevel) bool { - field := fl.Field() - switch field.Kind() { - case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func: - return !field.IsNil() - default: - if fl.(*validate).fldIsPointer && field.Interface() != nil { - return !field.IsZero() - } - return field.IsValid() && !field.IsZero() - } -} - -// requireCheckFieldKind is a func for check field kind -func requireCheckFieldKind(fl FieldLevel, param string, defaultNotFoundValue bool) bool { - field := fl.Field() - kind := field.Kind() - var nullable, found bool - if len(param) > 0 { - field, kind, nullable, found = fl.GetStructFieldOKAdvanced2(fl.Parent(), param) - if !found { - return defaultNotFoundValue - } - } - switch kind { - case reflect.Invalid: - return defaultNotFoundValue - case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func: - return field.IsNil() - default: - if nullable && field.Interface() != nil { - return false - } - return field.IsValid() && field.IsZero() - } -} - -// requireCheckFieldValue is a func for check field value -func requireCheckFieldValue( - fl FieldLevel, param string, value string, defaultNotFoundValue bool, -) bool { - field, kind, _, found := fl.GetStructFieldOKAdvanced2(fl.Parent(), param) - if !found { - return defaultNotFoundValue - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return field.Int() == asInt(value) - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return field.Uint() == asUint(value) - - case reflect.Float32: - return field.Float() == asFloat32(value) - - case reflect.Float64: - return field.Float() == asFloat64(value) - - case reflect.Slice, reflect.Map, reflect.Array: - return int64(field.Len()) == asInt(value) - - case reflect.Bool: - return field.Bool() == (value == "true") - - case reflect.Ptr: - if field.IsNil() { - return value == "nil" - } - // Handle non-nil pointers - return requireCheckFieldValue(fl, param, value, defaultNotFoundValue) - } - - // default reflect.String: - return field.String() == value -} - -// requiredIf is the validation function -// The field under validation must be present and not empty only if all the other specified fields are equal to the value following with the specified field. -func requiredIf(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - if len(params)%2 != 0 { - panic(fmt.Sprintf("Bad param number for required_if %s", fl.FieldName())) - } - for i := 0; i < len(params); i += 2 { - if !requireCheckFieldValue(fl, params[i], params[i+1], false) { - return true - } - } - return hasValue(fl) -} - -// excludedIf is the validation function -// The field under validation must not be present or is empty only if all the other specified fields are equal to the value following with the specified field. -func excludedIf(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - if len(params)%2 != 0 { - panic(fmt.Sprintf("Bad param number for excluded_if %s", fl.FieldName())) - } - - for i := 0; i < len(params); i += 2 { - if !requireCheckFieldValue(fl, params[i], params[i+1], false) { - return true - } - } - return !hasValue(fl) -} - -// requiredUnless is the validation function -// The field under validation must be present and not empty only unless all the other specified fields are equal to the value following with the specified field. -func requiredUnless(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - if len(params)%2 != 0 { - panic(fmt.Sprintf("Bad param number for required_unless %s", fl.FieldName())) - } - - for i := 0; i < len(params); i += 2 { - if requireCheckFieldValue(fl, params[i], params[i+1], false) { - return true - } - } - return hasValue(fl) -} - -// skipUnless is the validation function -// The field under validation must be present and not empty only unless all the other specified fields are equal to the value following with the specified field. -func skipUnless(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - if len(params)%2 != 0 { - panic(fmt.Sprintf("Bad param number for skip_unless %s", fl.FieldName())) - } - for i := 0; i < len(params); i += 2 { - if !requireCheckFieldValue(fl, params[i], params[i+1], false) { - return true - } - } - return hasValue(fl) -} - -// excludedUnless is the validation function -// The field under validation must not be present or is empty unless all the other specified fields are equal to the value following with the specified field. -func excludedUnless(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - if len(params)%2 != 0 { - panic(fmt.Sprintf("Bad param number for excluded_unless %s", fl.FieldName())) - } - for i := 0; i < len(params); i += 2 { - if !requireCheckFieldValue(fl, params[i], params[i+1], false) { - return !hasValue(fl) - } - } - return true -} - -// excludedWith is the validation function -// The field under validation must not be present or is empty if any of the other specified fields are present. -func excludedWith(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - for _, param := range params { - if !requireCheckFieldKind(fl, param, true) { - return !hasValue(fl) - } - } - return true -} - -// requiredWith is the validation function -// The field under validation must be present and not empty only if any of the other specified fields are present. -func requiredWith(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - for _, param := range params { - if !requireCheckFieldKind(fl, param, true) { - return hasValue(fl) - } - } - return true -} - -// excludedWithAll is the validation function -// The field under validation must not be present or is empty if all of the other specified fields are present. -func excludedWithAll(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - for _, param := range params { - if requireCheckFieldKind(fl, param, true) { - return true - } - } - return !hasValue(fl) -} - -// requiredWithAll is the validation function -// The field under validation must be present and not empty only if all of the other specified fields are present. -func requiredWithAll(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - for _, param := range params { - if requireCheckFieldKind(fl, param, true) { - return true - } - } - return hasValue(fl) -} - -// excludedWithout is the validation function -// The field under validation must not be present or is empty when any of the other specified fields are not present. -func excludedWithout(fl FieldLevel) bool { - if requireCheckFieldKind(fl, strings.TrimSpace(fl.Param()), true) { - return !hasValue(fl) - } - return true -} - -// requiredWithout is the validation function -// The field under validation must be present and not empty only when any of the other specified fields are not present. -func requiredWithout(fl FieldLevel) bool { - if requireCheckFieldKind(fl, strings.TrimSpace(fl.Param()), true) { - return hasValue(fl) - } - return true -} - -// excludedWithoutAll is the validation function -// The field under validation must not be present or is empty when all of the other specified fields are not present. -func excludedWithoutAll(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - for _, param := range params { - if !requireCheckFieldKind(fl, param, true) { - return true - } - } - return !hasValue(fl) -} - -// requiredWithoutAll is the validation function -// The field under validation must be present and not empty only when all of the other specified fields are not present. -func requiredWithoutAll(fl FieldLevel) bool { - params := parseOneOfParam2(fl.Param()) - for _, param := range params { - if !requireCheckFieldKind(fl, param, true) { - return true - } - } - return hasValue(fl) -} - -// isGteField is the validation function for validating if the current field's value is greater than or equal to the field specified by the param's value. -func isGteField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - currentField, currentKind, ok := fl.GetStructFieldOK() - if !ok || currentKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - - return field.Int() >= currentField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - - return field.Uint() >= currentField.Uint() - - case reflect.Float32, reflect.Float64: - - return field.Float() >= currentField.Float() - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) - - return fieldTime.After(t) || fieldTime.Equal(t) - } - - // Not Same underlying type i.e. struct and time - if fieldType != currentField.Type() { - return false - } - } - - // default reflect.String - return len(field.String()) >= len(currentField.String()) -} - -// isGtField is the validation function for validating if the current field's value is greater than the field specified by the param's value. -func isGtField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - currentField, currentKind, ok := fl.GetStructFieldOK() - if !ok || currentKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - - return field.Int() > currentField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - - return field.Uint() > currentField.Uint() - - case reflect.Float32, reflect.Float64: - - return field.Float() > currentField.Float() - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) - - return fieldTime.After(t) - } - - // Not Same underlying type i.e. struct and time - if fieldType != currentField.Type() { - return false - } - } - - // default reflect.String - return len(field.String()) > len(currentField.String()) -} - -// isGte is the validation function for validating if the current field's value is greater than or equal to the param's value. -func isGte(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - - switch field.Kind() { - - case reflect.String: - p := asInt(param) - - return int64(utf8.RuneCountInString(field.String())) >= p - - case reflect.Slice, reflect.Map, reflect.Array: - p := asInt(param) - - return int64(field.Len()) >= p - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - p := asIntFromType(field.Type(), param) - - return field.Int() >= p - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - p := asUint(param) - - return field.Uint() >= p - - case reflect.Float32: - p := asFloat32(param) - - return field.Float() >= p - - case reflect.Float64: - p := asFloat64(param) - - return field.Float() >= p - - case reflect.Struct: - - if field.Type().ConvertibleTo(timeType) { - - now := time.Now().UTC() - t := field.Convert(timeType).Interface().(time.Time) - - return t.After(now) || t.Equal(now) - } - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isGt is the validation function for validating if the current field's value is greater than the param's value. -func isGt(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - - switch field.Kind() { - - case reflect.String: - p := asInt(param) - - return int64(utf8.RuneCountInString(field.String())) > p - - case reflect.Slice, reflect.Map, reflect.Array: - p := asInt(param) - - return int64(field.Len()) > p - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - p := asIntFromType(field.Type(), param) - - return field.Int() > p - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - p := asUint(param) - - return field.Uint() > p - - case reflect.Float32: - p := asFloat32(param) - - return field.Float() > p - - case reflect.Float64: - p := asFloat64(param) - - return field.Float() > p - - case reflect.Struct: - - if field.Type().ConvertibleTo(timeType) { - return field.Convert(timeType).Interface().(time.Time).After(time.Now().UTC()) - } - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// hasLengthOf is the validation function for validating if the current field's value is equal to the param's value. -func hasLengthOf(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - - switch field.Kind() { - - case reflect.String: - p := asInt(param) - - return int64(utf8.RuneCountInString(field.String())) == p - - case reflect.Slice, reflect.Map, reflect.Array: - p := asInt(param) - - return int64(field.Len()) == p - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - p := asIntFromType(field.Type(), param) - - return field.Int() == p - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - p := asUint(param) - - return field.Uint() == p - - case reflect.Float32: - p := asFloat32(param) - - return field.Float() == p - - case reflect.Float64: - p := asFloat64(param) - - return field.Float() == p - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// hasMinOf is the validation function for validating if the current field's value is greater than or equal to the param's value. -func hasMinOf(fl FieldLevel) bool { - return isGte(fl) -} - -// isLteField is the validation function for validating if the current field's value is less than or equal to the field specified by the param's value. -func isLteField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - currentField, currentKind, ok := fl.GetStructFieldOK() - if !ok || currentKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - - return field.Int() <= currentField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - - return field.Uint() <= currentField.Uint() - - case reflect.Float32, reflect.Float64: - - return field.Float() <= currentField.Float() - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) - - return fieldTime.Before(t) || fieldTime.Equal(t) - } - - // Not Same underlying type i.e. struct and time - if fieldType != currentField.Type() { - return false - } - } - - // default reflect.String - return len(field.String()) <= len(currentField.String()) -} - -// isLtField is the validation function for validating if the current field's value is less than the field specified by the param's value. -func isLtField(fl FieldLevel) bool { - field := fl.Field() - kind := field.Kind() - - currentField, currentKind, ok := fl.GetStructFieldOK() - if !ok || currentKind != kind { - return false - } - - switch kind { - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - - return field.Int() < currentField.Int() - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - - return field.Uint() < currentField.Uint() - - case reflect.Float32, reflect.Float64: - - return field.Float() < currentField.Float() - - case reflect.Struct: - - fieldType := field.Type() - - if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) - - return fieldTime.Before(t) - } - - // Not Same underlying type i.e. struct and time - if fieldType != currentField.Type() { - return false - } - } - - // default reflect.String - return len(field.String()) < len(currentField.String()) -} - -// isLte is the validation function for validating if the current field's value is less than or equal to the param's value. -func isLte(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - - switch field.Kind() { - - case reflect.String: - p := asInt(param) - - return int64(utf8.RuneCountInString(field.String())) <= p - - case reflect.Slice, reflect.Map, reflect.Array: - p := asInt(param) - - return int64(field.Len()) <= p - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - p := asIntFromType(field.Type(), param) - - return field.Int() <= p - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - p := asUint(param) - - return field.Uint() <= p - - case reflect.Float32: - p := asFloat32(param) - - return field.Float() <= p - - case reflect.Float64: - p := asFloat64(param) - - return field.Float() <= p - - case reflect.Struct: - - if field.Type().ConvertibleTo(timeType) { - - now := time.Now().UTC() - t := field.Convert(timeType).Interface().(time.Time) - - return t.Before(now) || t.Equal(now) - } - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isLt is the validation function for validating if the current field's value is less than the param's value. -func isLt(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - - switch field.Kind() { - - case reflect.String: - p := asInt(param) - - return int64(utf8.RuneCountInString(field.String())) < p - - case reflect.Slice, reflect.Map, reflect.Array: - p := asInt(param) - - return int64(field.Len()) < p - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - p := asIntFromType(field.Type(), param) - - return field.Int() < p - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - p := asUint(param) - - return field.Uint() < p - - case reflect.Float32: - p := asFloat32(param) - - return field.Float() < p - - case reflect.Float64: - p := asFloat64(param) - - return field.Float() < p - - case reflect.Struct: - - if field.Type().ConvertibleTo(timeType) { - return field.Convert(timeType).Interface().(time.Time).Before(time.Now().UTC()) - } - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// hasMaxOf is the validation function for validating if the current field's value is less than or equal to the param's value. -func hasMaxOf(fl FieldLevel) bool { - return isLte(fl) -} - -// isTCP4AddrResolvable is the validation function for validating if the field's value is a resolvable tcp4 address. -func isTCP4AddrResolvable(fl FieldLevel) bool { - if !isIP4Addr(fl) { - return false - } - - _, err := net.ResolveTCPAddr("tcp4", fl.Field().String()) - return err == nil -} - -// isTCP6AddrResolvable is the validation function for validating if the field's value is a resolvable tcp6 address. -func isTCP6AddrResolvable(fl FieldLevel) bool { - if !isIP6Addr(fl) { - return false - } - - _, err := net.ResolveTCPAddr("tcp6", fl.Field().String()) - - return err == nil -} - -// isTCPAddrResolvable is the validation function for validating if the field's value is a resolvable tcp address. -func isTCPAddrResolvable(fl FieldLevel) bool { - if !isIP4Addr(fl) && !isIP6Addr(fl) { - return false - } - - _, err := net.ResolveTCPAddr("tcp", fl.Field().String()) - - return err == nil -} - -// isUDP4AddrResolvable is the validation function for validating if the field's value is a resolvable udp4 address. -func isUDP4AddrResolvable(fl FieldLevel) bool { - if !isIP4Addr(fl) { - return false - } - - _, err := net.ResolveUDPAddr("udp4", fl.Field().String()) - - return err == nil -} - -// isUDP6AddrResolvable is the validation function for validating if the field's value is a resolvable udp6 address. -func isUDP6AddrResolvable(fl FieldLevel) bool { - if !isIP6Addr(fl) { - return false - } - - _, err := net.ResolveUDPAddr("udp6", fl.Field().String()) - - return err == nil -} - -// isUDPAddrResolvable is the validation function for validating if the field's value is a resolvable udp address. -func isUDPAddrResolvable(fl FieldLevel) bool { - if !isIP4Addr(fl) && !isIP6Addr(fl) { - return false - } - - _, err := net.ResolveUDPAddr("udp", fl.Field().String()) - - return err == nil -} - -// isIP4AddrResolvable is the validation function for validating if the field's value is a resolvable ip4 address. -func isIP4AddrResolvable(fl FieldLevel) bool { - if !isIPv4(fl) { - return false - } - - _, err := net.ResolveIPAddr("ip4", fl.Field().String()) - - return err == nil -} - -// isIP6AddrResolvable is the validation function for validating if the field's value is a resolvable ip6 address. -func isIP6AddrResolvable(fl FieldLevel) bool { - if !isIPv6(fl) { - return false - } - - _, err := net.ResolveIPAddr("ip6", fl.Field().String()) - - return err == nil -} - -// isIPAddrResolvable is the validation function for validating if the field's value is a resolvable ip address. -func isIPAddrResolvable(fl FieldLevel) bool { - if !isIP(fl) { - return false - } - - _, err := net.ResolveIPAddr("ip", fl.Field().String()) - - return err == nil -} - -// isUnixAddrResolvable is the validation function for validating if the field's value is a resolvable unix address. -func isUnixAddrResolvable(fl FieldLevel) bool { - _, err := net.ResolveUnixAddr("unix", fl.Field().String()) - - return err == nil -} - -func isIP4Addr(fl FieldLevel) bool { - val := fl.Field().String() - - if idx := strings.LastIndex(val, ":"); idx != -1 { - val = val[0:idx] - } - - ip := net.ParseIP(val) - - return ip != nil && ip.To4() != nil -} - -func isIP6Addr(fl FieldLevel) bool { - val := fl.Field().String() - - if idx := strings.LastIndex(val, ":"); idx != -1 { - if idx != 0 && val[idx-1:idx] == "]" { - val = val[1 : idx-1] - } - } - - ip := net.ParseIP(val) - - return ip != nil && ip.To4() == nil -} - -func isHostnameRFC952(fl FieldLevel) bool { - return hostnameRegexRFC952().MatchString(fl.Field().String()) -} - -func isHostnameRFC1123(fl FieldLevel) bool { - return hostnameRegexRFC1123().MatchString(fl.Field().String()) -} - -func isFQDN(fl FieldLevel) bool { - val := fl.Field().String() - - if val == "" { - return false - } - - return fqdnRegexRFC1123().MatchString(val) -} - -// isDir is the validation function for validating if the current field's value is a valid existing directory. -func isDir(fl FieldLevel) bool { - field := fl.Field() - - if field.Kind() == reflect.String { - fileInfo, err := os.Stat(field.String()) - if err != nil { - return false - } - - return fileInfo.IsDir() - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isDirPath is the validation function for validating if the current field's value is a valid directory. -func isDirPath(fl FieldLevel) bool { - var exists bool - var err error - - field := fl.Field() - - // If it exists, it obviously is valid. - // This is done first to avoid code duplication and unnecessary additional logic. - if exists = isDir(fl); exists { - return true - } - - // It does not exist but may still be a valid path. - switch field.Kind() { - case reflect.String: - // Every OS allows for whitespace, but none - // let you use a dir with no name (to my knowledge). - // Unless you're dealing with raw inodes, but I digress. - if strings.TrimSpace(field.String()) == "" { - return false - } - if _, err = os.Stat(field.String()); err != nil { - switch t := err.(type) { - case *fs.PathError: - if t.Err == syscall.EINVAL { - // It's definitely an invalid character in the path. - return false - } - // It could be a permission error, a does-not-exist error, etc. - // Out-of-scope for this validation, though. - // Lastly, we make sure it is a directory. - if strings.HasSuffix(field.String(), string(os.PathSeparator)) { - return true - } else { - return false - } - default: - // Something went *seriously* wrong. - /* - Per https://pkg.go.dev/os#Stat: - "If there is an error, it will be of type *PathError." - */ - panic(err) - } - } - // We repeat the check here to make sure it is an explicit directory in case the above os.Stat didn't trigger an error. - if strings.HasSuffix(field.String(), string(os.PathSeparator)) { - return true - } else { - return false - } - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isJSON is the validation function for validating if the current field's value is a valid json string. -func isJSON(fl FieldLevel) bool { - field := fl.Field() - - switch field.Kind() { - case reflect.String: - val := field.String() - return json.Valid([]byte(val)) - case reflect.Slice: - fieldType := field.Type() - - if fieldType.ConvertibleTo(byteSliceType) { - b := field.Convert(byteSliceType).Interface().([]byte) - return json.Valid(b) - } - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isJWT is the validation function for validating if the current field's value is a valid JWT string. -func isJWT(fl FieldLevel) bool { - return jWTRegex().MatchString(fl.Field().String()) -} - -// isHostnamePort validates a : combination for fields typically used for socket address. -func isHostnamePort(fl FieldLevel) bool { - val := fl.Field().String() - host, port, err := net.SplitHostPort(val) - if err != nil { - return false - } - // Port must be a iny <= 65535. - if portNum, err := strconv.ParseInt( - port, 10, 32, - ); err != nil || portNum > 65535 || portNum < 1 { - return false - } - - // If host is specified, it should match a DNS name - if host != "" { - return hostnameRegexRFC1123().MatchString(host) - } - return true -} - -// IsPort validates if the current field's value represents a valid port -func isPort(fl FieldLevel) bool { - val := fl.Field().Uint() - - return val >= 1 && val <= 65535 -} - -// isLowercase is the validation function for validating if the current field's value is a lowercase string. -func isLowercase(fl FieldLevel) bool { - field := fl.Field() - - if field.Kind() == reflect.String { - if field.String() == "" { - return false - } - return field.String() == strings.ToLower(field.String()) - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isUppercase is the validation function for validating if the current field's value is an uppercase string. -func isUppercase(fl FieldLevel) bool { - field := fl.Field() - - if field.Kind() == reflect.String { - if field.String() == "" { - return false - } - return field.String() == strings.ToUpper(field.String()) - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isDatetime is the validation function for validating if the current field's value is a valid datetime string. -func isDatetime(fl FieldLevel) bool { - field := fl.Field() - param := fl.Param() - - if field.Kind() == reflect.String { - _, err := time.Parse(param, field.String()) - - return err == nil - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isTimeZone is the validation function for validating if the current field's value is a valid time zone string. -func isTimeZone(fl FieldLevel) bool { - field := fl.Field() - - if field.Kind() == reflect.String { - // empty value is converted to UTC by time.LoadLocation but disallow it as it is not a valid time zone name - if field.String() == "" { - return false - } - - // Local value is converted to the current system time zone by time.LoadLocation but disallow it as it is not a valid time zone name - if strings.ToLower(field.String()) == "local" { - return false - } - - _, err := time.LoadLocation(field.String()) - return err == nil - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isIso3166Alpha2 is the validation function for validating if the current field's value is a valid iso3166-1 alpha-2 country code. -func isIso3166Alpha2(fl FieldLevel) bool { - _, ok := iso3166_1_alpha2[fl.Field().String()] - return ok -} - -// isIso3166Alpha2EU is the validation function for validating if the current field's value is a valid iso3166-1 alpha-2 European Union country code. -func isIso3166Alpha2EU(fl FieldLevel) bool { - _, ok := iso3166_1_alpha2_eu[fl.Field().String()] - return ok -} - -// isIso3166Alpha3 is the validation function for validating if the current field's value is a valid iso3166-1 alpha-3 country code. -func isIso3166Alpha3(fl FieldLevel) bool { - _, ok := iso3166_1_alpha3[fl.Field().String()] - return ok -} - -// isIso3166Alpha3EU is the validation function for validating if the current field's value is a valid iso3166-1 alpha-3 European Union country code. -func isIso3166Alpha3EU(fl FieldLevel) bool { - _, ok := iso3166_1_alpha3_eu[fl.Field().String()] - return ok -} - -// isIso3166AlphaNumeric is the validation function for validating if the current field's value is a valid iso3166-1 alpha-numeric country code. -func isIso3166AlphaNumeric(fl FieldLevel) bool { - field := fl.Field() - - var code int - switch field.Kind() { - case reflect.String: - i, err := strconv.Atoi(field.String()) - if err != nil { - return false - } - code = i % 1000 - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - code = int(field.Int() % 1000) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - code = int(field.Uint() % 1000) - default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) - } - - _, ok := iso3166_1_alpha_numeric[code] - return ok -} - -// isIso3166AlphaNumericEU is the validation function for validating if the current field's value is a valid iso3166-1 alpha-numeric European Union country code. -func isIso3166AlphaNumericEU(fl FieldLevel) bool { - field := fl.Field() - - var code int - switch field.Kind() { - case reflect.String: - i, err := strconv.Atoi(field.String()) - if err != nil { - return false - } - code = i % 1000 - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - code = int(field.Int() % 1000) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - code = int(field.Uint() % 1000) - default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) - } - - _, ok := iso3166_1_alpha_numeric_eu[code] - return ok -} - -// isIso31662 is the validation function for validating if the current field's value is a valid iso3166-2 code. -func isIso31662(fl FieldLevel) bool { - _, ok := iso3166_2[fl.Field().String()] - return ok -} - -// isIso4217 is the validation function for validating if the current field's value is a valid iso4217 currency code. -func isIso4217(fl FieldLevel) bool { - _, ok := iso4217[fl.Field().String()] - return ok -} - -// isIso4217Numeric is the validation function for validating if the current field's value is a valid iso4217 numeric currency code. -func isIso4217Numeric(fl FieldLevel) bool { - field := fl.Field() - - var code int - switch field.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - code = int(field.Int()) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - code = int(field.Uint()) - default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) - } - - _, ok := iso4217_numeric[code] - return ok -} - -// isBCP47LanguageTag is the validation function for validating if the current field's value is a valid BCP 47 language tag, as parsed by language.Parse -func isBCP47LanguageTag(fl FieldLevel) bool { - field := fl.Field() - - if field.Kind() == reflect.String { - _, err := language.Parse(field.String()) - return err == nil - } - - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isIsoBicFormat is the validation function for validating if the current field's value is a valid Business Identifier Code (SWIFT code), defined in ISO 9362 -func isIsoBicFormat(fl FieldLevel) bool { - bicString := fl.Field().String() - - return bicRegex().MatchString(bicString) -} - -// isSemverFormat is the validation function for validating if the current field's value is a valid semver version, defined in Semantic Versioning 2.0.0 -func isSemverFormat(fl FieldLevel) bool { - semverString := fl.Field().String() - - return semverRegex().MatchString(semverString) -} - -// isCveFormat is the validation function for validating if the current field's value is a valid cve id, defined in CVE mitre org -func isCveFormat(fl FieldLevel) bool { - cveString := fl.Field().String() - - return cveRegex().MatchString(cveString) -} - -// isDnsRFC1035LabelFormat is the validation function -// for validating if the current field's value is -// a valid dns RFC 1035 label, defined in RFC 1035. -func isDnsRFC1035LabelFormat(fl FieldLevel) bool { - val := fl.Field().String() - - size := len(val) - if size > 63 { - return false - } - - return dnsRegexRFC1035Label().MatchString(val) -} - -// digitsHaveLuhnChecksum returns true if and only if the last element of the given digits slice is the Luhn checksum of the previous elements -func digitsHaveLuhnChecksum(digits []string) bool { - size := len(digits) - sum := 0 - for i, digit := range digits { - value, err := strconv.Atoi(digit) - if err != nil { - return false - } - if size%2 == 0 && i%2 == 0 || size%2 == 1 && i%2 == 1 { - v := value * 2 - if v >= 10 { - sum += 1 + (v % 10) - } else { - sum += v - } - } else { - sum += value - } - } - return (sum % 10) == 0 -} - -// isMongoDBObjectId is the validation function for validating if the current field's value is valid MongoDB ObjectID -func isMongoDBObjectId(fl FieldLevel) bool { - val := fl.Field().String() - return mongodbIdRegex().MatchString(val) -} - -// isMongoDBConnectionString is the validation function for validating if the current field's value is valid MongoDB Connection String -func isMongoDBConnectionString(fl FieldLevel) bool { - val := fl.Field().String() - return mongodbConnectionRegex().MatchString(val) -} - -// isSpiceDB is the validation function for validating if the current field's value is valid for use with Authzed SpiceDB in the indicated way -func isSpiceDB(fl FieldLevel) bool { - val := fl.Field().String() - param := fl.Param() - - switch param { - case "permission": - return spicedbPermissionRegex().MatchString(val) - case "type": - return spicedbTypeRegex().MatchString(val) - case "id", "": - return spicedbIDRegex().MatchString(val) - } - - panic("Unrecognized parameter: " + param) -} - -// isCreditCard is the validation function for validating if the current field's value is a valid credit card number -func isCreditCard(fl FieldLevel) bool { - val := fl.Field().String() - var creditCard bytes.Buffer - segments := strings.Split(val, " ") - for _, segment := range segments { - if len(segment) < 3 { - return false - } - creditCard.WriteString(segment) - } - - ccDigits := strings.Split(creditCard.String(), "") - size := len(ccDigits) - if size < 12 || size > 19 { - return false - } - - return digitsHaveLuhnChecksum(ccDigits) -} - -// hasLuhnChecksum is the validation for validating if the current field's value has a valid Luhn checksum -func hasLuhnChecksum(fl FieldLevel) bool { - field := fl.Field() - var str string // convert to a string which will then be split into single digits; easier and more readable than shifting/extracting single digits from a number - switch field.Kind() { - case reflect.String: - str = field.String() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - str = strconv.FormatInt(field.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - str = strconv.FormatUint(field.Uint(), 10) - default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) - } - size := len(str) - if size < 2 { // there has to be at least one digit that carries a meaning + the checksum - return false - } - digits := strings.Split(str, "") - return digitsHaveLuhnChecksum(digits) -} - -// isCron is the validation function for validating if the current field's value is a valid cron expression -func isCron(fl FieldLevel) bool { - cronString := fl.Field().String() - return cronRegex().MatchString(cronString) -} - -// isEIN is the validation function for validating if the current field's value is a valid U.S. Employer Identification Number (EIN) -func isEIN(fl FieldLevel) bool { - field := fl.Field() - - if field.Len() != 10 { - return false - } - - return einRegex().MatchString(field.String()) -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/cache.go b/go-controller/vendor/github.com/go-playground/validator/v10/cache.go deleted file mode 100644 index 41d40bfeac..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/cache.go +++ /dev/null @@ -1,337 +0,0 @@ -package validator - -import ( - "fmt" - "reflect" - "strings" - "sync" - "sync/atomic" -) - -type tagType uint8 - -const ( - typeDefault tagType = iota - typeOmitEmpty - typeIsDefault - typeNoStructLevel - typeStructOnly - typeDive - typeOr - typeKeys - typeEndKeys - typeOmitNil - typeOmitZero -) - -const ( - invalidValidation = "Invalid validation tag on field '%s'" - undefinedValidation = "Undefined validation function '%s' on field '%s'" - keysTagNotDefined = "'" + endKeysTag + "' tag encountered without a corresponding '" + keysTag + "' tag" -) - -type structCache struct { - lock sync.Mutex - m atomic.Value // map[reflect.Type]*cStruct -} - -func (sc *structCache) Get(key reflect.Type) (c *cStruct, found bool) { - c, found = sc.m.Load().(map[reflect.Type]*cStruct)[key] - return -} - -func (sc *structCache) Set(key reflect.Type, value *cStruct) { - m := sc.m.Load().(map[reflect.Type]*cStruct) - nm := make(map[reflect.Type]*cStruct, len(m)+1) - for k, v := range m { - nm[k] = v - } - nm[key] = value - sc.m.Store(nm) -} - -type tagCache struct { - lock sync.Mutex - m atomic.Value // map[string]*cTag -} - -func (tc *tagCache) Get(key string) (c *cTag, found bool) { - c, found = tc.m.Load().(map[string]*cTag)[key] - return -} - -func (tc *tagCache) Set(key string, value *cTag) { - m := tc.m.Load().(map[string]*cTag) - nm := make(map[string]*cTag, len(m)+1) - for k, v := range m { - nm[k] = v - } - nm[key] = value - tc.m.Store(nm) -} - -type cStruct struct { - name string - fields []*cField - fn StructLevelFuncCtx -} - -type cField struct { - idx int - name string - altName string - namesEqual bool - cTags *cTag -} - -type cTag struct { - tag string - aliasTag string - actualAliasTag string - param string - keys *cTag // only populated when using tag's 'keys' and 'endkeys' for map key validation - next *cTag - fn FuncCtx - typeof tagType - hasTag bool - hasAlias bool - hasParam bool // true if parameter used eg. eq= where the equal sign has been set - isBlockEnd bool // indicates the current tag represents the last validation in the block - runValidationWhenNil bool -} - -func (v *Validate) extractStructCache(current reflect.Value, sName string) *cStruct { - v.structCache.lock.Lock() - defer v.structCache.lock.Unlock() // leave as defer! because if inner panics, it will never get unlocked otherwise! - - typ := current.Type() - - // could have been multiple trying to access, but once first is done this ensures struct - // isn't parsed again. - cs, ok := v.structCache.Get(typ) - if ok { - return cs - } - - cs = &cStruct{name: sName, fields: make([]*cField, 0), fn: v.structLevelFuncs[typ]} - - numFields := current.NumField() - rules := v.rules[typ] - - var ctag *cTag - var fld reflect.StructField - var tag string - var customName string - - for i := 0; i < numFields; i++ { - - fld = typ.Field(i) - - if !v.privateFieldValidation && !fld.Anonymous && len(fld.PkgPath) > 0 { - continue - } - - if rtag, ok := rules[fld.Name]; ok { - tag = rtag - } else { - tag = fld.Tag.Get(v.tagName) - } - - if tag == skipValidationTag { - continue - } - - customName = fld.Name - - if v.hasTagNameFunc { - name := v.tagNameFunc(fld) - if len(name) > 0 { - customName = name - } - } - - // NOTE: cannot use shared tag cache, because tags may be equal, but things like alias may be different - // and so only struct level caching can be used instead of combined with Field tag caching - - if len(tag) > 0 { - ctag, _ = v.parseFieldTagsRecursive(tag, fld.Name, "", false) - } else { - // even if field doesn't have validations need cTag for traversing to potential inner/nested - // elements of the field. - ctag = new(cTag) - } - - cs.fields = append(cs.fields, &cField{ - idx: i, - name: fld.Name, - altName: customName, - cTags: ctag, - namesEqual: fld.Name == customName, - }) - } - v.structCache.Set(typ, cs) - return cs -} - -func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias string, hasAlias bool) (firstCtag *cTag, current *cTag) { - var t string - noAlias := len(alias) == 0 - tags := strings.Split(tag, tagSeparator) - - for i := 0; i < len(tags); i++ { - t = tags[i] - if noAlias { - alias = t - } - - // check map for alias and process new tags, otherwise process as usual - if tagsVal, found := v.aliases[t]; found { - if i == 0 { - firstCtag, current = v.parseFieldTagsRecursive(tagsVal, fieldName, t, true) - } else { - next, curr := v.parseFieldTagsRecursive(tagsVal, fieldName, t, true) - current.next, current = next, curr - - } - continue - } - - var prevTag tagType - - if i == 0 { - current = &cTag{aliasTag: alias, hasAlias: hasAlias, hasTag: true, typeof: typeDefault} - firstCtag = current - } else { - prevTag = current.typeof - current.next = &cTag{aliasTag: alias, hasAlias: hasAlias, hasTag: true} - current = current.next - } - - switch t { - case diveTag: - current.typeof = typeDive - continue - - case keysTag: - current.typeof = typeKeys - - if i == 0 || prevTag != typeDive { - panic(fmt.Sprintf("'%s' tag must be immediately preceded by the '%s' tag", keysTag, diveTag)) - } - - current.typeof = typeKeys - - // need to pass along only keys tag - // need to increment i to skip over the keys tags - b := make([]byte, 0, 64) - - i++ - - for ; i < len(tags); i++ { - - b = append(b, tags[i]...) - b = append(b, ',') - - if tags[i] == endKeysTag { - break - } - } - - current.keys, _ = v.parseFieldTagsRecursive(string(b[:len(b)-1]), fieldName, "", false) - continue - - case endKeysTag: - current.typeof = typeEndKeys - - // if there are more in tags then there was no keysTag defined - // and an error should be thrown - if i != len(tags)-1 { - panic(keysTagNotDefined) - } - return - - case omitzero: - current.typeof = typeOmitZero - continue - - case omitempty: - current.typeof = typeOmitEmpty - continue - - case omitnil: - current.typeof = typeOmitNil - continue - - case structOnlyTag: - current.typeof = typeStructOnly - continue - - case noStructLevelTag: - current.typeof = typeNoStructLevel - continue - - default: - if t == isdefault { - current.typeof = typeIsDefault - } - // if a pipe character is needed within the param you must use the utf8Pipe representation "0x7C" - orVals := strings.Split(t, orSeparator) - - for j := 0; j < len(orVals); j++ { - vals := strings.SplitN(orVals[j], tagKeySeparator, 2) - if noAlias { - alias = vals[0] - current.aliasTag = alias - } else { - current.actualAliasTag = t - } - - if j > 0 { - current.next = &cTag{aliasTag: alias, actualAliasTag: current.actualAliasTag, hasAlias: hasAlias, hasTag: true} - current = current.next - } - current.hasParam = len(vals) > 1 - - current.tag = vals[0] - if len(current.tag) == 0 { - panic(strings.TrimSpace(fmt.Sprintf(invalidValidation, fieldName))) - } - - if wrapper, ok := v.validations[current.tag]; ok { - current.fn = wrapper.fn - current.runValidationWhenNil = wrapper.runValidationOnNil - } else { - panic(strings.TrimSpace(fmt.Sprintf(undefinedValidation, current.tag, fieldName))) - } - - if len(orVals) > 1 { - current.typeof = typeOr - } - - if len(vals) > 1 { - current.param = strings.ReplaceAll(strings.ReplaceAll(vals[1], utf8HexComma, ","), utf8Pipe, "|") - } - } - current.isBlockEnd = true - } - } - return -} - -func (v *Validate) fetchCacheTag(tag string) *cTag { - // find cached tag - ctag, found := v.tagCache.Get(tag) - if !found { - v.tagCache.lock.Lock() - defer v.tagCache.lock.Unlock() - - // could have been multiple trying to access, but once first is done this ensures tag - // isn't parsed again. - ctag, found = v.tagCache.Get(tag) - if !found { - ctag, _ = v.parseFieldTagsRecursive(tag, "", "", false) - v.tagCache.Set(tag, ctag) - } - } - return ctag -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/country_codes.go b/go-controller/vendor/github.com/go-playground/validator/v10/country_codes.go deleted file mode 100644 index b5f10d3c11..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/country_codes.go +++ /dev/null @@ -1,1177 +0,0 @@ -package validator - -var iso3166_1_alpha2 = map[string]struct{}{ - // see: https://www.iso.org/iso-3166-country-codes.html - "AF": {}, "AX": {}, "AL": {}, "DZ": {}, "AS": {}, - "AD": {}, "AO": {}, "AI": {}, "AQ": {}, "AG": {}, - "AR": {}, "AM": {}, "AW": {}, "AU": {}, "AT": {}, - "AZ": {}, "BS": {}, "BH": {}, "BD": {}, "BB": {}, - "BY": {}, "BE": {}, "BZ": {}, "BJ": {}, "BM": {}, - "BT": {}, "BO": {}, "BQ": {}, "BA": {}, "BW": {}, - "BV": {}, "BR": {}, "IO": {}, "BN": {}, "BG": {}, - "BF": {}, "BI": {}, "KH": {}, "CM": {}, "CA": {}, - "CV": {}, "KY": {}, "CF": {}, "TD": {}, "CL": {}, - "CN": {}, "CX": {}, "CC": {}, "CO": {}, "KM": {}, - "CG": {}, "CD": {}, "CK": {}, "CR": {}, "CI": {}, - "HR": {}, "CU": {}, "CW": {}, "CY": {}, "CZ": {}, - "DK": {}, "DJ": {}, "DM": {}, "DO": {}, "EC": {}, - "EG": {}, "SV": {}, "GQ": {}, "ER": {}, "EE": {}, - "ET": {}, "FK": {}, "FO": {}, "FJ": {}, "FI": {}, - "FR": {}, "GF": {}, "PF": {}, "TF": {}, "GA": {}, - "GM": {}, "GE": {}, "DE": {}, "GH": {}, "GI": {}, - "GR": {}, "GL": {}, "GD": {}, "GP": {}, "GU": {}, - "GT": {}, "GG": {}, "GN": {}, "GW": {}, "GY": {}, - "HT": {}, "HM": {}, "VA": {}, "HN": {}, "HK": {}, - "HU": {}, "IS": {}, "IN": {}, "ID": {}, "IR": {}, - "IQ": {}, "IE": {}, "IM": {}, "IL": {}, "IT": {}, - "JM": {}, "JP": {}, "JE": {}, "JO": {}, "KZ": {}, - "KE": {}, "KI": {}, "KP": {}, "KR": {}, "KW": {}, - "KG": {}, "LA": {}, "LV": {}, "LB": {}, "LS": {}, - "LR": {}, "LY": {}, "LI": {}, "LT": {}, "LU": {}, - "MO": {}, "MK": {}, "MG": {}, "MW": {}, "MY": {}, - "MV": {}, "ML": {}, "MT": {}, "MH": {}, "MQ": {}, - "MR": {}, "MU": {}, "YT": {}, "MX": {}, "FM": {}, - "MD": {}, "MC": {}, "MN": {}, "ME": {}, "MS": {}, - "MA": {}, "MZ": {}, "MM": {}, "NA": {}, "NR": {}, - "NP": {}, "NL": {}, "NC": {}, "NZ": {}, "NI": {}, - "NE": {}, "NG": {}, "NU": {}, "NF": {}, "MP": {}, - "NO": {}, "OM": {}, "PK": {}, "PW": {}, "PS": {}, - "PA": {}, "PG": {}, "PY": {}, "PE": {}, "PH": {}, - "PN": {}, "PL": {}, "PT": {}, "PR": {}, "QA": {}, - "RE": {}, "RO": {}, "RU": {}, "RW": {}, "BL": {}, - "SH": {}, "KN": {}, "LC": {}, "MF": {}, "PM": {}, - "VC": {}, "WS": {}, "SM": {}, "ST": {}, "SA": {}, - "SN": {}, "RS": {}, "SC": {}, "SL": {}, "SG": {}, - "SX": {}, "SK": {}, "SI": {}, "SB": {}, "SO": {}, - "ZA": {}, "GS": {}, "SS": {}, "ES": {}, "LK": {}, - "SD": {}, "SR": {}, "SJ": {}, "SZ": {}, "SE": {}, - "CH": {}, "SY": {}, "TW": {}, "TJ": {}, "TZ": {}, - "TH": {}, "TL": {}, "TG": {}, "TK": {}, "TO": {}, - "TT": {}, "TN": {}, "TR": {}, "TM": {}, "TC": {}, - "TV": {}, "UG": {}, "UA": {}, "AE": {}, "GB": {}, - "US": {}, "UM": {}, "UY": {}, "UZ": {}, "VU": {}, - "VE": {}, "VN": {}, "VG": {}, "VI": {}, "WF": {}, - "EH": {}, "YE": {}, "ZM": {}, "ZW": {}, "XK": {}, -} - -var iso3166_1_alpha2_eu = map[string]struct{}{ - "AT": {}, "BE": {}, "BG": {}, "HR": {}, "CY": {}, - "CZ": {}, "DK": {}, "EE": {}, "FI": {}, "FR": {}, - "DE": {}, "GR": {}, "HU": {}, "IE": {}, "IT": {}, - "LV": {}, "LT": {}, "LU": {}, "MT": {}, "NL": {}, - "PL": {}, "PT": {}, "RO": {}, "SK": {}, "SI": {}, - "ES": {}, "SE": {}, -} - -var iso3166_1_alpha3 = map[string]struct{}{ - // see: https://www.iso.org/iso-3166-country-codes.html - "AFG": {}, "ALB": {}, "DZA": {}, "ASM": {}, "AND": {}, - "AGO": {}, "AIA": {}, "ATA": {}, "ATG": {}, "ARG": {}, - "ARM": {}, "ABW": {}, "AUS": {}, "AUT": {}, "AZE": {}, - "BHS": {}, "BHR": {}, "BGD": {}, "BRB": {}, "BLR": {}, - "BEL": {}, "BLZ": {}, "BEN": {}, "BMU": {}, "BTN": {}, - "BOL": {}, "BES": {}, "BIH": {}, "BWA": {}, "BVT": {}, - "BRA": {}, "IOT": {}, "BRN": {}, "BGR": {}, "BFA": {}, - "BDI": {}, "CPV": {}, "KHM": {}, "CMR": {}, "CAN": {}, - "CYM": {}, "CAF": {}, "TCD": {}, "CHL": {}, "CHN": {}, - "CXR": {}, "CCK": {}, "COL": {}, "COM": {}, "COD": {}, - "COG": {}, "COK": {}, "CRI": {}, "HRV": {}, "CUB": {}, - "CUW": {}, "CYP": {}, "CZE": {}, "CIV": {}, "DNK": {}, - "DJI": {}, "DMA": {}, "DOM": {}, "ECU": {}, "EGY": {}, - "SLV": {}, "GNQ": {}, "ERI": {}, "EST": {}, "SWZ": {}, - "ETH": {}, "FLK": {}, "FRO": {}, "FJI": {}, "FIN": {}, - "FRA": {}, "GUF": {}, "PYF": {}, "ATF": {}, "GAB": {}, - "GMB": {}, "GEO": {}, "DEU": {}, "GHA": {}, "GIB": {}, - "GRC": {}, "GRL": {}, "GRD": {}, "GLP": {}, "GUM": {}, - "GTM": {}, "GGY": {}, "GIN": {}, "GNB": {}, "GUY": {}, - "HTI": {}, "HMD": {}, "VAT": {}, "HND": {}, "HKG": {}, - "HUN": {}, "ISL": {}, "IND": {}, "IDN": {}, "IRN": {}, - "IRQ": {}, "IRL": {}, "IMN": {}, "ISR": {}, "ITA": {}, - "JAM": {}, "JPN": {}, "JEY": {}, "JOR": {}, "KAZ": {}, - "KEN": {}, "KIR": {}, "PRK": {}, "KOR": {}, "KWT": {}, - "KGZ": {}, "LAO": {}, "LVA": {}, "LBN": {}, "LSO": {}, - "LBR": {}, "LBY": {}, "LIE": {}, "LTU": {}, "LUX": {}, - "MAC": {}, "MDG": {}, "MWI": {}, "MYS": {}, "MDV": {}, - "MLI": {}, "MLT": {}, "MHL": {}, "MTQ": {}, "MRT": {}, - "MUS": {}, "MYT": {}, "MEX": {}, "FSM": {}, "MDA": {}, - "MCO": {}, "MNG": {}, "MNE": {}, "MSR": {}, "MAR": {}, - "MOZ": {}, "MMR": {}, "NAM": {}, "NRU": {}, "NPL": {}, - "NLD": {}, "NCL": {}, "NZL": {}, "NIC": {}, "NER": {}, - "NGA": {}, "NIU": {}, "NFK": {}, "MKD": {}, "MNP": {}, - "NOR": {}, "OMN": {}, "PAK": {}, "PLW": {}, "PSE": {}, - "PAN": {}, "PNG": {}, "PRY": {}, "PER": {}, "PHL": {}, - "PCN": {}, "POL": {}, "PRT": {}, "PRI": {}, "QAT": {}, - "ROU": {}, "RUS": {}, "RWA": {}, "REU": {}, "BLM": {}, - "SHN": {}, "KNA": {}, "LCA": {}, "MAF": {}, "SPM": {}, - "VCT": {}, "WSM": {}, "SMR": {}, "STP": {}, "SAU": {}, - "SEN": {}, "SRB": {}, "SYC": {}, "SLE": {}, "SGP": {}, - "SXM": {}, "SVK": {}, "SVN": {}, "SLB": {}, "SOM": {}, - "ZAF": {}, "SGS": {}, "SSD": {}, "ESP": {}, "LKA": {}, - "SDN": {}, "SUR": {}, "SJM": {}, "SWE": {}, "CHE": {}, - "SYR": {}, "TWN": {}, "TJK": {}, "TZA": {}, "THA": {}, - "TLS": {}, "TGO": {}, "TKL": {}, "TON": {}, "TTO": {}, - "TUN": {}, "TUR": {}, "TKM": {}, "TCA": {}, "TUV": {}, - "UGA": {}, "UKR": {}, "ARE": {}, "GBR": {}, "UMI": {}, - "USA": {}, "URY": {}, "UZB": {}, "VUT": {}, "VEN": {}, - "VNM": {}, "VGB": {}, "VIR": {}, "WLF": {}, "ESH": {}, - "YEM": {}, "ZMB": {}, "ZWE": {}, "ALA": {}, "UNK": {}, -} - -var iso3166_1_alpha3_eu = map[string]struct{}{ - "AUT": {}, "BEL": {}, "BGR": {}, "HRV": {}, "CYP": {}, - "CZE": {}, "DNK": {}, "EST": {}, "FIN": {}, "FRA": {}, - "DEU": {}, "GRC": {}, "HUN": {}, "IRL": {}, "ITA": {}, - "LVA": {}, "LTU": {}, "LUX": {}, "MLT": {}, "NLD": {}, - "POL": {}, "PRT": {}, "ROU": {}, "SVK": {}, "SVN": {}, - "ESP": {}, "SWE": {}, -} -var iso3166_1_alpha_numeric = map[int]struct{}{ - // see: https://www.iso.org/iso-3166-country-codes.html - 4: {}, 8: {}, 12: {}, 16: {}, 20: {}, - 24: {}, 660: {}, 10: {}, 28: {}, 32: {}, - 51: {}, 533: {}, 36: {}, 40: {}, 31: {}, - 44: {}, 48: {}, 50: {}, 52: {}, 112: {}, - 56: {}, 84: {}, 204: {}, 60: {}, 64: {}, - 68: {}, 535: {}, 70: {}, 72: {}, 74: {}, - 76: {}, 86: {}, 96: {}, 100: {}, 854: {}, - 108: {}, 132: {}, 116: {}, 120: {}, 124: {}, - 136: {}, 140: {}, 148: {}, 152: {}, 156: {}, - 162: {}, 166: {}, 170: {}, 174: {}, 180: {}, - 178: {}, 184: {}, 188: {}, 191: {}, 192: {}, - 531: {}, 196: {}, 203: {}, 384: {}, 208: {}, - 262: {}, 212: {}, 214: {}, 218: {}, 818: {}, - 222: {}, 226: {}, 232: {}, 233: {}, 748: {}, - 231: {}, 238: {}, 234: {}, 242: {}, 246: {}, - 250: {}, 254: {}, 258: {}, 260: {}, 266: {}, - 270: {}, 268: {}, 276: {}, 288: {}, 292: {}, - 300: {}, 304: {}, 308: {}, 312: {}, 316: {}, - 320: {}, 831: {}, 324: {}, 624: {}, 328: {}, - 332: {}, 334: {}, 336: {}, 340: {}, 344: {}, - 348: {}, 352: {}, 356: {}, 360: {}, 364: {}, - 368: {}, 372: {}, 833: {}, 376: {}, 380: {}, - 388: {}, 392: {}, 832: {}, 400: {}, 398: {}, - 404: {}, 296: {}, 408: {}, 410: {}, 414: {}, - 417: {}, 418: {}, 428: {}, 422: {}, 426: {}, - 430: {}, 434: {}, 438: {}, 440: {}, 442: {}, - 446: {}, 450: {}, 454: {}, 458: {}, 462: {}, - 466: {}, 470: {}, 584: {}, 474: {}, 478: {}, - 480: {}, 175: {}, 484: {}, 583: {}, 498: {}, - 492: {}, 496: {}, 499: {}, 500: {}, 504: {}, - 508: {}, 104: {}, 516: {}, 520: {}, 524: {}, - 528: {}, 540: {}, 554: {}, 558: {}, 562: {}, - 566: {}, 570: {}, 574: {}, 807: {}, 580: {}, - 578: {}, 512: {}, 586: {}, 585: {}, 275: {}, - 591: {}, 598: {}, 600: {}, 604: {}, 608: {}, - 612: {}, 616: {}, 620: {}, 630: {}, 634: {}, - 642: {}, 643: {}, 646: {}, 638: {}, 652: {}, - 654: {}, 659: {}, 662: {}, 663: {}, 666: {}, - 670: {}, 882: {}, 674: {}, 678: {}, 682: {}, - 686: {}, 688: {}, 690: {}, 694: {}, 702: {}, - 534: {}, 703: {}, 705: {}, 90: {}, 706: {}, - 710: {}, 239: {}, 728: {}, 724: {}, 144: {}, - 729: {}, 740: {}, 744: {}, 752: {}, 756: {}, - 760: {}, 158: {}, 762: {}, 834: {}, 764: {}, - 626: {}, 768: {}, 772: {}, 776: {}, 780: {}, - 788: {}, 792: {}, 795: {}, 796: {}, 798: {}, - 800: {}, 804: {}, 784: {}, 826: {}, 581: {}, - 840: {}, 858: {}, 860: {}, 548: {}, 862: {}, - 704: {}, 92: {}, 850: {}, 876: {}, 732: {}, - 887: {}, 894: {}, 716: {}, 248: {}, 153: {}, -} - -var iso3166_1_alpha_numeric_eu = map[int]struct{}{ - 40: {}, 56: {}, 100: {}, 191: {}, 196: {}, - 200: {}, 208: {}, 233: {}, 246: {}, 250: {}, - 276: {}, 300: {}, 348: {}, 372: {}, 380: {}, - 428: {}, 440: {}, 442: {}, 470: {}, 528: {}, - 616: {}, 620: {}, 642: {}, 703: {}, 705: {}, - 724: {}, 752: {}, -} - -var iso3166_2 = map[string]struct{}{ - "AD-02": {}, "AD-03": {}, "AD-04": {}, "AD-05": {}, "AD-06": {}, - "AD-07": {}, "AD-08": {}, "AE-AJ": {}, "AE-AZ": {}, "AE-DU": {}, - "AE-FU": {}, "AE-RK": {}, "AE-SH": {}, "AE-UQ": {}, "AF-BAL": {}, - "AF-BAM": {}, "AF-BDG": {}, "AF-BDS": {}, "AF-BGL": {}, "AF-DAY": {}, - "AF-FRA": {}, "AF-FYB": {}, "AF-GHA": {}, "AF-GHO": {}, "AF-HEL": {}, - "AF-HER": {}, "AF-JOW": {}, "AF-KAB": {}, "AF-KAN": {}, "AF-KAP": {}, - "AF-KDZ": {}, "AF-KHO": {}, "AF-KNR": {}, "AF-LAG": {}, "AF-LOG": {}, - "AF-NAN": {}, "AF-NIM": {}, "AF-NUR": {}, "AF-PAN": {}, "AF-PAR": {}, - "AF-PIA": {}, "AF-PKA": {}, "AF-SAM": {}, "AF-SAR": {}, "AF-TAK": {}, - "AF-URU": {}, "AF-WAR": {}, "AF-ZAB": {}, "AG-03": {}, "AG-04": {}, - "AG-05": {}, "AG-06": {}, "AG-07": {}, "AG-08": {}, "AG-10": {}, - "AG-11": {}, "AL-01": {}, "AL-02": {}, "AL-03": {}, "AL-04": {}, - "AL-05": {}, "AL-06": {}, "AL-07": {}, "AL-08": {}, "AL-09": {}, - "AL-10": {}, "AL-11": {}, "AL-12": {}, "AL-BR": {}, "AL-BU": {}, - "AL-DI": {}, "AL-DL": {}, "AL-DR": {}, "AL-DV": {}, "AL-EL": {}, - "AL-ER": {}, "AL-FR": {}, "AL-GJ": {}, "AL-GR": {}, "AL-HA": {}, - "AL-KA": {}, "AL-KB": {}, "AL-KC": {}, "AL-KO": {}, "AL-KR": {}, - "AL-KU": {}, "AL-LB": {}, "AL-LE": {}, "AL-LU": {}, "AL-MK": {}, - "AL-MM": {}, "AL-MR": {}, "AL-MT": {}, "AL-PG": {}, "AL-PQ": {}, - "AL-PR": {}, "AL-PU": {}, "AL-SH": {}, "AL-SK": {}, "AL-SR": {}, - "AL-TE": {}, "AL-TP": {}, "AL-TR": {}, "AL-VL": {}, "AM-AG": {}, - "AM-AR": {}, "AM-AV": {}, "AM-ER": {}, "AM-GR": {}, "AM-KT": {}, - "AM-LO": {}, "AM-SH": {}, "AM-SU": {}, "AM-TV": {}, "AM-VD": {}, - "AO-BGO": {}, "AO-BGU": {}, "AO-BIE": {}, "AO-CAB": {}, "AO-CCU": {}, - "AO-CNN": {}, "AO-CNO": {}, "AO-CUS": {}, "AO-HUA": {}, "AO-HUI": {}, - "AO-LNO": {}, "AO-LSU": {}, "AO-LUA": {}, "AO-MAL": {}, "AO-MOX": {}, - "AO-NAM": {}, "AO-UIG": {}, "AO-ZAI": {}, "AR-A": {}, "AR-B": {}, - "AR-C": {}, "AR-D": {}, "AR-E": {}, "AR-F": {}, "AR-G": {}, "AR-H": {}, - "AR-J": {}, "AR-K": {}, "AR-L": {}, "AR-M": {}, "AR-N": {}, - "AR-P": {}, "AR-Q": {}, "AR-R": {}, "AR-S": {}, "AR-T": {}, - "AR-U": {}, "AR-V": {}, "AR-W": {}, "AR-X": {}, "AR-Y": {}, - "AR-Z": {}, "AT-1": {}, "AT-2": {}, "AT-3": {}, "AT-4": {}, - "AT-5": {}, "AT-6": {}, "AT-7": {}, "AT-8": {}, "AT-9": {}, - "AU-ACT": {}, "AU-NSW": {}, "AU-NT": {}, "AU-QLD": {}, "AU-SA": {}, - "AU-TAS": {}, "AU-VIC": {}, "AU-WA": {}, "AZ-ABS": {}, "AZ-AGA": {}, - "AZ-AGC": {}, "AZ-AGM": {}, "AZ-AGS": {}, "AZ-AGU": {}, "AZ-AST": {}, - "AZ-BA": {}, "AZ-BAB": {}, "AZ-BAL": {}, "AZ-BAR": {}, "AZ-BEY": {}, - "AZ-BIL": {}, "AZ-CAB": {}, "AZ-CAL": {}, "AZ-CUL": {}, "AZ-DAS": {}, - "AZ-FUZ": {}, "AZ-GA": {}, "AZ-GAD": {}, "AZ-GOR": {}, "AZ-GOY": {}, - "AZ-GYG": {}, "AZ-HAC": {}, "AZ-IMI": {}, "AZ-ISM": {}, "AZ-KAL": {}, - "AZ-KAN": {}, "AZ-KUR": {}, "AZ-LA": {}, "AZ-LAC": {}, "AZ-LAN": {}, - "AZ-LER": {}, "AZ-MAS": {}, "AZ-MI": {}, "AZ-NA": {}, "AZ-NEF": {}, - "AZ-NV": {}, "AZ-NX": {}, "AZ-OGU": {}, "AZ-ORD": {}, "AZ-QAB": {}, - "AZ-QAX": {}, "AZ-QAZ": {}, "AZ-QBA": {}, "AZ-QBI": {}, "AZ-QOB": {}, - "AZ-QUS": {}, "AZ-SA": {}, "AZ-SAB": {}, "AZ-SAD": {}, "AZ-SAH": {}, - "AZ-SAK": {}, "AZ-SAL": {}, "AZ-SAR": {}, "AZ-SAT": {}, "AZ-SBN": {}, - "AZ-SIY": {}, "AZ-SKR": {}, "AZ-SM": {}, "AZ-SMI": {}, "AZ-SMX": {}, - "AZ-SR": {}, "AZ-SUS": {}, "AZ-TAR": {}, "AZ-TOV": {}, "AZ-UCA": {}, - "AZ-XA": {}, "AZ-XAC": {}, "AZ-XCI": {}, "AZ-XIZ": {}, "AZ-XVD": {}, - "AZ-YAR": {}, "AZ-YE": {}, "AZ-YEV": {}, "AZ-ZAN": {}, "AZ-ZAQ": {}, - "AZ-ZAR": {}, "BA-01": {}, "BA-02": {}, "BA-03": {}, "BA-04": {}, - "BA-05": {}, "BA-06": {}, "BA-07": {}, "BA-08": {}, "BA-09": {}, - "BA-10": {}, "BA-BIH": {}, "BA-BRC": {}, "BA-SRP": {}, "BB-01": {}, - "BB-02": {}, "BB-03": {}, "BB-04": {}, "BB-05": {}, "BB-06": {}, - "BB-07": {}, "BB-08": {}, "BB-09": {}, "BB-10": {}, "BB-11": {}, - "BD-01": {}, "BD-02": {}, "BD-03": {}, "BD-04": {}, "BD-05": {}, - "BD-06": {}, "BD-07": {}, "BD-08": {}, "BD-09": {}, "BD-10": {}, - "BD-11": {}, "BD-12": {}, "BD-13": {}, "BD-14": {}, "BD-15": {}, - "BD-16": {}, "BD-17": {}, "BD-18": {}, "BD-19": {}, "BD-20": {}, - "BD-21": {}, "BD-22": {}, "BD-23": {}, "BD-24": {}, "BD-25": {}, - "BD-26": {}, "BD-27": {}, "BD-28": {}, "BD-29": {}, "BD-30": {}, - "BD-31": {}, "BD-32": {}, "BD-33": {}, "BD-34": {}, "BD-35": {}, - "BD-36": {}, "BD-37": {}, "BD-38": {}, "BD-39": {}, "BD-40": {}, - "BD-41": {}, "BD-42": {}, "BD-43": {}, "BD-44": {}, "BD-45": {}, - "BD-46": {}, "BD-47": {}, "BD-48": {}, "BD-49": {}, "BD-50": {}, - "BD-51": {}, "BD-52": {}, "BD-53": {}, "BD-54": {}, "BD-55": {}, - "BD-56": {}, "BD-57": {}, "BD-58": {}, "BD-59": {}, "BD-60": {}, - "BD-61": {}, "BD-62": {}, "BD-63": {}, "BD-64": {}, "BD-A": {}, - "BD-B": {}, "BD-C": {}, "BD-D": {}, "BD-E": {}, "BD-F": {}, - "BD-G": {}, "BE-BRU": {}, "BE-VAN": {}, "BE-VBR": {}, "BE-VLG": {}, - "BE-VLI": {}, "BE-VOV": {}, "BE-VWV": {}, "BE-WAL": {}, "BE-WBR": {}, - "BE-WHT": {}, "BE-WLG": {}, "BE-WLX": {}, "BE-WNA": {}, "BF-01": {}, - "BF-02": {}, "BF-03": {}, "BF-04": {}, "BF-05": {}, "BF-06": {}, - "BF-07": {}, "BF-08": {}, "BF-09": {}, "BF-10": {}, "BF-11": {}, - "BF-12": {}, "BF-13": {}, "BF-BAL": {}, "BF-BAM": {}, "BF-BAN": {}, - "BF-BAZ": {}, "BF-BGR": {}, "BF-BLG": {}, "BF-BLK": {}, "BF-COM": {}, - "BF-GAN": {}, "BF-GNA": {}, "BF-GOU": {}, "BF-HOU": {}, "BF-IOB": {}, - "BF-KAD": {}, "BF-KEN": {}, "BF-KMD": {}, "BF-KMP": {}, "BF-KOP": {}, - "BF-KOS": {}, "BF-KOT": {}, "BF-KOW": {}, "BF-LER": {}, "BF-LOR": {}, - "BF-MOU": {}, "BF-NAM": {}, "BF-NAO": {}, "BF-NAY": {}, "BF-NOU": {}, - "BF-OUB": {}, "BF-OUD": {}, "BF-PAS": {}, "BF-PON": {}, "BF-SEN": {}, - "BF-SIS": {}, "BF-SMT": {}, "BF-SNG": {}, "BF-SOM": {}, "BF-SOR": {}, - "BF-TAP": {}, "BF-TUI": {}, "BF-YAG": {}, "BF-YAT": {}, "BF-ZIR": {}, - "BF-ZON": {}, "BF-ZOU": {}, "BG-01": {}, "BG-02": {}, "BG-03": {}, - "BG-04": {}, "BG-05": {}, "BG-06": {}, "BG-07": {}, "BG-08": {}, - "BG-09": {}, "BG-10": {}, "BG-11": {}, "BG-12": {}, "BG-13": {}, - "BG-14": {}, "BG-15": {}, "BG-16": {}, "BG-17": {}, "BG-18": {}, - "BG-19": {}, "BG-20": {}, "BG-21": {}, "BG-22": {}, "BG-23": {}, - "BG-24": {}, "BG-25": {}, "BG-26": {}, "BG-27": {}, "BG-28": {}, - "BH-13": {}, "BH-14": {}, "BH-15": {}, "BH-16": {}, "BH-17": {}, - "BI-BB": {}, "BI-BL": {}, "BI-BM": {}, "BI-BR": {}, "BI-CA": {}, - "BI-CI": {}, "BI-GI": {}, "BI-KI": {}, "BI-KR": {}, "BI-KY": {}, - "BI-MA": {}, "BI-MU": {}, "BI-MW": {}, "BI-NG": {}, "BI-RM": {}, "BI-RT": {}, - "BI-RY": {}, "BJ-AK": {}, "BJ-AL": {}, "BJ-AQ": {}, "BJ-BO": {}, - "BJ-CO": {}, "BJ-DO": {}, "BJ-KO": {}, "BJ-LI": {}, "BJ-MO": {}, - "BJ-OU": {}, "BJ-PL": {}, "BJ-ZO": {}, "BN-BE": {}, "BN-BM": {}, - "BN-TE": {}, "BN-TU": {}, "BO-B": {}, "BO-C": {}, "BO-H": {}, - "BO-L": {}, "BO-N": {}, "BO-O": {}, "BO-P": {}, "BO-S": {}, - "BO-T": {}, "BQ-BO": {}, "BQ-SA": {}, "BQ-SE": {}, "BR-AC": {}, - "BR-AL": {}, "BR-AM": {}, "BR-AP": {}, "BR-BA": {}, "BR-CE": {}, - "BR-DF": {}, "BR-ES": {}, "BR-FN": {}, "BR-GO": {}, "BR-MA": {}, - "BR-MG": {}, "BR-MS": {}, "BR-MT": {}, "BR-PA": {}, "BR-PB": {}, - "BR-PE": {}, "BR-PI": {}, "BR-PR": {}, "BR-RJ": {}, "BR-RN": {}, - "BR-RO": {}, "BR-RR": {}, "BR-RS": {}, "BR-SC": {}, "BR-SE": {}, - "BR-SP": {}, "BR-TO": {}, "BS-AK": {}, "BS-BI": {}, "BS-BP": {}, - "BS-BY": {}, "BS-CE": {}, "BS-CI": {}, "BS-CK": {}, "BS-CO": {}, - "BS-CS": {}, "BS-EG": {}, "BS-EX": {}, "BS-FP": {}, "BS-GC": {}, - "BS-HI": {}, "BS-HT": {}, "BS-IN": {}, "BS-LI": {}, "BS-MC": {}, - "BS-MG": {}, "BS-MI": {}, "BS-NE": {}, "BS-NO": {}, "BS-NP": {}, "BS-NS": {}, - "BS-RC": {}, "BS-RI": {}, "BS-SA": {}, "BS-SE": {}, "BS-SO": {}, - "BS-SS": {}, "BS-SW": {}, "BS-WG": {}, "BT-11": {}, "BT-12": {}, - "BT-13": {}, "BT-14": {}, "BT-15": {}, "BT-21": {}, "BT-22": {}, - "BT-23": {}, "BT-24": {}, "BT-31": {}, "BT-32": {}, "BT-33": {}, - "BT-34": {}, "BT-41": {}, "BT-42": {}, "BT-43": {}, "BT-44": {}, - "BT-45": {}, "BT-GA": {}, "BT-TY": {}, "BW-CE": {}, "BW-CH": {}, "BW-GH": {}, - "BW-KG": {}, "BW-KL": {}, "BW-KW": {}, "BW-NE": {}, "BW-NW": {}, - "BW-SE": {}, "BW-SO": {}, "BY-BR": {}, "BY-HM": {}, "BY-HO": {}, - "BY-HR": {}, "BY-MA": {}, "BY-MI": {}, "BY-VI": {}, "BZ-BZ": {}, - "BZ-CY": {}, "BZ-CZL": {}, "BZ-OW": {}, "BZ-SC": {}, "BZ-TOL": {}, - "CA-AB": {}, "CA-BC": {}, "CA-MB": {}, "CA-NB": {}, "CA-NL": {}, - "CA-NS": {}, "CA-NT": {}, "CA-NU": {}, "CA-ON": {}, "CA-PE": {}, - "CA-QC": {}, "CA-SK": {}, "CA-YT": {}, "CD-BC": {}, "CD-BN": {}, - "CD-EQ": {}, "CD-HK": {}, "CD-IT": {}, "CD-KA": {}, "CD-KC": {}, "CD-KE": {}, "CD-KG": {}, "CD-KN": {}, - "CD-KW": {}, "CD-KS": {}, "CD-LU": {}, "CD-MA": {}, "CD-NK": {}, "CD-OR": {}, "CD-SA": {}, "CD-SK": {}, - "CD-TA": {}, "CD-TO": {}, "CF-AC": {}, "CF-BB": {}, "CF-BGF": {}, "CF-BK": {}, "CF-HK": {}, "CF-HM": {}, - "CF-HS": {}, "CF-KB": {}, "CF-KG": {}, "CF-LB": {}, "CF-MB": {}, - "CF-MP": {}, "CF-NM": {}, "CF-OP": {}, "CF-SE": {}, "CF-UK": {}, - "CF-VK": {}, "CG-11": {}, "CG-12": {}, "CG-13": {}, "CG-14": {}, - "CG-15": {}, "CG-16": {}, "CG-2": {}, "CG-5": {}, "CG-7": {}, "CG-8": {}, - "CG-9": {}, "CG-BZV": {}, "CH-AG": {}, "CH-AI": {}, "CH-AR": {}, - "CH-BE": {}, "CH-BL": {}, "CH-BS": {}, "CH-FR": {}, "CH-GE": {}, - "CH-GL": {}, "CH-GR": {}, "CH-JU": {}, "CH-LU": {}, "CH-NE": {}, - "CH-NW": {}, "CH-OW": {}, "CH-SG": {}, "CH-SH": {}, "CH-SO": {}, - "CH-SZ": {}, "CH-TG": {}, "CH-TI": {}, "CH-UR": {}, "CH-VD": {}, - "CH-VS": {}, "CH-ZG": {}, "CH-ZH": {}, "CI-AB": {}, "CI-BS": {}, - "CI-CM": {}, "CI-DN": {}, "CI-GD": {}, "CI-LC": {}, "CI-LG": {}, - "CI-MG": {}, "CI-SM": {}, "CI-SV": {}, "CI-VB": {}, "CI-WR": {}, - "CI-YM": {}, "CI-ZZ": {}, "CL-AI": {}, "CL-AN": {}, "CL-AP": {}, - "CL-AR": {}, "CL-AT": {}, "CL-BI": {}, "CL-CO": {}, "CL-LI": {}, - "CL-LL": {}, "CL-LR": {}, "CL-MA": {}, "CL-ML": {}, "CL-NB": {}, "CL-RM": {}, - "CL-TA": {}, "CL-VS": {}, "CM-AD": {}, "CM-CE": {}, "CM-EN": {}, - "CM-ES": {}, "CM-LT": {}, "CM-NO": {}, "CM-NW": {}, "CM-OU": {}, - "CM-SU": {}, "CM-SW": {}, "CN-AH": {}, "CN-BJ": {}, "CN-CQ": {}, - "CN-FJ": {}, "CN-GS": {}, "CN-GD": {}, "CN-GX": {}, "CN-GZ": {}, - "CN-HI": {}, "CN-HE": {}, "CN-HL": {}, "CN-HA": {}, "CN-HB": {}, - "CN-HN": {}, "CN-JS": {}, "CN-JX": {}, "CN-JL": {}, "CN-LN": {}, - "CN-NM": {}, "CN-NX": {}, "CN-QH": {}, "CN-SN": {}, "CN-SD": {}, "CN-SH": {}, - "CN-SX": {}, "CN-SC": {}, "CN-TJ": {}, "CN-XJ": {}, "CN-XZ": {}, "CN-YN": {}, - "CN-ZJ": {}, "CO-AMA": {}, "CO-ANT": {}, "CO-ARA": {}, "CO-ATL": {}, - "CO-BOL": {}, "CO-BOY": {}, "CO-CAL": {}, "CO-CAQ": {}, "CO-CAS": {}, - "CO-CAU": {}, "CO-CES": {}, "CO-CHO": {}, "CO-COR": {}, "CO-CUN": {}, - "CO-DC": {}, "CO-GUA": {}, "CO-GUV": {}, "CO-HUI": {}, "CO-LAG": {}, - "CO-MAG": {}, "CO-MET": {}, "CO-NAR": {}, "CO-NSA": {}, "CO-PUT": {}, - "CO-QUI": {}, "CO-RIS": {}, "CO-SAN": {}, "CO-SAP": {}, "CO-SUC": {}, - "CO-TOL": {}, "CO-VAC": {}, "CO-VAU": {}, "CO-VID": {}, "CR-A": {}, - "CR-C": {}, "CR-G": {}, "CR-H": {}, "CR-L": {}, "CR-P": {}, - "CR-SJ": {}, "CU-01": {}, "CU-02": {}, "CU-03": {}, "CU-04": {}, - "CU-05": {}, "CU-06": {}, "CU-07": {}, "CU-08": {}, "CU-09": {}, - "CU-10": {}, "CU-11": {}, "CU-12": {}, "CU-13": {}, "CU-14": {}, "CU-15": {}, - "CU-16": {}, "CU-99": {}, "CV-B": {}, "CV-BR": {}, "CV-BV": {}, "CV-CA": {}, - "CV-CF": {}, "CV-CR": {}, "CV-MA": {}, "CV-MO": {}, "CV-PA": {}, - "CV-PN": {}, "CV-PR": {}, "CV-RB": {}, "CV-RG": {}, "CV-RS": {}, - "CV-S": {}, "CV-SD": {}, "CV-SF": {}, "CV-SL": {}, "CV-SM": {}, - "CV-SO": {}, "CV-SS": {}, "CV-SV": {}, "CV-TA": {}, "CV-TS": {}, - "CY-01": {}, "CY-02": {}, "CY-03": {}, "CY-04": {}, "CY-05": {}, - "CY-06": {}, "CZ-10": {}, "CZ-101": {}, "CZ-102": {}, "CZ-103": {}, - "CZ-104": {}, "CZ-105": {}, "CZ-106": {}, "CZ-107": {}, "CZ-108": {}, - "CZ-109": {}, "CZ-110": {}, "CZ-111": {}, "CZ-112": {}, "CZ-113": {}, - "CZ-114": {}, "CZ-115": {}, "CZ-116": {}, "CZ-117": {}, "CZ-118": {}, - "CZ-119": {}, "CZ-120": {}, "CZ-121": {}, "CZ-122": {}, "CZ-20": {}, - "CZ-201": {}, "CZ-202": {}, "CZ-203": {}, "CZ-204": {}, "CZ-205": {}, - "CZ-206": {}, "CZ-207": {}, "CZ-208": {}, "CZ-209": {}, "CZ-20A": {}, - "CZ-20B": {}, "CZ-20C": {}, "CZ-31": {}, "CZ-311": {}, "CZ-312": {}, - "CZ-313": {}, "CZ-314": {}, "CZ-315": {}, "CZ-316": {}, "CZ-317": {}, - "CZ-32": {}, "CZ-321": {}, "CZ-322": {}, "CZ-323": {}, "CZ-324": {}, - "CZ-325": {}, "CZ-326": {}, "CZ-327": {}, "CZ-41": {}, "CZ-411": {}, - "CZ-412": {}, "CZ-413": {}, "CZ-42": {}, "CZ-421": {}, "CZ-422": {}, - "CZ-423": {}, "CZ-424": {}, "CZ-425": {}, "CZ-426": {}, "CZ-427": {}, - "CZ-51": {}, "CZ-511": {}, "CZ-512": {}, "CZ-513": {}, "CZ-514": {}, - "CZ-52": {}, "CZ-521": {}, "CZ-522": {}, "CZ-523": {}, "CZ-524": {}, - "CZ-525": {}, "CZ-53": {}, "CZ-531": {}, "CZ-532": {}, "CZ-533": {}, - "CZ-534": {}, "CZ-63": {}, "CZ-631": {}, "CZ-632": {}, "CZ-633": {}, - "CZ-634": {}, "CZ-635": {}, "CZ-64": {}, "CZ-641": {}, "CZ-642": {}, - "CZ-643": {}, "CZ-644": {}, "CZ-645": {}, "CZ-646": {}, "CZ-647": {}, - "CZ-71": {}, "CZ-711": {}, "CZ-712": {}, "CZ-713": {}, "CZ-714": {}, - "CZ-715": {}, "CZ-72": {}, "CZ-721": {}, "CZ-722": {}, "CZ-723": {}, - "CZ-724": {}, "CZ-80": {}, "CZ-801": {}, "CZ-802": {}, "CZ-803": {}, - "CZ-804": {}, "CZ-805": {}, "CZ-806": {}, "DE-BB": {}, "DE-BE": {}, - "DE-BW": {}, "DE-BY": {}, "DE-HB": {}, "DE-HE": {}, "DE-HH": {}, - "DE-MV": {}, "DE-NI": {}, "DE-NW": {}, "DE-RP": {}, "DE-SH": {}, - "DE-SL": {}, "DE-SN": {}, "DE-ST": {}, "DE-TH": {}, "DJ-AR": {}, - "DJ-AS": {}, "DJ-DI": {}, "DJ-DJ": {}, "DJ-OB": {}, "DJ-TA": {}, - "DK-81": {}, "DK-82": {}, "DK-83": {}, "DK-84": {}, "DK-85": {}, - "DM-01": {}, "DM-02": {}, "DM-03": {}, "DM-04": {}, "DM-05": {}, - "DM-06": {}, "DM-07": {}, "DM-08": {}, "DM-09": {}, "DM-10": {}, - "DO-01": {}, "DO-02": {}, "DO-03": {}, "DO-04": {}, "DO-05": {}, - "DO-06": {}, "DO-07": {}, "DO-08": {}, "DO-09": {}, "DO-10": {}, - "DO-11": {}, "DO-12": {}, "DO-13": {}, "DO-14": {}, "DO-15": {}, - "DO-16": {}, "DO-17": {}, "DO-18": {}, "DO-19": {}, "DO-20": {}, - "DO-21": {}, "DO-22": {}, "DO-23": {}, "DO-24": {}, "DO-25": {}, - "DO-26": {}, "DO-27": {}, "DO-28": {}, "DO-29": {}, "DO-30": {}, "DO-31": {}, - "DZ-01": {}, "DZ-02": {}, "DZ-03": {}, "DZ-04": {}, "DZ-05": {}, - "DZ-06": {}, "DZ-07": {}, "DZ-08": {}, "DZ-09": {}, "DZ-10": {}, - "DZ-11": {}, "DZ-12": {}, "DZ-13": {}, "DZ-14": {}, "DZ-15": {}, - "DZ-16": {}, "DZ-17": {}, "DZ-18": {}, "DZ-19": {}, "DZ-20": {}, - "DZ-21": {}, "DZ-22": {}, "DZ-23": {}, "DZ-24": {}, "DZ-25": {}, - "DZ-26": {}, "DZ-27": {}, "DZ-28": {}, "DZ-29": {}, "DZ-30": {}, - "DZ-31": {}, "DZ-32": {}, "DZ-33": {}, "DZ-34": {}, "DZ-35": {}, - "DZ-36": {}, "DZ-37": {}, "DZ-38": {}, "DZ-39": {}, "DZ-40": {}, - "DZ-41": {}, "DZ-42": {}, "DZ-43": {}, "DZ-44": {}, "DZ-45": {}, - "DZ-46": {}, "DZ-47": {}, "DZ-48": {}, "DZ-49": {}, "DZ-51": {}, - "DZ-53": {}, "DZ-55": {}, "DZ-56": {}, "DZ-57": {}, "EC-A": {}, "EC-B": {}, - "EC-C": {}, "EC-D": {}, "EC-E": {}, "EC-F": {}, "EC-G": {}, - "EC-H": {}, "EC-I": {}, "EC-L": {}, "EC-M": {}, "EC-N": {}, - "EC-O": {}, "EC-P": {}, "EC-R": {}, "EC-S": {}, "EC-SD": {}, - "EC-SE": {}, "EC-T": {}, "EC-U": {}, "EC-W": {}, "EC-X": {}, - "EC-Y": {}, "EC-Z": {}, "EE-37": {}, "EE-39": {}, "EE-44": {}, "EE-45": {}, - "EE-49": {}, "EE-50": {}, "EE-51": {}, "EE-52": {}, "EE-56": {}, "EE-57": {}, - "EE-59": {}, "EE-60": {}, "EE-64": {}, "EE-65": {}, "EE-67": {}, "EE-68": {}, - "EE-70": {}, "EE-71": {}, "EE-74": {}, "EE-78": {}, "EE-79": {}, "EE-81": {}, "EE-82": {}, - "EE-84": {}, "EE-86": {}, "EE-87": {}, "EG-ALX": {}, "EG-ASN": {}, "EG-AST": {}, - "EG-BA": {}, "EG-BH": {}, "EG-BNS": {}, "EG-C": {}, "EG-DK": {}, - "EG-DT": {}, "EG-FYM": {}, "EG-GH": {}, "EG-GZ": {}, "EG-HU": {}, - "EG-IS": {}, "EG-JS": {}, "EG-KB": {}, "EG-KFS": {}, "EG-KN": {}, - "EG-LX": {}, "EG-MN": {}, "EG-MNF": {}, "EG-MT": {}, "EG-PTS": {}, "EG-SHG": {}, - "EG-SHR": {}, "EG-SIN": {}, "EG-SU": {}, "EG-SUZ": {}, "EG-WAD": {}, - "ER-AN": {}, "ER-DK": {}, "ER-DU": {}, "ER-GB": {}, "ER-MA": {}, - "ER-SK": {}, "ES-A": {}, "ES-AB": {}, "ES-AL": {}, "ES-AN": {}, - "ES-AR": {}, "ES-AS": {}, "ES-AV": {}, "ES-B": {}, "ES-BA": {}, - "ES-BI": {}, "ES-BU": {}, "ES-C": {}, "ES-CA": {}, "ES-CB": {}, - "ES-CC": {}, "ES-CE": {}, "ES-CL": {}, "ES-CM": {}, "ES-CN": {}, - "ES-CO": {}, "ES-CR": {}, "ES-CS": {}, "ES-CT": {}, "ES-CU": {}, - "ES-EX": {}, "ES-GA": {}, "ES-GC": {}, "ES-GI": {}, "ES-GR": {}, - "ES-GU": {}, "ES-H": {}, "ES-HU": {}, "ES-IB": {}, "ES-J": {}, - "ES-L": {}, "ES-LE": {}, "ES-LO": {}, "ES-LU": {}, "ES-M": {}, - "ES-MA": {}, "ES-MC": {}, "ES-MD": {}, "ES-ML": {}, "ES-MU": {}, - "ES-NA": {}, "ES-NC": {}, "ES-O": {}, "ES-OR": {}, "ES-P": {}, - "ES-PM": {}, "ES-PO": {}, "ES-PV": {}, "ES-RI": {}, "ES-S": {}, - "ES-SA": {}, "ES-SE": {}, "ES-SG": {}, "ES-SO": {}, "ES-SS": {}, - "ES-T": {}, "ES-TE": {}, "ES-TF": {}, "ES-TO": {}, "ES-V": {}, - "ES-VA": {}, "ES-VC": {}, "ES-VI": {}, "ES-Z": {}, "ES-ZA": {}, - "ET-AA": {}, "ET-AF": {}, "ET-AM": {}, "ET-BE": {}, "ET-DD": {}, - "ET-GA": {}, "ET-HA": {}, "ET-OR": {}, "ET-SN": {}, "ET-SO": {}, - "ET-TI": {}, "FI-01": {}, "FI-02": {}, "FI-03": {}, "FI-04": {}, - "FI-05": {}, "FI-06": {}, "FI-07": {}, "FI-08": {}, "FI-09": {}, - "FI-10": {}, "FI-11": {}, "FI-12": {}, "FI-13": {}, "FI-14": {}, - "FI-15": {}, "FI-16": {}, "FI-17": {}, "FI-18": {}, "FI-19": {}, - "FJ-C": {}, "FJ-E": {}, "FJ-N": {}, "FJ-R": {}, "FJ-W": {}, - "FM-KSA": {}, "FM-PNI": {}, "FM-TRK": {}, "FM-YAP": {}, "FR-01": {}, - "FR-02": {}, "FR-03": {}, "FR-04": {}, "FR-05": {}, "FR-06": {}, - "FR-07": {}, "FR-08": {}, "FR-09": {}, "FR-10": {}, "FR-11": {}, - "FR-12": {}, "FR-13": {}, "FR-14": {}, "FR-15": {}, "FR-16": {}, - "FR-17": {}, "FR-18": {}, "FR-19": {}, "FR-20R": {}, "FR-21": {}, "FR-22": {}, - "FR-23": {}, "FR-24": {}, "FR-25": {}, "FR-26": {}, "FR-27": {}, - "FR-28": {}, "FR-29": {}, "FR-2A": {}, "FR-2B": {}, "FR-30": {}, - "FR-31": {}, "FR-32": {}, "FR-33": {}, "FR-34": {}, "FR-35": {}, - "FR-36": {}, "FR-37": {}, "FR-38": {}, "FR-39": {}, "FR-40": {}, - "FR-41": {}, "FR-42": {}, "FR-43": {}, "FR-44": {}, "FR-45": {}, - "FR-46": {}, "FR-47": {}, "FR-48": {}, "FR-49": {}, "FR-50": {}, - "FR-51": {}, "FR-52": {}, "FR-53": {}, "FR-54": {}, "FR-55": {}, - "FR-56": {}, "FR-57": {}, "FR-58": {}, "FR-59": {}, "FR-60": {}, - "FR-61": {}, "FR-62": {}, "FR-63": {}, "FR-64": {}, "FR-65": {}, - "FR-66": {}, "FR-67": {}, "FR-68": {}, "FR-69": {}, "FR-70": {}, - "FR-71": {}, "FR-72": {}, "FR-73": {}, "FR-74": {}, "FR-75": {}, - "FR-76": {}, "FR-77": {}, "FR-78": {}, "FR-79": {}, "FR-80": {}, - "FR-81": {}, "FR-82": {}, "FR-83": {}, "FR-84": {}, "FR-85": {}, - "FR-86": {}, "FR-87": {}, "FR-88": {}, "FR-89": {}, "FR-90": {}, - "FR-91": {}, "FR-92": {}, "FR-93": {}, "FR-94": {}, "FR-95": {}, - "FR-ARA": {}, "FR-BFC": {}, "FR-BL": {}, "FR-BRE": {}, "FR-COR": {}, - "FR-CP": {}, "FR-CVL": {}, "FR-GES": {}, "FR-GF": {}, "FR-GP": {}, - "FR-GUA": {}, "FR-HDF": {}, "FR-IDF": {}, "FR-LRE": {}, "FR-MAY": {}, - "FR-MF": {}, "FR-MQ": {}, "FR-NAQ": {}, "FR-NC": {}, "FR-NOR": {}, - "FR-OCC": {}, "FR-PAC": {}, "FR-PDL": {}, "FR-PF": {}, "FR-PM": {}, - "FR-RE": {}, "FR-TF": {}, "FR-WF": {}, "FR-YT": {}, "GA-1": {}, - "GA-2": {}, "GA-3": {}, "GA-4": {}, "GA-5": {}, "GA-6": {}, - "GA-7": {}, "GA-8": {}, "GA-9": {}, "GB-ABC": {}, "GB-ABD": {}, - "GB-ABE": {}, "GB-AGB": {}, "GB-AGY": {}, "GB-AND": {}, "GB-ANN": {}, - "GB-ANS": {}, "GB-BAS": {}, "GB-BBD": {}, "GB-BDF": {}, "GB-BDG": {}, - "GB-BEN": {}, "GB-BEX": {}, "GB-BFS": {}, "GB-BGE": {}, "GB-BGW": {}, - "GB-BIR": {}, "GB-BKM": {}, "GB-BMH": {}, "GB-BNE": {}, "GB-BNH": {}, - "GB-BNS": {}, "GB-BOL": {}, "GB-BPL": {}, "GB-BRC": {}, "GB-BRD": {}, - "GB-BRY": {}, "GB-BST": {}, "GB-BUR": {}, "GB-CAM": {}, "GB-CAY": {}, - "GB-CBF": {}, "GB-CCG": {}, "GB-CGN": {}, "GB-CHE": {}, "GB-CHW": {}, - "GB-CLD": {}, "GB-CLK": {}, "GB-CMA": {}, "GB-CMD": {}, "GB-CMN": {}, - "GB-CON": {}, "GB-COV": {}, "GB-CRF": {}, "GB-CRY": {}, "GB-CWY": {}, - "GB-DAL": {}, "GB-DBY": {}, "GB-DEN": {}, "GB-DER": {}, "GB-DEV": {}, - "GB-DGY": {}, "GB-DNC": {}, "GB-DND": {}, "GB-DOR": {}, "GB-DRS": {}, - "GB-DUD": {}, "GB-DUR": {}, "GB-EAL": {}, "GB-EAW": {}, "GB-EAY": {}, - "GB-EDH": {}, "GB-EDU": {}, "GB-ELN": {}, "GB-ELS": {}, "GB-ENF": {}, - "GB-ENG": {}, "GB-ERW": {}, "GB-ERY": {}, "GB-ESS": {}, "GB-ESX": {}, - "GB-FAL": {}, "GB-FIF": {}, "GB-FLN": {}, "GB-FMO": {}, "GB-GAT": {}, - "GB-GBN": {}, "GB-GLG": {}, "GB-GLS": {}, "GB-GRE": {}, "GB-GWN": {}, - "GB-HAL": {}, "GB-HAM": {}, "GB-HAV": {}, "GB-HCK": {}, "GB-HEF": {}, - "GB-HIL": {}, "GB-HLD": {}, "GB-HMF": {}, "GB-HNS": {}, "GB-HPL": {}, - "GB-HRT": {}, "GB-HRW": {}, "GB-HRY": {}, "GB-IOS": {}, "GB-IOW": {}, - "GB-ISL": {}, "GB-IVC": {}, "GB-KEC": {}, "GB-KEN": {}, "GB-KHL": {}, - "GB-KIR": {}, "GB-KTT": {}, "GB-KWL": {}, "GB-LAN": {}, "GB-LBC": {}, - "GB-LBH": {}, "GB-LCE": {}, "GB-LDS": {}, "GB-LEC": {}, "GB-LEW": {}, - "GB-LIN": {}, "GB-LIV": {}, "GB-LND": {}, "GB-LUT": {}, "GB-MAN": {}, - "GB-MDB": {}, "GB-MDW": {}, "GB-MEA": {}, "GB-MIK": {}, "GD-01": {}, - "GB-MLN": {}, "GB-MON": {}, "GB-MRT": {}, "GB-MRY": {}, "GB-MTY": {}, - "GB-MUL": {}, "GB-NAY": {}, "GB-NBL": {}, "GB-NEL": {}, "GB-NET": {}, - "GB-NFK": {}, "GB-NGM": {}, "GB-NIR": {}, "GB-NLK": {}, "GB-NLN": {}, - "GB-NMD": {}, "GB-NSM": {}, "GB-NTH": {}, "GB-NTL": {}, "GB-NTT": {}, - "GB-NTY": {}, "GB-NWM": {}, "GB-NWP": {}, "GB-NYK": {}, "GB-OLD": {}, - "GB-ORK": {}, "GB-OXF": {}, "GB-PEM": {}, "GB-PKN": {}, "GB-PLY": {}, - "GB-POL": {}, "GB-POR": {}, "GB-POW": {}, "GB-PTE": {}, "GB-RCC": {}, - "GB-RCH": {}, "GB-RCT": {}, "GB-RDB": {}, "GB-RDG": {}, "GB-RFW": {}, - "GB-RIC": {}, "GB-ROT": {}, "GB-RUT": {}, "GB-SAW": {}, "GB-SAY": {}, - "GB-SCB": {}, "GB-SCT": {}, "GB-SFK": {}, "GB-SFT": {}, "GB-SGC": {}, - "GB-SHF": {}, "GB-SHN": {}, "GB-SHR": {}, "GB-SKP": {}, "GB-SLF": {}, - "GB-SLG": {}, "GB-SLK": {}, "GB-SND": {}, "GB-SOL": {}, "GB-SOM": {}, - "GB-SOS": {}, "GB-SRY": {}, "GB-STE": {}, "GB-STG": {}, "GB-STH": {}, - "GB-STN": {}, "GB-STS": {}, "GB-STT": {}, "GB-STY": {}, "GB-SWA": {}, - "GB-SWD": {}, "GB-SWK": {}, "GB-TAM": {}, "GB-TFW": {}, "GB-THR": {}, - "GB-TOB": {}, "GB-TOF": {}, "GB-TRF": {}, "GB-TWH": {}, "GB-UKM": {}, - "GB-VGL": {}, "GB-WAR": {}, "GB-WBK": {}, "GB-WDU": {}, "GB-WFT": {}, - "GB-WGN": {}, "GB-WIL": {}, "GB-WKF": {}, "GB-WLL": {}, "GB-WLN": {}, - "GB-WLS": {}, "GB-WLV": {}, "GB-WND": {}, "GB-WNM": {}, "GB-WOK": {}, - "GB-WOR": {}, "GB-WRL": {}, "GB-WRT": {}, "GB-WRX": {}, "GB-WSM": {}, - "GB-WSX": {}, "GB-YOR": {}, "GB-ZET": {}, "GD-02": {}, "GD-03": {}, - "GD-04": {}, "GD-05": {}, "GD-06": {}, "GD-10": {}, "GE-AB": {}, - "GE-AJ": {}, "GE-GU": {}, "GE-IM": {}, "GE-KA": {}, "GE-KK": {}, - "GE-MM": {}, "GE-RL": {}, "GE-SJ": {}, "GE-SK": {}, "GE-SZ": {}, - "GE-TB": {}, "GH-AA": {}, "GH-AH": {}, "GH-AF": {}, "GH-BA": {}, "GH-BO": {}, "GH-BE": {}, "GH-CP": {}, - "GH-EP": {}, "GH-NP": {}, "GH-TV": {}, "GH-UE": {}, "GH-UW": {}, - "GH-WP": {}, "GL-AV": {}, "GL-KU": {}, "GL-QA": {}, "GL-QT": {}, "GL-QE": {}, "GL-SM": {}, - "GM-B": {}, "GM-L": {}, "GM-M": {}, "GM-N": {}, "GM-U": {}, - "GM-W": {}, "GN-B": {}, "GN-BE": {}, "GN-BF": {}, "GN-BK": {}, - "GN-C": {}, "GN-CO": {}, "GN-D": {}, "GN-DB": {}, "GN-DI": {}, - "GN-DL": {}, "GN-DU": {}, "GN-F": {}, "GN-FA": {}, "GN-FO": {}, - "GN-FR": {}, "GN-GA": {}, "GN-GU": {}, "GN-K": {}, "GN-KA": {}, - "GN-KB": {}, "GN-KD": {}, "GN-KE": {}, "GN-KN": {}, "GN-KO": {}, - "GN-KS": {}, "GN-L": {}, "GN-LA": {}, "GN-LE": {}, "GN-LO": {}, - "GN-M": {}, "GN-MC": {}, "GN-MD": {}, "GN-ML": {}, "GN-MM": {}, - "GN-N": {}, "GN-NZ": {}, "GN-PI": {}, "GN-SI": {}, "GN-TE": {}, - "GN-TO": {}, "GN-YO": {}, "GQ-AN": {}, "GQ-BN": {}, "GQ-BS": {}, - "GQ-C": {}, "GQ-CS": {}, "GQ-I": {}, "GQ-KN": {}, "GQ-LI": {}, - "GQ-WN": {}, "GR-01": {}, "GR-03": {}, "GR-04": {}, "GR-05": {}, - "GR-06": {}, "GR-07": {}, "GR-11": {}, "GR-12": {}, "GR-13": {}, - "GR-14": {}, "GR-15": {}, "GR-16": {}, "GR-17": {}, "GR-21": {}, - "GR-22": {}, "GR-23": {}, "GR-24": {}, "GR-31": {}, "GR-32": {}, - "GR-33": {}, "GR-34": {}, "GR-41": {}, "GR-42": {}, "GR-43": {}, - "GR-44": {}, "GR-51": {}, "GR-52": {}, "GR-53": {}, "GR-54": {}, - "GR-55": {}, "GR-56": {}, "GR-57": {}, "GR-58": {}, "GR-59": {}, - "GR-61": {}, "GR-62": {}, "GR-63": {}, "GR-64": {}, "GR-69": {}, - "GR-71": {}, "GR-72": {}, "GR-73": {}, "GR-81": {}, "GR-82": {}, - "GR-83": {}, "GR-84": {}, "GR-85": {}, "GR-91": {}, "GR-92": {}, - "GR-93": {}, "GR-94": {}, "GR-A": {}, "GR-A1": {}, "GR-B": {}, - "GR-C": {}, "GR-D": {}, "GR-E": {}, "GR-F": {}, "GR-G": {}, - "GR-H": {}, "GR-I": {}, "GR-J": {}, "GR-K": {}, "GR-L": {}, - "GR-M": {}, "GT-01": {}, "GT-02": {}, "GT-03": {}, "GT-04": {}, - "GT-05": {}, "GT-06": {}, "GT-07": {}, "GT-08": {}, "GT-09": {}, - "GT-10": {}, "GT-11": {}, "GT-12": {}, "GT-13": {}, "GT-14": {}, - "GT-15": {}, "GT-16": {}, "GT-17": {}, "GT-18": {}, "GT-19": {}, - "GT-20": {}, "GT-21": {}, "GT-22": {}, "GW-BA": {}, "GW-BL": {}, - "GW-BM": {}, "GW-BS": {}, "GW-CA": {}, "GW-GA": {}, "GW-L": {}, - "GW-N": {}, "GW-OI": {}, "GW-QU": {}, "GW-S": {}, "GW-TO": {}, - "GY-BA": {}, "GY-CU": {}, "GY-DE": {}, "GY-EB": {}, "GY-ES": {}, - "GY-MA": {}, "GY-PM": {}, "GY-PT": {}, "GY-UD": {}, "GY-UT": {}, - "HN-AT": {}, "HN-CH": {}, "HN-CL": {}, "HN-CM": {}, "HN-CP": {}, - "HN-CR": {}, "HN-EP": {}, "HN-FM": {}, "HN-GD": {}, "HN-IB": {}, - "HN-IN": {}, "HN-LE": {}, "HN-LP": {}, "HN-OC": {}, "HN-OL": {}, - "HN-SB": {}, "HN-VA": {}, "HN-YO": {}, "HR-01": {}, "HR-02": {}, - "HR-03": {}, "HR-04": {}, "HR-05": {}, "HR-06": {}, "HR-07": {}, - "HR-08": {}, "HR-09": {}, "HR-10": {}, "HR-11": {}, "HR-12": {}, - "HR-13": {}, "HR-14": {}, "HR-15": {}, "HR-16": {}, "HR-17": {}, - "HR-18": {}, "HR-19": {}, "HR-20": {}, "HR-21": {}, "HT-AR": {}, - "HT-CE": {}, "HT-GA": {}, "HT-ND": {}, "HT-NE": {}, "HT-NO": {}, "HT-NI": {}, - "HT-OU": {}, "HT-SD": {}, "HT-SE": {}, "HU-BA": {}, "HU-BC": {}, - "HU-BE": {}, "HU-BK": {}, "HU-BU": {}, "HU-BZ": {}, "HU-CS": {}, - "HU-DE": {}, "HU-DU": {}, "HU-EG": {}, "HU-ER": {}, "HU-FE": {}, - "HU-GS": {}, "HU-GY": {}, "HU-HB": {}, "HU-HE": {}, "HU-HV": {}, - "HU-JN": {}, "HU-KE": {}, "HU-KM": {}, "HU-KV": {}, "HU-MI": {}, - "HU-NK": {}, "HU-NO": {}, "HU-NY": {}, "HU-PE": {}, "HU-PS": {}, - "HU-SD": {}, "HU-SF": {}, "HU-SH": {}, "HU-SK": {}, "HU-SN": {}, - "HU-SO": {}, "HU-SS": {}, "HU-ST": {}, "HU-SZ": {}, "HU-TB": {}, - "HU-TO": {}, "HU-VA": {}, "HU-VE": {}, "HU-VM": {}, "HU-ZA": {}, - "HU-ZE": {}, "ID-AC": {}, "ID-BA": {}, "ID-BB": {}, "ID-BE": {}, - "ID-BT": {}, "ID-GO": {}, "ID-IJ": {}, "ID-JA": {}, "ID-JB": {}, - "ID-JI": {}, "ID-JK": {}, "ID-JT": {}, "ID-JW": {}, "ID-KA": {}, - "ID-KB": {}, "ID-KI": {}, "ID-KU": {}, "ID-KR": {}, "ID-KS": {}, - "ID-KT": {}, "ID-LA": {}, "ID-MA": {}, "ID-ML": {}, "ID-MU": {}, - "ID-NB": {}, "ID-NT": {}, "ID-NU": {}, "ID-PA": {}, "ID-PB": {}, - "ID-PE": {}, "ID-PP": {}, "ID-PS": {}, "ID-PT": {}, "ID-RI": {}, - "ID-SA": {}, "ID-SB": {}, "ID-SG": {}, "ID-SL": {}, "ID-SM": {}, - "ID-SN": {}, "ID-SR": {}, "ID-SS": {}, "ID-ST": {}, "ID-SU": {}, - "ID-YO": {}, "IE-C": {}, "IE-CE": {}, "IE-CN": {}, "IE-CO": {}, - "IE-CW": {}, "IE-D": {}, "IE-DL": {}, "IE-G": {}, "IE-KE": {}, - "IE-KK": {}, "IE-KY": {}, "IE-L": {}, "IE-LD": {}, "IE-LH": {}, - "IE-LK": {}, "IE-LM": {}, "IE-LS": {}, "IE-M": {}, "IE-MH": {}, - "IE-MN": {}, "IE-MO": {}, "IE-OY": {}, "IE-RN": {}, "IE-SO": {}, - "IE-TA": {}, "IE-U": {}, "IE-WD": {}, "IE-WH": {}, "IE-WW": {}, - "IE-WX": {}, "IL-D": {}, "IL-HA": {}, "IL-JM": {}, "IL-M": {}, - "IL-TA": {}, "IL-Z": {}, "IN-AN": {}, "IN-AP": {}, "IN-AR": {}, - "IN-AS": {}, "IN-BR": {}, "IN-CH": {}, "IN-CT": {}, "IN-DH": {}, - "IN-DL": {}, "IN-DN": {}, "IN-GA": {}, "IN-GJ": {}, "IN-HP": {}, - "IN-HR": {}, "IN-JH": {}, "IN-JK": {}, "IN-KA": {}, "IN-KL": {}, - "IN-LD": {}, "IN-MH": {}, "IN-ML": {}, "IN-MN": {}, "IN-MP": {}, - "IN-MZ": {}, "IN-NL": {}, "IN-TG": {}, "IN-OR": {}, "IN-PB": {}, "IN-PY": {}, - "IN-RJ": {}, "IN-SK": {}, "IN-TN": {}, "IN-TR": {}, "IN-UP": {}, - "IN-UT": {}, "IN-WB": {}, "IQ-AN": {}, "IQ-AR": {}, "IQ-BA": {}, - "IQ-BB": {}, "IQ-BG": {}, "IQ-DA": {}, "IQ-DI": {}, "IQ-DQ": {}, - "IQ-KA": {}, "IQ-KI": {}, "IQ-MA": {}, "IQ-MU": {}, "IQ-NA": {}, "IQ-NI": {}, - "IQ-QA": {}, "IQ-SD": {}, "IQ-SW": {}, "IQ-SU": {}, "IQ-TS": {}, "IQ-WA": {}, - "IR-00": {}, "IR-01": {}, "IR-02": {}, "IR-03": {}, "IR-04": {}, "IR-05": {}, - "IR-06": {}, "IR-07": {}, "IR-08": {}, "IR-09": {}, "IR-10": {}, "IR-11": {}, - "IR-12": {}, "IR-13": {}, "IR-14": {}, "IR-15": {}, "IR-16": {}, - "IR-17": {}, "IR-18": {}, "IR-19": {}, "IR-20": {}, "IR-21": {}, - "IR-22": {}, "IR-23": {}, "IR-24": {}, "IR-25": {}, "IR-26": {}, - "IR-27": {}, "IR-28": {}, "IR-29": {}, "IR-30": {}, "IR-31": {}, - "IS-0": {}, "IS-1": {}, "IS-2": {}, "IS-3": {}, "IS-4": {}, - "IS-5": {}, "IS-6": {}, "IS-7": {}, "IS-8": {}, "IT-21": {}, - "IT-23": {}, "IT-25": {}, "IT-32": {}, "IT-34": {}, "IT-36": {}, - "IT-42": {}, "IT-45": {}, "IT-52": {}, "IT-55": {}, "IT-57": {}, - "IT-62": {}, "IT-65": {}, "IT-67": {}, "IT-72": {}, "IT-75": {}, - "IT-77": {}, "IT-78": {}, "IT-82": {}, "IT-88": {}, "IT-AG": {}, - "IT-AL": {}, "IT-AN": {}, "IT-AO": {}, "IT-AP": {}, "IT-AQ": {}, - "IT-AR": {}, "IT-AT": {}, "IT-AV": {}, "IT-BA": {}, "IT-BG": {}, - "IT-BI": {}, "IT-BL": {}, "IT-BN": {}, "IT-BO": {}, "IT-BR": {}, - "IT-BS": {}, "IT-BT": {}, "IT-BZ": {}, "IT-CA": {}, "IT-CB": {}, - "IT-CE": {}, "IT-CH": {}, "IT-CI": {}, "IT-CL": {}, "IT-CN": {}, - "IT-CO": {}, "IT-CR": {}, "IT-CS": {}, "IT-CT": {}, "IT-CZ": {}, - "IT-EN": {}, "IT-FC": {}, "IT-FE": {}, "IT-FG": {}, "IT-FI": {}, - "IT-FM": {}, "IT-FR": {}, "IT-GE": {}, "IT-GO": {}, "IT-GR": {}, - "IT-IM": {}, "IT-IS": {}, "IT-KR": {}, "IT-LC": {}, "IT-LE": {}, - "IT-LI": {}, "IT-LO": {}, "IT-LT": {}, "IT-LU": {}, "IT-MB": {}, - "IT-MC": {}, "IT-ME": {}, "IT-MI": {}, "IT-MN": {}, "IT-MO": {}, - "IT-MS": {}, "IT-MT": {}, "IT-NA": {}, "IT-NO": {}, "IT-NU": {}, - "IT-OG": {}, "IT-OR": {}, "IT-OT": {}, "IT-PA": {}, "IT-PC": {}, - "IT-PD": {}, "IT-PE": {}, "IT-PG": {}, "IT-PI": {}, "IT-PN": {}, - "IT-PO": {}, "IT-PR": {}, "IT-PT": {}, "IT-PU": {}, "IT-PV": {}, - "IT-PZ": {}, "IT-RA": {}, "IT-RC": {}, "IT-RE": {}, "IT-RG": {}, - "IT-RI": {}, "IT-RM": {}, "IT-RN": {}, "IT-RO": {}, "IT-SA": {}, - "IT-SI": {}, "IT-SO": {}, "IT-SP": {}, "IT-SR": {}, "IT-SS": {}, - "IT-SV": {}, "IT-TA": {}, "IT-TE": {}, "IT-TN": {}, "IT-TO": {}, - "IT-TP": {}, "IT-TR": {}, "IT-TS": {}, "IT-TV": {}, "IT-UD": {}, - "IT-VA": {}, "IT-VB": {}, "IT-VC": {}, "IT-VE": {}, "IT-VI": {}, - "IT-VR": {}, "IT-VS": {}, "IT-VT": {}, "IT-VV": {}, "JM-01": {}, - "JM-02": {}, "JM-03": {}, "JM-04": {}, "JM-05": {}, "JM-06": {}, - "JM-07": {}, "JM-08": {}, "JM-09": {}, "JM-10": {}, "JM-11": {}, - "JM-12": {}, "JM-13": {}, "JM-14": {}, "JO-AJ": {}, "JO-AM": {}, - "JO-AQ": {}, "JO-AT": {}, "JO-AZ": {}, "JO-BA": {}, "JO-IR": {}, - "JO-JA": {}, "JO-KA": {}, "JO-MA": {}, "JO-MD": {}, "JO-MN": {}, - "JP-01": {}, "JP-02": {}, "JP-03": {}, "JP-04": {}, "JP-05": {}, - "JP-06": {}, "JP-07": {}, "JP-08": {}, "JP-09": {}, "JP-10": {}, - "JP-11": {}, "JP-12": {}, "JP-13": {}, "JP-14": {}, "JP-15": {}, - "JP-16": {}, "JP-17": {}, "JP-18": {}, "JP-19": {}, "JP-20": {}, - "JP-21": {}, "JP-22": {}, "JP-23": {}, "JP-24": {}, "JP-25": {}, - "JP-26": {}, "JP-27": {}, "JP-28": {}, "JP-29": {}, "JP-30": {}, - "JP-31": {}, "JP-32": {}, "JP-33": {}, "JP-34": {}, "JP-35": {}, - "JP-36": {}, "JP-37": {}, "JP-38": {}, "JP-39": {}, "JP-40": {}, - "JP-41": {}, "JP-42": {}, "JP-43": {}, "JP-44": {}, "JP-45": {}, - "JP-46": {}, "JP-47": {}, "KE-01": {}, "KE-02": {}, "KE-03": {}, - "KE-04": {}, "KE-05": {}, "KE-06": {}, "KE-07": {}, "KE-08": {}, - "KE-09": {}, "KE-10": {}, "KE-11": {}, "KE-12": {}, "KE-13": {}, - "KE-14": {}, "KE-15": {}, "KE-16": {}, "KE-17": {}, "KE-18": {}, - "KE-19": {}, "KE-20": {}, "KE-21": {}, "KE-22": {}, "KE-23": {}, - "KE-24": {}, "KE-25": {}, "KE-26": {}, "KE-27": {}, "KE-28": {}, - "KE-29": {}, "KE-30": {}, "KE-31": {}, "KE-32": {}, "KE-33": {}, - "KE-34": {}, "KE-35": {}, "KE-36": {}, "KE-37": {}, "KE-38": {}, - "KE-39": {}, "KE-40": {}, "KE-41": {}, "KE-42": {}, "KE-43": {}, - "KE-44": {}, "KE-45": {}, "KE-46": {}, "KE-47": {}, "KG-B": {}, - "KG-C": {}, "KG-GB": {}, "KG-GO": {}, "KG-J": {}, "KG-N": {}, "KG-O": {}, - "KG-T": {}, "KG-Y": {}, "KH-1": {}, "KH-10": {}, "KH-11": {}, - "KH-12": {}, "KH-13": {}, "KH-14": {}, "KH-15": {}, "KH-16": {}, - "KH-17": {}, "KH-18": {}, "KH-19": {}, "KH-2": {}, "KH-20": {}, - "KH-21": {}, "KH-22": {}, "KH-23": {}, "KH-24": {}, "KH-3": {}, - "KH-4": {}, "KH-5": {}, "KH-6": {}, "KH-7": {}, "KH-8": {}, - "KH-9": {}, "KI-G": {}, "KI-L": {}, "KI-P": {}, "KM-A": {}, - "KM-G": {}, "KM-M": {}, "KN-01": {}, "KN-02": {}, "KN-03": {}, - "KN-04": {}, "KN-05": {}, "KN-06": {}, "KN-07": {}, "KN-08": {}, - "KN-09": {}, "KN-10": {}, "KN-11": {}, "KN-12": {}, "KN-13": {}, - "KN-15": {}, "KN-K": {}, "KN-N": {}, "KP-01": {}, "KP-02": {}, - "KP-03": {}, "KP-04": {}, "KP-05": {}, "KP-06": {}, "KP-07": {}, - "KP-08": {}, "KP-09": {}, "KP-10": {}, "KP-13": {}, "KR-11": {}, - "KR-26": {}, "KR-27": {}, "KR-28": {}, "KR-29": {}, "KR-30": {}, - "KR-31": {}, "KR-41": {}, "KR-42": {}, "KR-43": {}, "KR-44": {}, - "KR-45": {}, "KR-46": {}, "KR-47": {}, "KR-48": {}, "KR-49": {}, - "KW-AH": {}, "KW-FA": {}, "KW-HA": {}, "KW-JA": {}, "KW-KU": {}, - "KW-MU": {}, "KZ-10": {}, "KZ-75": {}, "KZ-19": {}, "KZ-11": {}, - "KZ-15": {}, "KZ-71": {}, "KZ-23": {}, "KZ-27": {}, "KZ-47": {}, - "KZ-55": {}, "KZ-35": {}, "KZ-39": {}, "KZ-43": {}, "KZ-63": {}, - "KZ-79": {}, "KZ-59": {}, "KZ-61": {}, "KZ-62": {}, "KZ-31": {}, - "KZ-33": {}, "LA-AT": {}, "LA-BK": {}, "LA-BL": {}, - "LA-CH": {}, "LA-HO": {}, "LA-KH": {}, "LA-LM": {}, "LA-LP": {}, - "LA-OU": {}, "LA-PH": {}, "LA-SL": {}, "LA-SV": {}, "LA-VI": {}, - "LA-VT": {}, "LA-XA": {}, "LA-XE": {}, "LA-XI": {}, "LA-XS": {}, - "LB-AK": {}, "LB-AS": {}, "LB-BA": {}, "LB-BH": {}, "LB-BI": {}, - "LB-JA": {}, "LB-JL": {}, "LB-NA": {}, "LC-01": {}, "LC-02": {}, - "LC-03": {}, "LC-05": {}, "LC-06": {}, "LC-07": {}, "LC-08": {}, - "LC-10": {}, "LC-11": {}, "LI-01": {}, "LI-02": {}, - "LI-03": {}, "LI-04": {}, "LI-05": {}, "LI-06": {}, "LI-07": {}, - "LI-08": {}, "LI-09": {}, "LI-10": {}, "LI-11": {}, "LK-1": {}, - "LK-11": {}, "LK-12": {}, "LK-13": {}, "LK-2": {}, "LK-21": {}, - "LK-22": {}, "LK-23": {}, "LK-3": {}, "LK-31": {}, "LK-32": {}, - "LK-33": {}, "LK-4": {}, "LK-41": {}, "LK-42": {}, "LK-43": {}, - "LK-44": {}, "LK-45": {}, "LK-5": {}, "LK-51": {}, "LK-52": {}, - "LK-53": {}, "LK-6": {}, "LK-61": {}, "LK-62": {}, "LK-7": {}, - "LK-71": {}, "LK-72": {}, "LK-8": {}, "LK-81": {}, "LK-82": {}, - "LK-9": {}, "LK-91": {}, "LK-92": {}, "LR-BG": {}, "LR-BM": {}, - "LR-CM": {}, "LR-GB": {}, "LR-GG": {}, "LR-GK": {}, "LR-LO": {}, - "LR-MG": {}, "LR-MO": {}, "LR-MY": {}, "LR-NI": {}, "LR-RI": {}, - "LR-SI": {}, "LS-A": {}, "LS-B": {}, "LS-C": {}, "LS-D": {}, - "LS-E": {}, "LS-F": {}, "LS-G": {}, "LS-H": {}, "LS-J": {}, - "LS-K": {}, "LT-AL": {}, "LT-KL": {}, "LT-KU": {}, "LT-MR": {}, - "LT-PN": {}, "LT-SA": {}, "LT-TA": {}, "LT-TE": {}, "LT-UT": {}, - "LT-VL": {}, "LU-CA": {}, "LU-CL": {}, "LU-DI": {}, "LU-EC": {}, - "LU-ES": {}, "LU-GR": {}, "LU-LU": {}, "LU-ME": {}, "LU-RD": {}, - "LU-RM": {}, "LU-VD": {}, "LU-WI": {}, "LU-D": {}, "LU-G": {}, "LU-L": {}, - "LV-001": {}, "LV-111": {}, "LV-112": {}, "LV-113": {}, - "LV-002": {}, "LV-003": {}, "LV-004": {}, "LV-005": {}, "LV-006": {}, - "LV-007": {}, "LV-008": {}, "LV-009": {}, "LV-010": {}, "LV-011": {}, - "LV-012": {}, "LV-013": {}, "LV-014": {}, "LV-015": {}, "LV-016": {}, - "LV-017": {}, "LV-018": {}, "LV-019": {}, "LV-020": {}, "LV-021": {}, - "LV-022": {}, "LV-023": {}, "LV-024": {}, "LV-025": {}, "LV-026": {}, - "LV-027": {}, "LV-028": {}, "LV-029": {}, "LV-030": {}, "LV-031": {}, - "LV-032": {}, "LV-033": {}, "LV-034": {}, "LV-035": {}, "LV-036": {}, - "LV-037": {}, "LV-038": {}, "LV-039": {}, "LV-040": {}, "LV-041": {}, - "LV-042": {}, "LV-043": {}, "LV-044": {}, "LV-045": {}, "LV-046": {}, - "LV-047": {}, "LV-048": {}, "LV-049": {}, "LV-050": {}, "LV-051": {}, - "LV-052": {}, "LV-053": {}, "LV-054": {}, "LV-055": {}, "LV-056": {}, - "LV-057": {}, "LV-058": {}, "LV-059": {}, "LV-060": {}, "LV-061": {}, - "LV-062": {}, "LV-063": {}, "LV-064": {}, "LV-065": {}, "LV-066": {}, - "LV-067": {}, "LV-068": {}, "LV-069": {}, "LV-070": {}, "LV-071": {}, - "LV-072": {}, "LV-073": {}, "LV-074": {}, "LV-075": {}, "LV-076": {}, - "LV-077": {}, "LV-078": {}, "LV-079": {}, "LV-080": {}, "LV-081": {}, - "LV-082": {}, "LV-083": {}, "LV-084": {}, "LV-085": {}, "LV-086": {}, - "LV-087": {}, "LV-088": {}, "LV-089": {}, "LV-090": {}, "LV-091": {}, - "LV-092": {}, "LV-093": {}, "LV-094": {}, "LV-095": {}, "LV-096": {}, - "LV-097": {}, "LV-098": {}, "LV-099": {}, "LV-100": {}, "LV-101": {}, - "LV-102": {}, "LV-103": {}, "LV-104": {}, "LV-105": {}, "LV-106": {}, - "LV-107": {}, "LV-108": {}, "LV-109": {}, "LV-110": {}, "LV-DGV": {}, - "LV-JEL": {}, "LV-JKB": {}, "LV-JUR": {}, "LV-LPX": {}, "LV-REZ": {}, - "LV-RIX": {}, "LV-VEN": {}, "LV-VMR": {}, "LY-BA": {}, "LY-BU": {}, - "LY-DR": {}, "LY-GT": {}, "LY-JA": {}, "LY-JB": {}, "LY-JG": {}, - "LY-JI": {}, "LY-JU": {}, "LY-KF": {}, "LY-MB": {}, "LY-MI": {}, - "LY-MJ": {}, "LY-MQ": {}, "LY-NL": {}, "LY-NQ": {}, "LY-SB": {}, - "LY-SR": {}, "LY-TB": {}, "LY-WA": {}, "LY-WD": {}, "LY-WS": {}, - "LY-ZA": {}, "MA-01": {}, "MA-02": {}, "MA-03": {}, "MA-04": {}, - "MA-05": {}, "MA-06": {}, "MA-07": {}, "MA-08": {}, "MA-09": {}, - "MA-10": {}, "MA-11": {}, "MA-12": {}, "MA-13": {}, "MA-14": {}, - "MA-15": {}, "MA-16": {}, "MA-AGD": {}, "MA-AOU": {}, "MA-ASZ": {}, - "MA-AZI": {}, "MA-BEM": {}, "MA-BER": {}, "MA-BES": {}, "MA-BOD": {}, - "MA-BOM": {}, "MA-CAS": {}, "MA-CHE": {}, "MA-CHI": {}, "MA-CHT": {}, - "MA-ERR": {}, "MA-ESI": {}, "MA-ESM": {}, "MA-FAH": {}, "MA-FES": {}, - "MA-FIG": {}, "MA-GUE": {}, "MA-HAJ": {}, "MA-HAO": {}, "MA-HOC": {}, - "MA-IFR": {}, "MA-INE": {}, "MA-JDI": {}, "MA-JRA": {}, "MA-KEN": {}, - "MA-KES": {}, "MA-KHE": {}, "MA-KHN": {}, "MA-KHO": {}, "MA-LAA": {}, - "MA-LAR": {}, "MA-MED": {}, "MA-MEK": {}, "MA-MMD": {}, "MA-MMN": {}, - "MA-MOH": {}, "MA-MOU": {}, "MA-NAD": {}, "MA-NOU": {}, "MA-OUA": {}, - "MA-OUD": {}, "MA-OUJ": {}, "MA-RAB": {}, "MA-SAF": {}, "MA-SAL": {}, - "MA-SEF": {}, "MA-SET": {}, "MA-SIK": {}, "MA-SKH": {}, "MA-SYB": {}, - "MA-TAI": {}, "MA-TAO": {}, "MA-TAR": {}, "MA-TAT": {}, "MA-TAZ": {}, - "MA-TET": {}, "MA-TIZ": {}, "MA-TNG": {}, "MA-TNT": {}, "MA-ZAG": {}, - "MC-CL": {}, "MC-CO": {}, "MC-FO": {}, "MC-GA": {}, "MC-JE": {}, - "MC-LA": {}, "MC-MA": {}, "MC-MC": {}, "MC-MG": {}, "MC-MO": {}, - "MC-MU": {}, "MC-PH": {}, "MC-SD": {}, "MC-SO": {}, "MC-SP": {}, - "MC-SR": {}, "MC-VR": {}, "MD-AN": {}, "MD-BA": {}, "MD-BD": {}, - "MD-BR": {}, "MD-BS": {}, "MD-CA": {}, "MD-CL": {}, "MD-CM": {}, - "MD-CR": {}, "MD-CS": {}, "MD-CT": {}, "MD-CU": {}, "MD-DO": {}, - "MD-DR": {}, "MD-DU": {}, "MD-ED": {}, "MD-FA": {}, "MD-FL": {}, - "MD-GA": {}, "MD-GL": {}, "MD-HI": {}, "MD-IA": {}, "MD-LE": {}, - "MD-NI": {}, "MD-OC": {}, "MD-OR": {}, "MD-RE": {}, "MD-RI": {}, - "MD-SD": {}, "MD-SI": {}, "MD-SN": {}, "MD-SO": {}, "MD-ST": {}, - "MD-SV": {}, "MD-TA": {}, "MD-TE": {}, "MD-UN": {}, "ME-01": {}, - "ME-02": {}, "ME-03": {}, "ME-04": {}, "ME-05": {}, "ME-06": {}, - "ME-07": {}, "ME-08": {}, "ME-09": {}, "ME-10": {}, "ME-11": {}, - "ME-12": {}, "ME-13": {}, "ME-14": {}, "ME-15": {}, "ME-16": {}, - "ME-17": {}, "ME-18": {}, "ME-19": {}, "ME-20": {}, "ME-21": {}, "ME-24": {}, - "MG-A": {}, "MG-D": {}, "MG-F": {}, "MG-M": {}, "MG-T": {}, - "MG-U": {}, "MH-ALK": {}, "MH-ALL": {}, "MH-ARN": {}, "MH-AUR": {}, - "MH-EBO": {}, "MH-ENI": {}, "MH-JAB": {}, "MH-JAL": {}, "MH-KIL": {}, - "MH-KWA": {}, "MH-L": {}, "MH-LAE": {}, "MH-LIB": {}, "MH-LIK": {}, - "MH-MAJ": {}, "MH-MAL": {}, "MH-MEJ": {}, "MH-MIL": {}, "MH-NMK": {}, - "MH-NMU": {}, "MH-RON": {}, "MH-T": {}, "MH-UJA": {}, "MH-UTI": {}, - "MH-WTJ": {}, "MH-WTN": {}, "MK-101": {}, "MK-102": {}, "MK-103": {}, - "MK-104": {}, "MK-105": {}, - "MK-106": {}, "MK-107": {}, "MK-108": {}, "MK-109": {}, "MK-201": {}, - "MK-202": {}, "MK-205": {}, "MK-206": {}, "MK-207": {}, "MK-208": {}, - "MK-209": {}, "MK-210": {}, "MK-211": {}, "MK-301": {}, "MK-303": {}, - "MK-307": {}, "MK-308": {}, "MK-310": {}, "MK-311": {}, "MK-312": {}, - "MK-401": {}, "MK-402": {}, "MK-403": {}, "MK-404": {}, "MK-405": {}, - "MK-406": {}, "MK-408": {}, "MK-409": {}, "MK-410": {}, "MK-501": {}, - "MK-502": {}, "MK-503": {}, "MK-505": {}, "MK-506": {}, "MK-507": {}, - "MK-508": {}, "MK-509": {}, "MK-601": {}, "MK-602": {}, "MK-604": {}, - "MK-605": {}, "MK-606": {}, "MK-607": {}, "MK-608": {}, "MK-609": {}, - "MK-701": {}, "MK-702": {}, "MK-703": {}, "MK-704": {}, "MK-705": {}, - "MK-803": {}, "MK-804": {}, "MK-806": {}, "MK-807": {}, "MK-809": {}, - "MK-810": {}, "MK-811": {}, "MK-812": {}, "MK-813": {}, "MK-814": {}, - "MK-816": {}, "ML-1": {}, "ML-2": {}, "ML-3": {}, "ML-4": {}, - "ML-5": {}, "ML-6": {}, "ML-7": {}, "ML-8": {}, "ML-BKO": {}, - "MM-01": {}, "MM-02": {}, "MM-03": {}, "MM-04": {}, "MM-05": {}, - "MM-06": {}, "MM-07": {}, "MM-11": {}, "MM-12": {}, "MM-13": {}, - "MM-14": {}, "MM-15": {}, "MM-16": {}, "MM-17": {}, "MM-18": {}, "MN-035": {}, - "MN-037": {}, "MN-039": {}, "MN-041": {}, "MN-043": {}, "MN-046": {}, - "MN-047": {}, "MN-049": {}, "MN-051": {}, "MN-053": {}, "MN-055": {}, - "MN-057": {}, "MN-059": {}, "MN-061": {}, "MN-063": {}, "MN-064": {}, - "MN-065": {}, "MN-067": {}, "MN-069": {}, "MN-071": {}, "MN-073": {}, - "MN-1": {}, "MR-01": {}, "MR-02": {}, "MR-03": {}, "MR-04": {}, - "MR-05": {}, "MR-06": {}, "MR-07": {}, "MR-08": {}, "MR-09": {}, - "MR-10": {}, "MR-11": {}, "MR-12": {}, "MR-13": {}, "MR-NKC": {}, "MT-01": {}, - "MT-02": {}, "MT-03": {}, "MT-04": {}, "MT-05": {}, "MT-06": {}, - "MT-07": {}, "MT-08": {}, "MT-09": {}, "MT-10": {}, "MT-11": {}, - "MT-12": {}, "MT-13": {}, "MT-14": {}, "MT-15": {}, "MT-16": {}, - "MT-17": {}, "MT-18": {}, "MT-19": {}, "MT-20": {}, "MT-21": {}, - "MT-22": {}, "MT-23": {}, "MT-24": {}, "MT-25": {}, "MT-26": {}, - "MT-27": {}, "MT-28": {}, "MT-29": {}, "MT-30": {}, "MT-31": {}, - "MT-32": {}, "MT-33": {}, "MT-34": {}, "MT-35": {}, "MT-36": {}, - "MT-37": {}, "MT-38": {}, "MT-39": {}, "MT-40": {}, "MT-41": {}, - "MT-42": {}, "MT-43": {}, "MT-44": {}, "MT-45": {}, "MT-46": {}, - "MT-47": {}, "MT-48": {}, "MT-49": {}, "MT-50": {}, "MT-51": {}, - "MT-52": {}, "MT-53": {}, "MT-54": {}, "MT-55": {}, "MT-56": {}, - "MT-57": {}, "MT-58": {}, "MT-59": {}, "MT-60": {}, "MT-61": {}, - "MT-62": {}, "MT-63": {}, "MT-64": {}, "MT-65": {}, "MT-66": {}, - "MT-67": {}, "MT-68": {}, "MU-AG": {}, "MU-BL": {}, "MU-BR": {}, - "MU-CC": {}, "MU-CU": {}, "MU-FL": {}, "MU-GP": {}, "MU-MO": {}, - "MU-PA": {}, "MU-PL": {}, "MU-PU": {}, "MU-PW": {}, "MU-QB": {}, - "MU-RO": {}, "MU-RP": {}, "MU-RR": {}, "MU-SA": {}, "MU-VP": {}, "MV-00": {}, - "MV-01": {}, "MV-02": {}, "MV-03": {}, "MV-04": {}, "MV-05": {}, - "MV-07": {}, "MV-08": {}, "MV-12": {}, "MV-13": {}, "MV-14": {}, - "MV-17": {}, "MV-20": {}, "MV-23": {}, "MV-24": {}, "MV-25": {}, - "MV-26": {}, "MV-27": {}, "MV-28": {}, "MV-29": {}, "MV-CE": {}, - "MV-MLE": {}, "MV-NC": {}, "MV-NO": {}, "MV-SC": {}, "MV-SU": {}, - "MV-UN": {}, "MV-US": {}, "MW-BA": {}, "MW-BL": {}, "MW-C": {}, - "MW-CK": {}, "MW-CR": {}, "MW-CT": {}, "MW-DE": {}, "MW-DO": {}, - "MW-KR": {}, "MW-KS": {}, "MW-LI": {}, "MW-LK": {}, "MW-MC": {}, - "MW-MG": {}, "MW-MH": {}, "MW-MU": {}, "MW-MW": {}, "MW-MZ": {}, - "MW-N": {}, "MW-NB": {}, "MW-NE": {}, "MW-NI": {}, "MW-NK": {}, - "MW-NS": {}, "MW-NU": {}, "MW-PH": {}, "MW-RU": {}, "MW-S": {}, - "MW-SA": {}, "MW-TH": {}, "MW-ZO": {}, "MX-AGU": {}, "MX-BCN": {}, - "MX-BCS": {}, "MX-CAM": {}, "MX-CHH": {}, "MX-CHP": {}, "MX-COA": {}, - "MX-COL": {}, "MX-CMX": {}, "MX-DIF": {}, "MX-DUR": {}, "MX-GRO": {}, "MX-GUA": {}, - "MX-HID": {}, "MX-JAL": {}, "MX-MEX": {}, "MX-MIC": {}, "MX-MOR": {}, - "MX-NAY": {}, "MX-NLE": {}, "MX-OAX": {}, "MX-PUE": {}, "MX-QUE": {}, - "MX-ROO": {}, "MX-SIN": {}, "MX-SLP": {}, "MX-SON": {}, "MX-TAB": {}, - "MX-TAM": {}, "MX-TLA": {}, "MX-VER": {}, "MX-YUC": {}, "MX-ZAC": {}, - "MY-01": {}, "MY-02": {}, "MY-03": {}, "MY-04": {}, "MY-05": {}, - "MY-06": {}, "MY-07": {}, "MY-08": {}, "MY-09": {}, "MY-10": {}, - "MY-11": {}, "MY-12": {}, "MY-13": {}, "MY-14": {}, "MY-15": {}, - "MY-16": {}, "MZ-A": {}, "MZ-B": {}, "MZ-G": {}, "MZ-I": {}, - "MZ-L": {}, "MZ-MPM": {}, "MZ-N": {}, "MZ-P": {}, "MZ-Q": {}, - "MZ-S": {}, "MZ-T": {}, "NA-CA": {}, "NA-ER": {}, "NA-HA": {}, - "NA-KA": {}, "NA-KE": {}, "NA-KH": {}, "NA-KU": {}, "NA-KW": {}, "NA-OD": {}, "NA-OH": {}, - "NA-OK": {}, "NA-ON": {}, "NA-OS": {}, "NA-OT": {}, "NA-OW": {}, - "NE-1": {}, "NE-2": {}, "NE-3": {}, "NE-4": {}, "NE-5": {}, - "NE-6": {}, "NE-7": {}, "NE-8": {}, "NG-AB": {}, "NG-AD": {}, - "NG-AK": {}, "NG-AN": {}, "NG-BA": {}, "NG-BE": {}, "NG-BO": {}, - "NG-BY": {}, "NG-CR": {}, "NG-DE": {}, "NG-EB": {}, "NG-ED": {}, - "NG-EK": {}, "NG-EN": {}, "NG-FC": {}, "NG-GO": {}, "NG-IM": {}, - "NG-JI": {}, "NG-KD": {}, "NG-KE": {}, "NG-KN": {}, "NG-KO": {}, - "NG-KT": {}, "NG-KW": {}, "NG-LA": {}, "NG-NA": {}, "NG-NI": {}, - "NG-OG": {}, "NG-ON": {}, "NG-OS": {}, "NG-OY": {}, "NG-PL": {}, - "NG-RI": {}, "NG-SO": {}, "NG-TA": {}, "NG-YO": {}, "NG-ZA": {}, - "NI-AN": {}, "NI-AS": {}, "NI-BO": {}, "NI-CA": {}, "NI-CI": {}, - "NI-CO": {}, "NI-ES": {}, "NI-GR": {}, "NI-JI": {}, "NI-LE": {}, - "NI-MD": {}, "NI-MN": {}, "NI-MS": {}, "NI-MT": {}, "NI-NS": {}, - "NI-RI": {}, "NI-SJ": {}, "NL-AW": {}, "NL-BQ1": {}, "NL-BQ2": {}, - "NL-BQ3": {}, "NL-CW": {}, "NL-DR": {}, "NL-FL": {}, "NL-FR": {}, - "NL-GE": {}, "NL-GR": {}, "NL-LI": {}, "NL-NB": {}, "NL-NH": {}, - "NL-OV": {}, "NL-SX": {}, "NL-UT": {}, "NL-ZE": {}, "NL-ZH": {}, - "NO-03": {}, "NO-11": {}, "NO-15": {}, "NO-16": {}, "NO-17": {}, - "NO-18": {}, "NO-21": {}, "NO-30": {}, "NO-34": {}, "NO-38": {}, - "NO-42": {}, "NO-46": {}, "NO-50": {}, "NO-54": {}, - "NO-22": {}, "NP-1": {}, "NP-2": {}, "NP-3": {}, "NP-4": {}, - "NP-5": {}, "NP-BA": {}, "NP-BH": {}, "NP-DH": {}, "NP-GA": {}, - "NP-JA": {}, "NP-KA": {}, "NP-KO": {}, "NP-LU": {}, "NP-MA": {}, - "NP-ME": {}, "NP-NA": {}, "NP-RA": {}, "NP-SA": {}, "NP-SE": {}, - "NR-01": {}, "NR-02": {}, "NR-03": {}, "NR-04": {}, "NR-05": {}, - "NR-06": {}, "NR-07": {}, "NR-08": {}, "NR-09": {}, "NR-10": {}, - "NR-11": {}, "NR-12": {}, "NR-13": {}, "NR-14": {}, "NZ-AUK": {}, - "NZ-BOP": {}, "NZ-CAN": {}, "NZ-CIT": {}, "NZ-GIS": {}, "NZ-HKB": {}, - "NZ-MBH": {}, "NZ-MWT": {}, "NZ-N": {}, "NZ-NSN": {}, "NZ-NTL": {}, - "NZ-OTA": {}, "NZ-S": {}, "NZ-STL": {}, "NZ-TAS": {}, "NZ-TKI": {}, - "NZ-WGN": {}, "NZ-WKO": {}, "NZ-WTC": {}, "OM-BA": {}, "OM-BS": {}, "OM-BU": {}, "OM-BJ": {}, - "OM-DA": {}, "OM-MA": {}, "OM-MU": {}, "OM-SH": {}, "OM-SJ": {}, "OM-SS": {}, "OM-WU": {}, - "OM-ZA": {}, "OM-ZU": {}, "PA-1": {}, "PA-2": {}, "PA-3": {}, - "PA-4": {}, "PA-5": {}, "PA-6": {}, "PA-7": {}, "PA-8": {}, - "PA-9": {}, "PA-EM": {}, "PA-KY": {}, "PA-NB": {}, "PE-AMA": {}, - "PE-ANC": {}, "PE-APU": {}, "PE-ARE": {}, "PE-AYA": {}, "PE-CAJ": {}, - "PE-CAL": {}, "PE-CUS": {}, "PE-HUC": {}, "PE-HUV": {}, "PE-ICA": {}, - "PE-JUN": {}, "PE-LAL": {}, "PE-LAM": {}, "PE-LIM": {}, "PE-LMA": {}, - "PE-LOR": {}, "PE-MDD": {}, "PE-MOQ": {}, "PE-PAS": {}, "PE-PIU": {}, - "PE-PUN": {}, "PE-SAM": {}, "PE-TAC": {}, "PE-TUM": {}, "PE-UCA": {}, - "PG-CPK": {}, "PG-CPM": {}, "PG-EBR": {}, "PG-EHG": {}, "PG-EPW": {}, - "PG-ESW": {}, "PG-GPK": {}, "PG-MBA": {}, "PG-MPL": {}, "PG-MPM": {}, - "PG-MRL": {}, "PG-NCD": {}, "PG-NIK": {}, "PG-NPP": {}, "PG-NSB": {}, - "PG-SAN": {}, "PG-SHM": {}, "PG-WBK": {}, "PG-WHM": {}, "PG-WPD": {}, - "PH-00": {}, "PH-01": {}, "PH-02": {}, "PH-03": {}, "PH-05": {}, - "PH-06": {}, "PH-07": {}, "PH-08": {}, "PH-09": {}, "PH-10": {}, - "PH-11": {}, "PH-12": {}, "PH-13": {}, "PH-14": {}, "PH-15": {}, - "PH-40": {}, "PH-41": {}, "PH-ABR": {}, "PH-AGN": {}, "PH-AGS": {}, - "PH-AKL": {}, "PH-ALB": {}, "PH-ANT": {}, "PH-APA": {}, "PH-AUR": {}, - "PH-BAN": {}, "PH-BAS": {}, "PH-BEN": {}, "PH-BIL": {}, "PH-BOH": {}, - "PH-BTG": {}, "PH-BTN": {}, "PH-BUK": {}, "PH-BUL": {}, "PH-CAG": {}, - "PH-CAM": {}, "PH-CAN": {}, "PH-CAP": {}, "PH-CAS": {}, "PH-CAT": {}, - "PH-CAV": {}, "PH-CEB": {}, "PH-COM": {}, "PH-DAO": {}, "PH-DAS": {}, - "PH-DAV": {}, "PH-DIN": {}, "PH-EAS": {}, "PH-GUI": {}, "PH-IFU": {}, - "PH-ILI": {}, "PH-ILN": {}, "PH-ILS": {}, "PH-ISA": {}, "PH-KAL": {}, - "PH-LAG": {}, "PH-LAN": {}, "PH-LAS": {}, "PH-LEY": {}, "PH-LUN": {}, - "PH-MAD": {}, "PH-MAG": {}, "PH-MAS": {}, "PH-MDC": {}, "PH-MDR": {}, - "PH-MOU": {}, "PH-MSC": {}, "PH-MSR": {}, "PH-NCO": {}, "PH-NEC": {}, - "PH-NER": {}, "PH-NSA": {}, "PH-NUE": {}, "PH-NUV": {}, "PH-PAM": {}, - "PH-PAN": {}, "PH-PLW": {}, "PH-QUE": {}, "PH-QUI": {}, "PH-RIZ": {}, - "PH-ROM": {}, "PH-SAR": {}, "PH-SCO": {}, "PH-SIG": {}, "PH-SLE": {}, - "PH-SLU": {}, "PH-SOR": {}, "PH-SUK": {}, "PH-SUN": {}, "PH-SUR": {}, - "PH-TAR": {}, "PH-TAW": {}, "PH-WSA": {}, "PH-ZAN": {}, "PH-ZAS": {}, - "PH-ZMB": {}, "PH-ZSI": {}, "PK-BA": {}, "PK-GB": {}, "PK-IS": {}, - "PK-JK": {}, "PK-KP": {}, "PK-PB": {}, "PK-SD": {}, "PK-TA": {}, - "PL-02": {}, "PL-04": {}, "PL-06": {}, "PL-08": {}, "PL-10": {}, - "PL-12": {}, "PL-14": {}, "PL-16": {}, "PL-18": {}, "PL-20": {}, - "PL-22": {}, "PL-24": {}, "PL-26": {}, "PL-28": {}, "PL-30": {}, "PL-32": {}, - "PS-BTH": {}, "PS-DEB": {}, "PS-GZA": {}, "PS-HBN": {}, - "PS-JEM": {}, "PS-JEN": {}, "PS-JRH": {}, "PS-KYS": {}, "PS-NBS": {}, - "PS-NGZ": {}, "PS-QQA": {}, "PS-RBH": {}, "PS-RFH": {}, "PS-SLT": {}, - "PS-TBS": {}, "PS-TKM": {}, "PT-01": {}, "PT-02": {}, "PT-03": {}, - "PT-04": {}, "PT-05": {}, "PT-06": {}, "PT-07": {}, "PT-08": {}, - "PT-09": {}, "PT-10": {}, "PT-11": {}, "PT-12": {}, "PT-13": {}, - "PT-14": {}, "PT-15": {}, "PT-16": {}, "PT-17": {}, "PT-18": {}, - "PT-20": {}, "PT-30": {}, "PW-002": {}, "PW-004": {}, "PW-010": {}, - "PW-050": {}, "PW-100": {}, "PW-150": {}, "PW-212": {}, "PW-214": {}, - "PW-218": {}, "PW-222": {}, "PW-224": {}, "PW-226": {}, "PW-227": {}, - "PW-228": {}, "PW-350": {}, "PW-370": {}, "PY-1": {}, "PY-10": {}, - "PY-11": {}, "PY-12": {}, "PY-13": {}, "PY-14": {}, "PY-15": {}, - "PY-16": {}, "PY-19": {}, "PY-2": {}, "PY-3": {}, "PY-4": {}, - "PY-5": {}, "PY-6": {}, "PY-7": {}, "PY-8": {}, "PY-9": {}, - "PY-ASU": {}, "QA-DA": {}, "QA-KH": {}, "QA-MS": {}, "QA-RA": {}, - "QA-US": {}, "QA-WA": {}, "QA-ZA": {}, "RO-AB": {}, "RO-AG": {}, - "RO-AR": {}, "RO-B": {}, "RO-BC": {}, "RO-BH": {}, "RO-BN": {}, - "RO-BR": {}, "RO-BT": {}, "RO-BV": {}, "RO-BZ": {}, "RO-CJ": {}, - "RO-CL": {}, "RO-CS": {}, "RO-CT": {}, "RO-CV": {}, "RO-DB": {}, - "RO-DJ": {}, "RO-GJ": {}, "RO-GL": {}, "RO-GR": {}, "RO-HD": {}, - "RO-HR": {}, "RO-IF": {}, "RO-IL": {}, "RO-IS": {}, "RO-MH": {}, - "RO-MM": {}, "RO-MS": {}, "RO-NT": {}, "RO-OT": {}, "RO-PH": {}, - "RO-SB": {}, "RO-SJ": {}, "RO-SM": {}, "RO-SV": {}, "RO-TL": {}, - "RO-TM": {}, "RO-TR": {}, "RO-VL": {}, "RO-VN": {}, "RO-VS": {}, - "RS-00": {}, "RS-01": {}, "RS-02": {}, "RS-03": {}, "RS-04": {}, - "RS-05": {}, "RS-06": {}, "RS-07": {}, "RS-08": {}, "RS-09": {}, - "RS-10": {}, "RS-11": {}, "RS-12": {}, "RS-13": {}, "RS-14": {}, - "RS-15": {}, "RS-16": {}, "RS-17": {}, "RS-18": {}, "RS-19": {}, - "RS-20": {}, "RS-21": {}, "RS-22": {}, "RS-23": {}, "RS-24": {}, - "RS-25": {}, "RS-26": {}, "RS-27": {}, "RS-28": {}, "RS-29": {}, - "RS-KM": {}, "RS-VO": {}, "RU-AD": {}, "RU-AL": {}, "RU-ALT": {}, - "RU-AMU": {}, "RU-ARK": {}, "RU-AST": {}, "RU-BA": {}, "RU-BEL": {}, - "RU-BRY": {}, "RU-BU": {}, "RU-CE": {}, "RU-CHE": {}, "RU-CHU": {}, - "RU-CU": {}, "RU-DA": {}, "RU-IN": {}, "RU-IRK": {}, "RU-IVA": {}, - "RU-KAM": {}, "RU-KB": {}, "RU-KC": {}, "RU-KDA": {}, "RU-KEM": {}, - "RU-KGD": {}, "RU-KGN": {}, "RU-KHA": {}, "RU-KHM": {}, "RU-KIR": {}, - "RU-KK": {}, "RU-KL": {}, "RU-KLU": {}, "RU-KO": {}, "RU-KOS": {}, - "RU-KR": {}, "RU-KRS": {}, "RU-KYA": {}, "RU-LEN": {}, "RU-LIP": {}, - "RU-MAG": {}, "RU-ME": {}, "RU-MO": {}, "RU-MOS": {}, "RU-MOW": {}, - "RU-MUR": {}, "RU-NEN": {}, "RU-NGR": {}, "RU-NIZ": {}, "RU-NVS": {}, - "RU-OMS": {}, "RU-ORE": {}, "RU-ORL": {}, "RU-PER": {}, "RU-PNZ": {}, - "RU-PRI": {}, "RU-PSK": {}, "RU-ROS": {}, "RU-RYA": {}, "RU-SA": {}, - "RU-SAK": {}, "RU-SAM": {}, "RU-SAR": {}, "RU-SE": {}, "RU-SMO": {}, - "RU-SPE": {}, "RU-STA": {}, "RU-SVE": {}, "RU-TA": {}, "RU-TAM": {}, - "RU-TOM": {}, "RU-TUL": {}, "RU-TVE": {}, "RU-TY": {}, "RU-TYU": {}, - "RU-UD": {}, "RU-ULY": {}, "RU-VGG": {}, "RU-VLA": {}, "RU-VLG": {}, - "RU-VOR": {}, "RU-YAN": {}, "RU-YAR": {}, "RU-YEV": {}, "RU-ZAB": {}, - "RW-01": {}, "RW-02": {}, "RW-03": {}, "RW-04": {}, "RW-05": {}, - "SA-01": {}, "SA-02": {}, "SA-03": {}, "SA-04": {}, "SA-05": {}, - "SA-06": {}, "SA-07": {}, "SA-08": {}, "SA-09": {}, "SA-10": {}, - "SA-11": {}, "SA-12": {}, "SA-14": {}, "SB-CE": {}, "SB-CH": {}, - "SB-CT": {}, "SB-GU": {}, "SB-IS": {}, "SB-MK": {}, "SB-ML": {}, - "SB-RB": {}, "SB-TE": {}, "SB-WE": {}, "SC-01": {}, "SC-02": {}, - "SC-03": {}, "SC-04": {}, "SC-05": {}, "SC-06": {}, "SC-07": {}, - "SC-08": {}, "SC-09": {}, "SC-10": {}, "SC-11": {}, "SC-12": {}, - "SC-13": {}, "SC-14": {}, "SC-15": {}, "SC-16": {}, "SC-17": {}, - "SC-18": {}, "SC-19": {}, "SC-20": {}, "SC-21": {}, "SC-22": {}, - "SC-23": {}, "SC-24": {}, "SC-25": {}, "SD-DC": {}, "SD-DE": {}, - "SD-DN": {}, "SD-DS": {}, "SD-DW": {}, "SD-GD": {}, "SD-GK": {}, "SD-GZ": {}, - "SD-KA": {}, "SD-KH": {}, "SD-KN": {}, "SD-KS": {}, "SD-NB": {}, - "SD-NO": {}, "SD-NR": {}, "SD-NW": {}, "SD-RS": {}, "SD-SI": {}, - "SE-AB": {}, "SE-AC": {}, "SE-BD": {}, "SE-C": {}, "SE-D": {}, - "SE-E": {}, "SE-F": {}, "SE-G": {}, "SE-H": {}, "SE-I": {}, - "SE-K": {}, "SE-M": {}, "SE-N": {}, "SE-O": {}, "SE-S": {}, - "SE-T": {}, "SE-U": {}, "SE-W": {}, "SE-X": {}, "SE-Y": {}, - "SE-Z": {}, "SG-01": {}, "SG-02": {}, "SG-03": {}, "SG-04": {}, - "SG-05": {}, "SH-AC": {}, "SH-HL": {}, "SH-TA": {}, "SI-001": {}, - "SI-002": {}, "SI-003": {}, "SI-004": {}, "SI-005": {}, "SI-006": {}, - "SI-007": {}, "SI-008": {}, "SI-009": {}, "SI-010": {}, "SI-011": {}, - "SI-012": {}, "SI-013": {}, "SI-014": {}, "SI-015": {}, "SI-016": {}, - "SI-017": {}, "SI-018": {}, "SI-019": {}, "SI-020": {}, "SI-021": {}, - "SI-022": {}, "SI-023": {}, "SI-024": {}, "SI-025": {}, "SI-026": {}, - "SI-027": {}, "SI-028": {}, "SI-029": {}, "SI-030": {}, "SI-031": {}, - "SI-032": {}, "SI-033": {}, "SI-034": {}, "SI-035": {}, "SI-036": {}, - "SI-037": {}, "SI-038": {}, "SI-039": {}, "SI-040": {}, "SI-041": {}, - "SI-042": {}, "SI-043": {}, "SI-044": {}, "SI-045": {}, "SI-046": {}, - "SI-047": {}, "SI-048": {}, "SI-049": {}, "SI-050": {}, "SI-051": {}, - "SI-052": {}, "SI-053": {}, "SI-054": {}, "SI-055": {}, "SI-056": {}, - "SI-057": {}, "SI-058": {}, "SI-059": {}, "SI-060": {}, "SI-061": {}, - "SI-062": {}, "SI-063": {}, "SI-064": {}, "SI-065": {}, "SI-066": {}, - "SI-067": {}, "SI-068": {}, "SI-069": {}, "SI-070": {}, "SI-071": {}, - "SI-072": {}, "SI-073": {}, "SI-074": {}, "SI-075": {}, "SI-076": {}, - "SI-077": {}, "SI-078": {}, "SI-079": {}, "SI-080": {}, "SI-081": {}, - "SI-082": {}, "SI-083": {}, "SI-084": {}, "SI-085": {}, "SI-086": {}, - "SI-087": {}, "SI-088": {}, "SI-089": {}, "SI-090": {}, "SI-091": {}, - "SI-092": {}, "SI-093": {}, "SI-094": {}, "SI-095": {}, "SI-096": {}, - "SI-097": {}, "SI-098": {}, "SI-099": {}, "SI-100": {}, "SI-101": {}, - "SI-102": {}, "SI-103": {}, "SI-104": {}, "SI-105": {}, "SI-106": {}, - "SI-107": {}, "SI-108": {}, "SI-109": {}, "SI-110": {}, "SI-111": {}, - "SI-112": {}, "SI-113": {}, "SI-114": {}, "SI-115": {}, "SI-116": {}, - "SI-117": {}, "SI-118": {}, "SI-119": {}, "SI-120": {}, "SI-121": {}, - "SI-122": {}, "SI-123": {}, "SI-124": {}, "SI-125": {}, "SI-126": {}, - "SI-127": {}, "SI-128": {}, "SI-129": {}, "SI-130": {}, "SI-131": {}, - "SI-132": {}, "SI-133": {}, "SI-134": {}, "SI-135": {}, "SI-136": {}, - "SI-137": {}, "SI-138": {}, "SI-139": {}, "SI-140": {}, "SI-141": {}, - "SI-142": {}, "SI-143": {}, "SI-144": {}, "SI-146": {}, "SI-147": {}, - "SI-148": {}, "SI-149": {}, "SI-150": {}, "SI-151": {}, "SI-152": {}, - "SI-153": {}, "SI-154": {}, "SI-155": {}, "SI-156": {}, "SI-157": {}, - "SI-158": {}, "SI-159": {}, "SI-160": {}, "SI-161": {}, "SI-162": {}, - "SI-163": {}, "SI-164": {}, "SI-165": {}, "SI-166": {}, "SI-167": {}, - "SI-168": {}, "SI-169": {}, "SI-170": {}, "SI-171": {}, "SI-172": {}, - "SI-173": {}, "SI-174": {}, "SI-175": {}, "SI-176": {}, "SI-177": {}, - "SI-178": {}, "SI-179": {}, "SI-180": {}, "SI-181": {}, "SI-182": {}, - "SI-183": {}, "SI-184": {}, "SI-185": {}, "SI-186": {}, "SI-187": {}, - "SI-188": {}, "SI-189": {}, "SI-190": {}, "SI-191": {}, "SI-192": {}, - "SI-193": {}, "SI-194": {}, "SI-195": {}, "SI-196": {}, "SI-197": {}, - "SI-198": {}, "SI-199": {}, "SI-200": {}, "SI-201": {}, "SI-202": {}, - "SI-203": {}, "SI-204": {}, "SI-205": {}, "SI-206": {}, "SI-207": {}, - "SI-208": {}, "SI-209": {}, "SI-210": {}, "SI-211": {}, "SI-212": {}, "SI-213": {}, "SK-BC": {}, - "SK-BL": {}, "SK-KI": {}, "SK-NI": {}, "SK-PV": {}, "SK-TA": {}, - "SK-TC": {}, "SK-ZI": {}, "SL-E": {}, "SL-N": {}, "SL-S": {}, - "SL-W": {}, "SM-01": {}, "SM-02": {}, "SM-03": {}, "SM-04": {}, - "SM-05": {}, "SM-06": {}, "SM-07": {}, "SM-08": {}, "SM-09": {}, - "SN-DB": {}, "SN-DK": {}, "SN-FK": {}, "SN-KA": {}, "SN-KD": {}, - "SN-KE": {}, "SN-KL": {}, "SN-LG": {}, "SN-MT": {}, "SN-SE": {}, - "SN-SL": {}, "SN-TC": {}, "SN-TH": {}, "SN-ZG": {}, "SO-AW": {}, - "SO-BK": {}, "SO-BN": {}, "SO-BR": {}, "SO-BY": {}, "SO-GA": {}, - "SO-GE": {}, "SO-HI": {}, "SO-JD": {}, "SO-JH": {}, "SO-MU": {}, - "SO-NU": {}, "SO-SA": {}, "SO-SD": {}, "SO-SH": {}, "SO-SO": {}, - "SO-TO": {}, "SO-WO": {}, "SR-BR": {}, "SR-CM": {}, "SR-CR": {}, - "SR-MA": {}, "SR-NI": {}, "SR-PM": {}, "SR-PR": {}, "SR-SA": {}, - "SR-SI": {}, "SR-WA": {}, "SS-BN": {}, "SS-BW": {}, "SS-EC": {}, - "SS-EE8": {}, "SS-EE": {}, "SS-EW": {}, "SS-JG": {}, "SS-LK": {}, "SS-NU": {}, - "SS-UY": {}, "SS-WR": {}, "ST-01": {}, "ST-P": {}, "ST-S": {}, "SV-AH": {}, - "SV-CA": {}, "SV-CH": {}, "SV-CU": {}, "SV-LI": {}, "SV-MO": {}, - "SV-PA": {}, "SV-SA": {}, "SV-SM": {}, "SV-SO": {}, "SV-SS": {}, - "SV-SV": {}, "SV-UN": {}, "SV-US": {}, "SY-DI": {}, "SY-DR": {}, - "SY-DY": {}, "SY-HA": {}, "SY-HI": {}, "SY-HL": {}, "SY-HM": {}, - "SY-ID": {}, "SY-LA": {}, "SY-QU": {}, "SY-RA": {}, "SY-RD": {}, - "SY-SU": {}, "SY-TA": {}, "SZ-HH": {}, "SZ-LU": {}, "SZ-MA": {}, - "SZ-SH": {}, "TD-BA": {}, "TD-BG": {}, "TD-BO": {}, "TD-CB": {}, - "TD-EN": {}, "TD-GR": {}, "TD-HL": {}, "TD-KA": {}, "TD-LC": {}, - "TD-LO": {}, "TD-LR": {}, "TD-MA": {}, "TD-MC": {}, "TD-ME": {}, - "TD-MO": {}, "TD-ND": {}, "TD-OD": {}, "TD-SA": {}, "TD-SI": {}, - "TD-TA": {}, "TD-TI": {}, "TD-WF": {}, "TG-C": {}, "TG-K": {}, - "TG-M": {}, "TG-P": {}, "TG-S": {}, "TH-10": {}, "TH-11": {}, - "TH-12": {}, "TH-13": {}, "TH-14": {}, "TH-15": {}, "TH-16": {}, - "TH-17": {}, "TH-18": {}, "TH-19": {}, "TH-20": {}, "TH-21": {}, - "TH-22": {}, "TH-23": {}, "TH-24": {}, "TH-25": {}, "TH-26": {}, - "TH-27": {}, "TH-30": {}, "TH-31": {}, "TH-32": {}, "TH-33": {}, - "TH-34": {}, "TH-35": {}, "TH-36": {}, "TH-37": {}, "TH-38": {}, "TH-39": {}, - "TH-40": {}, "TH-41": {}, "TH-42": {}, "TH-43": {}, "TH-44": {}, - "TH-45": {}, "TH-46": {}, "TH-47": {}, "TH-48": {}, "TH-49": {}, - "TH-50": {}, "TH-51": {}, "TH-52": {}, "TH-53": {}, "TH-54": {}, - "TH-55": {}, "TH-56": {}, "TH-57": {}, "TH-58": {}, "TH-60": {}, - "TH-61": {}, "TH-62": {}, "TH-63": {}, "TH-64": {}, "TH-65": {}, - "TH-66": {}, "TH-67": {}, "TH-70": {}, "TH-71": {}, "TH-72": {}, - "TH-73": {}, "TH-74": {}, "TH-75": {}, "TH-76": {}, "TH-77": {}, - "TH-80": {}, "TH-81": {}, "TH-82": {}, "TH-83": {}, "TH-84": {}, - "TH-85": {}, "TH-86": {}, "TH-90": {}, "TH-91": {}, "TH-92": {}, - "TH-93": {}, "TH-94": {}, "TH-95": {}, "TH-96": {}, "TH-S": {}, - "TJ-GB": {}, "TJ-KT": {}, "TJ-SU": {}, "TJ-DU": {}, "TJ-RA": {}, "TL-AL": {}, "TL-AN": {}, - "TL-BA": {}, "TL-BO": {}, "TL-CO": {}, "TL-DI": {}, "TL-ER": {}, - "TL-LA": {}, "TL-LI": {}, "TL-MF": {}, "TL-MT": {}, "TL-OE": {}, - "TL-VI": {}, "TM-A": {}, "TM-B": {}, "TM-D": {}, "TM-L": {}, - "TM-M": {}, "TM-S": {}, "TN-11": {}, "TN-12": {}, "TN-13": {}, - "TN-14": {}, "TN-21": {}, "TN-22": {}, "TN-23": {}, "TN-31": {}, - "TN-32": {}, "TN-33": {}, "TN-34": {}, "TN-41": {}, "TN-42": {}, - "TN-43": {}, "TN-51": {}, "TN-52": {}, "TN-53": {}, "TN-61": {}, - "TN-71": {}, "TN-72": {}, "TN-73": {}, "TN-81": {}, "TN-82": {}, - "TN-83": {}, "TO-01": {}, "TO-02": {}, "TO-03": {}, "TO-04": {}, - "TO-05": {}, "TR-01": {}, "TR-02": {}, "TR-03": {}, "TR-04": {}, - "TR-05": {}, "TR-06": {}, "TR-07": {}, "TR-08": {}, "TR-09": {}, - "TR-10": {}, "TR-11": {}, "TR-12": {}, "TR-13": {}, "TR-14": {}, - "TR-15": {}, "TR-16": {}, "TR-17": {}, "TR-18": {}, "TR-19": {}, - "TR-20": {}, "TR-21": {}, "TR-22": {}, "TR-23": {}, "TR-24": {}, - "TR-25": {}, "TR-26": {}, "TR-27": {}, "TR-28": {}, "TR-29": {}, - "TR-30": {}, "TR-31": {}, "TR-32": {}, "TR-33": {}, "TR-34": {}, - "TR-35": {}, "TR-36": {}, "TR-37": {}, "TR-38": {}, "TR-39": {}, - "TR-40": {}, "TR-41": {}, "TR-42": {}, "TR-43": {}, "TR-44": {}, - "TR-45": {}, "TR-46": {}, "TR-47": {}, "TR-48": {}, "TR-49": {}, - "TR-50": {}, "TR-51": {}, "TR-52": {}, "TR-53": {}, "TR-54": {}, - "TR-55": {}, "TR-56": {}, "TR-57": {}, "TR-58": {}, "TR-59": {}, - "TR-60": {}, "TR-61": {}, "TR-62": {}, "TR-63": {}, "TR-64": {}, - "TR-65": {}, "TR-66": {}, "TR-67": {}, "TR-68": {}, "TR-69": {}, - "TR-70": {}, "TR-71": {}, "TR-72": {}, "TR-73": {}, "TR-74": {}, - "TR-75": {}, "TR-76": {}, "TR-77": {}, "TR-78": {}, "TR-79": {}, - "TR-80": {}, "TR-81": {}, "TT-ARI": {}, "TT-CHA": {}, "TT-CTT": {}, - "TT-DMN": {}, "TT-ETO": {}, "TT-MRC": {}, "TT-TOB": {}, "TT-PED": {}, "TT-POS": {}, "TT-PRT": {}, - "TT-PTF": {}, "TT-RCM": {}, "TT-SFO": {}, "TT-SGE": {}, "TT-SIP": {}, - "TT-SJL": {}, "TT-TUP": {}, "TT-WTO": {}, "TV-FUN": {}, "TV-NIT": {}, - "TV-NKF": {}, "TV-NKL": {}, "TV-NMA": {}, "TV-NMG": {}, "TV-NUI": {}, - "TV-VAI": {}, "TW-CHA": {}, "TW-CYI": {}, "TW-CYQ": {}, "TW-KIN": {}, "TW-HSQ": {}, - "TW-HSZ": {}, "TW-HUA": {}, "TW-LIE": {}, "TW-ILA": {}, "TW-KEE": {}, "TW-KHH": {}, - "TW-KHQ": {}, "TW-MIA": {}, "TW-NAN": {}, "TW-NWT": {}, "TW-PEN": {}, "TW-PIF": {}, - "TW-TAO": {}, "TW-TNN": {}, "TW-TNQ": {}, "TW-TPE": {}, "TW-TPQ": {}, - "TW-TTT": {}, "TW-TXG": {}, "TW-TXQ": {}, "TW-YUN": {}, "TZ-01": {}, - "TZ-02": {}, "TZ-03": {}, "TZ-04": {}, "TZ-05": {}, "TZ-06": {}, - "TZ-07": {}, "TZ-08": {}, "TZ-09": {}, "TZ-10": {}, "TZ-11": {}, - "TZ-12": {}, "TZ-13": {}, "TZ-14": {}, "TZ-15": {}, "TZ-16": {}, - "TZ-17": {}, "TZ-18": {}, "TZ-19": {}, "TZ-20": {}, "TZ-21": {}, - "TZ-22": {}, "TZ-23": {}, "TZ-24": {}, "TZ-25": {}, "TZ-26": {}, "TZ-27": {}, "TZ-28": {}, "TZ-29": {}, "TZ-30": {}, "TZ-31": {}, - "UA-05": {}, "UA-07": {}, "UA-09": {}, "UA-12": {}, "UA-14": {}, - "UA-18": {}, "UA-21": {}, "UA-23": {}, "UA-26": {}, "UA-30": {}, - "UA-32": {}, "UA-35": {}, "UA-40": {}, "UA-43": {}, "UA-46": {}, - "UA-48": {}, "UA-51": {}, "UA-53": {}, "UA-56": {}, "UA-59": {}, - "UA-61": {}, "UA-63": {}, "UA-65": {}, "UA-68": {}, "UA-71": {}, - "UA-74": {}, "UA-77": {}, "UG-101": {}, "UG-102": {}, "UG-103": {}, - "UG-104": {}, "UG-105": {}, "UG-106": {}, "UG-107": {}, "UG-108": {}, - "UG-109": {}, "UG-110": {}, "UG-111": {}, "UG-112": {}, "UG-113": {}, - "UG-114": {}, "UG-115": {}, "UG-116": {}, "UG-201": {}, "UG-202": {}, - "UG-203": {}, "UG-204": {}, "UG-205": {}, "UG-206": {}, "UG-207": {}, - "UG-208": {}, "UG-209": {}, "UG-210": {}, "UG-211": {}, "UG-212": {}, - "UG-213": {}, "UG-214": {}, "UG-215": {}, "UG-216": {}, "UG-217": {}, - "UG-218": {}, "UG-219": {}, "UG-220": {}, "UG-221": {}, "UG-222": {}, - "UG-223": {}, "UG-224": {}, "UG-301": {}, "UG-302": {}, "UG-303": {}, - "UG-304": {}, "UG-305": {}, "UG-306": {}, "UG-307": {}, "UG-308": {}, - "UG-309": {}, "UG-310": {}, "UG-311": {}, "UG-312": {}, "UG-313": {}, - "UG-314": {}, "UG-315": {}, "UG-316": {}, "UG-317": {}, "UG-318": {}, - "UG-319": {}, "UG-320": {}, "UG-321": {}, "UG-401": {}, "UG-402": {}, - "UG-403": {}, "UG-404": {}, "UG-405": {}, "UG-406": {}, "UG-407": {}, - "UG-408": {}, "UG-409": {}, "UG-410": {}, "UG-411": {}, "UG-412": {}, - "UG-413": {}, "UG-414": {}, "UG-415": {}, "UG-416": {}, "UG-417": {}, - "UG-418": {}, "UG-419": {}, "UG-C": {}, "UG-E": {}, "UG-N": {}, - "UG-W": {}, "UG-322": {}, "UG-323": {}, "UG-420": {}, "UG-117": {}, - "UG-118": {}, "UG-225": {}, "UG-120": {}, "UG-226": {}, - "UG-121": {}, "UG-122": {}, "UG-227": {}, "UG-421": {}, - "UG-325": {}, "UG-228": {}, "UG-123": {}, "UG-422": {}, - "UG-326": {}, "UG-229": {}, "UG-124": {}, "UG-423": {}, - "UG-230": {}, "UG-327": {}, "UG-424": {}, "UG-328": {}, - "UG-425": {}, "UG-426": {}, "UG-330": {}, - "UM-67": {}, "UM-71": {}, "UM-76": {}, "UM-79": {}, - "UM-81": {}, "UM-84": {}, "UM-86": {}, "UM-89": {}, "UM-95": {}, - "US-AK": {}, "US-AL": {}, "US-AR": {}, "US-AS": {}, "US-AZ": {}, - "US-CA": {}, "US-CO": {}, "US-CT": {}, "US-DC": {}, "US-DE": {}, - "US-FL": {}, "US-GA": {}, "US-GU": {}, "US-HI": {}, "US-IA": {}, - "US-ID": {}, "US-IL": {}, "US-IN": {}, "US-KS": {}, "US-KY": {}, - "US-LA": {}, "US-MA": {}, "US-MD": {}, "US-ME": {}, "US-MI": {}, - "US-MN": {}, "US-MO": {}, "US-MP": {}, "US-MS": {}, "US-MT": {}, - "US-NC": {}, "US-ND": {}, "US-NE": {}, "US-NH": {}, "US-NJ": {}, - "US-NM": {}, "US-NV": {}, "US-NY": {}, "US-OH": {}, "US-OK": {}, - "US-OR": {}, "US-PA": {}, "US-PR": {}, "US-RI": {}, "US-SC": {}, - "US-SD": {}, "US-TN": {}, "US-TX": {}, "US-UM": {}, "US-UT": {}, - "US-VA": {}, "US-VI": {}, "US-VT": {}, "US-WA": {}, "US-WI": {}, - "US-WV": {}, "US-WY": {}, "UY-AR": {}, "UY-CA": {}, "UY-CL": {}, - "UY-CO": {}, "UY-DU": {}, "UY-FD": {}, "UY-FS": {}, "UY-LA": {}, - "UY-MA": {}, "UY-MO": {}, "UY-PA": {}, "UY-RN": {}, "UY-RO": {}, - "UY-RV": {}, "UY-SA": {}, "UY-SJ": {}, "UY-SO": {}, "UY-TA": {}, - "UY-TT": {}, "UZ-AN": {}, "UZ-BU": {}, "UZ-FA": {}, "UZ-JI": {}, - "UZ-NG": {}, "UZ-NW": {}, "UZ-QA": {}, "UZ-QR": {}, "UZ-SA": {}, - "UZ-SI": {}, "UZ-SU": {}, "UZ-TK": {}, "UZ-TO": {}, "UZ-XO": {}, - "VC-01": {}, "VC-02": {}, "VC-03": {}, "VC-04": {}, "VC-05": {}, - "VC-06": {}, "VE-A": {}, "VE-B": {}, "VE-C": {}, "VE-D": {}, - "VE-E": {}, "VE-F": {}, "VE-G": {}, "VE-H": {}, "VE-I": {}, - "VE-J": {}, "VE-K": {}, "VE-L": {}, "VE-M": {}, "VE-N": {}, - "VE-O": {}, "VE-P": {}, "VE-R": {}, "VE-S": {}, "VE-T": {}, - "VE-U": {}, "VE-V": {}, "VE-W": {}, "VE-X": {}, "VE-Y": {}, - "VE-Z": {}, "VN-01": {}, "VN-02": {}, "VN-03": {}, "VN-04": {}, - "VN-05": {}, "VN-06": {}, "VN-07": {}, "VN-09": {}, "VN-13": {}, - "VN-14": {}, "VN-15": {}, "VN-18": {}, "VN-20": {}, "VN-21": {}, - "VN-22": {}, "VN-23": {}, "VN-24": {}, "VN-25": {}, "VN-26": {}, - "VN-27": {}, "VN-28": {}, "VN-29": {}, "VN-30": {}, "VN-31": {}, - "VN-32": {}, "VN-33": {}, "VN-34": {}, "VN-35": {}, "VN-36": {}, - "VN-37": {}, "VN-39": {}, "VN-40": {}, "VN-41": {}, "VN-43": {}, - "VN-44": {}, "VN-45": {}, "VN-46": {}, "VN-47": {}, "VN-49": {}, - "VN-50": {}, "VN-51": {}, "VN-52": {}, "VN-53": {}, "VN-54": {}, - "VN-55": {}, "VN-56": {}, "VN-57": {}, "VN-58": {}, "VN-59": {}, - "VN-61": {}, "VN-63": {}, "VN-66": {}, "VN-67": {}, "VN-68": {}, - "VN-69": {}, "VN-70": {}, "VN-71": {}, "VN-72": {}, "VN-73": {}, - "VN-CT": {}, "VN-DN": {}, "VN-HN": {}, "VN-HP": {}, "VN-SG": {}, - "VU-MAP": {}, "VU-PAM": {}, "VU-SAM": {}, "VU-SEE": {}, "VU-TAE": {}, - "VU-TOB": {}, "WF-SG": {}, "WF-UV": {}, "WS-AA": {}, "WS-AL": {}, "WS-AT": {}, "WS-FA": {}, - "WS-GE": {}, "WS-GI": {}, "WS-PA": {}, "WS-SA": {}, "WS-TU": {}, - "WS-VF": {}, "WS-VS": {}, "YE-AB": {}, "YE-AD": {}, "YE-AM": {}, - "YE-BA": {}, "YE-DA": {}, "YE-DH": {}, "YE-HD": {}, "YE-HJ": {}, "YE-HU": {}, - "YE-IB": {}, "YE-JA": {}, "YE-LA": {}, "YE-MA": {}, "YE-MR": {}, - "YE-MU": {}, "YE-MW": {}, "YE-RA": {}, "YE-SA": {}, "YE-SD": {}, "YE-SH": {}, - "YE-SN": {}, "YE-TA": {}, "ZA-EC": {}, "ZA-FS": {}, "ZA-GP": {}, - "ZA-LP": {}, "ZA-MP": {}, "ZA-NC": {}, "ZA-NW": {}, "ZA-WC": {}, - "ZA-ZN": {}, "ZA-KZN": {}, "ZM-01": {}, "ZM-02": {}, "ZM-03": {}, "ZM-04": {}, - "ZM-05": {}, "ZM-06": {}, "ZM-07": {}, "ZM-08": {}, "ZM-09": {}, "ZM-10": {}, - "ZW-BU": {}, "ZW-HA": {}, "ZW-MA": {}, "ZW-MC": {}, "ZW-ME": {}, - "ZW-MI": {}, "ZW-MN": {}, "ZW-MS": {}, "ZW-MV": {}, "ZW-MW": {}, -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/currency_codes.go b/go-controller/vendor/github.com/go-playground/validator/v10/currency_codes.go deleted file mode 100644 index d0317f89cc..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/currency_codes.go +++ /dev/null @@ -1,79 +0,0 @@ -package validator - -var iso4217 = map[string]struct{}{ - "AFN": {}, "EUR": {}, "ALL": {}, "DZD": {}, "USD": {}, - "AOA": {}, "XCD": {}, "ARS": {}, "AMD": {}, "AWG": {}, - "AUD": {}, "AZN": {}, "BSD": {}, "BHD": {}, "BDT": {}, - "BBD": {}, "BYN": {}, "BZD": {}, "XOF": {}, "BMD": {}, - "INR": {}, "BTN": {}, "BOB": {}, "BOV": {}, "BAM": {}, - "BWP": {}, "NOK": {}, "BRL": {}, "BND": {}, "BGN": {}, - "BIF": {}, "CVE": {}, "KHR": {}, "XAF": {}, "CAD": {}, - "KYD": {}, "CLP": {}, "CLF": {}, "CNY": {}, "COP": {}, - "COU": {}, "KMF": {}, "CDF": {}, "NZD": {}, "CRC": {}, - "HRK": {}, "CUP": {}, "CUC": {}, "ANG": {}, "CZK": {}, - "DKK": {}, "DJF": {}, "DOP": {}, "EGP": {}, "SVC": {}, - "ERN": {}, "SZL": {}, "ETB": {}, "FKP": {}, "FJD": {}, - "XPF": {}, "GMD": {}, "GEL": {}, "GHS": {}, "GIP": {}, - "GTQ": {}, "GBP": {}, "GNF": {}, "GYD": {}, "HTG": {}, - "HNL": {}, "HKD": {}, "HUF": {}, "ISK": {}, "IDR": {}, - "XDR": {}, "IRR": {}, "IQD": {}, "ILS": {}, "JMD": {}, - "JPY": {}, "JOD": {}, "KZT": {}, "KES": {}, "KPW": {}, - "KRW": {}, "KWD": {}, "KGS": {}, "LAK": {}, "LBP": {}, - "LSL": {}, "ZAR": {}, "LRD": {}, "LYD": {}, "CHF": {}, - "MOP": {}, "MKD": {}, "MGA": {}, "MWK": {}, "MYR": {}, - "MVR": {}, "MRU": {}, "MUR": {}, "XUA": {}, "MXN": {}, - "MXV": {}, "MDL": {}, "MNT": {}, "MAD": {}, "MZN": {}, - "MMK": {}, "NAD": {}, "NPR": {}, "NIO": {}, "NGN": {}, - "OMR": {}, "PKR": {}, "PAB": {}, "PGK": {}, "PYG": {}, - "PEN": {}, "PHP": {}, "PLN": {}, "QAR": {}, "RON": {}, - "RUB": {}, "RWF": {}, "SHP": {}, "WST": {}, "STN": {}, - "SAR": {}, "RSD": {}, "SCR": {}, "SLL": {}, "SGD": {}, - "XSU": {}, "SBD": {}, "SOS": {}, "SSP": {}, "LKR": {}, - "SDG": {}, "SRD": {}, "SEK": {}, "CHE": {}, "CHW": {}, - "SYP": {}, "TWD": {}, "TJS": {}, "TZS": {}, "THB": {}, - "TOP": {}, "TTD": {}, "TND": {}, "TRY": {}, "TMT": {}, - "UGX": {}, "UAH": {}, "AED": {}, "USN": {}, "UYU": {}, - "UYI": {}, "UYW": {}, "UZS": {}, "VUV": {}, "VES": {}, - "VND": {}, "YER": {}, "ZMW": {}, "ZWL": {}, "XBA": {}, - "XBB": {}, "XBC": {}, "XBD": {}, "XTS": {}, "XXX": {}, - "XAU": {}, "XPD": {}, "XPT": {}, "XAG": {}, -} - -var iso4217_numeric = map[int]struct{}{ - 8: {}, 12: {}, 32: {}, 36: {}, 44: {}, - 48: {}, 50: {}, 51: {}, 52: {}, 60: {}, - 64: {}, 68: {}, 72: {}, 84: {}, 90: {}, - 96: {}, 104: {}, 108: {}, 116: {}, 124: {}, - 132: {}, 136: {}, 144: {}, 152: {}, 156: {}, - 170: {}, 174: {}, 188: {}, 191: {}, 192: {}, - 203: {}, 208: {}, 214: {}, 222: {}, 230: {}, - 232: {}, 238: {}, 242: {}, 262: {}, 270: {}, - 292: {}, 320: {}, 324: {}, 328: {}, 332: {}, - 340: {}, 344: {}, 348: {}, 352: {}, 356: {}, - 360: {}, 364: {}, 368: {}, 376: {}, 388: {}, - 392: {}, 398: {}, 400: {}, 404: {}, 408: {}, - 410: {}, 414: {}, 417: {}, 418: {}, 422: {}, - 426: {}, 430: {}, 434: {}, 446: {}, 454: {}, - 458: {}, 462: {}, 480: {}, 484: {}, 496: {}, - 498: {}, 504: {}, 512: {}, 516: {}, 524: {}, - 532: {}, 533: {}, 548: {}, 554: {}, 558: {}, - 566: {}, 578: {}, 586: {}, 590: {}, 598: {}, - 600: {}, 604: {}, 608: {}, 634: {}, 643: {}, - 646: {}, 654: {}, 682: {}, 690: {}, 694: {}, - 702: {}, 704: {}, 706: {}, 710: {}, 728: {}, - 748: {}, 752: {}, 756: {}, 760: {}, 764: {}, - 776: {}, 780: {}, 784: {}, 788: {}, 800: {}, - 807: {}, 818: {}, 826: {}, 834: {}, 840: {}, - 858: {}, 860: {}, 882: {}, 886: {}, 901: {}, - 927: {}, 928: {}, 929: {}, 930: {}, 931: {}, - 932: {}, 933: {}, 934: {}, 936: {}, 938: {}, - 940: {}, 941: {}, 943: {}, 944: {}, 946: {}, - 947: {}, 948: {}, 949: {}, 950: {}, 951: {}, - 952: {}, 953: {}, 955: {}, 956: {}, 957: {}, - 958: {}, 959: {}, 960: {}, 961: {}, 962: {}, - 963: {}, 964: {}, 965: {}, 967: {}, 968: {}, - 969: {}, 970: {}, 971: {}, 972: {}, 973: {}, - 975: {}, 976: {}, 977: {}, 978: {}, 979: {}, - 980: {}, 981: {}, 984: {}, 985: {}, 986: {}, - 990: {}, 994: {}, 997: {}, 999: {}, -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/doc.go b/go-controller/vendor/github.com/go-playground/validator/v10/doc.go deleted file mode 100644 index e7a241fbc4..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/doc.go +++ /dev/null @@ -1,1504 +0,0 @@ -/* -Package validator implements value validations for structs and individual fields -based on tags. - -It can also handle Cross-Field and Cross-Struct validation for nested structs -and has the ability to dive into arrays and maps of any type. - -see more examples https://github.com/go-playground/validator/tree/master/_examples - -# Singleton - -Validator is designed to be thread-safe and used as a singleton instance. -It caches information about your struct and validations, -in essence only parsing your validation tags once per struct type. -Using multiple instances neglects the benefit of caching. -The not thread-safe functions are explicitly marked as such in the documentation. - -# Validation Functions Return Type error - -Doing things this way is actually the way the standard library does, see the -file.Open method here: - - https://golang.org/pkg/os/#Open. - -The authors return type "error" to avoid the issue discussed in the following, -where err is always != nil: - - http://stackoverflow.com/a/29138676/3158232 - https://github.com/go-playground/validator/issues/134 - -Validator only InvalidValidationError for bad validation input, nil or -ValidationErrors as type error; so, in your code all you need to do is check -if the error returned is not nil, and if it's not check if error is -InvalidValidationError ( if necessary, most of the time it isn't ) type cast -it to type ValidationErrors like so err.(validator.ValidationErrors). - -# Custom Validation Functions - -Custom Validation functions can be added. Example: - - // Structure - func customFunc(fl validator.FieldLevel) bool { - - if fl.Field().String() == "invalid" { - return false - } - - return true - } - - validate.RegisterValidation("custom tag name", customFunc) - // NOTES: using the same tag name as an existing function - // will overwrite the existing one - -# Cross-Field Validation - -Cross-Field Validation can be done via the following tags: - - eqfield - - nefield - - gtfield - - gtefield - - ltfield - - ltefield - - eqcsfield - - necsfield - - gtcsfield - - gtecsfield - - ltcsfield - - ltecsfield - -If, however, some custom cross-field validation is required, it can be done -using a custom validation. - -Why not just have cross-fields validation tags (i.e. only eqcsfield and not -eqfield)? - -The reason is efficiency. If you want to check a field within the same struct -"eqfield" only has to find the field on the same struct (1 level). But, if we -used "eqcsfield" it could be multiple levels down. Example: - - type Inner struct { - StartDate time.Time - } - - type Outer struct { - InnerStructField *Inner - CreatedAt time.Time `validate:"ltecsfield=InnerStructField.StartDate"` - } - - now := time.Now() - - inner := &Inner{ - StartDate: now, - } - - outer := &Outer{ - InnerStructField: inner, - CreatedAt: now, - } - - errs := validate.Struct(outer) - - // NOTE: when calling validate.Struct(val) topStruct will be the top level struct passed - // into the function - // when calling validate.VarWithValue(val, field, tag) val will be - // whatever you pass, struct, field... - // when calling validate.Field(field, tag) val will be nil - -# Multiple Validators - -Multiple validators on a field will process in the order defined. Example: - - type Test struct { - Field `validate:"max=10,min=1"` - } - - // max will be checked then min - -Bad Validator definitions are not handled by the library. Example: - - type Test struct { - Field `validate:"min=10,max=0"` - } - - // this definition of min max will never succeed - -# Using Validator Tags - -Baked In Cross-Field validation only compares fields on the same struct. -If Cross-Field + Cross-Struct validation is needed you should implement your -own custom validator. - -Comma (",") is the default separator of validation tags. If you wish to -have a comma included within the parameter (i.e. excludesall=,) you will need to -use the UTF-8 hex representation 0x2C, which is replaced in the code as a comma, -so the above will become excludesall=0x2C. - - type Test struct { - Field `validate:"excludesall=,"` // BAD! Do not include a comma. - Field `validate:"excludesall=0x2C"` // GOOD! Use the UTF-8 hex representation. - } - -Pipe ("|") is the 'or' validation tags deparator. If you wish to -have a pipe included within the parameter i.e. excludesall=| you will need to -use the UTF-8 hex representation 0x7C, which is replaced in the code as a pipe, -so the above will become excludesall=0x7C - - type Test struct { - Field `validate:"excludesall=|"` // BAD! Do not include a pipe! - Field `validate:"excludesall=0x7C"` // GOOD! Use the UTF-8 hex representation. - } - -# Baked In Validators and Tags - -Here is a list of the current built in validators: - -# Skip Field - -Tells the validation to skip this struct field; this is particularly -handy in ignoring embedded structs from being validated. (Usage: -) - - Usage: - - -# Or Operator - -This is the 'or' operator allowing multiple validators to be used and -accepted. (Usage: rgb|rgba) <-- this would allow either rgb or rgba -colors to be accepted. This can also be combined with 'and' for example -( Usage: omitempty,rgb|rgba) - - Usage: | - -# StructOnly - -When a field that is a nested struct is encountered, and contains this flag -any validation on the nested struct will be run, but none of the nested -struct fields will be validated. This is useful if inside of your program -you know the struct will be valid, but need to verify it has been assigned. -NOTE: only "required" and "omitempty" can be used on a struct itself. - - Usage: structonly - -# NoStructLevel - -Same as structonly tag except that any struct level validations will not run. - - Usage: nostructlevel - -# Omit Empty - -Allows conditional validation, for example if a field is not set with -a value (Determined by the "required" validator) then other validation -such as min or max won't run, but if a value is set validation will run. - - Usage: omitempty - -# Omit Nil - -Allows to skip the validation if the value is nil (same as omitempty, but -only for the nil-values). - - Usage: omitnil - -# Dive - -This tells the validator to dive into a slice, array or map and validate that -level of the slice, array or map with the validation tags that follow. -Multidimensional nesting is also supported, each level you wish to dive will -require another dive tag. dive has some sub-tags, 'keys' & 'endkeys', please see -the Keys & EndKeys section just below. - - Usage: dive - -Example #1 - - [][]string with validation tag "gt=0,dive,len=1,dive,required" - // gt=0 will be applied to [] - // len=1 will be applied to []string - // required will be applied to string - -Example #2 - - [][]string with validation tag "gt=0,dive,dive,required" - // gt=0 will be applied to [] - // []string will be spared validation - // required will be applied to string - -Keys & EndKeys - -These are to be used together directly after the dive tag and tells the validator -that anything between 'keys' and 'endkeys' applies to the keys of a map and not the -values; think of it like the 'dive' tag, but for map keys instead of values. -Multidimensional nesting is also supported, each level you wish to validate will -require another 'keys' and 'endkeys' tag. These tags are only valid for maps. - - Usage: dive,keys,othertagvalidation(s),endkeys,valuevalidationtags - -Example #1 - - map[string]string with validation tag "gt=0,dive,keys,eq=1|eq=2,endkeys,required" - // gt=0 will be applied to the map itself - // eq=1|eq=2 will be applied to the map keys - // required will be applied to map values - -Example #2 - - map[[2]string]string with validation tag "gt=0,dive,keys,dive,eq=1|eq=2,endkeys,required" - // gt=0 will be applied to the map itself - // eq=1|eq=2 will be applied to each array element in the map keys - // required will be applied to map values - -# Required - -This validates that the value is not the data types default zero value. -For numbers ensures value is not zero. For strings ensures value is -not "". For booleans ensures value is not false. For slices, maps, pointers, interfaces, channels and functions -ensures the value is not nil. For structs ensures value is not the zero value when using WithRequiredStructEnabled. - - Usage: required - -# Required If - -The field under validation must be present and not empty only if all -the other specified fields are equal to the value following the specified -field. For strings ensures value is not "". For slices, maps, pointers, -interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value. - - Usage: required_if - -Examples: - - // require the field if the Field1 is equal to the parameter given: - Usage: required_if=Field1 foobar - - // require the field if the Field1 and Field2 is equal to the value respectively: - Usage: required_if=Field1 foo Field2 bar - -# Required Unless - -The field under validation must be present and not empty unless all -the other specified fields are equal to the value following the specified -field. For strings ensures value is not "". For slices, maps, pointers, -interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value. - - Usage: required_unless - -Examples: - - // require the field unless the Field1 is equal to the parameter given: - Usage: required_unless=Field1 foobar - - // require the field unless the Field1 and Field2 is equal to the value respectively: - Usage: required_unless=Field1 foo Field2 bar - -# Required With - -The field under validation must be present and not empty only if any -of the other specified fields are present. For strings ensures value is -not "". For slices, maps, pointers, interfaces, channels and functions -ensures the value is not nil. For structs ensures value is not the zero value. - - Usage: required_with - -Examples: - - // require the field if the Field1 is present: - Usage: required_with=Field1 - - // require the field if the Field1 or Field2 is present: - Usage: required_with=Field1 Field2 - -# Required With All - -The field under validation must be present and not empty only if all -of the other specified fields are present. For strings ensures value is -not "". For slices, maps, pointers, interfaces, channels and functions -ensures the value is not nil. For structs ensures value is not the zero value. - - Usage: required_with_all - -Example: - - // require the field if the Field1 and Field2 is present: - Usage: required_with_all=Field1 Field2 - -# Required Without - -The field under validation must be present and not empty only when any -of the other specified fields are not present. For strings ensures value is -not "". For slices, maps, pointers, interfaces, channels and functions -ensures the value is not nil. For structs ensures value is not the zero value. - - Usage: required_without - -Examples: - - // require the field if the Field1 is not present: - Usage: required_without=Field1 - - // require the field if the Field1 or Field2 is not present: - Usage: required_without=Field1 Field2 - -# Required Without All - -The field under validation must be present and not empty only when all -of the other specified fields are not present. For strings ensures value is -not "". For slices, maps, pointers, interfaces, channels and functions -ensures the value is not nil. For structs ensures value is not the zero value. - - Usage: required_without_all - -Example: - - // require the field if the Field1 and Field2 is not present: - Usage: required_without_all=Field1 Field2 - -# Excluded If - -The field under validation must not be present or not empty only if all -the other specified fields are equal to the value following the specified -field. For strings ensures value is not "". For slices, maps, pointers, -interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value. - - Usage: excluded_if - -Examples: - - // exclude the field if the Field1 is equal to the parameter given: - Usage: excluded_if=Field1 foobar - - // exclude the field if the Field1 and Field2 is equal to the value respectively: - Usage: excluded_if=Field1 foo Field2 bar - -# Excluded Unless - -The field under validation must not be present or empty unless all -the other specified fields are equal to the value following the specified -field. For strings ensures value is not "". For slices, maps, pointers, -interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value. - - Usage: excluded_unless - -Examples: - - // exclude the field unless the Field1 is equal to the parameter given: - Usage: excluded_unless=Field1 foobar - - // exclude the field unless the Field1 and Field2 is equal to the value respectively: - Usage: excluded_unless=Field1 foo Field2 bar - -# Is Default - -This validates that the value is the default value and is almost the -opposite of required. - - Usage: isdefault - -# Length - -For numbers, length will ensure that the value is -equal to the parameter given. For strings, it checks that -the string length is exactly that number of characters. For slices, -arrays, and maps, validates the number of items. - -Example #1 - - Usage: len=10 - -Example #2 (time.Duration) - -For time.Duration, len will ensure that the value is equal to the duration given -in the parameter. - - Usage: len=1h30m - -# Maximum - -For numbers, max will ensure that the value is -less than or equal to the parameter given. For strings, it checks -that the string length is at most that number of characters. For -slices, arrays, and maps, validates the number of items. - -Example #1 - - Usage: max=10 - -Example #2 (time.Duration) - -For time.Duration, max will ensure that the value is less than or equal to the -duration given in the parameter. - - Usage: max=1h30m - -# Minimum - -For numbers, min will ensure that the value is -greater or equal to the parameter given. For strings, it checks that -the string length is at least that number of characters. For slices, -arrays, and maps, validates the number of items. - -Example #1 - - Usage: min=10 - -Example #2 (time.Duration) - -For time.Duration, min will ensure that the value is greater than or equal to -the duration given in the parameter. - - Usage: min=1h30m - -# Equals - -For strings & numbers, eq will ensure that the value is -equal to the parameter given. For slices, arrays, and maps, -validates the number of items. - -Example #1 - - Usage: eq=10 - -Example #2 (time.Duration) - -For time.Duration, eq will ensure that the value is equal to the duration given -in the parameter. - - Usage: eq=1h30m - -# Not Equal - -For strings & numbers, ne will ensure that the value is not -equal to the parameter given. For slices, arrays, and maps, -validates the number of items. - -Example #1 - - Usage: ne=10 - -Example #2 (time.Duration) - -For time.Duration, ne will ensure that the value is not equal to the duration -given in the parameter. - - Usage: ne=1h30m - -# One Of - -For strings, ints, and uints, oneof will ensure that the value -is one of the values in the parameter. The parameter should be -a list of values separated by whitespace. Values may be -strings or numbers. To match strings with spaces in them, include -the target string between single quotes. Kind of like an 'enum'. - - Usage: oneof=red green - oneof='red green' 'blue yellow' - oneof=5 7 9 - -# One Of Case Insensitive - -Works the same as oneof but is case insensitive and therefore only accepts strings. - - Usage: oneofci=red green - oneofci='red green' 'blue yellow' - -# Greater Than - -For numbers, this will ensure that the value is greater than the -parameter given. For strings, it checks that the string length -is greater than that number of characters. For slices, arrays -and maps it validates the number of items. - -Example #1 - - Usage: gt=10 - -Example #2 (time.Time) - -For time.Time ensures the time value is greater than time.Now.UTC(). - - Usage: gt - -Example #3 (time.Duration) - -For time.Duration, gt will ensure that the value is greater than the duration -given in the parameter. - - Usage: gt=1h30m - -# Greater Than or Equal - -Same as 'min' above. Kept both to make terminology with 'len' easier. - -Example #1 - - Usage: gte=10 - -Example #2 (time.Time) - -For time.Time ensures the time value is greater than or equal to time.Now.UTC(). - - Usage: gte - -Example #3 (time.Duration) - -For time.Duration, gte will ensure that the value is greater than or equal to -the duration given in the parameter. - - Usage: gte=1h30m - -# Less Than - -For numbers, this will ensure that the value is less than the parameter given. -For strings, it checks that the string length is less than that number of -characters. For slices, arrays, and maps it validates the number of items. - -Example #1 - - Usage: lt=10 - -Example #2 (time.Time) - -For time.Time ensures the time value is less than time.Now.UTC(). - - Usage: lt - -Example #3 (time.Duration) - -For time.Duration, lt will ensure that the value is less than the duration given -in the parameter. - - Usage: lt=1h30m - -# Less Than or Equal - -Same as 'max' above. Kept both to make terminology with 'len' easier. - -Example #1 - - Usage: lte=10 - -Example #2 (time.Time) - -For time.Time ensures the time value is less than or equal to time.Now.UTC(). - - Usage: lte - -Example #3 (time.Duration) - -For time.Duration, lte will ensure that the value is less than or equal to the -duration given in the parameter. - - Usage: lte=1h30m - -# Field Equals Another Field - -This will validate the field value against another fields value either within -a struct or passed in field. - -Example #1: - - // Validation on Password field using: - Usage: eqfield=ConfirmPassword - -Example #2: - - // Validating by field: - validate.VarWithValue(password, confirmpassword, "eqfield") - -Field Equals Another Field (relative) - -This does the same as eqfield except that it validates the field provided relative -to the top level struct. - - Usage: eqcsfield=InnerStructField.Field) - -# Field Does Not Equal Another Field - -This will validate the field value against another fields value either within -a struct or passed in field. - -Examples: - - // Confirm two colors are not the same: - // - // Validation on Color field: - Usage: nefield=Color2 - - // Validating by field: - validate.VarWithValue(color1, color2, "nefield") - -Field Does Not Equal Another Field (relative) - -This does the same as nefield except that it validates the field provided -relative to the top level struct. - - Usage: necsfield=InnerStructField.Field - -# Field Greater Than Another Field - -Only valid for Numbers, time.Duration and time.Time types, this will validate -the field value against another fields value either within a struct or passed in -field. usage examples are for validation of a Start and End date: - -Example #1: - - // Validation on End field using: - validate.Struct Usage(gtfield=Start) - -Example #2: - - // Validating by field: - validate.VarWithValue(start, end, "gtfield") - -# Field Greater Than Another Relative Field - -This does the same as gtfield except that it validates the field provided -relative to the top level struct. - - Usage: gtcsfield=InnerStructField.Field - -# Field Greater Than or Equal To Another Field - -Only valid for Numbers, time.Duration and time.Time types, this will validate -the field value against another fields value either within a struct or passed in -field. usage examples are for validation of a Start and End date: - -Example #1: - - // Validation on End field using: - validate.Struct Usage(gtefield=Start) - -Example #2: - - // Validating by field: - validate.VarWithValue(start, end, "gtefield") - -# Field Greater Than or Equal To Another Relative Field - -This does the same as gtefield except that it validates the field provided relative -to the top level struct. - - Usage: gtecsfield=InnerStructField.Field - -# Less Than Another Field - -Only valid for Numbers, time.Duration and time.Time types, this will validate -the field value against another fields value either within a struct or passed in -field. usage examples are for validation of a Start and End date: - -Example #1: - - // Validation on End field using: - validate.Struct Usage(ltfield=Start) - -Example #2: - - // Validating by field: - validate.VarWithValue(start, end, "ltfield") - -# Less Than Another Relative Field - -This does the same as ltfield except that it validates the field provided relative -to the top level struct. - - Usage: ltcsfield=InnerStructField.Field - -# Less Than or Equal To Another Field - -Only valid for Numbers, time.Duration and time.Time types, this will validate -the field value against another fields value either within a struct or passed in -field. usage examples are for validation of a Start and End date: - -Example #1: - - // Validation on End field using: - validate.Struct Usage(ltefield=Start) - -Example #2: - - // Validating by field: - validate.VarWithValue(start, end, "ltefield") - -# Less Than or Equal To Another Relative Field - -This does the same as ltefield except that it validates the field provided relative -to the top level struct. - - Usage: ltecsfield=InnerStructField.Field - -# Field Contains Another Field - -This does the same as contains except for struct fields. It should only be used -with string types. See the behavior of reflect.Value.String() for behavior on -other types. - - Usage: containsfield=InnerStructField.Field - -# Field Excludes Another Field - -This does the same as excludes except for struct fields. It should only be used -with string types. See the behavior of reflect.Value.String() for behavior on -other types. - - Usage: excludesfield=InnerStructField.Field - -# Unique - -For arrays & slices, unique will ensure that there are no duplicates. -For maps, unique will ensure that there are no duplicate values. -For slices of struct, unique will ensure that there are no duplicate values -in a field of the struct specified via a parameter. - - // For arrays, slices, and maps: - Usage: unique - - // For slices of struct: - Usage: unique=field - -# Alpha Only - -This validates that a string value contains ASCII alpha characters only - - Usage: alpha - -# Alphanumeric - -This validates that a string value contains ASCII alphanumeric characters only - - Usage: alphanum - -# Alpha Unicode - -This validates that a string value contains unicode alpha characters only - - Usage: alphaunicode - -# Alphanumeric Unicode - -This validates that a string value contains unicode alphanumeric characters only - - Usage: alphanumunicode - -# Boolean - -This validates that a string value can successfully be parsed into a boolean with strconv.ParseBool - - Usage: boolean - -# Number - -This validates that a string value contains number values only. -For integers or float it returns true. - - Usage: number - -# Numeric - -This validates that a string value contains a basic numeric value. -basic excludes exponents etc... -for integers or float it returns true. - - Usage: numeric - -# Hexadecimal String - -This validates that a string value contains a valid hexadecimal. - - Usage: hexadecimal - -# Hexcolor String - -This validates that a string value contains a valid hex color including -hashtag (#) - - Usage: hexcolor - -# Lowercase String - -This validates that a string value contains only lowercase characters. An empty string is not a valid lowercase string. - - Usage: lowercase - -# Uppercase String - -This validates that a string value contains only uppercase characters. An empty string is not a valid uppercase string. - - Usage: uppercase - -# RGB String - -This validates that a string value contains a valid rgb color - - Usage: rgb - -# RGBA String - -This validates that a string value contains a valid rgba color - - Usage: rgba - -# HSL String - -This validates that a string value contains a valid hsl color - - Usage: hsl - -# HSLA String - -This validates that a string value contains a valid hsla color - - Usage: hsla - -# E.164 Phone Number String - -This validates that a string value contains a valid E.164 Phone number -https://en.wikipedia.org/wiki/E.164 (ex. +1123456789) - - Usage: e164 - -# E-mail String - -This validates that a string value contains a valid email -This may not conform to all possibilities of any rfc standard, but neither -does any email provider accept all possibilities. - - Usage: email - -# JSON String - -This validates that a string value is valid JSON - - Usage: json - -# JWT String - -This validates that a string value is a valid JWT - - Usage: jwt - -# File - -This validates that a string value contains a valid file path and that -the file exists on the machine. -This is done using os.Stat, which is a platform independent function. - - Usage: file - -# Image path - -This validates that a string value contains a valid file path and that -the file exists on the machine and is an image. -This is done using os.Stat and github.com/gabriel-vasile/mimetype - - Usage: image - -# File Path - -This validates that a string value contains a valid file path but does not -validate the existence of that file. -This is done using os.Stat, which is a platform independent function. - - Usage: filepath - -# URL String - -This validates that a string value contains a valid url -This will accept any url the golang request uri accepts but must contain -a schema for example http:// or rtmp:// - - Usage: url - -# URI String - -This validates that a string value contains a valid uri -This will accept any uri the golang request uri accepts - - Usage: uri - -# Urn RFC 2141 String - -This validates that a string value contains a valid URN -according to the RFC 2141 spec. - - Usage: urn_rfc2141 - -# Base32 String - -This validates that a string value contains a valid bas324 value. -Although an empty string is valid base32 this will report an empty string -as an error, if you wish to accept an empty string as valid you can use -this with the omitempty tag. - - Usage: base32 - -# Base64 String - -This validates that a string value contains a valid base64 value. -Although an empty string is valid base64 this will report an empty string -as an error, if you wish to accept an empty string as valid you can use -this with the omitempty tag. - - Usage: base64 - -# Base64URL String - -This validates that a string value contains a valid base64 URL safe value -according the RFC4648 spec. -Although an empty string is a valid base64 URL safe value, this will report -an empty string as an error, if you wish to accept an empty string as valid -you can use this with the omitempty tag. - - Usage: base64url - -# Base64RawURL String - -This validates that a string value contains a valid base64 URL safe value, -but without = padding, according the RFC4648 spec, section 3.2. -Although an empty string is a valid base64 URL safe value, this will report -an empty string as an error, if you wish to accept an empty string as valid -you can use this with the omitempty tag. - - Usage: base64rawurl - -# Bitcoin Address - -This validates that a string value contains a valid bitcoin address. -The format of the string is checked to ensure it matches one of the three formats -P2PKH, P2SH and performs checksum validation. - - Usage: btc_addr - -Bitcoin Bech32 Address (segwit) - -This validates that a string value contains a valid bitcoin Bech32 address as defined -by bip-0173 (https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) -Special thanks to Pieter Wuille for providing reference implementations. - - Usage: btc_addr_bech32 - -# Ethereum Address - -This validates that a string value contains a valid ethereum address. -The format of the string is checked to ensure it matches the standard Ethereum address format. - - Usage: eth_addr - -# Contains - -This validates that a string value contains the substring value. - - Usage: contains=@ - -# Contains Any - -This validates that a string value contains any Unicode code points -in the substring value. - - Usage: containsany=!@#? - -# Contains Rune - -This validates that a string value contains the supplied rune value. - - Usage: containsrune=@ - -# Excludes - -This validates that a string value does not contain the substring value. - - Usage: excludes=@ - -# Excludes All - -This validates that a string value does not contain any Unicode code -points in the substring value. - - Usage: excludesall=!@#? - -# Excludes Rune - -This validates that a string value does not contain the supplied rune value. - - Usage: excludesrune=@ - -# Starts With - -This validates that a string value starts with the supplied string value - - Usage: startswith=hello - -# Ends With - -This validates that a string value ends with the supplied string value - - Usage: endswith=goodbye - -# Does Not Start With - -This validates that a string value does not start with the supplied string value - - Usage: startsnotwith=hello - -# Does Not End With - -This validates that a string value does not end with the supplied string value - - Usage: endsnotwith=goodbye - -# International Standard Book Number - -This validates that a string value contains a valid isbn10 or isbn13 value. - - Usage: isbn - -# International Standard Book Number 10 - -This validates that a string value contains a valid isbn10 value. - - Usage: isbn10 - -# International Standard Book Number 13 - -This validates that a string value contains a valid isbn13 value. - - Usage: isbn13 - -# Universally Unique Identifier UUID - -This validates that a string value contains a valid UUID. Uppercase UUID values will not pass - use `uuid_rfc4122` instead. - - Usage: uuid - -# Universally Unique Identifier UUID v3 - -This validates that a string value contains a valid version 3 UUID. Uppercase UUID values will not pass - use `uuid3_rfc4122` instead. - - Usage: uuid3 - -# Universally Unique Identifier UUID v4 - -This validates that a string value contains a valid version 4 UUID. Uppercase UUID values will not pass - use `uuid4_rfc4122` instead. - - Usage: uuid4 - -# Universally Unique Identifier UUID v5 - -This validates that a string value contains a valid version 5 UUID. Uppercase UUID values will not pass - use `uuid5_rfc4122` instead. - - Usage: uuid5 - -# Universally Unique Lexicographically Sortable Identifier ULID - -This validates that a string value contains a valid ULID value. - - Usage: ulid - -# ASCII - -This validates that a string value contains only ASCII characters. -NOTE: if the string is blank, this validates as true. - - Usage: ascii - -# Printable ASCII - -This validates that a string value contains only printable ASCII characters. -NOTE: if the string is blank, this validates as true. - - Usage: printascii - -# Multi-Byte Characters - -This validates that a string value contains one or more multibyte characters. -NOTE: if the string is blank, this validates as true. - - Usage: multibyte - -# Data URL - -This validates that a string value contains a valid DataURI. -NOTE: this will also validate that the data portion is valid base64 - - Usage: datauri - -# Latitude - -This validates that a string value contains a valid latitude. - - Usage: latitude - -# Longitude - -This validates that a string value contains a valid longitude. - - Usage: longitude - -# Employeer Identification Number EIN - -This validates that a string value contains a valid U.S. Employer Identification Number. - - Usage: ein - -# Social Security Number SSN - -This validates that a string value contains a valid U.S. Social Security Number. - - Usage: ssn - -# Internet Protocol Address IP - -This validates that a string value contains a valid IP Address. - - Usage: ip - -# Internet Protocol Address IPv4 - -This validates that a string value contains a valid v4 IP Address. - - Usage: ipv4 - -# Internet Protocol Address IPv6 - -This validates that a string value contains a valid v6 IP Address. - - Usage: ipv6 - -# Classless Inter-Domain Routing CIDR - -This validates that a string value contains a valid CIDR Address. - - Usage: cidr - -# Classless Inter-Domain Routing CIDRv4 - -This validates that a string value contains a valid v4 CIDR Address. - - Usage: cidrv4 - -# Classless Inter-Domain Routing CIDRv6 - -This validates that a string value contains a valid v6 CIDR Address. - - Usage: cidrv6 - -# Transmission Control Protocol Address TCP - -This validates that a string value contains a valid resolvable TCP Address. - - Usage: tcp_addr - -# Transmission Control Protocol Address TCPv4 - -This validates that a string value contains a valid resolvable v4 TCP Address. - - Usage: tcp4_addr - -# Transmission Control Protocol Address TCPv6 - -This validates that a string value contains a valid resolvable v6 TCP Address. - - Usage: tcp6_addr - -# User Datagram Protocol Address UDP - -This validates that a string value contains a valid resolvable UDP Address. - - Usage: udp_addr - -# User Datagram Protocol Address UDPv4 - -This validates that a string value contains a valid resolvable v4 UDP Address. - - Usage: udp4_addr - -# User Datagram Protocol Address UDPv6 - -This validates that a string value contains a valid resolvable v6 UDP Address. - - Usage: udp6_addr - -# Internet Protocol Address IP - -This validates that a string value contains a valid resolvable IP Address. - - Usage: ip_addr - -# Internet Protocol Address IPv4 - -This validates that a string value contains a valid resolvable v4 IP Address. - - Usage: ip4_addr - -# Internet Protocol Address IPv6 - -This validates that a string value contains a valid resolvable v6 IP Address. - - Usage: ip6_addr - -# Unix domain socket end point Address - -This validates that a string value contains a valid Unix Address. - - Usage: unix_addr - -# Media Access Control Address MAC - -This validates that a string value contains a valid MAC Address. - - Usage: mac - -Note: See Go's ParseMAC for accepted formats and types: - - http://golang.org/src/net/mac.go?s=866:918#L29 - -# Hostname RFC 952 - -This validates that a string value is a valid Hostname according to RFC 952 https://tools.ietf.org/html/rfc952 - - Usage: hostname - -# Hostname RFC 1123 - -This validates that a string value is a valid Hostname according to RFC 1123 https://tools.ietf.org/html/rfc1123 - - Usage: hostname_rfc1123 or if you want to continue to use 'hostname' in your tags, create an alias. - -Full Qualified Domain Name (FQDN) - -This validates that a string value contains a valid FQDN. - - Usage: fqdn - -# HTML Tags - -This validates that a string value appears to be an HTML element tag -including those described at https://developer.mozilla.org/en-US/docs/Web/HTML/Element - - Usage: html - -# HTML Encoded - -This validates that a string value is a proper character reference in decimal -or hexadecimal format - - Usage: html_encoded - -# URL Encoded - -This validates that a string value is percent-encoded (URL encoded) according -to https://tools.ietf.org/html/rfc3986#section-2.1 - - Usage: url_encoded - -# Directory - -This validates that a string value contains a valid directory and that -it exists on the machine. -This is done using os.Stat, which is a platform independent function. - - Usage: dir - -# Directory Path - -This validates that a string value contains a valid directory but does -not validate the existence of that directory. -This is done using os.Stat, which is a platform independent function. -It is safest to suffix the string with os.PathSeparator if the directory -may not exist at the time of validation. - - Usage: dirpath - -# HostPort - -This validates that a string value contains a valid DNS hostname and port that -can be used to validate fields typically passed to sockets and connections. - - Usage: hostname_port - -# Datetime - -This validates that a string value is a valid datetime based on the supplied datetime format. -Supplied format must match the official Go time format layout as documented in https://golang.org/pkg/time/ - - Usage: datetime=2006-01-02 - -# Iso3166-1 alpha-2 - -This validates that a string value is a valid country code based on iso3166-1 alpha-2 standard. -see: https://www.iso.org/iso-3166-country-codes.html - - Usage: iso3166_1_alpha2 - -# Iso3166-1 alpha-3 - -This validates that a string value is a valid country code based on iso3166-1 alpha-3 standard. -see: https://www.iso.org/iso-3166-country-codes.html - - Usage: iso3166_1_alpha3 - -# Iso3166-1 alpha-numeric - -This validates that a string value is a valid country code based on iso3166-1 alpha-numeric standard. -see: https://www.iso.org/iso-3166-country-codes.html - - Usage: iso3166_1_alpha3 - -# BCP 47 Language Tag - -This validates that a string value is a valid BCP 47 language tag, as parsed by language.Parse. -More information on https://pkg.go.dev/golang.org/x/text/language - - Usage: bcp47_language_tag - -BIC (SWIFT code) - -This validates that a string value is a valid Business Identifier Code (SWIFT code), defined in ISO 9362. -More information on https://www.iso.org/standard/60390.html - - Usage: bic - -# RFC 1035 label - -This validates that a string value is a valid dns RFC 1035 label, defined in RFC 1035. -More information on https://datatracker.ietf.org/doc/html/rfc1035 - - Usage: dns_rfc1035_label - -# TimeZone - -This validates that a string value is a valid time zone based on the time zone database present on the system. -Although empty value and Local value are allowed by time.LoadLocation golang function, they are not allowed by this validator. -More information on https://golang.org/pkg/time/#LoadLocation - - Usage: timezone - -# Semantic Version - -This validates that a string value is a valid semver version, defined in Semantic Versioning 2.0.0. -More information on https://semver.org/ - - Usage: semver - -# CVE Identifier - -This validates that a string value is a valid cve id, defined in cve mitre. -More information on https://cve.mitre.org/ - - Usage: cve - -# Credit Card - -This validates that a string value contains a valid credit card number using Luhn algorithm. - - Usage: credit_card - -# Luhn Checksum - - Usage: luhn_checksum - -This validates that a string or (u)int value contains a valid checksum using the Luhn algorithm. - -# MongoDB - -This validates that a string is a valid 24 character hexadecimal string or valid connection string. - - Usage: mongodb - mongodb_connection_string - -Example: - - type Test struct { - ObjectIdField string `validate:"mongodb"` - ConnectionStringField string `validate:"mongodb_connection_string"` - } - -# Cron - -This validates that a string value contains a valid cron expression. - - Usage: cron - -# SpiceDb ObjectID/Permission/Object Type - -This validates that a string is valid for use with SpiceDb for the indicated purpose. If no purpose is given, a purpose of 'id' is assumed. - - Usage: spicedb=id|permission|type - -# Alias Validators and Tags - -Alias Validators and Tags -NOTE: When returning an error, the tag returned in "FieldError" will be -the alias tag unless the dive tag is part of the alias. Everything after the -dive tag is not reported as the alias tag. Also, the "ActualTag" in the before -case will be the actual tag within the alias that failed. - -Here is a list of the current built in alias tags: - - "iscolor" - alias is "hexcolor|rgb|rgba|hsl|hsla" (Usage: iscolor) - "country_code" - alias is "iso3166_1_alpha2|iso3166_1_alpha3|iso3166_1_alpha_numeric" (Usage: country_code) - -Validator notes: - - regex - a regex validator won't be added because commas and = signs can be part - of a regex which conflict with the validation definitions. Although - workarounds can be made, they take away from using pure regex's. - Furthermore it's quick and dirty but the regex's become harder to - maintain and are not reusable, so it's as much a programming philosophy - as anything. - - In place of this new validator functions should be created; a regex can - be used within the validator function and even be precompiled for better - efficiency within regexes.go. - - And the best reason, you can submit a pull request and we can keep on - adding to the validation library of this package! - -# Non standard validators - -A collection of validation rules that are frequently needed but are more -complex than the ones found in the baked in validators. -A non standard validator must be registered manually like you would -with your own custom validation functions. - -Example of registration and use: - - type Test struct { - TestField string `validate:"yourtag"` - } - - t := &Test{ - TestField: "Test" - } - - validate := validator.New() - validate.RegisterValidation("yourtag", validators.NotBlank) - -Here is a list of the current non standard validators: - - NotBlank - This validates that the value is not blank or with length zero. - For strings ensures they do not contain only spaces. For channels, maps, slices and arrays - ensures they don't have zero length. For others, a non empty value is required. - - Usage: notblank - -# Panics - -This package panics when bad input is provided, this is by design, bad code like -that should not make it to production. - - type Test struct { - TestField string `validate:"nonexistantfunction=1"` - } - - t := &Test{ - TestField: "Test" - } - - validate.Struct(t) // this will panic -*/ -package validator diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/errors.go b/go-controller/vendor/github.com/go-playground/validator/v10/errors.go deleted file mode 100644 index be2676e9e1..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/errors.go +++ /dev/null @@ -1,276 +0,0 @@ -package validator - -import ( - "bytes" - "fmt" - "reflect" - "strings" - - ut "github.com/go-playground/universal-translator" -) - -const ( - fieldErrMsg = "Key: '%s' Error:Field validation for '%s' failed on the '%s' tag" -) - -// ValidationErrorsTranslations is the translation return type -type ValidationErrorsTranslations map[string]string - -// InvalidValidationError describes an invalid argument passed to -// `Struct`, `StructExcept`, StructPartial` or `Field` -type InvalidValidationError struct { - Type reflect.Type -} - -// Error returns InvalidValidationError message -func (e *InvalidValidationError) Error() string { - - if e.Type == nil { - return "validator: (nil)" - } - - return "validator: (nil " + e.Type.String() + ")" -} - -// ValidationErrors is an array of FieldError's -// for use in custom error messages post validation. -type ValidationErrors []FieldError - -// Error is intended for use in development + debugging and not intended to be a production error message. -// It allows ValidationErrors to subscribe to the Error interface. -// All information to create an error message specific to your application is contained within -// the FieldError found within the ValidationErrors array -func (ve ValidationErrors) Error() string { - - buff := bytes.NewBufferString("") - - for i := 0; i < len(ve); i++ { - - buff.WriteString(ve[i].Error()) - buff.WriteString("\n") - } - - return strings.TrimSpace(buff.String()) -} - -// Translate translates all of the ValidationErrors -func (ve ValidationErrors) Translate(ut ut.Translator) ValidationErrorsTranslations { - - trans := make(ValidationErrorsTranslations) - - var fe *fieldError - - for i := 0; i < len(ve); i++ { - fe = ve[i].(*fieldError) - - // // in case an Anonymous struct was used, ensure that the key - // // would be 'Username' instead of ".Username" - // if len(fe.ns) > 0 && fe.ns[:1] == "." { - // trans[fe.ns[1:]] = fe.Translate(ut) - // continue - // } - - trans[fe.ns] = fe.Translate(ut) - } - - return trans -} - -// FieldError contains all functions to get error details -type FieldError interface { - - // Tag returns the validation tag that failed. if the - // validation was an alias, this will return the - // alias name and not the underlying tag that failed. - // - // eg. alias "iscolor": "hexcolor|rgb|rgba|hsl|hsla" - // will return "iscolor" - Tag() string - - // ActualTag returns the validation tag that failed, even if an - // alias the actual tag within the alias will be returned. - // If an 'or' validation fails the entire or will be returned. - // - // eg. alias "iscolor": "hexcolor|rgb|rgba|hsl|hsla" - // will return "hexcolor|rgb|rgba|hsl|hsla" - ActualTag() string - - // Namespace returns the namespace for the field error, with the tag - // name taking precedence over the field's actual name. - // - // eg. JSON name "User.fname" - // - // See StructNamespace() for a version that returns actual names. - // - // NOTE: this field can be blank when validating a single primitive field - // using validate.Field(...) as there is no way to extract it's name - Namespace() string - - // StructNamespace returns the namespace for the field error, with the field's - // actual name. - // - // eq. "User.FirstName" see Namespace for comparison - // - // NOTE: this field can be blank when validating a single primitive field - // using validate.Field(...) as there is no way to extract its name - StructNamespace() string - - // Field returns the fields name with the tag name taking precedence over the - // field's actual name. - // - // eq. JSON name "fname" - // see StructField for comparison - Field() string - - // StructField returns the field's actual name from the struct, when able to determine. - // - // eq. "FirstName" - // see Field for comparison - StructField() string - - // Value returns the actual field's value in case needed for creating the error - // message - Value() interface{} - - // Param returns the param value, in string form for comparison; this will also - // help with generating an error message - Param() string - - // Kind returns the Field's reflect Kind - // - // eg. time.Time's kind is a struct - Kind() reflect.Kind - - // Type returns the Field's reflect Type - // - // eg. time.Time's type is time.Time - Type() reflect.Type - - // Translate returns the FieldError's translated error - // from the provided 'ut.Translator' and registered 'TranslationFunc' - // - // NOTE: if no registered translator can be found it returns the same as - // calling fe.Error() - Translate(ut ut.Translator) string - - // Error returns the FieldError's message - Error() string -} - -// compile time interface checks -var _ FieldError = new(fieldError) -var _ error = new(fieldError) - -// fieldError contains a single field's validation error along -// with other properties that may be needed for error message creation -// it complies with the FieldError interface -type fieldError struct { - v *Validate - tag string - actualTag string - ns string - structNs string - fieldLen uint8 - structfieldLen uint8 - value interface{} - param string - kind reflect.Kind - typ reflect.Type -} - -// Tag returns the validation tag that failed. -func (fe *fieldError) Tag() string { - return fe.tag -} - -// ActualTag returns the validation tag that failed, even if an -// alias the actual tag within the alias will be returned. -func (fe *fieldError) ActualTag() string { - return fe.actualTag -} - -// Namespace returns the namespace for the field error, with the tag -// name taking precedence over the field's actual name. -func (fe *fieldError) Namespace() string { - return fe.ns -} - -// StructNamespace returns the namespace for the field error, with the field's -// actual name. -func (fe *fieldError) StructNamespace() string { - return fe.structNs -} - -// Field returns the field's name with the tag name taking precedence over the -// field's actual name. -func (fe *fieldError) Field() string { - - return fe.ns[len(fe.ns)-int(fe.fieldLen):] - // // return fe.field - // fld := fe.ns[len(fe.ns)-int(fe.fieldLen):] - - // log.Println("FLD:", fld) - - // if len(fld) > 0 && fld[:1] == "." { - // return fld[1:] - // } - - // return fld -} - -// StructField returns the field's actual name from the struct, when able to determine. -func (fe *fieldError) StructField() string { - // return fe.structField - return fe.structNs[len(fe.structNs)-int(fe.structfieldLen):] -} - -// Value returns the actual field's value in case needed for creating the error -// message -func (fe *fieldError) Value() interface{} { - return fe.value -} - -// Param returns the param value, in string form for comparison; this will -// also help with generating an error message -func (fe *fieldError) Param() string { - return fe.param -} - -// Kind returns the Field's reflect Kind -func (fe *fieldError) Kind() reflect.Kind { - return fe.kind -} - -// Type returns the Field's reflect Type -func (fe *fieldError) Type() reflect.Type { - return fe.typ -} - -// Error returns the fieldError's error message -func (fe *fieldError) Error() string { - return fmt.Sprintf(fieldErrMsg, fe.ns, fe.Field(), fe.tag) -} - -// Translate returns the FieldError's translated error -// from the provided 'ut.Translator' and registered 'TranslationFunc' -// -// NOTE: if no registered translation can be found, it returns the original -// untranslated error message. -func (fe *fieldError) Translate(ut ut.Translator) string { - var fn TranslationFunc - - m, ok := fe.v.transTagFunc[ut] - if !ok { - return fe.Error() - } - - fn, ok = m[fe.tag] - if !ok { - fn, ok = m[fe.actualTag] - if !ok { - return fe.Error() - } - } - - return fn(ut, fe) -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/field_level.go b/go-controller/vendor/github.com/go-playground/validator/v10/field_level.go deleted file mode 100644 index ef35826ee6..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/field_level.go +++ /dev/null @@ -1,120 +0,0 @@ -package validator - -import "reflect" - -// FieldLevel contains all the information and helper functions -// to validate a field -type FieldLevel interface { - - // Top returns the top level struct, if any - Top() reflect.Value - - // Parent returns the current fields parent struct, if any or - // the comparison value if called 'VarWithValue' - Parent() reflect.Value - - // Field returns current field for validation - Field() reflect.Value - - // FieldName returns the field's name with the tag - // name taking precedence over the fields actual name. - FieldName() string - - // StructFieldName returns the struct field's name - StructFieldName() string - - // Param returns param for validation against current field - Param() string - - // GetTag returns the current validations tag name - GetTag() string - - // ExtractType gets the actual underlying type of field value. - // It will dive into pointers, customTypes and return you the - // underlying value and it's kind. - ExtractType(field reflect.Value) (value reflect.Value, kind reflect.Kind, nullable bool) - - // GetStructFieldOK traverses the parent struct to retrieve a specific field denoted by the provided namespace - // in the param and returns the field, field kind and whether is was successful in retrieving - // the field at all. - // - // NOTE: when not successful ok will be false, this can happen when a nested struct is nil and so the field - // could not be retrieved because it didn't exist. - // - // Deprecated: Use GetStructFieldOK2() instead which also return if the value is nullable. - GetStructFieldOK() (reflect.Value, reflect.Kind, bool) - - // GetStructFieldOKAdvanced is the same as GetStructFieldOK except that it accepts the parent struct to start looking for - // the field and namespace allowing more extensibility for validators. - // - // Deprecated: Use GetStructFieldOKAdvanced2() instead which also return if the value is nullable. - GetStructFieldOKAdvanced(val reflect.Value, namespace string) (reflect.Value, reflect.Kind, bool) - - // GetStructFieldOK2 traverses the parent struct to retrieve a specific field denoted by the provided namespace - // in the param and returns the field, field kind, if it's a nullable type and whether is was successful in retrieving - // the field at all. - // - // NOTE: when not successful ok will be false, this can happen when a nested struct is nil and so the field - // could not be retrieved because it didn't exist. - GetStructFieldOK2() (reflect.Value, reflect.Kind, bool, bool) - - // GetStructFieldOKAdvanced2 is the same as GetStructFieldOK except that it accepts the parent struct to start looking for - // the field and namespace allowing more extensibility for validators. - GetStructFieldOKAdvanced2(val reflect.Value, namespace string) (reflect.Value, reflect.Kind, bool, bool) -} - -var _ FieldLevel = new(validate) - -// Field returns current field for validation -func (v *validate) Field() reflect.Value { - return v.flField -} - -// FieldName returns the field's name with the tag -// name taking precedence over the fields actual name. -func (v *validate) FieldName() string { - return v.cf.altName -} - -// GetTag returns the current validations tag name -func (v *validate) GetTag() string { - return v.ct.tag -} - -// StructFieldName returns the struct field's name -func (v *validate) StructFieldName() string { - return v.cf.name -} - -// Param returns param for validation against current field -func (v *validate) Param() string { - return v.ct.param -} - -// GetStructFieldOK returns Param returns param for validation against current field -// -// Deprecated: Use GetStructFieldOK2() instead which also return if the value is nullable. -func (v *validate) GetStructFieldOK() (reflect.Value, reflect.Kind, bool) { - current, kind, _, found := v.getStructFieldOKInternal(v.slflParent, v.ct.param) - return current, kind, found -} - -// GetStructFieldOKAdvanced is the same as GetStructFieldOK except that it accepts the parent struct to start looking for -// the field and namespace allowing more extensibility for validators. -// -// Deprecated: Use GetStructFieldOKAdvanced2() instead which also return if the value is nullable. -func (v *validate) GetStructFieldOKAdvanced(val reflect.Value, namespace string) (reflect.Value, reflect.Kind, bool) { - current, kind, _, found := v.GetStructFieldOKAdvanced2(val, namespace) - return current, kind, found -} - -// GetStructFieldOK2 returns Param returns param for validation against current field -func (v *validate) GetStructFieldOK2() (reflect.Value, reflect.Kind, bool, bool) { - return v.getStructFieldOKInternal(v.slflParent, v.ct.param) -} - -// GetStructFieldOKAdvanced2 is the same as GetStructFieldOK except that it accepts the parent struct to start looking for -// the field and namespace allowing more extensibility for validators. -func (v *validate) GetStructFieldOKAdvanced2(val reflect.Value, namespace string) (reflect.Value, reflect.Kind, bool, bool) { - return v.getStructFieldOKInternal(val, namespace) -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/logo.png b/go-controller/vendor/github.com/go-playground/validator/v10/logo.png deleted file mode 100644 index 355000f524..0000000000 Binary files a/go-controller/vendor/github.com/go-playground/validator/v10/logo.png and /dev/null differ diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/options.go b/go-controller/vendor/github.com/go-playground/validator/v10/options.go deleted file mode 100644 index 86a0db218e..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/options.go +++ /dev/null @@ -1,26 +0,0 @@ -package validator - -// Option represents a configurations option to be applied to validator during initialization. -type Option func(*Validate) - -// WithRequiredStructEnabled enables required tag on non-pointer structs to be applied instead of ignored. -// -// This was made opt-in behaviour in order to maintain backward compatibility with the behaviour previous -// to being able to apply struct level validations on struct fields directly. -// -// It is recommended you enabled this as it will be the default behaviour in v11+ -func WithRequiredStructEnabled() Option { - return func(v *Validate) { - v.requiredStructEnabled = true - } -} - -// WithPrivateFieldValidation activates validation for unexported fields via the use of the `unsafe` package. -// -// By opting into this feature you are acknowledging that you are aware of the risks and accept any current or future -// consequences of using this feature. -func WithPrivateFieldValidation() Option { - return func(v *Validate) { - v.privateFieldValidation = true - } -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/postcode_regexes.go b/go-controller/vendor/github.com/go-playground/validator/v10/postcode_regexes.go deleted file mode 100644 index 326b8f7538..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/postcode_regexes.go +++ /dev/null @@ -1,179 +0,0 @@ -package validator - -import ( - "regexp" - "sync" -) - -var postCodePatternDict = map[string]string{ - "GB": `^GIR[ ]?0AA|((AB|AL|B|BA|BB|BD|BH|BL|BN|BR|BS|BT|CA|CB|CF|CH|CM|CO|CR|CT|CV|CW|DA|DD|DE|DG|DH|DL|DN|DT|DY|E|EC|EH|EN|EX|FK|FY|G|GL|GY|GU|HA|HD|HG|HP|HR|HS|HU|HX|IG|IM|IP|IV|JE|KA|KT|KW|KY|L|LA|LD|LE|LL|LN|LS|LU|M|ME|MK|ML|N|NE|NG|NN|NP|NR|NW|OL|OX|PA|PE|PH|PL|PO|PR|RG|RH|RM|S|SA|SE|SG|SK|SL|SM|SN|SO|SP|SR|SS|ST|SW|SY|TA|TD|TF|TN|TQ|TR|TS|TW|UB|W|WA|WC|WD|WF|WN|WR|WS|WV|YO|ZE)(\d[\dA-Z]?[ ]?\d[ABD-HJLN-UW-Z]{2}))|BFPO[ ]?\d{1,4}$`, - "JE": `^JE\d[\dA-Z]?[ ]?\d[ABD-HJLN-UW-Z]{2}$`, - "GG": `^GY\d[\dA-Z]?[ ]?\d[ABD-HJLN-UW-Z]{2}$`, - "IM": `^IM\d[\dA-Z]?[ ]?\d[ABD-HJLN-UW-Z]{2}$`, - "US": `^\d{5}([ \-]\d{4})?$`, - "CA": `^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][ ]?\d[ABCEGHJ-NPRSTV-Z]\d$`, - "DE": `^\d{5}$`, - "JP": `^\d{3}-\d{4}$`, - "FR": `^\d{2}[ ]?\d{3}$`, - "AU": `^\d{4}$`, - "IT": `^\d{5}$`, - "CH": `^\d{4}$`, - "AT": `^\d{4}$`, - "ES": `^\d{5}$`, - "NL": `^\d{4}[ ]?[A-Z]{2}$`, - "BE": `^\d{4}$`, - "DK": `^\d{4}$`, - "SE": `^\d{3}[ ]?\d{2}$`, - "NO": `^\d{4}$`, - "BR": `^\d{5}[\-]?\d{3}$`, - "PT": `^\d{4}([\-]\d{3})?$`, - "FI": `^\d{5}$`, - "AX": `^22\d{3}$`, - "KR": `^\d{3}[\-]\d{3}$`, - "CN": `^\d{6}$`, - "TW": `^\d{3}(\d{2})?$`, - "SG": `^\d{6}$`, - "DZ": `^\d{5}$`, - "AD": `^AD\d{3}$`, - "AR": `^([A-HJ-NP-Z])?\d{4}([A-Z]{3})?$`, - "AM": `^(37)?\d{4}$`, - "AZ": `^\d{4}$`, - "BH": `^((1[0-2]|[2-9])\d{2})?$`, - "BD": `^\d{4}$`, - "BB": `^(BB\d{5})?$`, - "BY": `^\d{6}$`, - "BM": `^[A-Z]{2}[ ]?[A-Z0-9]{2}$`, - "BA": `^\d{5}$`, - "IO": `^BBND 1ZZ$`, - "BN": `^[A-Z]{2}[ ]?\d{4}$`, - "BG": `^\d{4}$`, - "KH": `^\d{5}$`, - "CV": `^\d{4}$`, - "CL": `^\d{7}$`, - "CR": `^\d{4,5}|\d{3}-\d{4}$`, - "HR": `^\d{5}$`, - "CY": `^\d{4}$`, - "CZ": `^\d{3}[ ]?\d{2}$`, - "DO": `^\d{5}$`, - "EC": `^([A-Z]\d{4}[A-Z]|(?:[A-Z]{2})?\d{6})?$`, - "EG": `^\d{5}$`, - "EE": `^\d{5}$`, - "FO": `^\d{3}$`, - "GE": `^\d{4}$`, - "GR": `^\d{3}[ ]?\d{2}$`, - "GL": `^39\d{2}$`, - "GT": `^\d{5}$`, - "HT": `^\d{4}$`, - "HN": `^(?:\d{5})?$`, - "HU": `^\d{4}$`, - "IS": `^\d{3}$`, - "IN": `^\d{6}$`, - "ID": `^\d{5}$`, - "IL": `^\d{5}$`, - "JO": `^\d{5}$`, - "KZ": `^\d{6}$`, - "KE": `^\d{5}$`, - "KW": `^\d{5}$`, - "LA": `^\d{5}$`, - "LV": `^\d{4}$`, - "LB": `^(\d{4}([ ]?\d{4})?)?$`, - "LI": `^(948[5-9])|(949[0-7])$`, - "LT": `^\d{5}$`, - "LU": `^\d{4}$`, - "MK": `^\d{4}$`, - "MY": `^\d{5}$`, - "MV": `^\d{5}$`, - "MT": `^[A-Z]{3}[ ]?\d{2,4}$`, - "MU": `^(\d{3}[A-Z]{2}\d{3})?$`, - "MX": `^\d{5}$`, - "MD": `^\d{4}$`, - "MC": `^980\d{2}$`, - "MA": `^\d{5}$`, - "NP": `^\d{5}$`, - "NZ": `^\d{4}$`, - "NI": `^((\d{4}-)?\d{3}-\d{3}(-\d{1})?)?$`, - "NG": `^(\d{6})?$`, - "OM": `^(PC )?\d{3}$`, - "PK": `^\d{5}$`, - "PY": `^\d{4}$`, - "PH": `^\d{4}$`, - "PL": `^\d{2}-\d{3}$`, - "PR": `^00[679]\d{2}([ \-]\d{4})?$`, - "RO": `^\d{6}$`, - "RU": `^\d{6}$`, - "SM": `^4789\d$`, - "SA": `^\d{5}$`, - "SN": `^\d{5}$`, - "SK": `^\d{3}[ ]?\d{2}$`, - "SI": `^\d{4}$`, - "ZA": `^\d{4}$`, - "LK": `^\d{5}$`, - "TJ": `^\d{6}$`, - "TH": `^\d{5}$`, - "TN": `^\d{4}$`, - "TR": `^\d{5}$`, - "TM": `^\d{6}$`, - "UA": `^\d{5}$`, - "UY": `^\d{5}$`, - "UZ": `^\d{6}$`, - "VA": `^00120$`, - "VE": `^\d{4}$`, - "ZM": `^\d{5}$`, - "AS": `^96799$`, - "CC": `^6799$`, - "CK": `^\d{4}$`, - "RS": `^\d{6}$`, - "ME": `^8\d{4}$`, - "CS": `^\d{5}$`, - "YU": `^\d{5}$`, - "CX": `^6798$`, - "ET": `^\d{4}$`, - "FK": `^FIQQ 1ZZ$`, - "NF": `^2899$`, - "FM": `^(9694[1-4])([ \-]\d{4})?$`, - "GF": `^9[78]3\d{2}$`, - "GN": `^\d{3}$`, - "GP": `^9[78][01]\d{2}$`, - "GS": `^SIQQ 1ZZ$`, - "GU": `^969[123]\d([ \-]\d{4})?$`, - "GW": `^\d{4}$`, - "HM": `^\d{4}$`, - "IQ": `^\d{5}$`, - "KG": `^\d{6}$`, - "LR": `^\d{4}$`, - "LS": `^\d{3}$`, - "MG": `^\d{3}$`, - "MH": `^969[67]\d([ \-]\d{4})?$`, - "MN": `^\d{6}$`, - "MP": `^9695[012]([ \-]\d{4})?$`, - "MQ": `^9[78]2\d{2}$`, - "NC": `^988\d{2}$`, - "NE": `^\d{4}$`, - "VI": `^008(([0-4]\d)|(5[01]))([ \-]\d{4})?$`, - "VN": `^[0-9]{1,6}$`, - "PF": `^987\d{2}$`, - "PG": `^\d{3}$`, - "PM": `^9[78]5\d{2}$`, - "PN": `^PCRN 1ZZ$`, - "PW": `^96940$`, - "RE": `^9[78]4\d{2}$`, - "SH": `^(ASCN|STHL) 1ZZ$`, - "SJ": `^\d{4}$`, - "SO": `^\d{5}$`, - "SZ": `^[HLMS]\d{3}$`, - "TC": `^TKCA 1ZZ$`, - "WF": `^986\d{2}$`, - "XK": `^\d{5}$`, - "YT": `^976\d{2}$`, -} - -var ( - postcodeRegexInit sync.Once - postCodeRegexDict = map[string]*regexp.Regexp{} -) - -func initPostcodes() { - for countryCode, pattern := range postCodePatternDict { - postCodeRegexDict[countryCode] = regexp.MustCompile(pattern) - } -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/regexes.go b/go-controller/vendor/github.com/go-playground/validator/v10/regexes.go deleted file mode 100644 index 93909b2e50..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/regexes.go +++ /dev/null @@ -1,165 +0,0 @@ -package validator - -import ( - "regexp" - "sync" -) - -const ( - alphaRegexString = "^[a-zA-Z]+$" - alphaNumericRegexString = "^[a-zA-Z0-9]+$" - alphaUnicodeRegexString = "^[\\p{L}]+$" - alphaUnicodeNumericRegexString = "^[\\p{L}\\p{N}]+$" - numericRegexString = "^[-+]?[0-9]+(?:\\.[0-9]+)?$" - numberRegexString = "^[0-9]+$" - hexadecimalRegexString = "^(0[xX])?[0-9a-fA-F]+$" - hexColorRegexString = "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$" - rgbRegexString = "^rgb\\(\\s*(?:(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])|(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%)\\s*\\)$" - rgbaRegexString = "^rgba\\(\\s*(?:(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])|(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%)\\s*,\\s*(?:(?:0.[1-9]*)|[01])\\s*\\)$" - hslRegexString = "^hsl\\(\\s*(?:0|[1-9]\\d?|[12]\\d\\d|3[0-5]\\d|360)\\s*,\\s*(?:(?:0|[1-9]\\d?|100)%)\\s*,\\s*(?:(?:0|[1-9]\\d?|100)%)\\s*\\)$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A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(?:(?:[a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(?:(?:[a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])(?:[a-zA-Z]|\\d|-|\\.|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*(?:[a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$" - e164RegexString = "^\\+[1-9]?[0-9]{7,14}$" - base32RegexString = "^(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}={6}|[A-Z2-7]{4}={4}|[A-Z2-7]{5}={3}|[A-Z2-7]{7}=|[A-Z2-7]{8})$" - base64RegexString = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" - base64URLRegexString = "^(?:[A-Za-z0-9-_]{4})*(?:[A-Za-z0-9-_]{2}==|[A-Za-z0-9-_]{3}=|[A-Za-z0-9-_]{4})$" - base64RawURLRegexString = "^(?:[A-Za-z0-9-_]{4})*(?:[A-Za-z0-9-_]{2,4})$" - iSBN10RegexString = "^(?:[0-9]{9}X|[0-9]{10})$" - iSBN13RegexString = "^(?:(?:97(?:8|9))[0-9]{10})$" - iSSNRegexString = "^(?:[0-9]{4}-[0-9]{3}[0-9X])$" - uUID3RegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" - uUID4RegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - uUID5RegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - uUIDRegexString = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" - uUID3RFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-3[0-9a-fA-F]{3}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" - uUID4RFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - uUID5RFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-5[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" - uUIDRFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" - uLIDRegexString = "^(?i)[A-HJKMNP-TV-Z0-9]{26}$" - md4RegexString = "^[0-9a-f]{32}$" - md5RegexString = "^[0-9a-f]{32}$" - sha256RegexString = "^[0-9a-f]{64}$" - sha384RegexString = "^[0-9a-f]{96}$" - sha512RegexString = "^[0-9a-f]{128}$" - ripemd128RegexString = "^[0-9a-f]{32}$" - ripemd160RegexString = "^[0-9a-f]{40}$" - tiger128RegexString = "^[0-9a-f]{32}$" - tiger160RegexString = "^[0-9a-f]{40}$" - tiger192RegexString = "^[0-9a-f]{48}$" - aSCIIRegexString = "^[\x00-\x7F]*$" - printableASCIIRegexString = "^[\x20-\x7E]*$" - multibyteRegexString = "[^\x00-\x7F]" - dataURIRegexString = `^data:((?:\w+\/(?:([^;]|;[^;]).)+)?)` - latitudeRegexString = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$" - longitudeRegexString = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" - sSNRegexString = `^[0-9]{3}[ -]?(0[1-9]|[1-9][0-9])[ -]?([1-9][0-9]{3}|[0-9][1-9][0-9]{2}|[0-9]{2}[1-9][0-9]|[0-9]{3}[1-9])$` - hostnameRegexStringRFC952 = `^[a-zA-Z]([a-zA-Z0-9\-]+[\.]?)*[a-zA-Z0-9]$` // https://tools.ietf.org/html/rfc952 - hostnameRegexStringRFC1123 = `^([a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,62}){1}(\.[a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,62})*?$` // accepts hostname starting with a digit https://tools.ietf.org/html/rfc1123 - fqdnRegexStringRFC1123 = `^([a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,62})(\.[a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,62})*?(\.[a-zA-Z]{1}[a-zA-Z0-9]{0,62})\.?$` // same as hostnameRegexStringRFC1123 but must contain a non numerical TLD (possibly ending with '.') - btcAddressRegexString = `^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$` // bitcoin address - btcAddressUpperRegexStringBech32 = `^BC1[02-9AC-HJ-NP-Z]{7,76}$` // bitcoin bech32 address https://en.bitcoin.it/wiki/Bech32 - btcAddressLowerRegexStringBech32 = `^bc1[02-9ac-hj-np-z]{7,76}$` // bitcoin bech32 address https://en.bitcoin.it/wiki/Bech32 - ethAddressRegexString = `^0x[0-9a-fA-F]{40}$` - ethAddressUpperRegexString = `^0x[0-9A-F]{40}$` - ethAddressLowerRegexString = `^0x[0-9a-f]{40}$` - uRLEncodedRegexString = `^(?:[^%]|%[0-9A-Fa-f]{2})*$` - hTMLEncodedRegexString = `&#[x]?([0-9a-fA-F]{2})|(>)|(<)|(")|(&)+[;]?` - hTMLRegexString = `<[/]?([a-zA-Z]+).*?>` - jWTRegexString = "^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$" - splitParamsRegexString = `'[^']*'|\S+` - bicRegexString = `^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$` - semverRegexString = `^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$` // numbered capture groups https://semver.org/ - dnsRegexStringRFC1035Label = "^[a-z]([-a-z0-9]*[a-z0-9])?$" - cveRegexString = `^CVE-(1999|2\d{3})-(0[^0]\d{2}|0\d[^0]\d{1}|0\d{2}[^0]|[1-9]{1}\d{3,})$` // CVE Format Id https://cve.mitre.org/cve/identifiers/syntaxchange.html - mongodbIdRegexString = "^[a-f\\d]{24}$" - mongodbConnStringRegexString = "^mongodb(\\+srv)?:\\/\\/(([a-zA-Z\\d]+):([a-zA-Z\\d$:\\/?#\\[\\]@]+)@)?(([a-z\\d.-]+)(:[\\d]+)?)((,(([a-z\\d.-]+)(:(\\d+))?))*)?(\\/[a-zA-Z-_]{1,64})?(\\?(([a-zA-Z]+)=([a-zA-Z\\d]+))(&(([a-zA-Z\\d]+)=([a-zA-Z\\d]+))?)*)?$" - cronRegexString = `(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|((\*|\d+)(\/|-)\d+)|\d+|\*) ?){5,7})` - spicedbIDRegexString = `^(([a-zA-Z0-9/_|\-=+]{1,})|\*)$` - spicedbPermissionRegexString = "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$" - spicedbTypeRegexString = "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$" - einRegexString = "^(\\d{2}-\\d{7})$" -) - -func lazyRegexCompile(str string) func() *regexp.Regexp { - var regex *regexp.Regexp - var once sync.Once - return func() *regexp.Regexp { - once.Do(func() { - regex = regexp.MustCompile(str) - }) - return regex - } -} - -var ( - alphaRegex = lazyRegexCompile(alphaRegexString) - alphaNumericRegex = lazyRegexCompile(alphaNumericRegexString) - alphaUnicodeRegex = lazyRegexCompile(alphaUnicodeRegexString) - alphaUnicodeNumericRegex = lazyRegexCompile(alphaUnicodeNumericRegexString) - numericRegex = lazyRegexCompile(numericRegexString) - numberRegex = lazyRegexCompile(numberRegexString) - hexadecimalRegex = lazyRegexCompile(hexadecimalRegexString) - hexColorRegex = lazyRegexCompile(hexColorRegexString) - rgbRegex = lazyRegexCompile(rgbRegexString) - rgbaRegex = lazyRegexCompile(rgbaRegexString) - hslRegex = lazyRegexCompile(hslRegexString) - hslaRegex = lazyRegexCompile(hslaRegexString) - e164Regex = lazyRegexCompile(e164RegexString) - emailRegex = lazyRegexCompile(emailRegexString) - base32Regex = lazyRegexCompile(base32RegexString) - base64Regex = lazyRegexCompile(base64RegexString) - base64URLRegex = lazyRegexCompile(base64URLRegexString) - base64RawURLRegex = lazyRegexCompile(base64RawURLRegexString) - iSBN10Regex = lazyRegexCompile(iSBN10RegexString) - iSBN13Regex = lazyRegexCompile(iSBN13RegexString) - iSSNRegex = lazyRegexCompile(iSSNRegexString) - uUID3Regex = lazyRegexCompile(uUID3RegexString) - uUID4Regex = lazyRegexCompile(uUID4RegexString) - uUID5Regex = lazyRegexCompile(uUID5RegexString) - uUIDRegex = lazyRegexCompile(uUIDRegexString) - uUID3RFC4122Regex = lazyRegexCompile(uUID3RFC4122RegexString) - uUID4RFC4122Regex = lazyRegexCompile(uUID4RFC4122RegexString) - uUID5RFC4122Regex = lazyRegexCompile(uUID5RFC4122RegexString) - uUIDRFC4122Regex = lazyRegexCompile(uUIDRFC4122RegexString) - uLIDRegex = lazyRegexCompile(uLIDRegexString) - md4Regex = lazyRegexCompile(md4RegexString) - md5Regex = lazyRegexCompile(md5RegexString) - sha256Regex = lazyRegexCompile(sha256RegexString) - sha384Regex = lazyRegexCompile(sha384RegexString) - sha512Regex = lazyRegexCompile(sha512RegexString) - ripemd128Regex = lazyRegexCompile(ripemd128RegexString) - ripemd160Regex = lazyRegexCompile(ripemd160RegexString) - tiger128Regex = lazyRegexCompile(tiger128RegexString) - tiger160Regex = lazyRegexCompile(tiger160RegexString) - tiger192Regex = lazyRegexCompile(tiger192RegexString) - aSCIIRegex = lazyRegexCompile(aSCIIRegexString) - printableASCIIRegex = lazyRegexCompile(printableASCIIRegexString) - multibyteRegex = lazyRegexCompile(multibyteRegexString) - dataURIRegex = lazyRegexCompile(dataURIRegexString) - latitudeRegex = lazyRegexCompile(latitudeRegexString) - longitudeRegex = lazyRegexCompile(longitudeRegexString) - sSNRegex = lazyRegexCompile(sSNRegexString) - hostnameRegexRFC952 = lazyRegexCompile(hostnameRegexStringRFC952) - hostnameRegexRFC1123 = lazyRegexCompile(hostnameRegexStringRFC1123) - fqdnRegexRFC1123 = lazyRegexCompile(fqdnRegexStringRFC1123) - btcAddressRegex = lazyRegexCompile(btcAddressRegexString) - btcUpperAddressRegexBech32 = lazyRegexCompile(btcAddressUpperRegexStringBech32) - btcLowerAddressRegexBech32 = lazyRegexCompile(btcAddressLowerRegexStringBech32) - ethAddressRegex = lazyRegexCompile(ethAddressRegexString) - uRLEncodedRegex = lazyRegexCompile(uRLEncodedRegexString) - hTMLEncodedRegex = lazyRegexCompile(hTMLEncodedRegexString) - hTMLRegex = lazyRegexCompile(hTMLRegexString) - jWTRegex = lazyRegexCompile(jWTRegexString) - splitParamsRegex = lazyRegexCompile(splitParamsRegexString) - bicRegex = lazyRegexCompile(bicRegexString) - semverRegex = lazyRegexCompile(semverRegexString) - dnsRegexRFC1035Label = lazyRegexCompile(dnsRegexStringRFC1035Label) - cveRegex = lazyRegexCompile(cveRegexString) - mongodbIdRegex = lazyRegexCompile(mongodbIdRegexString) - mongodbConnectionRegex = lazyRegexCompile(mongodbConnStringRegexString) - cronRegex = lazyRegexCompile(cronRegexString) - spicedbIDRegex = lazyRegexCompile(spicedbIDRegexString) - spicedbPermissionRegex = lazyRegexCompile(spicedbPermissionRegexString) - spicedbTypeRegex = lazyRegexCompile(spicedbTypeRegexString) - einRegex = lazyRegexCompile(einRegexString) -) diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/struct_level.go b/go-controller/vendor/github.com/go-playground/validator/v10/struct_level.go deleted file mode 100644 index fa7af9dd50..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/struct_level.go +++ /dev/null @@ -1,175 +0,0 @@ -package validator - -import ( - "context" - "reflect" -) - -// StructLevelFunc accepts all values needed for struct level validation -type StructLevelFunc func(sl StructLevel) - -// StructLevelFuncCtx accepts all values needed for struct level validation -// but also allows passing of contextual validation information via context.Context. -type StructLevelFuncCtx func(ctx context.Context, sl StructLevel) - -// wrapStructLevelFunc wraps normal StructLevelFunc makes it compatible with StructLevelFuncCtx -func wrapStructLevelFunc(fn StructLevelFunc) StructLevelFuncCtx { - return func(ctx context.Context, sl StructLevel) { - fn(sl) - } -} - -// StructLevel contains all the information and helper functions -// to validate a struct -type StructLevel interface { - - // Validator returns the main validation object, in case one wants to call validations internally. - // this is so you don't have to use anonymous functions to get access to the validate - // instance. - Validator() *Validate - - // Top returns the top level struct, if any - Top() reflect.Value - - // Parent returns the current fields parent struct, if any - Parent() reflect.Value - - // Current returns the current struct. - Current() reflect.Value - - // ExtractType gets the actual underlying type of field value. - // It will dive into pointers, customTypes and return you the - // underlying value and its kind. - ExtractType(field reflect.Value) (value reflect.Value, kind reflect.Kind, nullable bool) - - // ReportError reports an error just by passing the field and tag information - // - // NOTES: - // - // fieldName and structFieldName get appended to the existing - // namespace that validator is on. e.g. pass 'FirstName' or - // 'Names[0]' depending on the nesting - // - // tag can be an existing validation tag or just something you make up - // and process on the flip side it's up to you. - ReportError(field interface{}, fieldName, structFieldName string, tag, param string) - - // ReportValidationErrors reports an error just by passing ValidationErrors - // - // NOTES: - // - // relativeNamespace and relativeActualNamespace get appended to the - // existing namespace that validator is on. - // e.g. pass 'User.FirstName' or 'Users[0].FirstName' depending - // on the nesting. most of the time they will be blank, unless you validate - // at a level lower the current field depth - ReportValidationErrors(relativeNamespace, relativeActualNamespace string, errs ValidationErrors) -} - -var _ StructLevel = new(validate) - -// Top returns the top level struct -// -// NOTE: this can be the same as the current struct being validated -// if not is a nested struct. -// -// this is only called when within Struct and Field Level validation and -// should not be relied upon for an accurate value otherwise. -func (v *validate) Top() reflect.Value { - return v.top -} - -// Parent returns the current structs parent -// -// NOTE: this can be the same as the current struct being validated -// if not is a nested struct. -// -// this is only called when within Struct and Field Level validation and -// should not be relied upon for an accurate value otherwise. -func (v *validate) Parent() reflect.Value { - return v.slflParent -} - -// Current returns the current struct. -func (v *validate) Current() reflect.Value { - return v.slCurrent -} - -// Validator returns the main validation object, in case one want to call validations internally. -func (v *validate) Validator() *Validate { - return v.v -} - -// ExtractType gets the actual underlying type of field value. -func (v *validate) ExtractType(field reflect.Value) (reflect.Value, reflect.Kind, bool) { - return v.extractTypeInternal(field, false) -} - -// ReportError reports an error just by passing the field and tag information -func (v *validate) ReportError(field interface{}, fieldName, structFieldName, tag, param string) { - - fv, kind, _ := v.extractTypeInternal(reflect.ValueOf(field), false) - - if len(structFieldName) == 0 { - structFieldName = fieldName - } - - v.str1 = string(append(v.ns, fieldName...)) - - if v.v.hasTagNameFunc || fieldName != structFieldName { - v.str2 = string(append(v.actualNs, structFieldName...)) - } else { - v.str2 = v.str1 - } - - if kind == reflect.Invalid { - - v.errs = append(v.errs, - &fieldError{ - v: v.v, - tag: tag, - actualTag: tag, - ns: v.str1, - structNs: v.str2, - fieldLen: uint8(len(fieldName)), - structfieldLen: uint8(len(structFieldName)), - param: param, - kind: kind, - }, - ) - return - } - - v.errs = append(v.errs, - &fieldError{ - v: v.v, - tag: tag, - actualTag: tag, - ns: v.str1, - structNs: v.str2, - fieldLen: uint8(len(fieldName)), - structfieldLen: uint8(len(structFieldName)), - value: fv.Interface(), - param: param, - kind: kind, - typ: fv.Type(), - }, - ) -} - -// ReportValidationErrors reports ValidationErrors obtained from running validations within the Struct Level validation. -// -// NOTE: this function prepends the current namespace to the relative ones. -func (v *validate) ReportValidationErrors(relativeNamespace, relativeStructNamespace string, errs ValidationErrors) { - - var err *fieldError - - for i := 0; i < len(errs); i++ { - - err = errs[i].(*fieldError) - err.ns = string(append(append(v.ns, relativeNamespace...), err.ns...)) - err.structNs = string(append(append(v.actualNs, relativeStructNamespace...), err.structNs...)) - - v.errs = append(v.errs, err) - } -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/translations.go b/go-controller/vendor/github.com/go-playground/validator/v10/translations.go deleted file mode 100644 index 4d9d75c13a..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/translations.go +++ /dev/null @@ -1,11 +0,0 @@ -package validator - -import ut "github.com/go-playground/universal-translator" - -// TranslationFunc is the function type used to register or override -// custom translations -type TranslationFunc func(ut ut.Translator, fe FieldError) string - -// RegisterTranslationsFunc allows for registering of translations -// for a 'ut.Translator' for use within the 'TranslationFunc' -type RegisterTranslationsFunc func(ut ut.Translator) error diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/util.go b/go-controller/vendor/github.com/go-playground/validator/v10/util.go deleted file mode 100644 index 9285223a2f..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/util.go +++ /dev/null @@ -1,312 +0,0 @@ -package validator - -import ( - "fmt" - "reflect" - "regexp" - "strconv" - "strings" - "time" -) - -// extractTypeInternal gets the actual underlying type of field value. -// It will dive into pointers, customTypes and return you the -// underlying value and it's kind. -func (v *validate) extractTypeInternal(current reflect.Value, nullable bool) (reflect.Value, reflect.Kind, bool) { - -BEGIN: - switch current.Kind() { - case reflect.Ptr: - - nullable = true - - if current.IsNil() { - return current, reflect.Ptr, nullable - } - - current = current.Elem() - goto BEGIN - - case reflect.Interface: - - nullable = true - - if current.IsNil() { - return current, reflect.Interface, nullable - } - - current = current.Elem() - goto BEGIN - - case reflect.Invalid: - return current, reflect.Invalid, nullable - - default: - - if v.v.hasCustomFuncs { - - if fn, ok := v.v.customFuncs[current.Type()]; ok { - current = reflect.ValueOf(fn(current)) - goto BEGIN - } - } - - return current, current.Kind(), nullable - } -} - -// getStructFieldOKInternal traverses a struct to retrieve a specific field denoted by the provided namespace and -// returns the field, field kind and whether is was successful in retrieving the field at all. -// -// NOTE: when not successful ok will be false, this can happen when a nested struct is nil and so the field -// could not be retrieved because it didn't exist. -func (v *validate) getStructFieldOKInternal(val reflect.Value, namespace string) (current reflect.Value, kind reflect.Kind, nullable bool, found bool) { - -BEGIN: - current, kind, nullable = v.ExtractType(val) - if kind == reflect.Invalid { - return - } - - if namespace == "" { - found = true - return - } - - switch kind { - - case reflect.Ptr, reflect.Interface: - return - - case reflect.Struct: - - typ := current.Type() - fld := namespace - var ns string - - if !typ.ConvertibleTo(timeType) { - - idx := strings.Index(namespace, namespaceSeparator) - - if idx != -1 { - fld = namespace[:idx] - ns = namespace[idx+1:] - } else { - ns = "" - } - - bracketIdx := strings.Index(fld, leftBracket) - if bracketIdx != -1 { - fld = fld[:bracketIdx] - - ns = namespace[bracketIdx:] - } - - val = current.FieldByName(fld) - namespace = ns - goto BEGIN - } - - case reflect.Array, reflect.Slice: - idx := strings.Index(namespace, leftBracket) - idx2 := strings.Index(namespace, rightBracket) - - arrIdx, _ := strconv.Atoi(namespace[idx+1 : idx2]) - - if arrIdx >= current.Len() { - return - } - - startIdx := idx2 + 1 - - if startIdx < len(namespace) { - if namespace[startIdx:startIdx+1] == namespaceSeparator { - startIdx++ - } - } - - val = current.Index(arrIdx) - namespace = namespace[startIdx:] - goto BEGIN - - case reflect.Map: - idx := strings.Index(namespace, leftBracket) + 1 - idx2 := strings.Index(namespace, rightBracket) - - endIdx := idx2 - - if endIdx+1 < len(namespace) { - if namespace[endIdx+1:endIdx+2] == namespaceSeparator { - endIdx++ - } - } - - key := namespace[idx:idx2] - - switch current.Type().Key().Kind() { - case reflect.Int: - i, _ := strconv.Atoi(key) - val = current.MapIndex(reflect.ValueOf(i)) - namespace = namespace[endIdx+1:] - - case reflect.Int8: - i, _ := strconv.ParseInt(key, 10, 8) - val = current.MapIndex(reflect.ValueOf(int8(i))) - namespace = namespace[endIdx+1:] - - case reflect.Int16: - i, _ := strconv.ParseInt(key, 10, 16) - val = current.MapIndex(reflect.ValueOf(int16(i))) - namespace = namespace[endIdx+1:] - - case reflect.Int32: - i, _ := strconv.ParseInt(key, 10, 32) - val = current.MapIndex(reflect.ValueOf(int32(i))) - namespace = namespace[endIdx+1:] - - case reflect.Int64: - i, _ := strconv.ParseInt(key, 10, 64) - val = current.MapIndex(reflect.ValueOf(i)) - namespace = namespace[endIdx+1:] - - case reflect.Uint: - i, _ := strconv.ParseUint(key, 10, 0) - val = current.MapIndex(reflect.ValueOf(uint(i))) - namespace = namespace[endIdx+1:] - - case reflect.Uint8: - i, _ := strconv.ParseUint(key, 10, 8) - val = current.MapIndex(reflect.ValueOf(uint8(i))) - namespace = namespace[endIdx+1:] - - case reflect.Uint16: - i, _ := strconv.ParseUint(key, 10, 16) - val = current.MapIndex(reflect.ValueOf(uint16(i))) - namespace = namespace[endIdx+1:] - - case reflect.Uint32: - i, _ := strconv.ParseUint(key, 10, 32) - val = current.MapIndex(reflect.ValueOf(uint32(i))) - namespace = namespace[endIdx+1:] - - case reflect.Uint64: - i, _ := strconv.ParseUint(key, 10, 64) - val = current.MapIndex(reflect.ValueOf(i)) - namespace = namespace[endIdx+1:] - - case reflect.Float32: - f, _ := strconv.ParseFloat(key, 32) - val = current.MapIndex(reflect.ValueOf(float32(f))) - namespace = namespace[endIdx+1:] - - case reflect.Float64: - f, _ := strconv.ParseFloat(key, 64) - val = current.MapIndex(reflect.ValueOf(f)) - namespace = namespace[endIdx+1:] - - case reflect.Bool: - b, _ := strconv.ParseBool(key) - val = current.MapIndex(reflect.ValueOf(b)) - namespace = namespace[endIdx+1:] - - // reflect.Type = string - default: - val = current.MapIndex(reflect.ValueOf(key)) - namespace = namespace[endIdx+1:] - } - - goto BEGIN - } - - // if got here there was more namespace, cannot go any deeper - panic("Invalid field namespace") -} - -// asInt returns the parameter as a int64 -// or panics if it can't convert -func asInt(param string) int64 { - i, err := strconv.ParseInt(param, 0, 64) - panicIf(err) - - return i -} - -// asIntFromTimeDuration parses param as time.Duration and returns it as int64 -// or panics on error. -func asIntFromTimeDuration(param string) int64 { - d, err := time.ParseDuration(param) - if err != nil { - // attempt parsing as an integer assuming nanosecond precision - return asInt(param) - } - return int64(d) -} - -// asIntFromType calls the proper function to parse param as int64, -// given a field's Type t. -func asIntFromType(t reflect.Type, param string) int64 { - switch t { - case timeDurationType: - return asIntFromTimeDuration(param) - default: - return asInt(param) - } -} - -// asUint returns the parameter as a uint64 -// or panics if it can't convert -func asUint(param string) uint64 { - - i, err := strconv.ParseUint(param, 0, 64) - panicIf(err) - - return i -} - -// asFloat64 returns the parameter as a float64 -// or panics if it can't convert -func asFloat64(param string) float64 { - i, err := strconv.ParseFloat(param, 64) - panicIf(err) - return i -} - -// asFloat32 returns the parameter as a float32 -// or panics if it can't convert -func asFloat32(param string) float64 { - i, err := strconv.ParseFloat(param, 32) - panicIf(err) - return i -} - -// asBool returns the parameter as a bool -// or panics if it can't convert -func asBool(param string) bool { - - i, err := strconv.ParseBool(param) - panicIf(err) - - return i -} - -func panicIf(err error) { - if err != nil { - panic(err.Error()) - } -} - -// Checks if field value matches regex. If fl.Field can be cast to Stringer, it uses the Stringer interfaces -// String() return value. Otherwise, it uses fl.Field's String() value. -func fieldMatchesRegexByStringerValOrString(regexFn func() *regexp.Regexp, fl FieldLevel) bool { - regex := regexFn() - switch fl.Field().Kind() { - case reflect.String: - return regex.MatchString(fl.Field().String()) - default: - if stringer, ok := fl.Field().Interface().(fmt.Stringer); ok { - return regex.MatchString(stringer.String()) - } else { - return regex.MatchString(fl.Field().String()) - } - } -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/validator.go b/go-controller/vendor/github.com/go-playground/validator/v10/validator.go deleted file mode 100644 index d7c2e65863..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/validator.go +++ /dev/null @@ -1,527 +0,0 @@ -package validator - -import ( - "context" - "fmt" - "reflect" - "strconv" - "unsafe" -) - -// per validate construct -type validate struct { - v *Validate - top reflect.Value - ns []byte - actualNs []byte - errs ValidationErrors - includeExclude map[string]struct{} // reset only if StructPartial or StructExcept are called, no need otherwise - ffn FilterFunc - slflParent reflect.Value // StructLevel & FieldLevel - slCurrent reflect.Value // StructLevel & FieldLevel - flField reflect.Value // StructLevel & FieldLevel - cf *cField // StructLevel & FieldLevel - ct *cTag // StructLevel & FieldLevel - misc []byte // misc reusable - str1 string // misc reusable - str2 string // misc reusable - fldIsPointer bool // StructLevel & FieldLevel - isPartial bool - hasExcludes bool -} - -// parent and current will be the same the first run of validateStruct -func (v *validate) validateStruct(ctx context.Context, parent reflect.Value, current reflect.Value, typ reflect.Type, ns []byte, structNs []byte, ct *cTag) { - - cs, ok := v.v.structCache.Get(typ) - if !ok { - cs = v.v.extractStructCache(current, typ.Name()) - } - - if len(ns) == 0 && len(cs.name) != 0 { - - ns = append(ns, cs.name...) - ns = append(ns, '.') - - structNs = append(structNs, cs.name...) - structNs = append(structNs, '.') - } - - // ct is nil on top level struct, and structs as fields that have no tag info - // so if nil or if not nil and the structonly tag isn't present - if ct == nil || ct.typeof != typeStructOnly { - - var f *cField - - for i := 0; i < len(cs.fields); i++ { - - f = cs.fields[i] - - if v.isPartial { - - if v.ffn != nil { - // used with StructFiltered - if v.ffn(append(structNs, f.name...)) { - continue - } - - } else { - // used with StructPartial & StructExcept - _, ok = v.includeExclude[string(append(structNs, f.name...))] - - if (ok && v.hasExcludes) || (!ok && !v.hasExcludes) { - continue - } - } - } - - v.traverseField(ctx, current, current.Field(f.idx), ns, structNs, f, f.cTags) - } - } - - // check if any struct level validations, after all field validations already checked. - // first iteration will have no info about nostructlevel tag, and is checked prior to - // calling the next iteration of validateStruct called from traverseField. - if cs.fn != nil { - - v.slflParent = parent - v.slCurrent = current - v.ns = ns - v.actualNs = structNs - - cs.fn(ctx, v) - } -} - -// traverseField validates any field, be it a struct or single field, ensures it's validity and passes it along to be validated via it's tag options -func (v *validate) traverseField(ctx context.Context, parent reflect.Value, current reflect.Value, ns []byte, structNs []byte, cf *cField, ct *cTag) { - var typ reflect.Type - var kind reflect.Kind - - current, kind, v.fldIsPointer = v.extractTypeInternal(current, false) - - var isNestedStruct bool - - switch kind { - case reflect.Ptr, reflect.Interface, reflect.Invalid: - - if ct == nil { - return - } - - if ct.typeof == typeOmitEmpty || ct.typeof == typeIsDefault { - return - } - - if ct.typeof == typeOmitNil && (kind != reflect.Invalid && current.IsNil()) { - return - } - - if ct.typeof == typeOmitZero { - return - } - - if ct.hasTag { - if kind == reflect.Invalid { - v.str1 = string(append(ns, cf.altName...)) - if v.v.hasTagNameFunc { - v.str2 = string(append(structNs, cf.name...)) - } else { - v.str2 = v.str1 - } - v.errs = append(v.errs, - &fieldError{ - v: v.v, - tag: ct.aliasTag, - actualTag: ct.tag, - ns: v.str1, - structNs: v.str2, - fieldLen: uint8(len(cf.altName)), - structfieldLen: uint8(len(cf.name)), - param: ct.param, - kind: kind, - }, - ) - return - } - - v.str1 = string(append(ns, cf.altName...)) - if v.v.hasTagNameFunc { - v.str2 = string(append(structNs, cf.name...)) - } else { - v.str2 = v.str1 - } - if !ct.runValidationWhenNil { - v.errs = append(v.errs, - &fieldError{ - v: v.v, - tag: ct.aliasTag, - actualTag: ct.tag, - ns: v.str1, - structNs: v.str2, - fieldLen: uint8(len(cf.altName)), - structfieldLen: uint8(len(cf.name)), - value: getValue(current), - param: ct.param, - kind: kind, - typ: current.Type(), - }, - ) - return - } - } - - if kind == reflect.Invalid { - return - } - - case reflect.Struct: - isNestedStruct = !current.Type().ConvertibleTo(timeType) - // For backward compatibility before struct level validation tags were supported - // as there were a number of projects relying on `required` not failing on non-pointer - // structs. Since it's basically nonsensical to use `required` with a non-pointer struct - // are explicitly skipping the required validation for it. This WILL be removed in the - // next major version. - if isNestedStruct && !v.v.requiredStructEnabled && ct != nil && ct.tag == requiredTag { - ct = ct.next - } - } - - typ = current.Type() - -OUTER: - for { - if ct == nil || !ct.hasTag || (isNestedStruct && len(cf.name) == 0) { - // isNestedStruct check here - if isNestedStruct { - // if len == 0 then validating using 'Var' or 'VarWithValue' - // Var - doesn't make much sense to do it that way, should call 'Struct', but no harm... - // VarWithField - this allows for validating against each field within the struct against a specific value - // pretty handy in certain situations - if len(cf.name) > 0 { - ns = append(append(ns, cf.altName...), '.') - structNs = append(append(structNs, cf.name...), '.') - } - - v.validateStruct(ctx, parent, current, typ, ns, structNs, ct) - } - return - } - - switch ct.typeof { - case typeNoStructLevel: - return - - case typeStructOnly: - if isNestedStruct { - // if len == 0 then validating using 'Var' or 'VarWithValue' - // Var - doesn't make much sense to do it that way, should call 'Struct', but no harm... - // VarWithField - this allows for validating against each field within the struct against a specific value - // pretty handy in certain situations - if len(cf.name) > 0 { - ns = append(append(ns, cf.altName...), '.') - structNs = append(append(structNs, cf.name...), '.') - } - - v.validateStruct(ctx, parent, current, typ, ns, structNs, ct) - } - return - - case typeOmitEmpty: - - // set Field Level fields - v.slflParent = parent - v.flField = current - v.cf = cf - v.ct = ct - - if !hasValue(v) { - return - } - - ct = ct.next - continue - - case typeOmitZero: - v.slflParent = parent - v.flField = current - v.cf = cf - v.ct = ct - - if !hasNotZeroValue(v) { - return - } - - ct = ct.next - continue - - case typeOmitNil: - v.slflParent = parent - v.flField = current - v.cf = cf - v.ct = ct - - switch field := v.Field(); field.Kind() { - case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func: - if field.IsNil() { - return - } - default: - if v.fldIsPointer && field.Interface() == nil { - return - } - } - - ct = ct.next - continue - - case typeEndKeys: - return - - case typeDive: - - ct = ct.next - - // traverse slice or map here - // or panic ;) - switch kind { - case reflect.Slice, reflect.Array: - - var i64 int64 - reusableCF := &cField{} - - for i := 0; i < current.Len(); i++ { - - i64 = int64(i) - - v.misc = append(v.misc[0:0], cf.name...) - v.misc = append(v.misc, '[') - v.misc = strconv.AppendInt(v.misc, i64, 10) - v.misc = append(v.misc, ']') - - reusableCF.name = string(v.misc) - - if cf.namesEqual { - reusableCF.altName = reusableCF.name - } else { - - v.misc = append(v.misc[0:0], cf.altName...) - v.misc = append(v.misc, '[') - v.misc = strconv.AppendInt(v.misc, i64, 10) - v.misc = append(v.misc, ']') - - reusableCF.altName = string(v.misc) - } - v.traverseField(ctx, parent, current.Index(i), ns, structNs, reusableCF, ct) - } - - case reflect.Map: - - var pv string - reusableCF := &cField{} - - for _, key := range current.MapKeys() { - - pv = fmt.Sprintf("%v", key.Interface()) - - v.misc = append(v.misc[0:0], cf.name...) - v.misc = append(v.misc, '[') - v.misc = append(v.misc, pv...) - v.misc = append(v.misc, ']') - - reusableCF.name = string(v.misc) - - if cf.namesEqual { - reusableCF.altName = reusableCF.name - } else { - v.misc = append(v.misc[0:0], cf.altName...) - v.misc = append(v.misc, '[') - v.misc = append(v.misc, pv...) - v.misc = append(v.misc, ']') - - reusableCF.altName = string(v.misc) - } - - if ct != nil && ct.typeof == typeKeys && ct.keys != nil { - v.traverseField(ctx, parent, key, ns, structNs, reusableCF, ct.keys) - // can be nil when just keys being validated - if ct.next != nil { - v.traverseField(ctx, parent, current.MapIndex(key), ns, structNs, reusableCF, ct.next) - } - } else { - v.traverseField(ctx, parent, current.MapIndex(key), ns, structNs, reusableCF, ct) - } - } - - default: - // throw error, if not a slice or map then should not have gotten here - // bad dive tag - panic("dive error! can't dive on a non slice or map") - } - - return - - case typeOr: - - v.misc = v.misc[0:0] - - for { - - // set Field Level fields - v.slflParent = parent - v.flField = current - v.cf = cf - v.ct = ct - - if ct.fn(ctx, v) { - if ct.isBlockEnd { - ct = ct.next - continue OUTER - } - - // drain rest of the 'or' values, then continue or leave - for { - - ct = ct.next - - if ct == nil { - continue OUTER - } - - if ct.typeof != typeOr { - continue OUTER - } - - if ct.isBlockEnd { - ct = ct.next - continue OUTER - } - } - } - - v.misc = append(v.misc, '|') - v.misc = append(v.misc, ct.tag...) - - if ct.hasParam { - v.misc = append(v.misc, '=') - v.misc = append(v.misc, ct.param...) - } - - if ct.isBlockEnd || ct.next == nil { - // if we get here, no valid 'or' value and no more tags - v.str1 = string(append(ns, cf.altName...)) - - if v.v.hasTagNameFunc { - v.str2 = string(append(structNs, cf.name...)) - } else { - v.str2 = v.str1 - } - - if ct.hasAlias { - - v.errs = append(v.errs, - &fieldError{ - v: v.v, - tag: ct.aliasTag, - actualTag: ct.actualAliasTag, - ns: v.str1, - structNs: v.str2, - fieldLen: uint8(len(cf.altName)), - structfieldLen: uint8(len(cf.name)), - value: getValue(current), - param: ct.param, - kind: kind, - typ: typ, - }, - ) - - } else { - - tVal := string(v.misc)[1:] - - v.errs = append(v.errs, - &fieldError{ - v: v.v, - tag: tVal, - actualTag: tVal, - ns: v.str1, - structNs: v.str2, - fieldLen: uint8(len(cf.altName)), - structfieldLen: uint8(len(cf.name)), - value: getValue(current), - param: ct.param, - kind: kind, - typ: typ, - }, - ) - } - - return - } - - ct = ct.next - } - - default: - - // set Field Level fields - v.slflParent = parent - v.flField = current - v.cf = cf - v.ct = ct - - if !ct.fn(ctx, v) { - v.str1 = string(append(ns, cf.altName...)) - - if v.v.hasTagNameFunc { - v.str2 = string(append(structNs, cf.name...)) - } else { - v.str2 = v.str1 - } - - v.errs = append(v.errs, - &fieldError{ - v: v.v, - tag: ct.aliasTag, - actualTag: ct.tag, - ns: v.str1, - structNs: v.str2, - fieldLen: uint8(len(cf.altName)), - structfieldLen: uint8(len(cf.name)), - value: getValue(current), - param: ct.param, - kind: kind, - typ: typ, - }, - ) - - return - } - ct = ct.next - } - } - -} - -func getValue(val reflect.Value) interface{} { - if val.CanInterface() { - return val.Interface() - } - - if val.CanAddr() { - return reflect.NewAt(val.Type(), unsafe.Pointer(val.UnsafeAddr())).Elem().Interface() - } - - switch val.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return val.Int() - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return val.Uint() - case reflect.Complex64, reflect.Complex128: - return val.Complex() - case reflect.Float32, reflect.Float64: - return val.Float() - default: - return val.String() - } -} diff --git a/go-controller/vendor/github.com/go-playground/validator/v10/validator_instance.go b/go-controller/vendor/github.com/go-playground/validator/v10/validator_instance.go deleted file mode 100644 index 779f689a8f..0000000000 --- a/go-controller/vendor/github.com/go-playground/validator/v10/validator_instance.go +++ /dev/null @@ -1,711 +0,0 @@ -package validator - -import ( - "context" - "errors" - "fmt" - "reflect" - "strings" - "sync" - "time" - - ut "github.com/go-playground/universal-translator" -) - -const ( - defaultTagName = "validate" - utf8HexComma = "0x2C" - utf8Pipe = "0x7C" - tagSeparator = "," - orSeparator = "|" - tagKeySeparator = "=" - structOnlyTag = "structonly" - noStructLevelTag = "nostructlevel" - omitzero = "omitzero" - omitempty = "omitempty" - omitnil = "omitnil" - isdefault = "isdefault" - requiredWithoutAllTag = "required_without_all" - requiredWithoutTag = "required_without" - requiredWithTag = "required_with" - requiredWithAllTag = "required_with_all" - requiredIfTag = "required_if" - requiredUnlessTag = "required_unless" - skipUnlessTag = "skip_unless" - excludedWithoutAllTag = "excluded_without_all" - excludedWithoutTag = "excluded_without" - excludedWithTag = "excluded_with" - excludedWithAllTag = "excluded_with_all" - excludedIfTag = "excluded_if" - excludedUnlessTag = "excluded_unless" - skipValidationTag = "-" - diveTag = "dive" - keysTag = "keys" - endKeysTag = "endkeys" - requiredTag = "required" - namespaceSeparator = "." - leftBracket = "[" - rightBracket = "]" - restrictedTagChars = ".[],|=+()`~!@#$%^&*\\\"/?<>{}" - restrictedAliasErr = "Alias '%s' either contains restricted characters or is the same as a restricted tag needed for normal operation" - restrictedTagErr = "Tag '%s' either contains restricted characters or is the same as a restricted tag needed for normal operation" -) - -var ( - timeDurationType = reflect.TypeOf(time.Duration(0)) - timeType = reflect.TypeOf(time.Time{}) - - byteSliceType = reflect.TypeOf([]byte{}) - - defaultCField = &cField{namesEqual: true} -) - -// FilterFunc is the type used to filter fields using -// StructFiltered(...) function. -// returning true results in the field being filtered/skipped from -// validation -type FilterFunc func(ns []byte) bool - -// CustomTypeFunc allows for overriding or adding custom field type handler functions -// field = field value of the type to return a value to be validated -// example Valuer from sql drive see https://golang.org/src/database/sql/driver/types.go?s=1210:1293#L29 -type CustomTypeFunc func(field reflect.Value) interface{} - -// TagNameFunc allows for adding of a custom tag name parser -type TagNameFunc func(field reflect.StructField) string - -type internalValidationFuncWrapper struct { - fn FuncCtx - runValidationOnNil bool -} - -// Validate contains the validator settings and cache -type Validate struct { - tagName string - pool *sync.Pool - tagNameFunc TagNameFunc - structLevelFuncs map[reflect.Type]StructLevelFuncCtx - customFuncs map[reflect.Type]CustomTypeFunc - aliases map[string]string - validations map[string]internalValidationFuncWrapper - transTagFunc map[ut.Translator]map[string]TranslationFunc // map[]map[]TranslationFunc - rules map[reflect.Type]map[string]string - tagCache *tagCache - structCache *structCache - hasCustomFuncs bool - hasTagNameFunc bool - requiredStructEnabled bool - privateFieldValidation bool -} - -// New returns a new instance of 'validate' with sane defaults. -// Validate is designed to be thread-safe and used as a singleton instance. -// It caches information about your struct and validations, -// in essence only parsing your validation tags once per struct type. -// Using multiple instances neglects the benefit of caching. -func New(options ...Option) *Validate { - - tc := new(tagCache) - tc.m.Store(make(map[string]*cTag)) - - sc := new(structCache) - sc.m.Store(make(map[reflect.Type]*cStruct)) - - v := &Validate{ - tagName: defaultTagName, - aliases: make(map[string]string, len(bakedInAliases)), - validations: make(map[string]internalValidationFuncWrapper, len(bakedInValidators)), - tagCache: tc, - structCache: sc, - } - - // must copy alias validators for separate validations to be used in each validator instance - for k, val := range bakedInAliases { - v.RegisterAlias(k, val) - } - - // must copy validators for separate validations to be used in each instance - for k, val := range bakedInValidators { - - switch k { - // these require that even if the value is nil that the validation should run, omitempty still overrides this behaviour - case requiredIfTag, requiredUnlessTag, requiredWithTag, requiredWithAllTag, requiredWithoutTag, requiredWithoutAllTag, - excludedIfTag, excludedUnlessTag, excludedWithTag, excludedWithAllTag, excludedWithoutTag, excludedWithoutAllTag, - skipUnlessTag: - _ = v.registerValidation(k, wrapFunc(val), true, true) - default: - // no need to error check here, baked in will always be valid - _ = v.registerValidation(k, wrapFunc(val), true, false) - } - } - - v.pool = &sync.Pool{ - New: func() interface{} { - return &validate{ - v: v, - ns: make([]byte, 0, 64), - actualNs: make([]byte, 0, 64), - misc: make([]byte, 32), - } - }, - } - - for _, o := range options { - o(v) - } - return v -} - -// SetTagName allows for changing of the default tag name of 'validate' -func (v *Validate) SetTagName(name string) { - v.tagName = name -} - -// ValidateMapCtx validates a map using a map of validation rules and allows passing of contextual -// validation information via context.Context. -func (v Validate) ValidateMapCtx(ctx context.Context, data map[string]interface{}, rules map[string]interface{}) map[string]interface{} { - errs := make(map[string]interface{}) - for field, rule := range rules { - if ruleObj, ok := rule.(map[string]interface{}); ok { - if dataObj, ok := data[field].(map[string]interface{}); ok { - err := v.ValidateMapCtx(ctx, dataObj, ruleObj) - if len(err) > 0 { - errs[field] = err - } - } else if dataObjs, ok := data[field].([]map[string]interface{}); ok { - for _, obj := range dataObjs { - err := v.ValidateMapCtx(ctx, obj, ruleObj) - if len(err) > 0 { - errs[field] = err - } - } - } else { - errs[field] = errors.New("The field: '" + field + "' is not a map to dive") - } - } else if ruleStr, ok := rule.(string); ok { - err := v.VarCtx(ctx, data[field], ruleStr) - if err != nil { - errs[field] = err - } - } - } - return errs -} - -// ValidateMap validates map data from a map of tags -func (v *Validate) ValidateMap(data map[string]interface{}, rules map[string]interface{}) map[string]interface{} { - return v.ValidateMapCtx(context.Background(), data, rules) -} - -// RegisterTagNameFunc registers a function to get alternate names for StructFields. -// -// eg. to use the names which have been specified for JSON representations of structs, rather than normal Go field names: -// -// validate.RegisterTagNameFunc(func(fld reflect.StructField) string { -// name := strings.SplitN(fld.Tag.Get("json"), ",", 2)[0] -// // skip if tag key says it should be ignored -// if name == "-" { -// return "" -// } -// return name -// }) -func (v *Validate) RegisterTagNameFunc(fn TagNameFunc) { - v.tagNameFunc = fn - v.hasTagNameFunc = true -} - -// RegisterValidation adds a validation with the given tag -// -// NOTES: -// - if the key already exists, the previous validation function will be replaced. -// - this method is not thread-safe it is intended that these all be registered prior to any validation -func (v *Validate) RegisterValidation(tag string, fn Func, callValidationEvenIfNull ...bool) error { - return v.RegisterValidationCtx(tag, wrapFunc(fn), callValidationEvenIfNull...) -} - -// RegisterValidationCtx does the same as RegisterValidation on accepts a FuncCtx validation -// allowing context.Context validation support. -func (v *Validate) RegisterValidationCtx(tag string, fn FuncCtx, callValidationEvenIfNull ...bool) error { - var nilCheckable bool - if len(callValidationEvenIfNull) > 0 { - nilCheckable = callValidationEvenIfNull[0] - } - return v.registerValidation(tag, fn, false, nilCheckable) -} - -func (v *Validate) registerValidation(tag string, fn FuncCtx, bakedIn bool, nilCheckable bool) error { - if len(tag) == 0 { - return errors.New("function Key cannot be empty") - } - - if fn == nil { - return errors.New("function cannot be empty") - } - - _, ok := restrictedTags[tag] - if !bakedIn && (ok || strings.ContainsAny(tag, restrictedTagChars)) { - panic(fmt.Sprintf(restrictedTagErr, tag)) - } - v.validations[tag] = internalValidationFuncWrapper{fn: fn, runValidationOnNil: nilCheckable} - return nil -} - -// RegisterAlias registers a mapping of a single validation tag that -// defines a common or complex set of validation(s) to simplify adding validation -// to structs. -// -// NOTE: this function is not thread-safe it is intended that these all be registered prior to any validation -func (v *Validate) RegisterAlias(alias, tags string) { - - _, ok := restrictedTags[alias] - - if ok || strings.ContainsAny(alias, restrictedTagChars) { - panic(fmt.Sprintf(restrictedAliasErr, alias)) - } - - v.aliases[alias] = tags -} - -// RegisterStructValidation registers a StructLevelFunc against a number of types. -// -// NOTE: -// - this method is not thread-safe it is intended that these all be registered prior to any validation -func (v *Validate) RegisterStructValidation(fn StructLevelFunc, types ...interface{}) { - v.RegisterStructValidationCtx(wrapStructLevelFunc(fn), types...) -} - -// RegisterStructValidationCtx registers a StructLevelFuncCtx against a number of types and allows passing -// of contextual validation information via context.Context. -// -// NOTE: -// - this method is not thread-safe it is intended that these all be registered prior to any validation -func (v *Validate) RegisterStructValidationCtx(fn StructLevelFuncCtx, types ...interface{}) { - - if v.structLevelFuncs == nil { - v.structLevelFuncs = make(map[reflect.Type]StructLevelFuncCtx) - } - - for _, t := range types { - tv := reflect.ValueOf(t) - if tv.Kind() == reflect.Ptr { - t = reflect.Indirect(tv).Interface() - } - - v.structLevelFuncs[reflect.TypeOf(t)] = fn - } -} - -// RegisterStructValidationMapRules registers validate map rules. -// Be aware that map validation rules supersede those defined on a/the struct if present. -// -// NOTE: this method is not thread-safe it is intended that these all be registered prior to any validation -func (v *Validate) RegisterStructValidationMapRules(rules map[string]string, types ...interface{}) { - if v.rules == nil { - v.rules = make(map[reflect.Type]map[string]string) - } - - deepCopyRules := make(map[string]string) - for i, rule := range rules { - deepCopyRules[i] = rule - } - - for _, t := range types { - typ := reflect.TypeOf(t) - - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - } - - if typ.Kind() != reflect.Struct { - continue - } - v.rules[typ] = deepCopyRules - } -} - -// RegisterCustomTypeFunc registers a CustomTypeFunc against a number of types -// -// NOTE: this method is not thread-safe it is intended that these all be registered prior to any validation -func (v *Validate) RegisterCustomTypeFunc(fn CustomTypeFunc, types ...interface{}) { - - if v.customFuncs == nil { - v.customFuncs = make(map[reflect.Type]CustomTypeFunc) - } - - for _, t := range types { - v.customFuncs[reflect.TypeOf(t)] = fn - } - - v.hasCustomFuncs = true -} - -// RegisterTranslation registers translations against the provided tag. -func (v *Validate) RegisterTranslation(tag string, trans ut.Translator, registerFn RegisterTranslationsFunc, translationFn TranslationFunc) (err error) { - - if v.transTagFunc == nil { - v.transTagFunc = make(map[ut.Translator]map[string]TranslationFunc) - } - - if err = registerFn(trans); err != nil { - return - } - - m, ok := v.transTagFunc[trans] - if !ok { - m = make(map[string]TranslationFunc) - v.transTagFunc[trans] = m - } - - m[tag] = translationFn - - return -} - -// Struct validates a structs exposed fields, and automatically validates nested structs, unless otherwise specified. -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -func (v *Validate) Struct(s interface{}) error { - return v.StructCtx(context.Background(), s) -} - -// StructCtx validates a structs exposed fields, and automatically validates nested structs, unless otherwise specified -// and also allows passing of context.Context for contextual validation information. -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -func (v *Validate) StructCtx(ctx context.Context, s interface{}) (err error) { - - val := reflect.ValueOf(s) - top := val - - if val.Kind() == reflect.Ptr && !val.IsNil() { - val = val.Elem() - } - - if val.Kind() != reflect.Struct || val.Type().ConvertibleTo(timeType) { - return &InvalidValidationError{Type: reflect.TypeOf(s)} - } - - // good to validate - vd := v.pool.Get().(*validate) - vd.top = top - vd.isPartial = false - // vd.hasExcludes = false // only need to reset in StructPartial and StructExcept - - vd.validateStruct(ctx, top, val, val.Type(), vd.ns[0:0], vd.actualNs[0:0], nil) - - if len(vd.errs) > 0 { - err = vd.errs - vd.errs = nil - } - - v.pool.Put(vd) - - return -} - -// StructFiltered validates a structs exposed fields, that pass the FilterFunc check and automatically validates -// nested structs, unless otherwise specified. -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -func (v *Validate) StructFiltered(s interface{}, fn FilterFunc) error { - return v.StructFilteredCtx(context.Background(), s, fn) -} - -// StructFilteredCtx validates a structs exposed fields, that pass the FilterFunc check and automatically validates -// nested structs, unless otherwise specified and also allows passing of contextual validation information via -// context.Context -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -func (v *Validate) StructFilteredCtx(ctx context.Context, s interface{}, fn FilterFunc) (err error) { - val := reflect.ValueOf(s) - top := val - - if val.Kind() == reflect.Ptr && !val.IsNil() { - val = val.Elem() - } - - if val.Kind() != reflect.Struct || val.Type().ConvertibleTo(timeType) { - return &InvalidValidationError{Type: reflect.TypeOf(s)} - } - - // good to validate - vd := v.pool.Get().(*validate) - vd.top = top - vd.isPartial = true - vd.ffn = fn - // vd.hasExcludes = false // only need to reset in StructPartial and StructExcept - - vd.validateStruct(ctx, top, val, val.Type(), vd.ns[0:0], vd.actualNs[0:0], nil) - - if len(vd.errs) > 0 { - err = vd.errs - vd.errs = nil - } - - v.pool.Put(vd) - - return -} - -// StructPartial validates the fields passed in only, ignoring all others. -// Fields may be provided in a namespaced fashion relative to the struct provided -// eg. NestedStruct.Field or NestedArrayField[0].Struct.Name -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -func (v *Validate) StructPartial(s interface{}, fields ...string) error { - return v.StructPartialCtx(context.Background(), s, fields...) -} - -// StructPartialCtx validates the fields passed in only, ignoring all others and allows passing of contextual -// validation information via context.Context -// Fields may be provided in a namespaced fashion relative to the struct provided -// eg. NestedStruct.Field or NestedArrayField[0].Struct.Name -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -func (v *Validate) StructPartialCtx(ctx context.Context, s interface{}, fields ...string) (err error) { - val := reflect.ValueOf(s) - top := val - - if val.Kind() == reflect.Ptr && !val.IsNil() { - val = val.Elem() - } - - if val.Kind() != reflect.Struct || val.Type().ConvertibleTo(timeType) { - return &InvalidValidationError{Type: reflect.TypeOf(s)} - } - - // good to validate - vd := v.pool.Get().(*validate) - vd.top = top - vd.isPartial = true - vd.ffn = nil - vd.hasExcludes = false - vd.includeExclude = make(map[string]struct{}) - - typ := val.Type() - name := typ.Name() - - for _, k := range fields { - - flds := strings.Split(k, namespaceSeparator) - if len(flds) > 0 { - - vd.misc = append(vd.misc[0:0], name...) - // Don't append empty name for unnamed structs - if len(vd.misc) != 0 { - vd.misc = append(vd.misc, '.') - } - - for _, s := range flds { - - idx := strings.Index(s, leftBracket) - - if idx != -1 { - for idx != -1 { - vd.misc = append(vd.misc, s[:idx]...) - vd.includeExclude[string(vd.misc)] = struct{}{} - - idx2 := strings.Index(s, rightBracket) - idx2++ - vd.misc = append(vd.misc, s[idx:idx2]...) - vd.includeExclude[string(vd.misc)] = struct{}{} - s = s[idx2:] - idx = strings.Index(s, leftBracket) - } - } else { - - vd.misc = append(vd.misc, s...) - vd.includeExclude[string(vd.misc)] = struct{}{} - } - - vd.misc = append(vd.misc, '.') - } - } - } - - vd.validateStruct(ctx, top, val, typ, vd.ns[0:0], vd.actualNs[0:0], nil) - - if len(vd.errs) > 0 { - err = vd.errs - vd.errs = nil - } - - v.pool.Put(vd) - - return -} - -// StructExcept validates all fields except the ones passed in. -// Fields may be provided in a namespaced fashion relative to the struct provided -// i.e. NestedStruct.Field or NestedArrayField[0].Struct.Name -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -func (v *Validate) StructExcept(s interface{}, fields ...string) error { - return v.StructExceptCtx(context.Background(), s, fields...) -} - -// StructExceptCtx validates all fields except the ones passed in and allows passing of contextual -// validation information via context.Context -// Fields may be provided in a namespaced fashion relative to the struct provided -// i.e. NestedStruct.Field or NestedArrayField[0].Struct.Name -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -func (v *Validate) StructExceptCtx(ctx context.Context, s interface{}, fields ...string) (err error) { - val := reflect.ValueOf(s) - top := val - - if val.Kind() == reflect.Ptr && !val.IsNil() { - val = val.Elem() - } - - if val.Kind() != reflect.Struct || val.Type().ConvertibleTo(timeType) { - return &InvalidValidationError{Type: reflect.TypeOf(s)} - } - - // good to validate - vd := v.pool.Get().(*validate) - vd.top = top - vd.isPartial = true - vd.ffn = nil - vd.hasExcludes = true - vd.includeExclude = make(map[string]struct{}) - - typ := val.Type() - name := typ.Name() - - for _, key := range fields { - - vd.misc = vd.misc[0:0] - - if len(name) > 0 { - vd.misc = append(vd.misc, name...) - vd.misc = append(vd.misc, '.') - } - - vd.misc = append(vd.misc, key...) - vd.includeExclude[string(vd.misc)] = struct{}{} - } - - vd.validateStruct(ctx, top, val, typ, vd.ns[0:0], vd.actualNs[0:0], nil) - - if len(vd.errs) > 0 { - err = vd.errs - vd.errs = nil - } - - v.pool.Put(vd) - - return -} - -// Var validates a single variable using tag style validation. -// eg. -// var i int -// validate.Var(i, "gt=1,lt=10") -// -// WARNING: a struct can be passed for validation eg. time.Time is a struct or -// if you have a custom type and have registered a custom type handler, so must -// allow it; however unforeseen validations will occur if trying to validate a -// struct that is meant to be passed to 'validate.Struct' -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -// validate Array, Slice and maps fields which may contain more than one error -func (v *Validate) Var(field interface{}, tag string) error { - return v.VarCtx(context.Background(), field, tag) -} - -// VarCtx validates a single variable using tag style validation and allows passing of contextual -// validation information via context.Context. -// eg. -// var i int -// validate.Var(i, "gt=1,lt=10") -// -// WARNING: a struct can be passed for validation eg. time.Time is a struct or -// if you have a custom type and have registered a custom type handler, so must -// allow it; however unforeseen validations will occur if trying to validate a -// struct that is meant to be passed to 'validate.Struct' -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -// validate Array, Slice and maps fields which may contain more than one error -func (v *Validate) VarCtx(ctx context.Context, field interface{}, tag string) (err error) { - if len(tag) == 0 || tag == skipValidationTag { - return nil - } - - ctag := v.fetchCacheTag(tag) - - val := reflect.ValueOf(field) - vd := v.pool.Get().(*validate) - vd.top = val - vd.isPartial = false - vd.traverseField(ctx, val, val, vd.ns[0:0], vd.actualNs[0:0], defaultCField, ctag) - - if len(vd.errs) > 0 { - err = vd.errs - vd.errs = nil - } - v.pool.Put(vd) - return -} - -// VarWithValue validates a single variable, against another variable/field's value using tag style validation -// eg. -// s1 := "abcd" -// s2 := "abcd" -// validate.VarWithValue(s1, s2, "eqcsfield") // returns true -// -// WARNING: a struct can be passed for validation eg. time.Time is a struct or -// if you have a custom type and have registered a custom type handler, so must -// allow it; however unforeseen validations will occur if trying to validate a -// struct that is meant to be passed to 'validate.Struct' -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -// validate Array, Slice and maps fields which may contain more than one error -func (v *Validate) VarWithValue(field interface{}, other interface{}, tag string) error { - return v.VarWithValueCtx(context.Background(), field, other, tag) -} - -// VarWithValueCtx validates a single variable, against another variable/field's value using tag style validation and -// allows passing of contextual validation information via context.Context. -// eg. -// s1 := "abcd" -// s2 := "abcd" -// validate.VarWithValue(s1, s2, "eqcsfield") // returns true -// -// WARNING: a struct can be passed for validation eg. time.Time is a struct or -// if you have a custom type and have registered a custom type handler, so must -// allow it; however unforeseen validations will occur if trying to validate a -// struct that is meant to be passed to 'validate.Struct' -// -// It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. -// You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. -// validate Array, Slice and maps fields which may contain more than one error -func (v *Validate) VarWithValueCtx(ctx context.Context, field interface{}, other interface{}, tag string) (err error) { - if len(tag) == 0 || tag == skipValidationTag { - return nil - } - ctag := v.fetchCacheTag(tag) - otherVal := reflect.ValueOf(other) - vd := v.pool.Get().(*validate) - vd.top = otherVal - vd.isPartial = false - vd.traverseField(ctx, otherVal, reflect.ValueOf(field), vd.ns[0:0], vd.actualNs[0:0], defaultCField, ctag) - - if len(vd.errs) > 0 { - err = vd.errs - vd.errs = nil - } - v.pool.Put(vd) - return -} diff --git a/go-controller/vendor/github.com/golang/protobuf/AUTHORS b/go-controller/vendor/github.com/golang/protobuf/AUTHORS new file mode 100644 index 0000000000..15167cd746 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/AUTHORS @@ -0,0 +1,3 @@ +# This source code refers to The Go Authors for copyright purposes. +# The master list of authors is in the main Go distribution, +# visible at http://tip.golang.org/AUTHORS. diff --git a/go-controller/vendor/github.com/golang/protobuf/CONTRIBUTORS b/go-controller/vendor/github.com/golang/protobuf/CONTRIBUTORS new file mode 100644 index 0000000000..1c4577e968 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/CONTRIBUTORS @@ -0,0 +1,3 @@ +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/go-controller/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/LICENSE b/go-controller/vendor/github.com/golang/protobuf/LICENSE similarity index 83% rename from go-controller/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/LICENSE rename to go-controller/vendor/github.com/golang/protobuf/LICENSE index 65d761bc9f..0f646931a4 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/LICENSE +++ b/go-controller/vendor/github.com/golang/protobuf/LICENSE @@ -1,16 +1,16 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. +Copyright 2010 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -25,3 +25,4 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/buffer.go b/go-controller/vendor/github.com/golang/protobuf/proto/buffer.go new file mode 100644 index 0000000000..e810e6fea1 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/buffer.go @@ -0,0 +1,324 @@ +// Copyright 2019 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 proto + +import ( + "errors" + "fmt" + + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + WireVarint = 0 + WireFixed32 = 5 + WireFixed64 = 1 + WireBytes = 2 + WireStartGroup = 3 + WireEndGroup = 4 +) + +// EncodeVarint returns the varint encoded bytes of v. +func EncodeVarint(v uint64) []byte { + return protowire.AppendVarint(nil, v) +} + +// SizeVarint returns the length of the varint encoded bytes of v. +// This is equal to len(EncodeVarint(v)). +func SizeVarint(v uint64) int { + return protowire.SizeVarint(v) +} + +// DecodeVarint parses a varint encoded integer from b, +// returning the integer value and the length of the varint. +// It returns (0, 0) if there is a parse error. +func DecodeVarint(b []byte) (uint64, int) { + v, n := protowire.ConsumeVarint(b) + if n < 0 { + return 0, 0 + } + return v, n +} + +// Buffer is a buffer for encoding and decoding the protobuf wire format. +// It may be reused between invocations to reduce memory usage. +type Buffer struct { + buf []byte + idx int + deterministic bool +} + +// NewBuffer allocates a new Buffer initialized with buf, +// where the contents of buf are considered the unread portion of the buffer. +func NewBuffer(buf []byte) *Buffer { + return &Buffer{buf: buf} +} + +// SetDeterministic specifies whether to use deterministic serialization. +// +// Deterministic serialization guarantees that for a given binary, equal +// messages will always be serialized to the same bytes. This implies: +// +// - Repeated serialization of a message will return the same bytes. +// - Different processes of the same binary (which may be executing on +// different machines) will serialize equal messages to the same bytes. +// +// Note that the deterministic serialization is NOT canonical across +// languages. It is not guaranteed to remain stable over time. It is unstable +// across different builds with schema changes due to unknown fields. +// Users who need canonical serialization (e.g., persistent storage in a +// canonical form, fingerprinting, etc.) should define their own +// canonicalization specification and implement their own serializer rather +// than relying on this API. +// +// If deterministic serialization is requested, map entries will be sorted +// by keys in lexographical order. This is an implementation detail and +// subject to change. +func (b *Buffer) SetDeterministic(deterministic bool) { + b.deterministic = deterministic +} + +// SetBuf sets buf as the internal buffer, +// where the contents of buf are considered the unread portion of the buffer. +func (b *Buffer) SetBuf(buf []byte) { + b.buf = buf + b.idx = 0 +} + +// Reset clears the internal buffer of all written and unread data. +func (b *Buffer) Reset() { + b.buf = b.buf[:0] + b.idx = 0 +} + +// Bytes returns the internal buffer. +func (b *Buffer) Bytes() []byte { + return b.buf +} + +// Unread returns the unread portion of the buffer. +func (b *Buffer) Unread() []byte { + return b.buf[b.idx:] +} + +// Marshal appends the wire-format encoding of m to the buffer. +func (b *Buffer) Marshal(m Message) error { + var err error + b.buf, err = marshalAppend(b.buf, m, b.deterministic) + return err +} + +// Unmarshal parses the wire-format message in the buffer and +// places the decoded results in m. +// It does not reset m before unmarshaling. +func (b *Buffer) Unmarshal(m Message) error { + err := UnmarshalMerge(b.Unread(), m) + b.idx = len(b.buf) + return err +} + +type unknownFields struct{ XXX_unrecognized protoimpl.UnknownFields } + +func (m *unknownFields) String() string { panic("not implemented") } +func (m *unknownFields) Reset() { panic("not implemented") } +func (m *unknownFields) ProtoMessage() { panic("not implemented") } + +// DebugPrint dumps the encoded bytes of b with a header and footer including s +// to stdout. This is only intended for debugging. +func (*Buffer) DebugPrint(s string, b []byte) { + m := MessageReflect(new(unknownFields)) + m.SetUnknown(b) + b, _ = prototext.MarshalOptions{AllowPartial: true, Indent: "\t"}.Marshal(m.Interface()) + fmt.Printf("==== %s ====\n%s==== %s ====\n", s, b, s) +} + +// EncodeVarint appends an unsigned varint encoding to the buffer. +func (b *Buffer) EncodeVarint(v uint64) error { + b.buf = protowire.AppendVarint(b.buf, v) + return nil +} + +// EncodeZigzag32 appends a 32-bit zig-zag varint encoding to the buffer. +func (b *Buffer) EncodeZigzag32(v uint64) error { + return b.EncodeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) +} + +// EncodeZigzag64 appends a 64-bit zig-zag varint encoding to the buffer. +func (b *Buffer) EncodeZigzag64(v uint64) error { + return b.EncodeVarint(uint64((uint64(v) << 1) ^ uint64((int64(v) >> 63)))) +} + +// EncodeFixed32 appends a 32-bit little-endian integer to the buffer. +func (b *Buffer) EncodeFixed32(v uint64) error { + b.buf = protowire.AppendFixed32(b.buf, uint32(v)) + return nil +} + +// EncodeFixed64 appends a 64-bit little-endian integer to the buffer. +func (b *Buffer) EncodeFixed64(v uint64) error { + b.buf = protowire.AppendFixed64(b.buf, uint64(v)) + return nil +} + +// EncodeRawBytes appends a length-prefixed raw bytes to the buffer. +func (b *Buffer) EncodeRawBytes(v []byte) error { + b.buf = protowire.AppendBytes(b.buf, v) + return nil +} + +// EncodeStringBytes appends a length-prefixed raw bytes to the buffer. +// It does not validate whether v contains valid UTF-8. +func (b *Buffer) EncodeStringBytes(v string) error { + b.buf = protowire.AppendString(b.buf, v) + return nil +} + +// EncodeMessage appends a length-prefixed encoded message to the buffer. +func (b *Buffer) EncodeMessage(m Message) error { + var err error + b.buf = protowire.AppendVarint(b.buf, uint64(Size(m))) + b.buf, err = marshalAppend(b.buf, m, b.deterministic) + return err +} + +// DecodeVarint consumes an encoded unsigned varint from the buffer. +func (b *Buffer) DecodeVarint() (uint64, error) { + v, n := protowire.ConsumeVarint(b.buf[b.idx:]) + if n < 0 { + return 0, protowire.ParseError(n) + } + b.idx += n + return uint64(v), nil +} + +// DecodeZigzag32 consumes an encoded 32-bit zig-zag varint from the buffer. +func (b *Buffer) DecodeZigzag32() (uint64, error) { + v, err := b.DecodeVarint() + if err != nil { + return 0, err + } + return uint64((uint32(v) >> 1) ^ uint32((int32(v&1)<<31)>>31)), nil +} + +// DecodeZigzag64 consumes an encoded 64-bit zig-zag varint from the buffer. +func (b *Buffer) DecodeZigzag64() (uint64, error) { + v, err := b.DecodeVarint() + if err != nil { + return 0, err + } + return uint64((uint64(v) >> 1) ^ uint64((int64(v&1)<<63)>>63)), nil +} + +// DecodeFixed32 consumes a 32-bit little-endian integer from the buffer. +func (b *Buffer) DecodeFixed32() (uint64, error) { + v, n := protowire.ConsumeFixed32(b.buf[b.idx:]) + if n < 0 { + return 0, protowire.ParseError(n) + } + b.idx += n + return uint64(v), nil +} + +// DecodeFixed64 consumes a 64-bit little-endian integer from the buffer. +func (b *Buffer) DecodeFixed64() (uint64, error) { + v, n := protowire.ConsumeFixed64(b.buf[b.idx:]) + if n < 0 { + return 0, protowire.ParseError(n) + } + b.idx += n + return uint64(v), nil +} + +// DecodeRawBytes consumes a length-prefixed raw bytes from the buffer. +// If alloc is specified, it returns a copy the raw bytes +// rather than a sub-slice of the buffer. +func (b *Buffer) DecodeRawBytes(alloc bool) ([]byte, error) { + v, n := protowire.ConsumeBytes(b.buf[b.idx:]) + if n < 0 { + return nil, protowire.ParseError(n) + } + b.idx += n + if alloc { + v = append([]byte(nil), v...) + } + return v, nil +} + +// DecodeStringBytes consumes a length-prefixed raw bytes from the buffer. +// It does not validate whether the raw bytes contain valid UTF-8. +func (b *Buffer) DecodeStringBytes() (string, error) { + v, n := protowire.ConsumeString(b.buf[b.idx:]) + if n < 0 { + return "", protowire.ParseError(n) + } + b.idx += n + return v, nil +} + +// DecodeMessage consumes a length-prefixed message from the buffer. +// It does not reset m before unmarshaling. +func (b *Buffer) DecodeMessage(m Message) error { + v, err := b.DecodeRawBytes(false) + if err != nil { + return err + } + return UnmarshalMerge(v, m) +} + +// DecodeGroup consumes a message group from the buffer. +// It assumes that the start group marker has already been consumed and +// consumes all bytes until (and including the end group marker). +// It does not reset m before unmarshaling. +func (b *Buffer) DecodeGroup(m Message) error { + v, n, err := consumeGroup(b.buf[b.idx:]) + if err != nil { + return err + } + b.idx += n + return UnmarshalMerge(v, m) +} + +// consumeGroup parses b until it finds an end group marker, returning +// the raw bytes of the message (excluding the end group marker) and the +// the total length of the message (including the end group marker). +func consumeGroup(b []byte) ([]byte, int, error) { + b0 := b + depth := 1 // assume this follows a start group marker + for { + _, wtyp, tagLen := protowire.ConsumeTag(b) + if tagLen < 0 { + return nil, 0, protowire.ParseError(tagLen) + } + b = b[tagLen:] + + var valLen int + switch wtyp { + case protowire.VarintType: + _, valLen = protowire.ConsumeVarint(b) + case protowire.Fixed32Type: + _, valLen = protowire.ConsumeFixed32(b) + case protowire.Fixed64Type: + _, valLen = protowire.ConsumeFixed64(b) + case protowire.BytesType: + _, valLen = protowire.ConsumeBytes(b) + case protowire.StartGroupType: + depth++ + case protowire.EndGroupType: + depth-- + default: + return nil, 0, errors.New("proto: cannot parse reserved wire type") + } + if valLen < 0 { + return nil, 0, protowire.ParseError(valLen) + } + b = b[valLen:] + + if depth == 0 { + return b0[:len(b0)-len(b)-tagLen], len(b0) - len(b), nil + } + } +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/defaults.go b/go-controller/vendor/github.com/golang/protobuf/proto/defaults.go new file mode 100644 index 0000000000..d399bf069c --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/defaults.go @@ -0,0 +1,63 @@ +// Copyright 2019 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 proto + +import ( + "google.golang.org/protobuf/reflect/protoreflect" +) + +// SetDefaults sets unpopulated scalar fields to their default values. +// Fields within a oneof are not set even if they have a default value. +// SetDefaults is recursively called upon any populated message fields. +func SetDefaults(m Message) { + if m != nil { + setDefaults(MessageReflect(m)) + } +} + +func setDefaults(m protoreflect.Message) { + fds := m.Descriptor().Fields() + for i := 0; i < fds.Len(); i++ { + fd := fds.Get(i) + if !m.Has(fd) { + if fd.HasDefault() && fd.ContainingOneof() == nil { + v := fd.Default() + if fd.Kind() == protoreflect.BytesKind { + v = protoreflect.ValueOf(append([]byte(nil), v.Bytes()...)) // copy the default bytes + } + m.Set(fd, v) + } + continue + } + } + + m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { + switch { + // Handle singular message. + case fd.Cardinality() != protoreflect.Repeated: + if fd.Message() != nil { + setDefaults(m.Get(fd).Message()) + } + // Handle list of messages. + case fd.IsList(): + if fd.Message() != nil { + ls := m.Get(fd).List() + for i := 0; i < ls.Len(); i++ { + setDefaults(ls.Get(i).Message()) + } + } + // Handle map of messages. + case fd.IsMap(): + if fd.MapValue().Message() != nil { + ms := m.Get(fd).Map() + ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool { + setDefaults(v.Message()) + return true + }) + } + } + return true + }) +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/deprecated.go b/go-controller/vendor/github.com/golang/protobuf/proto/deprecated.go new file mode 100644 index 0000000000..e8db57e097 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/deprecated.go @@ -0,0 +1,113 @@ +// 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. + +package proto + +import ( + "encoding/json" + "errors" + "fmt" + "strconv" + + protoV2 "google.golang.org/protobuf/proto" +) + +var ( + // Deprecated: No longer returned. + ErrNil = errors.New("proto: Marshal called with nil") + + // Deprecated: No longer returned. + ErrTooLarge = errors.New("proto: message encodes to over 2 GB") + + // Deprecated: No longer returned. + ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") +) + +// Deprecated: Do not use. +type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 } + +// Deprecated: Do not use. +func GetStats() Stats { return Stats{} } + +// Deprecated: Do not use. +func MarshalMessageSet(interface{}) ([]byte, error) { + return nil, errors.New("proto: not implemented") +} + +// Deprecated: Do not use. +func UnmarshalMessageSet([]byte, interface{}) error { + return errors.New("proto: not implemented") +} + +// Deprecated: Do not use. +func MarshalMessageSetJSON(interface{}) ([]byte, error) { + return nil, errors.New("proto: not implemented") +} + +// Deprecated: Do not use. +func UnmarshalMessageSetJSON([]byte, interface{}) error { + return errors.New("proto: not implemented") +} + +// Deprecated: Do not use. +func RegisterMessageSetType(Message, int32, string) {} + +// Deprecated: Do not use. +func EnumName(m map[int32]string, v int32) string { + s, ok := m[v] + if ok { + return s + } + return strconv.Itoa(int(v)) +} + +// Deprecated: Do not use. +func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { + if data[0] == '"' { + // New style: enums are strings. + var repr string + if err := json.Unmarshal(data, &repr); err != nil { + return -1, err + } + val, ok := m[repr] + if !ok { + return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) + } + return val, nil + } + // Old style: enums are ints. + var val int32 + if err := json.Unmarshal(data, &val); err != nil { + return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) + } + return val, nil +} + +// Deprecated: Do not use; this type existed for intenal-use only. +type InternalMessageInfo struct{} + +// Deprecated: Do not use; this method existed for intenal-use only. +func (*InternalMessageInfo) DiscardUnknown(m Message) { + DiscardUnknown(m) +} + +// Deprecated: Do not use; this method existed for intenal-use only. +func (*InternalMessageInfo) Marshal(b []byte, m Message, deterministic bool) ([]byte, error) { + return protoV2.MarshalOptions{Deterministic: deterministic}.MarshalAppend(b, MessageV2(m)) +} + +// Deprecated: Do not use; this method existed for intenal-use only. +func (*InternalMessageInfo) Merge(dst, src Message) { + protoV2.Merge(MessageV2(dst), MessageV2(src)) +} + +// Deprecated: Do not use; this method existed for intenal-use only. +func (*InternalMessageInfo) Size(m Message) int { + return protoV2.Size(MessageV2(m)) +} + +// Deprecated: Do not use; this method existed for intenal-use only. +func (*InternalMessageInfo) Unmarshal(m Message, b []byte) error { + return protoV2.UnmarshalOptions{Merge: true}.Unmarshal(b, MessageV2(m)) +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/discard.go b/go-controller/vendor/github.com/golang/protobuf/proto/discard.go new file mode 100644 index 0000000000..2187e877fa --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/discard.go @@ -0,0 +1,58 @@ +// Copyright 2019 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 proto + +import ( + "google.golang.org/protobuf/reflect/protoreflect" +) + +// DiscardUnknown recursively discards all unknown fields from this message +// and all embedded messages. +// +// When unmarshaling a message with unrecognized fields, the tags and values +// of such fields are preserved in the Message. This allows a later call to +// marshal to be able to produce a message that continues to have those +// unrecognized fields. To avoid this, DiscardUnknown is used to +// explicitly clear the unknown fields after unmarshaling. +func DiscardUnknown(m Message) { + if m != nil { + discardUnknown(MessageReflect(m)) + } +} + +func discardUnknown(m protoreflect.Message) { + m.Range(func(fd protoreflect.FieldDescriptor, val protoreflect.Value) bool { + switch { + // Handle singular message. + case fd.Cardinality() != protoreflect.Repeated: + if fd.Message() != nil { + discardUnknown(m.Get(fd).Message()) + } + // Handle list of messages. + case fd.IsList(): + if fd.Message() != nil { + ls := m.Get(fd).List() + for i := 0; i < ls.Len(); i++ { + discardUnknown(ls.Get(i).Message()) + } + } + // Handle map of messages. + case fd.IsMap(): + if fd.MapValue().Message() != nil { + ms := m.Get(fd).Map() + ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool { + discardUnknown(v.Message()) + return true + }) + } + } + return true + }) + + // Discard unknown fields. + if len(m.GetUnknown()) > 0 { + m.SetUnknown(nil) + } +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/extensions.go b/go-controller/vendor/github.com/golang/protobuf/proto/extensions.go new file mode 100644 index 0000000000..42fc120c97 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/extensions.go @@ -0,0 +1,356 @@ +// Copyright 2010 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 proto + +import ( + "errors" + "fmt" + "reflect" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/runtime/protoimpl" +) + +type ( + // ExtensionDesc represents an extension descriptor and + // is used to interact with an extension field in a message. + // + // Variables of this type are generated in code by protoc-gen-go. + ExtensionDesc = protoimpl.ExtensionInfo + + // ExtensionRange represents a range of message extensions. + // Used in code generated by protoc-gen-go. + ExtensionRange = protoiface.ExtensionRangeV1 + + // Deprecated: Do not use; this is an internal type. + Extension = protoimpl.ExtensionFieldV1 + + // Deprecated: Do not use; this is an internal type. + XXX_InternalExtensions = protoimpl.ExtensionFields +) + +// ErrMissingExtension reports whether the extension was not present. +var ErrMissingExtension = errors.New("proto: missing extension") + +var errNotExtendable = errors.New("proto: not an extendable proto.Message") + +// HasExtension reports whether the extension field is present in m +// either as an explicitly populated field or as an unknown field. +func HasExtension(m Message, xt *ExtensionDesc) (has bool) { + mr := MessageReflect(m) + if mr == nil || !mr.IsValid() { + return false + } + + // Check whether any populated known field matches the field number. + xtd := xt.TypeDescriptor() + if isValidExtension(mr.Descriptor(), xtd) { + has = mr.Has(xtd) + } else { + mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool { + has = int32(fd.Number()) == xt.Field + return !has + }) + } + + // Check whether any unknown field matches the field number. + for b := mr.GetUnknown(); !has && len(b) > 0; { + num, _, n := protowire.ConsumeField(b) + has = int32(num) == xt.Field + b = b[n:] + } + return has +} + +// ClearExtension removes the extension field from m +// either as an explicitly populated field or as an unknown field. +func ClearExtension(m Message, xt *ExtensionDesc) { + mr := MessageReflect(m) + if mr == nil || !mr.IsValid() { + return + } + + xtd := xt.TypeDescriptor() + if isValidExtension(mr.Descriptor(), xtd) { + mr.Clear(xtd) + } else { + mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool { + if int32(fd.Number()) == xt.Field { + mr.Clear(fd) + return false + } + return true + }) + } + clearUnknown(mr, fieldNum(xt.Field)) +} + +// ClearAllExtensions clears all extensions from m. +// This includes populated fields and unknown fields in the extension range. +func ClearAllExtensions(m Message) { + mr := MessageReflect(m) + if mr == nil || !mr.IsValid() { + return + } + + mr.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool { + if fd.IsExtension() { + mr.Clear(fd) + } + return true + }) + clearUnknown(mr, mr.Descriptor().ExtensionRanges()) +} + +// GetExtension retrieves a proto2 extended field from m. +// +// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil), +// then GetExtension parses the encoded field and returns a Go value of the specified type. +// If the field is not present, then the default value is returned (if one is specified), +// otherwise ErrMissingExtension is reported. +// +// If the descriptor is type incomplete (i.e., ExtensionDesc.ExtensionType is nil), +// then GetExtension returns the raw encoded bytes for the extension field. +func GetExtension(m Message, xt *ExtensionDesc) (interface{}, error) { + mr := MessageReflect(m) + if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 { + return nil, errNotExtendable + } + + // Retrieve the unknown fields for this extension field. + var bo protoreflect.RawFields + for bi := mr.GetUnknown(); len(bi) > 0; { + num, _, n := protowire.ConsumeField(bi) + if int32(num) == xt.Field { + bo = append(bo, bi[:n]...) + } + bi = bi[n:] + } + + // For type incomplete descriptors, only retrieve the unknown fields. + if xt.ExtensionType == nil { + return []byte(bo), nil + } + + // If the extension field only exists as unknown fields, unmarshal it. + // This is rarely done since proto.Unmarshal eagerly unmarshals extensions. + xtd := xt.TypeDescriptor() + if !isValidExtension(mr.Descriptor(), xtd) { + return nil, fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m) + } + if !mr.Has(xtd) && len(bo) > 0 { + m2 := mr.New() + if err := (proto.UnmarshalOptions{ + Resolver: extensionResolver{xt}, + }.Unmarshal(bo, m2.Interface())); err != nil { + return nil, err + } + if m2.Has(xtd) { + mr.Set(xtd, m2.Get(xtd)) + clearUnknown(mr, fieldNum(xt.Field)) + } + } + + // Check whether the message has the extension field set or a default. + var pv protoreflect.Value + switch { + case mr.Has(xtd): + pv = mr.Get(xtd) + case xtd.HasDefault(): + pv = xtd.Default() + default: + return nil, ErrMissingExtension + } + + v := xt.InterfaceOf(pv) + rv := reflect.ValueOf(v) + if isScalarKind(rv.Kind()) { + rv2 := reflect.New(rv.Type()) + rv2.Elem().Set(rv) + v = rv2.Interface() + } + return v, nil +} + +// extensionResolver is a custom extension resolver that stores a single +// extension type that takes precedence over the global registry. +type extensionResolver struct{ xt protoreflect.ExtensionType } + +func (r extensionResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) { + if xtd := r.xt.TypeDescriptor(); xtd.FullName() == field { + return r.xt, nil + } + return protoregistry.GlobalTypes.FindExtensionByName(field) +} + +func (r extensionResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) { + if xtd := r.xt.TypeDescriptor(); xtd.ContainingMessage().FullName() == message && xtd.Number() == field { + return r.xt, nil + } + return protoregistry.GlobalTypes.FindExtensionByNumber(message, field) +} + +// GetExtensions returns a list of the extensions values present in m, +// corresponding with the provided list of extension descriptors, xts. +// If an extension is missing in m, the corresponding value is nil. +func GetExtensions(m Message, xts []*ExtensionDesc) ([]interface{}, error) { + mr := MessageReflect(m) + if mr == nil || !mr.IsValid() { + return nil, errNotExtendable + } + + vs := make([]interface{}, len(xts)) + for i, xt := range xts { + v, err := GetExtension(m, xt) + if err != nil { + if err == ErrMissingExtension { + continue + } + return vs, err + } + vs[i] = v + } + return vs, nil +} + +// SetExtension sets an extension field in m to the provided value. +func SetExtension(m Message, xt *ExtensionDesc, v interface{}) error { + mr := MessageReflect(m) + if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 { + return errNotExtendable + } + + rv := reflect.ValueOf(v) + if reflect.TypeOf(v) != reflect.TypeOf(xt.ExtensionType) { + return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", v, xt.ExtensionType) + } + if rv.Kind() == reflect.Ptr { + if rv.IsNil() { + return fmt.Errorf("proto: SetExtension called with nil value of type %T", v) + } + if isScalarKind(rv.Elem().Kind()) { + v = rv.Elem().Interface() + } + } + + xtd := xt.TypeDescriptor() + if !isValidExtension(mr.Descriptor(), xtd) { + return fmt.Errorf("proto: bad extended type; %T does not extend %T", xt.ExtendedType, m) + } + mr.Set(xtd, xt.ValueOf(v)) + clearUnknown(mr, fieldNum(xt.Field)) + return nil +} + +// SetRawExtension inserts b into the unknown fields of m. +// +// Deprecated: Use Message.ProtoReflect.SetUnknown instead. +func SetRawExtension(m Message, fnum int32, b []byte) { + mr := MessageReflect(m) + if mr == nil || !mr.IsValid() { + return + } + + // Verify that the raw field is valid. + for b0 := b; len(b0) > 0; { + num, _, n := protowire.ConsumeField(b0) + if int32(num) != fnum { + panic(fmt.Sprintf("mismatching field number: got %d, want %d", num, fnum)) + } + b0 = b0[n:] + } + + ClearExtension(m, &ExtensionDesc{Field: fnum}) + mr.SetUnknown(append(mr.GetUnknown(), b...)) +} + +// ExtensionDescs returns a list of extension descriptors found in m, +// containing descriptors for both populated extension fields in m and +// also unknown fields of m that are in the extension range. +// For the later case, an type incomplete descriptor is provided where only +// the ExtensionDesc.Field field is populated. +// The order of the extension descriptors is undefined. +func ExtensionDescs(m Message) ([]*ExtensionDesc, error) { + mr := MessageReflect(m) + if mr == nil || !mr.IsValid() || mr.Descriptor().ExtensionRanges().Len() == 0 { + return nil, errNotExtendable + } + + // Collect a set of known extension descriptors. + extDescs := make(map[protoreflect.FieldNumber]*ExtensionDesc) + mr.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { + if fd.IsExtension() { + xt := fd.(protoreflect.ExtensionTypeDescriptor) + if xd, ok := xt.Type().(*ExtensionDesc); ok { + extDescs[fd.Number()] = xd + } + } + return true + }) + + // Collect a set of unknown extension descriptors. + extRanges := mr.Descriptor().ExtensionRanges() + for b := mr.GetUnknown(); len(b) > 0; { + num, _, n := protowire.ConsumeField(b) + if extRanges.Has(num) && extDescs[num] == nil { + extDescs[num] = nil + } + b = b[n:] + } + + // Transpose the set of descriptors into a list. + var xts []*ExtensionDesc + for num, xt := range extDescs { + if xt == nil { + xt = &ExtensionDesc{Field: int32(num)} + } + xts = append(xts, xt) + } + return xts, nil +} + +// isValidExtension reports whether xtd is a valid extension descriptor for md. +func isValidExtension(md protoreflect.MessageDescriptor, xtd protoreflect.ExtensionTypeDescriptor) bool { + return xtd.ContainingMessage() == md && md.ExtensionRanges().Has(xtd.Number()) +} + +// isScalarKind reports whether k is a protobuf scalar kind (except bytes). +// This function exists for historical reasons since the representation of +// scalars differs between v1 and v2, where v1 uses *T and v2 uses T. +func isScalarKind(k reflect.Kind) bool { + switch k { + case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String: + return true + default: + return false + } +} + +// clearUnknown removes unknown fields from m where remover.Has reports true. +func clearUnknown(m protoreflect.Message, remover interface { + Has(protoreflect.FieldNumber) bool +}) { + var bo protoreflect.RawFields + for bi := m.GetUnknown(); len(bi) > 0; { + num, _, n := protowire.ConsumeField(bi) + if !remover.Has(num) { + bo = append(bo, bi[:n]...) + } + bi = bi[n:] + } + if bi := m.GetUnknown(); len(bi) != len(bo) { + m.SetUnknown(bo) + } +} + +type fieldNum protoreflect.FieldNumber + +func (n1 fieldNum) Has(n2 protoreflect.FieldNumber) bool { + return protoreflect.FieldNumber(n1) == n2 +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/properties.go b/go-controller/vendor/github.com/golang/protobuf/proto/properties.go new file mode 100644 index 0000000000..dcdc2202fa --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/properties.go @@ -0,0 +1,306 @@ +// Copyright 2010 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 proto + +import ( + "fmt" + "reflect" + "strconv" + "strings" + "sync" + + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoimpl" +) + +// StructProperties represents protocol buffer type information for a +// generated protobuf message in the open-struct API. +// +// Deprecated: Do not use. +type StructProperties struct { + // Prop are the properties for each field. + // + // Fields belonging to a oneof are stored in OneofTypes instead, with a + // single Properties representing the parent oneof held here. + // + // The order of Prop matches the order of fields in the Go struct. + // Struct fields that are not related to protobufs have a "XXX_" prefix + // in the Properties.Name and must be ignored by the user. + Prop []*Properties + + // OneofTypes contains information about the oneof fields in this message. + // It is keyed by the protobuf field name. + OneofTypes map[string]*OneofProperties +} + +// Properties represents the type information for a protobuf message field. +// +// Deprecated: Do not use. +type Properties struct { + // Name is a placeholder name with little meaningful semantic value. + // If the name has an "XXX_" prefix, the entire Properties must be ignored. + Name string + // OrigName is the protobuf field name or oneof name. + OrigName string + // JSONName is the JSON name for the protobuf field. + JSONName string + // Enum is a placeholder name for enums. + // For historical reasons, this is neither the Go name for the enum, + // nor the protobuf name for the enum. + Enum string // Deprecated: Do not use. + // Weak contains the full name of the weakly referenced message. + Weak string + // Wire is a string representation of the wire type. + Wire string + // WireType is the protobuf wire type for the field. + WireType int + // Tag is the protobuf field number. + Tag int + // Required reports whether this is a required field. + Required bool + // Optional reports whether this is a optional field. + Optional bool + // Repeated reports whether this is a repeated field. + Repeated bool + // Packed reports whether this is a packed repeated field of scalars. + Packed bool + // Proto3 reports whether this field operates under the proto3 syntax. + Proto3 bool + // Oneof reports whether this field belongs within a oneof. + Oneof bool + + // Default is the default value in string form. + Default string + // HasDefault reports whether the field has a default value. + HasDefault bool + + // MapKeyProp is the properties for the key field for a map field. + MapKeyProp *Properties + // MapValProp is the properties for the value field for a map field. + MapValProp *Properties +} + +// OneofProperties represents the type information for a protobuf oneof. +// +// Deprecated: Do not use. +type OneofProperties struct { + // Type is a pointer to the generated wrapper type for the field value. + // This is nil for messages that are not in the open-struct API. + Type reflect.Type + // Field is the index into StructProperties.Prop for the containing oneof. + Field int + // Prop is the properties for the field. + Prop *Properties +} + +// String formats the properties in the protobuf struct field tag style. +func (p *Properties) String() string { + s := p.Wire + s += "," + strconv.Itoa(p.Tag) + if p.Required { + s += ",req" + } + if p.Optional { + s += ",opt" + } + if p.Repeated { + s += ",rep" + } + if p.Packed { + s += ",packed" + } + s += ",name=" + p.OrigName + if p.JSONName != "" { + s += ",json=" + p.JSONName + } + if len(p.Enum) > 0 { + s += ",enum=" + p.Enum + } + if len(p.Weak) > 0 { + s += ",weak=" + p.Weak + } + if p.Proto3 { + s += ",proto3" + } + if p.Oneof { + s += ",oneof" + } + if p.HasDefault { + s += ",def=" + p.Default + } + return s +} + +// Parse populates p by parsing a string in the protobuf struct field tag style. +func (p *Properties) Parse(tag string) { + // For example: "bytes,49,opt,name=foo,def=hello!" + for len(tag) > 0 { + i := strings.IndexByte(tag, ',') + if i < 0 { + i = len(tag) + } + switch s := tag[:i]; { + case strings.HasPrefix(s, "name="): + p.OrigName = s[len("name="):] + case strings.HasPrefix(s, "json="): + p.JSONName = s[len("json="):] + case strings.HasPrefix(s, "enum="): + p.Enum = s[len("enum="):] + case strings.HasPrefix(s, "weak="): + p.Weak = s[len("weak="):] + case strings.Trim(s, "0123456789") == "": + n, _ := strconv.ParseUint(s, 10, 32) + p.Tag = int(n) + case s == "opt": + p.Optional = true + case s == "req": + p.Required = true + case s == "rep": + p.Repeated = true + case s == "varint" || s == "zigzag32" || s == "zigzag64": + p.Wire = s + p.WireType = WireVarint + case s == "fixed32": + p.Wire = s + p.WireType = WireFixed32 + case s == "fixed64": + p.Wire = s + p.WireType = WireFixed64 + case s == "bytes": + p.Wire = s + p.WireType = WireBytes + case s == "group": + p.Wire = s + p.WireType = WireStartGroup + case s == "packed": + p.Packed = true + case s == "proto3": + p.Proto3 = true + case s == "oneof": + p.Oneof = true + case strings.HasPrefix(s, "def="): + // The default tag is special in that everything afterwards is the + // default regardless of the presence of commas. + p.HasDefault = true + p.Default, i = tag[len("def="):], len(tag) + } + tag = strings.TrimPrefix(tag[i:], ",") + } +} + +// Init populates the properties from a protocol buffer struct tag. +// +// Deprecated: Do not use. +func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { + p.Name = name + p.OrigName = name + if tag == "" { + return + } + p.Parse(tag) + + if typ != nil && typ.Kind() == reflect.Map { + p.MapKeyProp = new(Properties) + p.MapKeyProp.Init(nil, "Key", f.Tag.Get("protobuf_key"), nil) + p.MapValProp = new(Properties) + p.MapValProp.Init(nil, "Value", f.Tag.Get("protobuf_val"), nil) + } +} + +var propertiesCache sync.Map // map[reflect.Type]*StructProperties + +// GetProperties returns the list of properties for the type represented by t, +// which must be a generated protocol buffer message in the open-struct API, +// where protobuf message fields are represented by exported Go struct fields. +// +// Deprecated: Use protobuf reflection instead. +func GetProperties(t reflect.Type) *StructProperties { + if p, ok := propertiesCache.Load(t); ok { + return p.(*StructProperties) + } + p, _ := propertiesCache.LoadOrStore(t, newProperties(t)) + return p.(*StructProperties) +} + +func newProperties(t reflect.Type) *StructProperties { + if t.Kind() != reflect.Struct { + panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t)) + } + + var hasOneof bool + prop := new(StructProperties) + + // Construct a list of properties for each field in the struct. + for i := 0; i < t.NumField(); i++ { + p := new(Properties) + f := t.Field(i) + tagField := f.Tag.Get("protobuf") + p.Init(f.Type, f.Name, tagField, &f) + + tagOneof := f.Tag.Get("protobuf_oneof") + if tagOneof != "" { + hasOneof = true + p.OrigName = tagOneof + } + + // Rename unrelated struct fields with the "XXX_" prefix since so much + // user code simply checks for this to exclude special fields. + if tagField == "" && tagOneof == "" && !strings.HasPrefix(p.Name, "XXX_") { + p.Name = "XXX_" + p.Name + p.OrigName = "XXX_" + p.OrigName + } else if p.Weak != "" { + p.Name = p.OrigName // avoid possible "XXX_" prefix on weak field + } + + prop.Prop = append(prop.Prop, p) + } + + // Construct a mapping of oneof field names to properties. + if hasOneof { + var oneofWrappers []interface{} + if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofFuncs"); ok { + oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[3].Interface().([]interface{}) + } + if fn, ok := reflect.PtrTo(t).MethodByName("XXX_OneofWrappers"); ok { + oneofWrappers = fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0].Interface().([]interface{}) + } + if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(protoreflect.ProtoMessage); ok { + if m, ok := m.ProtoReflect().(interface{ ProtoMessageInfo() *protoimpl.MessageInfo }); ok { + oneofWrappers = m.ProtoMessageInfo().OneofWrappers + } + } + + prop.OneofTypes = make(map[string]*OneofProperties) + for _, wrapper := range oneofWrappers { + p := &OneofProperties{ + Type: reflect.ValueOf(wrapper).Type(), // *T + Prop: new(Properties), + } + f := p.Type.Elem().Field(0) + p.Prop.Name = f.Name + p.Prop.Parse(f.Tag.Get("protobuf")) + + // Determine the struct field that contains this oneof. + // Each wrapper is assignable to exactly one parent field. + var foundOneof bool + for i := 0; i < t.NumField() && !foundOneof; i++ { + if p.Type.AssignableTo(t.Field(i).Type) { + p.Field = i + foundOneof = true + } + } + if !foundOneof { + panic(fmt.Sprintf("%v is not a generated message in the open-struct API", t)) + } + prop.OneofTypes[p.Prop.OrigName] = p + } + } + + return prop +} + +func (sp *StructProperties) Len() int { return len(sp.Prop) } +func (sp *StructProperties) Less(i, j int) bool { return false } +func (sp *StructProperties) Swap(i, j int) { return } diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/proto.go b/go-controller/vendor/github.com/golang/protobuf/proto/proto.go new file mode 100644 index 0000000000..5aee89c323 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/proto.go @@ -0,0 +1,167 @@ +// Copyright 2019 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 proto provides functionality for handling protocol buffer messages. +// In particular, it provides marshaling and unmarshaling between a protobuf +// message and the binary wire format. +// +// See https://developers.google.com/protocol-buffers/docs/gotutorial for +// more information. +// +// Deprecated: Use the "google.golang.org/protobuf/proto" package instead. +package proto + +import ( + protoV2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + ProtoPackageIsVersion1 = true + ProtoPackageIsVersion2 = true + ProtoPackageIsVersion3 = true + ProtoPackageIsVersion4 = true +) + +// GeneratedEnum is any enum type generated by protoc-gen-go +// which is a named int32 kind. +// This type exists for documentation purposes. +type GeneratedEnum interface{} + +// GeneratedMessage is any message type generated by protoc-gen-go +// which is a pointer to a named struct kind. +// This type exists for documentation purposes. +type GeneratedMessage interface{} + +// Message is a protocol buffer message. +// +// This is the v1 version of the message interface and is marginally better +// than an empty interface as it lacks any method to programatically interact +// with the contents of the message. +// +// A v2 message is declared in "google.golang.org/protobuf/proto".Message and +// exposes protobuf reflection as a first-class feature of the interface. +// +// To convert a v1 message to a v2 message, use the MessageV2 function. +// To convert a v2 message to a v1 message, use the MessageV1 function. +type Message = protoiface.MessageV1 + +// MessageV1 converts either a v1 or v2 message to a v1 message. +// It returns nil if m is nil. +func MessageV1(m GeneratedMessage) protoiface.MessageV1 { + return protoimpl.X.ProtoMessageV1Of(m) +} + +// MessageV2 converts either a v1 or v2 message to a v2 message. +// It returns nil if m is nil. +func MessageV2(m GeneratedMessage) protoV2.Message { + return protoimpl.X.ProtoMessageV2Of(m) +} + +// MessageReflect returns a reflective view for a message. +// It returns nil if m is nil. +func MessageReflect(m Message) protoreflect.Message { + return protoimpl.X.MessageOf(m) +} + +// Marshaler is implemented by messages that can marshal themselves. +// This interface is used by the following functions: Size, Marshal, +// Buffer.Marshal, and Buffer.EncodeMessage. +// +// Deprecated: Do not implement. +type Marshaler interface { + // Marshal formats the encoded bytes of the message. + // It should be deterministic and emit valid protobuf wire data. + // The caller takes ownership of the returned buffer. + Marshal() ([]byte, error) +} + +// Unmarshaler is implemented by messages that can unmarshal themselves. +// This interface is used by the following functions: Unmarshal, UnmarshalMerge, +// Buffer.Unmarshal, Buffer.DecodeMessage, and Buffer.DecodeGroup. +// +// Deprecated: Do not implement. +type Unmarshaler interface { + // Unmarshal parses the encoded bytes of the protobuf wire input. + // The provided buffer is only valid for during method call. + // It should not reset the receiver message. + Unmarshal([]byte) error +} + +// Merger is implemented by messages that can merge themselves. +// This interface is used by the following functions: Clone and Merge. +// +// Deprecated: Do not implement. +type Merger interface { + // Merge merges the contents of src into the receiver message. + // It clones all data structures in src such that it aliases no mutable + // memory referenced by src. + Merge(src Message) +} + +// RequiredNotSetError is an error type returned when +// marshaling or unmarshaling a message with missing required fields. +type RequiredNotSetError struct { + err error +} + +func (e *RequiredNotSetError) Error() string { + if e.err != nil { + return e.err.Error() + } + return "proto: required field not set" +} +func (e *RequiredNotSetError) RequiredNotSet() bool { + return true +} + +func checkRequiredNotSet(m protoV2.Message) error { + if err := protoV2.CheckInitialized(m); err != nil { + return &RequiredNotSetError{err: err} + } + return nil +} + +// Clone returns a deep copy of src. +func Clone(src Message) Message { + return MessageV1(protoV2.Clone(MessageV2(src))) +} + +// Merge merges src into dst, which must be messages of the same type. +// +// Populated scalar fields in src are copied to dst, while populated +// singular messages in src are merged into dst by recursively calling Merge. +// The elements of every list field in src is appended to the corresponded +// list fields in dst. The entries of every map field in src is copied into +// the corresponding map field in dst, possibly replacing existing entries. +// The unknown fields of src are appended to the unknown fields of dst. +func Merge(dst, src Message) { + protoV2.Merge(MessageV2(dst), MessageV2(src)) +} + +// Equal reports whether two messages are equal. +// If two messages marshal to the same bytes under deterministic serialization, +// then Equal is guaranteed to report true. +// +// Two messages are equal if they are the same protobuf message type, +// have the same set of populated known and extension field values, +// and the same set of unknown fields values. +// +// Scalar values are compared with the equivalent of the == operator in Go, +// except bytes values which are compared using bytes.Equal and +// floating point values which specially treat NaNs as equal. +// Message values are compared by recursively calling Equal. +// Lists are equal if each element value is also equal. +// Maps are equal if they have the same set of keys, where the pair of values +// for each key is also equal. +func Equal(x, y Message) bool { + return protoV2.Equal(MessageV2(x), MessageV2(y)) +} + +func isMessageSet(md protoreflect.MessageDescriptor) bool { + ms, ok := md.(interface{ IsMessageSet() bool }) + return ok && ms.IsMessageSet() +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/registry.go b/go-controller/vendor/github.com/golang/protobuf/proto/registry.go new file mode 100644 index 0000000000..066b4323b4 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/registry.go @@ -0,0 +1,317 @@ +// Copyright 2019 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 proto + +import ( + "bytes" + "compress/gzip" + "fmt" + "io/ioutil" + "reflect" + "strings" + "sync" + + "google.golang.org/protobuf/reflect/protodesc" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/runtime/protoimpl" +) + +// filePath is the path to the proto source file. +type filePath = string // e.g., "google/protobuf/descriptor.proto" + +// fileDescGZIP is the compressed contents of the encoded FileDescriptorProto. +type fileDescGZIP = []byte + +var fileCache sync.Map // map[filePath]fileDescGZIP + +// RegisterFile is called from generated code to register the compressed +// FileDescriptorProto with the file path for a proto source file. +// +// Deprecated: Use protoregistry.GlobalFiles.RegisterFile instead. +func RegisterFile(s filePath, d fileDescGZIP) { + // Decompress the descriptor. + zr, err := gzip.NewReader(bytes.NewReader(d)) + if err != nil { + panic(fmt.Sprintf("proto: invalid compressed file descriptor: %v", err)) + } + b, err := ioutil.ReadAll(zr) + if err != nil { + panic(fmt.Sprintf("proto: invalid compressed file descriptor: %v", err)) + } + + // Construct a protoreflect.FileDescriptor from the raw descriptor. + // Note that DescBuilder.Build automatically registers the constructed + // file descriptor with the v2 registry. + protoimpl.DescBuilder{RawDescriptor: b}.Build() + + // Locally cache the raw descriptor form for the file. + fileCache.Store(s, d) +} + +// FileDescriptor returns the compressed FileDescriptorProto given the file path +// for a proto source file. It returns nil if not found. +// +// Deprecated: Use protoregistry.GlobalFiles.FindFileByPath instead. +func FileDescriptor(s filePath) fileDescGZIP { + if v, ok := fileCache.Load(s); ok { + return v.(fileDescGZIP) + } + + // Find the descriptor in the v2 registry. + var b []byte + if fd, _ := protoregistry.GlobalFiles.FindFileByPath(s); fd != nil { + b, _ = Marshal(protodesc.ToFileDescriptorProto(fd)) + } + + // Locally cache the raw descriptor form for the file. + if len(b) > 0 { + v, _ := fileCache.LoadOrStore(s, protoimpl.X.CompressGZIP(b)) + return v.(fileDescGZIP) + } + return nil +} + +// enumName is the name of an enum. For historical reasons, the enum name is +// neither the full Go name nor the full protobuf name of the enum. +// The name is the dot-separated combination of just the proto package that the +// enum is declared within followed by the Go type name of the generated enum. +type enumName = string // e.g., "my.proto.package.GoMessage_GoEnum" + +// enumsByName maps enum values by name to their numeric counterpart. +type enumsByName = map[string]int32 + +// enumsByNumber maps enum values by number to their name counterpart. +type enumsByNumber = map[int32]string + +var enumCache sync.Map // map[enumName]enumsByName +var numFilesCache sync.Map // map[protoreflect.FullName]int + +// RegisterEnum is called from the generated code to register the mapping of +// enum value names to enum numbers for the enum identified by s. +// +// Deprecated: Use protoregistry.GlobalTypes.RegisterEnum instead. +func RegisterEnum(s enumName, _ enumsByNumber, m enumsByName) { + if _, ok := enumCache.Load(s); ok { + panic("proto: duplicate enum registered: " + s) + } + enumCache.Store(s, m) + + // This does not forward registration to the v2 registry since this API + // lacks sufficient information to construct a complete v2 enum descriptor. +} + +// EnumValueMap returns the mapping from enum value names to enum numbers for +// the enum of the given name. It returns nil if not found. +// +// Deprecated: Use protoregistry.GlobalTypes.FindEnumByName instead. +func EnumValueMap(s enumName) enumsByName { + if v, ok := enumCache.Load(s); ok { + return v.(enumsByName) + } + + // Check whether the cache is stale. If the number of files in the current + // package differs, then it means that some enums may have been recently + // registered upstream that we do not know about. + var protoPkg protoreflect.FullName + if i := strings.LastIndexByte(s, '.'); i >= 0 { + protoPkg = protoreflect.FullName(s[:i]) + } + v, _ := numFilesCache.Load(protoPkg) + numFiles, _ := v.(int) + if protoregistry.GlobalFiles.NumFilesByPackage(protoPkg) == numFiles { + return nil // cache is up-to-date; was not found earlier + } + + // Update the enum cache for all enums declared in the given proto package. + numFiles = 0 + protoregistry.GlobalFiles.RangeFilesByPackage(protoPkg, func(fd protoreflect.FileDescriptor) bool { + walkEnums(fd, func(ed protoreflect.EnumDescriptor) { + name := protoimpl.X.LegacyEnumName(ed) + if _, ok := enumCache.Load(name); !ok { + m := make(enumsByName) + evs := ed.Values() + for i := evs.Len() - 1; i >= 0; i-- { + ev := evs.Get(i) + m[string(ev.Name())] = int32(ev.Number()) + } + enumCache.LoadOrStore(name, m) + } + }) + numFiles++ + return true + }) + numFilesCache.Store(protoPkg, numFiles) + + // Check cache again for enum map. + if v, ok := enumCache.Load(s); ok { + return v.(enumsByName) + } + return nil +} + +// walkEnums recursively walks all enums declared in d. +func walkEnums(d interface { + Enums() protoreflect.EnumDescriptors + Messages() protoreflect.MessageDescriptors +}, f func(protoreflect.EnumDescriptor)) { + eds := d.Enums() + for i := eds.Len() - 1; i >= 0; i-- { + f(eds.Get(i)) + } + mds := d.Messages() + for i := mds.Len() - 1; i >= 0; i-- { + walkEnums(mds.Get(i), f) + } +} + +// messageName is the full name of protobuf message. +type messageName = string + +var messageTypeCache sync.Map // map[messageName]reflect.Type + +// RegisterType is called from generated code to register the message Go type +// for a message of the given name. +// +// Deprecated: Use protoregistry.GlobalTypes.RegisterMessage instead. +func RegisterType(m Message, s messageName) { + mt := protoimpl.X.LegacyMessageTypeOf(m, protoreflect.FullName(s)) + if err := protoregistry.GlobalTypes.RegisterMessage(mt); err != nil { + panic(err) + } + messageTypeCache.Store(s, reflect.TypeOf(m)) +} + +// RegisterMapType is called from generated code to register the Go map type +// for a protobuf message representing a map entry. +// +// Deprecated: Do not use. +func RegisterMapType(m interface{}, s messageName) { + t := reflect.TypeOf(m) + if t.Kind() != reflect.Map { + panic(fmt.Sprintf("invalid map kind: %v", t)) + } + if _, ok := messageTypeCache.Load(s); ok { + panic(fmt.Errorf("proto: duplicate proto message registered: %s", s)) + } + messageTypeCache.Store(s, t) +} + +// MessageType returns the message type for a named message. +// It returns nil if not found. +// +// Deprecated: Use protoregistry.GlobalTypes.FindMessageByName instead. +func MessageType(s messageName) reflect.Type { + if v, ok := messageTypeCache.Load(s); ok { + return v.(reflect.Type) + } + + // Derive the message type from the v2 registry. + var t reflect.Type + if mt, _ := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(s)); mt != nil { + t = messageGoType(mt) + } + + // If we could not get a concrete type, it is possible that it is a + // pseudo-message for a map entry. + if t == nil { + d, _ := protoregistry.GlobalFiles.FindDescriptorByName(protoreflect.FullName(s)) + if md, _ := d.(protoreflect.MessageDescriptor); md != nil && md.IsMapEntry() { + kt := goTypeForField(md.Fields().ByNumber(1)) + vt := goTypeForField(md.Fields().ByNumber(2)) + t = reflect.MapOf(kt, vt) + } + } + + // Locally cache the message type for the given name. + if t != nil { + v, _ := messageTypeCache.LoadOrStore(s, t) + return v.(reflect.Type) + } + return nil +} + +func goTypeForField(fd protoreflect.FieldDescriptor) reflect.Type { + switch k := fd.Kind(); k { + case protoreflect.EnumKind: + if et, _ := protoregistry.GlobalTypes.FindEnumByName(fd.Enum().FullName()); et != nil { + return enumGoType(et) + } + return reflect.TypeOf(protoreflect.EnumNumber(0)) + case protoreflect.MessageKind, protoreflect.GroupKind: + if mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName()); mt != nil { + return messageGoType(mt) + } + return reflect.TypeOf((*protoreflect.Message)(nil)).Elem() + default: + return reflect.TypeOf(fd.Default().Interface()) + } +} + +func enumGoType(et protoreflect.EnumType) reflect.Type { + return reflect.TypeOf(et.New(0)) +} + +func messageGoType(mt protoreflect.MessageType) reflect.Type { + return reflect.TypeOf(MessageV1(mt.Zero().Interface())) +} + +// MessageName returns the full protobuf name for the given message type. +// +// Deprecated: Use protoreflect.MessageDescriptor.FullName instead. +func MessageName(m Message) messageName { + if m == nil { + return "" + } + if m, ok := m.(interface{ XXX_MessageName() messageName }); ok { + return m.XXX_MessageName() + } + return messageName(protoimpl.X.MessageDescriptorOf(m).FullName()) +} + +// RegisterExtension is called from the generated code to register +// the extension descriptor. +// +// Deprecated: Use protoregistry.GlobalTypes.RegisterExtension instead. +func RegisterExtension(d *ExtensionDesc) { + if err := protoregistry.GlobalTypes.RegisterExtension(d); err != nil { + panic(err) + } +} + +type extensionsByNumber = map[int32]*ExtensionDesc + +var extensionCache sync.Map // map[messageName]extensionsByNumber + +// RegisteredExtensions returns a map of the registered extensions for the +// provided protobuf message, indexed by the extension field number. +// +// Deprecated: Use protoregistry.GlobalTypes.RangeExtensionsByMessage instead. +func RegisteredExtensions(m Message) extensionsByNumber { + // Check whether the cache is stale. If the number of extensions for + // the given message differs, then it means that some extensions were + // recently registered upstream that we do not know about. + s := MessageName(m) + v, _ := extensionCache.Load(s) + xs, _ := v.(extensionsByNumber) + if protoregistry.GlobalTypes.NumExtensionsByMessage(protoreflect.FullName(s)) == len(xs) { + return xs // cache is up-to-date + } + + // Cache is stale, re-compute the extensions map. + xs = make(extensionsByNumber) + protoregistry.GlobalTypes.RangeExtensionsByMessage(protoreflect.FullName(s), func(xt protoreflect.ExtensionType) bool { + if xd, ok := xt.(*ExtensionDesc); ok { + xs[int32(xt.TypeDescriptor().Number())] = xd + } else { + // TODO: This implies that the protoreflect.ExtensionType is a + // custom type not generated by protoc-gen-go. We could try and + // convert the type to an ExtensionDesc. + } + return true + }) + extensionCache.Store(s, xs) + return xs +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/text_decode.go b/go-controller/vendor/github.com/golang/protobuf/proto/text_decode.go new file mode 100644 index 0000000000..47eb3e4450 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/text_decode.go @@ -0,0 +1,801 @@ +// Copyright 2010 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 proto + +import ( + "encoding" + "errors" + "fmt" + "reflect" + "strconv" + "strings" + "unicode/utf8" + + "google.golang.org/protobuf/encoding/prototext" + protoV2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" +) + +const wrapTextUnmarshalV2 = false + +// ParseError is returned by UnmarshalText. +type ParseError struct { + Message string + + // Deprecated: Do not use. + Line, Offset int +} + +func (e *ParseError) Error() string { + if wrapTextUnmarshalV2 { + return e.Message + } + if e.Line == 1 { + return fmt.Sprintf("line 1.%d: %v", e.Offset, e.Message) + } + return fmt.Sprintf("line %d: %v", e.Line, e.Message) +} + +// UnmarshalText parses a proto text formatted string into m. +func UnmarshalText(s string, m Message) error { + if u, ok := m.(encoding.TextUnmarshaler); ok { + return u.UnmarshalText([]byte(s)) + } + + m.Reset() + mi := MessageV2(m) + + if wrapTextUnmarshalV2 { + err := prototext.UnmarshalOptions{ + AllowPartial: true, + }.Unmarshal([]byte(s), mi) + if err != nil { + return &ParseError{Message: err.Error()} + } + return checkRequiredNotSet(mi) + } else { + if err := newTextParser(s).unmarshalMessage(mi.ProtoReflect(), ""); err != nil { + return err + } + return checkRequiredNotSet(mi) + } +} + +type textParser struct { + s string // remaining input + done bool // whether the parsing is finished (success or error) + backed bool // whether back() was called + offset, line int + cur token +} + +type token struct { + value string + err *ParseError + line int // line number + offset int // byte number from start of input, not start of line + unquoted string // the unquoted version of value, if it was a quoted string +} + +func newTextParser(s string) *textParser { + p := new(textParser) + p.s = s + p.line = 1 + p.cur.line = 1 + return p +} + +func (p *textParser) unmarshalMessage(m protoreflect.Message, terminator string) (err error) { + md := m.Descriptor() + fds := md.Fields() + + // A struct is a sequence of "name: value", terminated by one of + // '>' or '}', or the end of the input. A name may also be + // "[extension]" or "[type/url]". + // + // The whole struct can also be an expanded Any message, like: + // [type/url] < ... struct contents ... > + seen := make(map[protoreflect.FieldNumber]bool) + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + if tok.value == "[" { + if err := p.unmarshalExtensionOrAny(m, seen); err != nil { + return err + } + continue + } + + // This is a normal, non-extension field. + name := protoreflect.Name(tok.value) + fd := fds.ByName(name) + switch { + case fd == nil: + gd := fds.ByName(protoreflect.Name(strings.ToLower(string(name)))) + if gd != nil && gd.Kind() == protoreflect.GroupKind && gd.Message().Name() == name { + fd = gd + } + case fd.Kind() == protoreflect.GroupKind && fd.Message().Name() != name: + fd = nil + case fd.IsWeak() && fd.Message().IsPlaceholder(): + fd = nil + } + if fd == nil { + typeName := string(md.FullName()) + if m, ok := m.Interface().(Message); ok { + t := reflect.TypeOf(m) + if t.Kind() == reflect.Ptr { + typeName = t.Elem().String() + } + } + return p.errorf("unknown field name %q in %v", name, typeName) + } + if od := fd.ContainingOneof(); od != nil && m.WhichOneof(od) != nil { + return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, od.Name()) + } + if fd.Cardinality() != protoreflect.Repeated && seen[fd.Number()] { + return p.errorf("non-repeated field %q was repeated", fd.Name()) + } + seen[fd.Number()] = true + + // Consume any colon. + if err := p.checkForColon(fd); err != nil { + return err + } + + // Parse into the field. + v := m.Get(fd) + if !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) { + v = m.Mutable(fd) + } + if v, err = p.unmarshalValue(v, fd); err != nil { + return err + } + m.Set(fd, v) + + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + } + return nil +} + +func (p *textParser) unmarshalExtensionOrAny(m protoreflect.Message, seen map[protoreflect.FieldNumber]bool) error { + name, err := p.consumeExtensionOrAnyName() + if err != nil { + return err + } + + // If it contains a slash, it's an Any type URL. + if slashIdx := strings.LastIndex(name, "/"); slashIdx >= 0 { + tok := p.next() + if tok.err != nil { + return tok.err + } + // consume an optional colon + if tok.value == ":" { + tok = p.next() + if tok.err != nil { + return tok.err + } + } + + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + + mt, err := protoregistry.GlobalTypes.FindMessageByURL(name) + if err != nil { + return p.errorf("unrecognized message %q in google.protobuf.Any", name[slashIdx+len("/"):]) + } + m2 := mt.New() + if err := p.unmarshalMessage(m2, terminator); err != nil { + return err + } + b, err := protoV2.Marshal(m2.Interface()) + if err != nil { + return p.errorf("failed to marshal message of type %q: %v", name[slashIdx+len("/"):], err) + } + + urlFD := m.Descriptor().Fields().ByName("type_url") + valFD := m.Descriptor().Fields().ByName("value") + if seen[urlFD.Number()] { + return p.errorf("Any message unpacked multiple times, or %q already set", urlFD.Name()) + } + if seen[valFD.Number()] { + return p.errorf("Any message unpacked multiple times, or %q already set", valFD.Name()) + } + m.Set(urlFD, protoreflect.ValueOfString(name)) + m.Set(valFD, protoreflect.ValueOfBytes(b)) + seen[urlFD.Number()] = true + seen[valFD.Number()] = true + return nil + } + + xname := protoreflect.FullName(name) + xt, _ := protoregistry.GlobalTypes.FindExtensionByName(xname) + if xt == nil && isMessageSet(m.Descriptor()) { + xt, _ = protoregistry.GlobalTypes.FindExtensionByName(xname.Append("message_set_extension")) + } + if xt == nil { + return p.errorf("unrecognized extension %q", name) + } + fd := xt.TypeDescriptor() + if fd.ContainingMessage().FullName() != m.Descriptor().FullName() { + return p.errorf("extension field %q does not extend message %q", name, m.Descriptor().FullName()) + } + + if err := p.checkForColon(fd); err != nil { + return err + } + + v := m.Get(fd) + if !m.Has(fd) && (fd.IsList() || fd.IsMap() || fd.Message() != nil) { + v = m.Mutable(fd) + } + v, err = p.unmarshalValue(v, fd) + if err != nil { + return err + } + m.Set(fd, v) + return p.consumeOptionalSeparator() +} + +func (p *textParser) unmarshalValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) { + tok := p.next() + if tok.err != nil { + return v, tok.err + } + if tok.value == "" { + return v, p.errorf("unexpected EOF") + } + + switch { + case fd.IsList(): + lv := v.List() + var err error + if tok.value == "[" { + // Repeated field with list notation, like [1,2,3]. + for { + vv := lv.NewElement() + vv, err = p.unmarshalSingularValue(vv, fd) + if err != nil { + return v, err + } + lv.Append(vv) + + tok := p.next() + if tok.err != nil { + return v, tok.err + } + if tok.value == "]" { + break + } + if tok.value != "," { + return v, p.errorf("Expected ']' or ',' found %q", tok.value) + } + } + return v, nil + } + + // One value of the repeated field. + p.back() + vv := lv.NewElement() + vv, err = p.unmarshalSingularValue(vv, fd) + if err != nil { + return v, err + } + lv.Append(vv) + return v, nil + case fd.IsMap(): + // The map entry should be this sequence of tokens: + // < key : KEY value : VALUE > + // However, implementations may omit key or value, and technically + // we should support them in any order. + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return v, p.errorf("expected '{' or '<', found %q", tok.value) + } + + keyFD := fd.MapKey() + valFD := fd.MapValue() + + mv := v.Map() + kv := keyFD.Default() + vv := mv.NewValue() + for { + tok := p.next() + if tok.err != nil { + return v, tok.err + } + if tok.value == terminator { + break + } + var err error + switch tok.value { + case "key": + if err := p.consumeToken(":"); err != nil { + return v, err + } + if kv, err = p.unmarshalSingularValue(kv, keyFD); err != nil { + return v, err + } + if err := p.consumeOptionalSeparator(); err != nil { + return v, err + } + case "value": + if err := p.checkForColon(valFD); err != nil { + return v, err + } + if vv, err = p.unmarshalSingularValue(vv, valFD); err != nil { + return v, err + } + if err := p.consumeOptionalSeparator(); err != nil { + return v, err + } + default: + p.back() + return v, p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) + } + } + mv.Set(kv.MapKey(), vv) + return v, nil + default: + p.back() + return p.unmarshalSingularValue(v, fd) + } +} + +func (p *textParser) unmarshalSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) (protoreflect.Value, error) { + tok := p.next() + if tok.err != nil { + return v, tok.err + } + if tok.value == "" { + return v, p.errorf("unexpected EOF") + } + + switch fd.Kind() { + case protoreflect.BoolKind: + switch tok.value { + case "true", "1", "t", "True": + return protoreflect.ValueOfBool(true), nil + case "false", "0", "f", "False": + return protoreflect.ValueOfBool(false), nil + } + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: + if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { + return protoreflect.ValueOfInt32(int32(x)), nil + } + + // The C++ parser accepts large positive hex numbers that uses + // two's complement arithmetic to represent negative numbers. + // This feature is here for backwards compatibility with C++. + if strings.HasPrefix(tok.value, "0x") { + if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { + return protoreflect.ValueOfInt32(int32(-(int64(^x) + 1))), nil + } + } + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: + if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { + return protoreflect.ValueOfInt64(int64(x)), nil + } + + // The C++ parser accepts large positive hex numbers that uses + // two's complement arithmetic to represent negative numbers. + // This feature is here for backwards compatibility with C++. + if strings.HasPrefix(tok.value, "0x") { + if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { + return protoreflect.ValueOfInt64(int64(-(int64(^x) + 1))), nil + } + } + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: + if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { + return protoreflect.ValueOfUint32(uint32(x)), nil + } + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { + return protoreflect.ValueOfUint64(uint64(x)), nil + } + case protoreflect.FloatKind: + // Ignore 'f' for compatibility with output generated by C++, + // but don't remove 'f' when the value is "-inf" or "inf". + v := tok.value + if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" { + v = v[:len(v)-len("f")] + } + if x, err := strconv.ParseFloat(v, 32); err == nil { + return protoreflect.ValueOfFloat32(float32(x)), nil + } + case protoreflect.DoubleKind: + // Ignore 'f' for compatibility with output generated by C++, + // but don't remove 'f' when the value is "-inf" or "inf". + v := tok.value + if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" { + v = v[:len(v)-len("f")] + } + if x, err := strconv.ParseFloat(v, 64); err == nil { + return protoreflect.ValueOfFloat64(float64(x)), nil + } + case protoreflect.StringKind: + if isQuote(tok.value[0]) { + return protoreflect.ValueOfString(tok.unquoted), nil + } + case protoreflect.BytesKind: + if isQuote(tok.value[0]) { + return protoreflect.ValueOfBytes([]byte(tok.unquoted)), nil + } + case protoreflect.EnumKind: + if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { + return protoreflect.ValueOfEnum(protoreflect.EnumNumber(x)), nil + } + vd := fd.Enum().Values().ByName(protoreflect.Name(tok.value)) + if vd != nil { + return protoreflect.ValueOfEnum(vd.Number()), nil + } + case protoreflect.MessageKind, protoreflect.GroupKind: + var terminator string + switch tok.value { + case "{": + terminator = "}" + case "<": + terminator = ">" + default: + return v, p.errorf("expected '{' or '<', found %q", tok.value) + } + err := p.unmarshalMessage(v.Message(), terminator) + return v, err + default: + panic(fmt.Sprintf("invalid kind %v", fd.Kind())) + } + return v, p.errorf("invalid %v: %v", fd.Kind(), tok.value) +} + +// Consume a ':' from the input stream (if the next token is a colon), +// returning an error if a colon is needed but not present. +func (p *textParser) checkForColon(fd protoreflect.FieldDescriptor) *ParseError { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ":" { + if fd.Message() == nil { + return p.errorf("expected ':', found %q", tok.value) + } + p.back() + } + return nil +} + +// consumeExtensionOrAnyName consumes an extension name or an Any type URL and +// the following ']'. It returns the name or URL consumed. +func (p *textParser) consumeExtensionOrAnyName() (string, error) { + tok := p.next() + if tok.err != nil { + return "", tok.err + } + + // If extension name or type url is quoted, it's a single token. + if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { + name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) + if err != nil { + return "", err + } + return name, p.consumeToken("]") + } + + // Consume everything up to "]" + var parts []string + for tok.value != "]" { + parts = append(parts, tok.value) + tok = p.next() + if tok.err != nil { + return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) + } + if p.done && tok.value != "]" { + return "", p.errorf("unclosed type_url or extension name") + } + } + return strings.Join(parts, ""), nil +} + +// consumeOptionalSeparator consumes an optional semicolon or comma. +// It is used in unmarshalMessage to provide backward compatibility. +func (p *textParser) consumeOptionalSeparator() error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ";" && tok.value != "," { + p.back() + } + return nil +} + +func (p *textParser) errorf(format string, a ...interface{}) *ParseError { + pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} + p.cur.err = pe + p.done = true + return pe +} + +func (p *textParser) skipWhitespace() { + i := 0 + for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { + if p.s[i] == '#' { + // comment; skip to end of line or input + for i < len(p.s) && p.s[i] != '\n' { + i++ + } + if i == len(p.s) { + break + } + } + if p.s[i] == '\n' { + p.line++ + } + i++ + } + p.offset += i + p.s = p.s[i:len(p.s)] + if len(p.s) == 0 { + p.done = true + } +} + +func (p *textParser) advance() { + // Skip whitespace + p.skipWhitespace() + if p.done { + return + } + + // Start of non-whitespace + p.cur.err = nil + p.cur.offset, p.cur.line = p.offset, p.line + p.cur.unquoted = "" + switch p.s[0] { + case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': + // Single symbol + p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] + case '"', '\'': + // Quoted string + i := 1 + for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { + if p.s[i] == '\\' && i+1 < len(p.s) { + // skip escaped char + i++ + } + i++ + } + if i >= len(p.s) || p.s[i] != p.s[0] { + p.errorf("unmatched quote") + return + } + unq, err := unquoteC(p.s[1:i], rune(p.s[0])) + if err != nil { + p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) + return + } + p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] + p.cur.unquoted = unq + default: + i := 0 + for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { + i++ + } + if i == 0 { + p.errorf("unexpected byte %#x", p.s[0]) + return + } + p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] + } + p.offset += len(p.cur.value) +} + +// Back off the parser by one token. Can only be done between calls to next(). +// It makes the next advance() a no-op. +func (p *textParser) back() { p.backed = true } + +// Advances the parser and returns the new current token. +func (p *textParser) next() *token { + if p.backed || p.done { + p.backed = false + return &p.cur + } + p.advance() + if p.done { + p.cur.value = "" + } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { + // Look for multiple quoted strings separated by whitespace, + // and concatenate them. + cat := p.cur + for { + p.skipWhitespace() + if p.done || !isQuote(p.s[0]) { + break + } + p.advance() + if p.cur.err != nil { + return &p.cur + } + cat.value += " " + p.cur.value + cat.unquoted += p.cur.unquoted + } + p.done = false // parser may have seen EOF, but we want to return cat + p.cur = cat + } + return &p.cur +} + +func (p *textParser) consumeToken(s string) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != s { + p.back() + return p.errorf("expected %q, found %q", s, tok.value) + } + return nil +} + +var errBadUTF8 = errors.New("proto: bad UTF-8") + +func unquoteC(s string, quote rune) (string, error) { + // This is based on C++'s tokenizer.cc. + // Despite its name, this is *not* parsing C syntax. + // For instance, "\0" is an invalid quoted string. + + // Avoid allocation in trivial cases. + simple := true + for _, r := range s { + if r == '\\' || r == quote { + simple = false + break + } + } + if simple { + return s, nil + } + + buf := make([]byte, 0, 3*len(s)/2) + for len(s) > 0 { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", errBadUTF8 + } + s = s[n:] + if r != '\\' { + if r < utf8.RuneSelf { + buf = append(buf, byte(r)) + } else { + buf = append(buf, string(r)...) + } + continue + } + + ch, tail, err := unescape(s) + if err != nil { + return "", err + } + buf = append(buf, ch...) + s = tail + } + return string(buf), nil +} + +func unescape(s string) (ch string, tail string, err error) { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", "", errBadUTF8 + } + s = s[n:] + switch r { + case 'a': + return "\a", s, nil + case 'b': + return "\b", s, nil + case 'f': + return "\f", s, nil + case 'n': + return "\n", s, nil + case 'r': + return "\r", s, nil + case 't': + return "\t", s, nil + case 'v': + return "\v", s, nil + case '?': + return "?", s, nil // trigraph workaround + case '\'', '"', '\\': + return string(r), s, nil + case '0', '1', '2', '3', '4', '5', '6', '7': + if len(s) < 2 { + return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) + } + ss := string(r) + s[:2] + s = s[2:] + i, err := strconv.ParseUint(ss, 8, 8) + if err != nil { + return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss) + } + return string([]byte{byte(i)}), s, nil + case 'x', 'X', 'u', 'U': + var n int + switch r { + case 'x', 'X': + n = 2 + case 'u': + n = 4 + case 'U': + n = 8 + } + if len(s) < n { + return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n) + } + ss := s[:n] + s = s[n:] + i, err := strconv.ParseUint(ss, 16, 64) + if err != nil { + return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss) + } + if r == 'x' || r == 'X' { + return string([]byte{byte(i)}), s, nil + } + if i > utf8.MaxRune { + return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) + } + return string(rune(i)), s, nil + } + return "", "", fmt.Errorf(`unknown escape \%c`, r) +} + +func isIdentOrNumberChar(c byte) bool { + switch { + case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': + return true + case '0' <= c && c <= '9': + return true + } + switch c { + case '-', '+', '.', '_': + return true + } + return false +} + +func isWhitespace(c byte) bool { + switch c { + case ' ', '\t', '\n', '\r': + return true + } + return false +} + +func isQuote(c byte) bool { + switch c { + case '"', '\'': + return true + } + return false +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/text_encode.go b/go-controller/vendor/github.com/golang/protobuf/proto/text_encode.go new file mode 100644 index 0000000000..a31134eeb3 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/text_encode.go @@ -0,0 +1,560 @@ +// Copyright 2010 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 proto + +import ( + "bytes" + "encoding" + "fmt" + "io" + "math" + "sort" + "strings" + + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" +) + +const wrapTextMarshalV2 = false + +// TextMarshaler is a configurable text format marshaler. +type TextMarshaler struct { + Compact bool // use compact text format (one line) + ExpandAny bool // expand google.protobuf.Any messages of known types +} + +// Marshal writes the proto text format of m to w. +func (tm *TextMarshaler) Marshal(w io.Writer, m Message) error { + b, err := tm.marshal(m) + if len(b) > 0 { + if _, err := w.Write(b); err != nil { + return err + } + } + return err +} + +// Text returns a proto text formatted string of m. +func (tm *TextMarshaler) Text(m Message) string { + b, _ := tm.marshal(m) + return string(b) +} + +func (tm *TextMarshaler) marshal(m Message) ([]byte, error) { + mr := MessageReflect(m) + if mr == nil || !mr.IsValid() { + return []byte(""), nil + } + + if wrapTextMarshalV2 { + if m, ok := m.(encoding.TextMarshaler); ok { + return m.MarshalText() + } + + opts := prototext.MarshalOptions{ + AllowPartial: true, + EmitUnknown: true, + } + if !tm.Compact { + opts.Indent = " " + } + if !tm.ExpandAny { + opts.Resolver = (*protoregistry.Types)(nil) + } + return opts.Marshal(mr.Interface()) + } else { + w := &textWriter{ + compact: tm.Compact, + expandAny: tm.ExpandAny, + complete: true, + } + + if m, ok := m.(encoding.TextMarshaler); ok { + b, err := m.MarshalText() + if err != nil { + return nil, err + } + w.Write(b) + return w.buf, nil + } + + err := w.writeMessage(mr) + return w.buf, err + } +} + +var ( + defaultTextMarshaler = TextMarshaler{} + compactTextMarshaler = TextMarshaler{Compact: true} +) + +// MarshalText writes the proto text format of m to w. +func MarshalText(w io.Writer, m Message) error { return defaultTextMarshaler.Marshal(w, m) } + +// MarshalTextString returns a proto text formatted string of m. +func MarshalTextString(m Message) string { return defaultTextMarshaler.Text(m) } + +// CompactText writes the compact proto text format of m to w. +func CompactText(w io.Writer, m Message) error { return compactTextMarshaler.Marshal(w, m) } + +// CompactTextString returns a compact proto text formatted string of m. +func CompactTextString(m Message) string { return compactTextMarshaler.Text(m) } + +var ( + newline = []byte("\n") + endBraceNewline = []byte("}\n") + posInf = []byte("inf") + negInf = []byte("-inf") + nan = []byte("nan") +) + +// textWriter is an io.Writer that tracks its indentation level. +type textWriter struct { + compact bool // same as TextMarshaler.Compact + expandAny bool // same as TextMarshaler.ExpandAny + complete bool // whether the current position is a complete line + indent int // indentation level; never negative + buf []byte +} + +func (w *textWriter) Write(p []byte) (n int, _ error) { + newlines := bytes.Count(p, newline) + if newlines == 0 { + if !w.compact && w.complete { + w.writeIndent() + } + w.buf = append(w.buf, p...) + w.complete = false + return len(p), nil + } + + frags := bytes.SplitN(p, newline, newlines+1) + if w.compact { + for i, frag := range frags { + if i > 0 { + w.buf = append(w.buf, ' ') + n++ + } + w.buf = append(w.buf, frag...) + n += len(frag) + } + return n, nil + } + + for i, frag := range frags { + if w.complete { + w.writeIndent() + } + w.buf = append(w.buf, frag...) + n += len(frag) + if i+1 < len(frags) { + w.buf = append(w.buf, '\n') + n++ + } + } + w.complete = len(frags[len(frags)-1]) == 0 + return n, nil +} + +func (w *textWriter) WriteByte(c byte) error { + if w.compact && c == '\n' { + c = ' ' + } + if !w.compact && w.complete { + w.writeIndent() + } + w.buf = append(w.buf, c) + w.complete = c == '\n' + return nil +} + +func (w *textWriter) writeName(fd protoreflect.FieldDescriptor) { + if !w.compact && w.complete { + w.writeIndent() + } + w.complete = false + + if fd.Kind() != protoreflect.GroupKind { + w.buf = append(w.buf, fd.Name()...) + w.WriteByte(':') + } else { + // Use message type name for group field name. + w.buf = append(w.buf, fd.Message().Name()...) + } + + if !w.compact { + w.WriteByte(' ') + } +} + +func requiresQuotes(u string) bool { + // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. + for _, ch := range u { + switch { + case ch == '.' || ch == '/' || ch == '_': + continue + case '0' <= ch && ch <= '9': + continue + case 'A' <= ch && ch <= 'Z': + continue + case 'a' <= ch && ch <= 'z': + continue + default: + return true + } + } + return false +} + +// writeProto3Any writes an expanded google.protobuf.Any message. +// +// It returns (false, nil) if sv value can't be unmarshaled (e.g. because +// required messages are not linked in). +// +// It returns (true, error) when sv was written in expanded format or an error +// was encountered. +func (w *textWriter) writeProto3Any(m protoreflect.Message) (bool, error) { + md := m.Descriptor() + fdURL := md.Fields().ByName("type_url") + fdVal := md.Fields().ByName("value") + + url := m.Get(fdURL).String() + mt, err := protoregistry.GlobalTypes.FindMessageByURL(url) + if err != nil { + return false, nil + } + + b := m.Get(fdVal).Bytes() + m2 := mt.New() + if err := proto.Unmarshal(b, m2.Interface()); err != nil { + return false, nil + } + w.Write([]byte("[")) + if requiresQuotes(url) { + w.writeQuotedString(url) + } else { + w.Write([]byte(url)) + } + if w.compact { + w.Write([]byte("]:<")) + } else { + w.Write([]byte("]: <\n")) + w.indent++ + } + if err := w.writeMessage(m2); err != nil { + return true, err + } + if w.compact { + w.Write([]byte("> ")) + } else { + w.indent-- + w.Write([]byte(">\n")) + } + return true, nil +} + +func (w *textWriter) writeMessage(m protoreflect.Message) error { + md := m.Descriptor() + if w.expandAny && md.FullName() == "google.protobuf.Any" { + if canExpand, err := w.writeProto3Any(m); canExpand { + return err + } + } + + fds := md.Fields() + for i := 0; i < fds.Len(); { + fd := fds.Get(i) + if od := fd.ContainingOneof(); od != nil { + fd = m.WhichOneof(od) + i += od.Fields().Len() + } else { + i++ + } + if fd == nil || !m.Has(fd) { + continue + } + + switch { + case fd.IsList(): + lv := m.Get(fd).List() + for j := 0; j < lv.Len(); j++ { + w.writeName(fd) + v := lv.Get(j) + if err := w.writeSingularValue(v, fd); err != nil { + return err + } + w.WriteByte('\n') + } + case fd.IsMap(): + kfd := fd.MapKey() + vfd := fd.MapValue() + mv := m.Get(fd).Map() + + type entry struct{ key, val protoreflect.Value } + var entries []entry + mv.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { + entries = append(entries, entry{k.Value(), v}) + return true + }) + sort.Slice(entries, func(i, j int) bool { + switch kfd.Kind() { + case protoreflect.BoolKind: + return !entries[i].key.Bool() && entries[j].key.Bool() + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: + return entries[i].key.Int() < entries[j].key.Int() + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + return entries[i].key.Uint() < entries[j].key.Uint() + case protoreflect.StringKind: + return entries[i].key.String() < entries[j].key.String() + default: + panic("invalid kind") + } + }) + for _, entry := range entries { + w.writeName(fd) + w.WriteByte('<') + if !w.compact { + w.WriteByte('\n') + } + w.indent++ + w.writeName(kfd) + if err := w.writeSingularValue(entry.key, kfd); err != nil { + return err + } + w.WriteByte('\n') + w.writeName(vfd) + if err := w.writeSingularValue(entry.val, vfd); err != nil { + return err + } + w.WriteByte('\n') + w.indent-- + w.WriteByte('>') + w.WriteByte('\n') + } + default: + w.writeName(fd) + if err := w.writeSingularValue(m.Get(fd), fd); err != nil { + return err + } + w.WriteByte('\n') + } + } + + if b := m.GetUnknown(); len(b) > 0 { + w.writeUnknownFields(b) + } + return w.writeExtensions(m) +} + +func (w *textWriter) writeSingularValue(v protoreflect.Value, fd protoreflect.FieldDescriptor) error { + switch fd.Kind() { + case protoreflect.FloatKind, protoreflect.DoubleKind: + switch vf := v.Float(); { + case math.IsInf(vf, +1): + w.Write(posInf) + case math.IsInf(vf, -1): + w.Write(negInf) + case math.IsNaN(vf): + w.Write(nan) + default: + fmt.Fprint(w, v.Interface()) + } + case protoreflect.StringKind: + // NOTE: This does not validate UTF-8 for historical reasons. + w.writeQuotedString(string(v.String())) + case protoreflect.BytesKind: + w.writeQuotedString(string(v.Bytes())) + case protoreflect.MessageKind, protoreflect.GroupKind: + var bra, ket byte = '<', '>' + if fd.Kind() == protoreflect.GroupKind { + bra, ket = '{', '}' + } + w.WriteByte(bra) + if !w.compact { + w.WriteByte('\n') + } + w.indent++ + m := v.Message() + if m2, ok := m.Interface().(encoding.TextMarshaler); ok { + b, err := m2.MarshalText() + if err != nil { + return err + } + w.Write(b) + } else { + w.writeMessage(m) + } + w.indent-- + w.WriteByte(ket) + case protoreflect.EnumKind: + if ev := fd.Enum().Values().ByNumber(v.Enum()); ev != nil { + fmt.Fprint(w, ev.Name()) + } else { + fmt.Fprint(w, v.Enum()) + } + default: + fmt.Fprint(w, v.Interface()) + } + return nil +} + +// writeQuotedString writes a quoted string in the protocol buffer text format. +func (w *textWriter) writeQuotedString(s string) { + w.WriteByte('"') + for i := 0; i < len(s); i++ { + switch c := s[i]; c { + case '\n': + w.buf = append(w.buf, `\n`...) + case '\r': + w.buf = append(w.buf, `\r`...) + case '\t': + w.buf = append(w.buf, `\t`...) + case '"': + w.buf = append(w.buf, `\"`...) + case '\\': + w.buf = append(w.buf, `\\`...) + default: + if isPrint := c >= 0x20 && c < 0x7f; isPrint { + w.buf = append(w.buf, c) + } else { + w.buf = append(w.buf, fmt.Sprintf(`\%03o`, c)...) + } + } + } + w.WriteByte('"') +} + +func (w *textWriter) writeUnknownFields(b []byte) { + if !w.compact { + fmt.Fprintf(w, "/* %d unknown bytes */\n", len(b)) + } + + for len(b) > 0 { + num, wtyp, n := protowire.ConsumeTag(b) + if n < 0 { + return + } + b = b[n:] + + if wtyp == protowire.EndGroupType { + w.indent-- + w.Write(endBraceNewline) + continue + } + fmt.Fprint(w, num) + if wtyp != protowire.StartGroupType { + w.WriteByte(':') + } + if !w.compact || wtyp == protowire.StartGroupType { + w.WriteByte(' ') + } + switch wtyp { + case protowire.VarintType: + v, n := protowire.ConsumeVarint(b) + if n < 0 { + return + } + b = b[n:] + fmt.Fprint(w, v) + case protowire.Fixed32Type: + v, n := protowire.ConsumeFixed32(b) + if n < 0 { + return + } + b = b[n:] + fmt.Fprint(w, v) + case protowire.Fixed64Type: + v, n := protowire.ConsumeFixed64(b) + if n < 0 { + return + } + b = b[n:] + fmt.Fprint(w, v) + case protowire.BytesType: + v, n := protowire.ConsumeBytes(b) + if n < 0 { + return + } + b = b[n:] + fmt.Fprintf(w, "%q", v) + case protowire.StartGroupType: + w.WriteByte('{') + w.indent++ + default: + fmt.Fprintf(w, "/* unknown wire type %d */", wtyp) + } + w.WriteByte('\n') + } +} + +// writeExtensions writes all the extensions in m. +func (w *textWriter) writeExtensions(m protoreflect.Message) error { + md := m.Descriptor() + if md.ExtensionRanges().Len() == 0 { + return nil + } + + type ext struct { + desc protoreflect.FieldDescriptor + val protoreflect.Value + } + var exts []ext + m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { + if fd.IsExtension() { + exts = append(exts, ext{fd, v}) + } + return true + }) + sort.Slice(exts, func(i, j int) bool { + return exts[i].desc.Number() < exts[j].desc.Number() + }) + + for _, ext := range exts { + // For message set, use the name of the message as the extension name. + name := string(ext.desc.FullName()) + if isMessageSet(ext.desc.ContainingMessage()) { + name = strings.TrimSuffix(name, ".message_set_extension") + } + + if !ext.desc.IsList() { + if err := w.writeSingularExtension(name, ext.val, ext.desc); err != nil { + return err + } + } else { + lv := ext.val.List() + for i := 0; i < lv.Len(); i++ { + if err := w.writeSingularExtension(name, lv.Get(i), ext.desc); err != nil { + return err + } + } + } + } + return nil +} + +func (w *textWriter) writeSingularExtension(name string, v protoreflect.Value, fd protoreflect.FieldDescriptor) error { + fmt.Fprintf(w, "[%s]:", name) + if !w.compact { + w.WriteByte(' ') + } + if err := w.writeSingularValue(v, fd); err != nil { + return err + } + w.WriteByte('\n') + return nil +} + +func (w *textWriter) writeIndent() { + if !w.complete { + return + } + for i := 0; i < w.indent*2; i++ { + w.buf = append(w.buf, ' ') + } + w.complete = false +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/wire.go b/go-controller/vendor/github.com/golang/protobuf/proto/wire.go new file mode 100644 index 0000000000..d7c28da5a7 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/wire.go @@ -0,0 +1,78 @@ +// Copyright 2019 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 proto + +import ( + protoV2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoiface" +) + +// Size returns the size in bytes of the wire-format encoding of m. +func Size(m Message) int { + if m == nil { + return 0 + } + mi := MessageV2(m) + return protoV2.Size(mi) +} + +// Marshal returns the wire-format encoding of m. +func Marshal(m Message) ([]byte, error) { + b, err := marshalAppend(nil, m, false) + if b == nil { + b = zeroBytes + } + return b, err +} + +var zeroBytes = make([]byte, 0, 0) + +func marshalAppend(buf []byte, m Message, deterministic bool) ([]byte, error) { + if m == nil { + return nil, ErrNil + } + mi := MessageV2(m) + nbuf, err := protoV2.MarshalOptions{ + Deterministic: deterministic, + AllowPartial: true, + }.MarshalAppend(buf, mi) + if err != nil { + return buf, err + } + if len(buf) == len(nbuf) { + if !mi.ProtoReflect().IsValid() { + return buf, ErrNil + } + } + return nbuf, checkRequiredNotSet(mi) +} + +// Unmarshal parses a wire-format message in b and places the decoded results in m. +// +// Unmarshal resets m before starting to unmarshal, so any existing data in m is always +// removed. Use UnmarshalMerge to preserve and append to existing data. +func Unmarshal(b []byte, m Message) error { + m.Reset() + return UnmarshalMerge(b, m) +} + +// UnmarshalMerge parses a wire-format message in b and places the decoded results in m. +func UnmarshalMerge(b []byte, m Message) error { + mi := MessageV2(m) + out, err := protoV2.UnmarshalOptions{ + AllowPartial: true, + Merge: true, + }.UnmarshalState(protoiface.UnmarshalInput{ + Buf: b, + Message: mi.ProtoReflect(), + }) + if err != nil { + return err + } + if out.Flags&protoiface.UnmarshalInitialized > 0 { + return nil + } + return checkRequiredNotSet(mi) +} diff --git a/go-controller/vendor/github.com/golang/protobuf/proto/wrappers.go b/go-controller/vendor/github.com/golang/protobuf/proto/wrappers.go new file mode 100644 index 0000000000..398e348599 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/proto/wrappers.go @@ -0,0 +1,34 @@ +// Copyright 2019 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 proto + +// Bool stores v in a new bool value and returns a pointer to it. +func Bool(v bool) *bool { return &v } + +// Int stores v in a new int32 value and returns a pointer to it. +// +// Deprecated: Use Int32 instead. +func Int(v int) *int32 { return Int32(int32(v)) } + +// Int32 stores v in a new int32 value and returns a pointer to it. +func Int32(v int32) *int32 { return &v } + +// Int64 stores v in a new int64 value and returns a pointer to it. +func Int64(v int64) *int64 { return &v } + +// Uint32 stores v in a new uint32 value and returns a pointer to it. +func Uint32(v uint32) *uint32 { return &v } + +// Uint64 stores v in a new uint64 value and returns a pointer to it. +func Uint64(v uint64) *uint64 { return &v } + +// Float32 stores v in a new float32 value and returns a pointer to it. +func Float32(v float32) *float32 { return &v } + +// Float64 stores v in a new float64 value and returns a pointer to it. +func Float64(v float64) *float64 { return &v } + +// String stores v in a new string value and returns a pointer to it. +func String(v string) *string { return &v } diff --git a/go-controller/vendor/github.com/golang/protobuf/ptypes/any.go b/go-controller/vendor/github.com/golang/protobuf/ptypes/any.go new file mode 100644 index 0000000000..fdff3fdb4c --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/ptypes/any.go @@ -0,0 +1,180 @@ +// Copyright 2016 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 ptypes + +import ( + "fmt" + "strings" + + "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + + anypb "github.com/golang/protobuf/ptypes/any" +) + +const urlPrefix = "type.googleapis.com/" + +// AnyMessageName returns the message name contained in an anypb.Any message. +// Most type assertions should use the Is function instead. +// +// Deprecated: Call the any.MessageName method instead. +func AnyMessageName(any *anypb.Any) (string, error) { + name, err := anyMessageName(any) + return string(name), err +} +func anyMessageName(any *anypb.Any) (protoreflect.FullName, error) { + if any == nil { + return "", fmt.Errorf("message is nil") + } + name := protoreflect.FullName(any.TypeUrl) + if i := strings.LastIndex(any.TypeUrl, "/"); i >= 0 { + name = name[i+len("/"):] + } + if !name.IsValid() { + return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl) + } + return name, nil +} + +// MarshalAny marshals the given message m into an anypb.Any message. +// +// Deprecated: Call the anypb.New function instead. +func MarshalAny(m proto.Message) (*anypb.Any, error) { + switch dm := m.(type) { + case DynamicAny: + m = dm.Message + case *DynamicAny: + if dm == nil { + return nil, proto.ErrNil + } + m = dm.Message + } + b, err := proto.Marshal(m) + if err != nil { + return nil, err + } + return &anypb.Any{TypeUrl: urlPrefix + proto.MessageName(m), Value: b}, nil +} + +// Empty returns a new message of the type specified in an anypb.Any message. +// It returns protoregistry.NotFound if the corresponding message type could not +// be resolved in the global registry. +// +// Deprecated: Use protoregistry.GlobalTypes.FindMessageByName instead +// to resolve the message name and create a new instance of it. +func Empty(any *anypb.Any) (proto.Message, error) { + name, err := anyMessageName(any) + if err != nil { + return nil, err + } + mt, err := protoregistry.GlobalTypes.FindMessageByName(name) + if err != nil { + return nil, err + } + return proto.MessageV1(mt.New().Interface()), nil +} + +// UnmarshalAny unmarshals the encoded value contained in the anypb.Any message +// into the provided message m. It returns an error if the target message +// does not match the type in the Any message or if an unmarshal error occurs. +// +// The target message m may be a *DynamicAny message. If the underlying message +// type could not be resolved, then this returns protoregistry.NotFound. +// +// Deprecated: Call the any.UnmarshalTo method instead. +func UnmarshalAny(any *anypb.Any, m proto.Message) error { + if dm, ok := m.(*DynamicAny); ok { + if dm.Message == nil { + var err error + dm.Message, err = Empty(any) + if err != nil { + return err + } + } + m = dm.Message + } + + anyName, err := AnyMessageName(any) + if err != nil { + return err + } + msgName := proto.MessageName(m) + if anyName != msgName { + return fmt.Errorf("mismatched message type: got %q want %q", anyName, msgName) + } + return proto.Unmarshal(any.Value, m) +} + +// Is reports whether the Any message contains a message of the specified type. +// +// Deprecated: Call the any.MessageIs method instead. +func Is(any *anypb.Any, m proto.Message) bool { + if any == nil || m == nil { + return false + } + name := proto.MessageName(m) + if !strings.HasSuffix(any.TypeUrl, name) { + return false + } + return len(any.TypeUrl) == len(name) || any.TypeUrl[len(any.TypeUrl)-len(name)-1] == '/' +} + +// DynamicAny is a value that can be passed to UnmarshalAny to automatically +// allocate a proto.Message for the type specified in an anypb.Any message. +// The allocated message is stored in the embedded proto.Message. +// +// Example: +// +// var x ptypes.DynamicAny +// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } +// fmt.Printf("unmarshaled message: %v", x.Message) +// +// Deprecated: Use the any.UnmarshalNew method instead to unmarshal +// the any message contents into a new instance of the underlying message. +type DynamicAny struct{ proto.Message } + +func (m DynamicAny) String() string { + if m.Message == nil { + return "" + } + return m.Message.String() +} +func (m DynamicAny) Reset() { + if m.Message == nil { + return + } + m.Message.Reset() +} +func (m DynamicAny) ProtoMessage() { + return +} +func (m DynamicAny) ProtoReflect() protoreflect.Message { + if m.Message == nil { + return nil + } + return dynamicAny{proto.MessageReflect(m.Message)} +} + +type dynamicAny struct{ protoreflect.Message } + +func (m dynamicAny) Type() protoreflect.MessageType { + return dynamicAnyType{m.Message.Type()} +} +func (m dynamicAny) New() protoreflect.Message { + return dynamicAnyType{m.Message.Type()}.New() +} +func (m dynamicAny) Interface() protoreflect.ProtoMessage { + return DynamicAny{proto.MessageV1(m.Message.Interface())} +} + +type dynamicAnyType struct{ protoreflect.MessageType } + +func (t dynamicAnyType) New() protoreflect.Message { + return dynamicAny{t.MessageType.New()} +} +func (t dynamicAnyType) Zero() protoreflect.Message { + return dynamicAny{t.MessageType.Zero()} +} diff --git a/go-controller/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/go-controller/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go new file mode 100644 index 0000000000..0ef27d33de --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go @@ -0,0 +1,62 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/golang/protobuf/ptypes/any/any.proto + +package any + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" +) + +// Symbols defined in public import of google/protobuf/any.proto. + +type Any = anypb.Any + +var File_github_com_golang_protobuf_ptypes_any_any_proto protoreflect.FileDescriptor + +var file_github_com_golang_protobuf_ptypes_any_any_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x61, 0x6e, 0x79, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x2b, 0x5a, 0x29, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2f, 0x61, 0x6e, 0x79, 0x3b, 0x61, 0x6e, 0x79, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes = []interface{}{} +var file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_golang_protobuf_ptypes_any_any_proto_init() } +func file_github_com_golang_protobuf_ptypes_any_any_proto_init() { + if File_github_com_golang_protobuf_ptypes_any_any_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_golang_protobuf_ptypes_any_any_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes, + DependencyIndexes: file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs, + }.Build() + File_github_com_golang_protobuf_ptypes_any_any_proto = out.File + file_github_com_golang_protobuf_ptypes_any_any_proto_rawDesc = nil + file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes = nil + file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs = nil +} diff --git a/go-controller/vendor/github.com/golang/protobuf/ptypes/doc.go b/go-controller/vendor/github.com/golang/protobuf/ptypes/doc.go new file mode 100644 index 0000000000..d3c33259d2 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/ptypes/doc.go @@ -0,0 +1,10 @@ +// Copyright 2016 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 ptypes provides functionality for interacting with well-known types. +// +// Deprecated: Well-known types have specialized functionality directly +// injected into the generated packages for each message type. +// See the deprecation notice for each function for the suggested alternative. +package ptypes diff --git a/go-controller/vendor/github.com/golang/protobuf/ptypes/duration.go b/go-controller/vendor/github.com/golang/protobuf/ptypes/duration.go new file mode 100644 index 0000000000..b2b55dd851 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/ptypes/duration.go @@ -0,0 +1,76 @@ +// Copyright 2016 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 ptypes + +import ( + "errors" + "fmt" + "time" + + durationpb "github.com/golang/protobuf/ptypes/duration" +) + +// Range of google.protobuf.Duration as specified in duration.proto. +// This is about 10,000 years in seconds. +const ( + maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) + minSeconds = -maxSeconds +) + +// Duration converts a durationpb.Duration to a time.Duration. +// Duration returns an error if dur is invalid or overflows a time.Duration. +// +// Deprecated: Call the dur.AsDuration and dur.CheckValid methods instead. +func Duration(dur *durationpb.Duration) (time.Duration, error) { + if err := validateDuration(dur); err != nil { + return 0, err + } + d := time.Duration(dur.Seconds) * time.Second + if int64(d/time.Second) != dur.Seconds { + return 0, fmt.Errorf("duration: %v is out of range for time.Duration", dur) + } + if dur.Nanos != 0 { + d += time.Duration(dur.Nanos) * time.Nanosecond + if (d < 0) != (dur.Nanos < 0) { + return 0, fmt.Errorf("duration: %v is out of range for time.Duration", dur) + } + } + return d, nil +} + +// DurationProto converts a time.Duration to a durationpb.Duration. +// +// Deprecated: Call the durationpb.New function instead. +func DurationProto(d time.Duration) *durationpb.Duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &durationpb.Duration{ + Seconds: int64(secs), + Nanos: int32(nanos), + } +} + +// validateDuration determines whether the durationpb.Duration is valid +// according to the definition in google/protobuf/duration.proto. +// A valid durpb.Duration may still be too large to fit into a time.Duration +// Note that the range of durationpb.Duration is about 10,000 years, +// while the range of time.Duration is about 290 years. +func validateDuration(dur *durationpb.Duration) error { + if dur == nil { + return errors.New("duration: nil Duration") + } + if dur.Seconds < minSeconds || dur.Seconds > maxSeconds { + return fmt.Errorf("duration: %v: seconds out of range", dur) + } + if dur.Nanos <= -1e9 || dur.Nanos >= 1e9 { + return fmt.Errorf("duration: %v: nanos out of range", dur) + } + // Seconds and Nanos must have the same sign, unless d.Nanos is zero. + if (dur.Seconds < 0 && dur.Nanos > 0) || (dur.Seconds > 0 && dur.Nanos < 0) { + return fmt.Errorf("duration: %v: seconds and nanos have different signs", dur) + } + return nil +} diff --git a/go-controller/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/go-controller/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go new file mode 100644 index 0000000000..d0079ee3ef --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go @@ -0,0 +1,63 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/golang/protobuf/ptypes/duration/duration.proto + +package duration + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" +) + +// Symbols defined in public import of google/protobuf/duration.proto. + +type Duration = durationpb.Duration + +var File_github_com_golang_protobuf_ptypes_duration_duration_proto protoreflect.FileDescriptor + +var file_github_com_golang_protobuf_ptypes_duration_duration_proto_rawDesc = []byte{ + 0x0a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x35, 0x5a, 0x33, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_github_com_golang_protobuf_ptypes_duration_duration_proto_goTypes = []interface{}{} +var file_github_com_golang_protobuf_ptypes_duration_duration_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_golang_protobuf_ptypes_duration_duration_proto_init() } +func file_github_com_golang_protobuf_ptypes_duration_duration_proto_init() { + if File_github_com_golang_protobuf_ptypes_duration_duration_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_golang_protobuf_ptypes_duration_duration_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_github_com_golang_protobuf_ptypes_duration_duration_proto_goTypes, + DependencyIndexes: file_github_com_golang_protobuf_ptypes_duration_duration_proto_depIdxs, + }.Build() + File_github_com_golang_protobuf_ptypes_duration_duration_proto = out.File + file_github_com_golang_protobuf_ptypes_duration_duration_proto_rawDesc = nil + file_github_com_golang_protobuf_ptypes_duration_duration_proto_goTypes = nil + file_github_com_golang_protobuf_ptypes_duration_duration_proto_depIdxs = nil +} diff --git a/go-controller/vendor/github.com/golang/protobuf/ptypes/timestamp.go b/go-controller/vendor/github.com/golang/protobuf/ptypes/timestamp.go new file mode 100644 index 0000000000..8368a3f70d --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/ptypes/timestamp.go @@ -0,0 +1,112 @@ +// Copyright 2016 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 ptypes + +import ( + "errors" + "fmt" + "time" + + timestamppb "github.com/golang/protobuf/ptypes/timestamp" +) + +// Range of google.protobuf.Duration as specified in timestamp.proto. +const ( + // Seconds field of the earliest valid Timestamp. + // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + minValidSeconds = -62135596800 + // Seconds field just after the latest valid Timestamp. + // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + maxValidSeconds = 253402300800 +) + +// Timestamp converts a timestamppb.Timestamp to a time.Time. +// It returns an error if the argument is invalid. +// +// Unlike most Go functions, if Timestamp returns an error, the first return +// value is not the zero time.Time. Instead, it is the value obtained from the +// time.Unix function when passed the contents of the Timestamp, in the UTC +// locale. This may or may not be a meaningful time; many invalid Timestamps +// do map to valid time.Times. +// +// A nil Timestamp returns an error. The first return value in that case is +// undefined. +// +// Deprecated: Call the ts.AsTime and ts.CheckValid methods instead. +func Timestamp(ts *timestamppb.Timestamp) (time.Time, error) { + // Don't return the zero value on error, because corresponds to a valid + // timestamp. Instead return whatever time.Unix gives us. + var t time.Time + if ts == nil { + t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp + } else { + t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() + } + return t, validateTimestamp(ts) +} + +// TimestampNow returns a google.protobuf.Timestamp for the current time. +// +// Deprecated: Call the timestamppb.Now function instead. +func TimestampNow() *timestamppb.Timestamp { + ts, err := TimestampProto(time.Now()) + if err != nil { + panic("ptypes: time.Now() out of Timestamp range") + } + return ts +} + +// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. +// It returns an error if the resulting Timestamp is invalid. +// +// Deprecated: Call the timestamppb.New function instead. +func TimestampProto(t time.Time) (*timestamppb.Timestamp, error) { + ts := ×tamppb.Timestamp{ + Seconds: t.Unix(), + Nanos: int32(t.Nanosecond()), + } + if err := validateTimestamp(ts); err != nil { + return nil, err + } + return ts, nil +} + +// TimestampString returns the RFC 3339 string for valid Timestamps. +// For invalid Timestamps, it returns an error message in parentheses. +// +// Deprecated: Call the ts.AsTime method instead, +// followed by a call to the Format method on the time.Time value. +func TimestampString(ts *timestamppb.Timestamp) string { + t, err := Timestamp(ts) + if err != nil { + return fmt.Sprintf("(%v)", err) + } + return t.Format(time.RFC3339Nano) +} + +// validateTimestamp determines whether a Timestamp is valid. +// A valid timestamp represents a time in the range [0001-01-01, 10000-01-01) +// and has a Nanos field in the range [0, 1e9). +// +// If the Timestamp is valid, validateTimestamp returns nil. +// Otherwise, it returns an error that describes the problem. +// +// Every valid Timestamp can be represented by a time.Time, +// but the converse is not true. +func validateTimestamp(ts *timestamppb.Timestamp) error { + if ts == nil { + return errors.New("timestamp: nil Timestamp") + } + if ts.Seconds < minValidSeconds { + return fmt.Errorf("timestamp: %v before 0001-01-01", ts) + } + if ts.Seconds >= maxValidSeconds { + return fmt.Errorf("timestamp: %v after 10000-01-01", ts) + } + if ts.Nanos < 0 || ts.Nanos >= 1e9 { + return fmt.Errorf("timestamp: %v: nanos not in range [0, 1e9)", ts) + } + return nil +} diff --git a/go-controller/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/go-controller/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go new file mode 100644 index 0000000000..a76f807600 --- /dev/null +++ b/go-controller/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go @@ -0,0 +1,64 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/golang/protobuf/ptypes/timestamp/timestamp.proto + +package timestamp + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" +) + +// Symbols defined in public import of google/protobuf/timestamp.proto. + +type Timestamp = timestamppb.Timestamp + +var File_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto protoreflect.FileDescriptor + +var file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x37, + 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3b, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_goTypes = []interface{}{} +var file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_init() } +func file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_init() { + if File_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_goTypes, + DependencyIndexes: file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_depIdxs, + }.Build() + File_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto = out.File + file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_rawDesc = nil + file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_goTypes = nil + file_github_com_golang_protobuf_ptypes_timestamp_timestamp_proto_depIdxs = nil +} diff --git a/go-controller/vendor/github.com/google/gnostic-models/compiler/extensions.go b/go-controller/vendor/github.com/google/gnostic-models/compiler/extensions.go index 16ae66faa3..250c81e8c8 100644 --- a/go-controller/vendor/github.com/google/gnostic-models/compiler/extensions.go +++ b/go-controller/vendor/github.com/google/gnostic-models/compiler/extensions.go @@ -20,8 +20,8 @@ import ( "os/exec" "strings" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/anypb" + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes/any" yaml "gopkg.in/yaml.v3" extensions "github.com/google/gnostic-models/extensions" @@ -33,7 +33,7 @@ type ExtensionHandler struct { } // CallExtension calls a binary extension handler. -func CallExtension(context *Context, in *yaml.Node, extensionName string) (handled bool, response *anypb.Any, err error) { +func CallExtension(context *Context, in *yaml.Node, extensionName string) (handled bool, response *any.Any, err error) { if context == nil || context.ExtensionHandlers == nil { return false, nil, nil } @@ -50,7 +50,7 @@ func CallExtension(context *Context, in *yaml.Node, extensionName string) (handl return handled, response, err } -func (extensionHandlers *ExtensionHandler) handle(in *yaml.Node, extensionName string) (*anypb.Any, error) { +func (extensionHandlers *ExtensionHandler) handle(in *yaml.Node, extensionName string) (*any.Any, error) { if extensionHandlers.Name != "" { yamlData, _ := yaml.Marshal(in) request := &extensions.ExtensionHandlerRequest{ diff --git a/go-controller/vendor/github.com/google/gnostic-models/extensions/extension.pb.go b/go-controller/vendor/github.com/google/gnostic-models/extensions/extension.pb.go index 16c40d985f..a71df8abec 100644 --- a/go-controller/vendor/github.com/google/gnostic-models/extensions/extension.pb.go +++ b/go-controller/vendor/github.com/google/gnostic-models/extensions/extension.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v4.23.4 +// protoc-gen-go v1.27.1 +// protoc v3.19.3 // source: extensions/extension.proto package gnostic_extension_v1 @@ -51,9 +51,11 @@ type Version struct { func (x *Version) Reset() { *x = Version{} - mi := &file_extensions_extension_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_extensions_extension_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Version) String() string { @@ -64,7 +66,7 @@ func (*Version) ProtoMessage() {} func (x *Version) ProtoReflect() protoreflect.Message { mi := &file_extensions_extension_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -121,9 +123,11 @@ type ExtensionHandlerRequest struct { func (x *ExtensionHandlerRequest) Reset() { *x = ExtensionHandlerRequest{} - mi := &file_extensions_extension_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_extensions_extension_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExtensionHandlerRequest) String() string { @@ -134,7 +138,7 @@ func (*ExtensionHandlerRequest) ProtoMessage() {} func (x *ExtensionHandlerRequest) ProtoReflect() protoreflect.Message { mi := &file_extensions_extension_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,9 +191,11 @@ type ExtensionHandlerResponse struct { func (x *ExtensionHandlerResponse) Reset() { *x = ExtensionHandlerResponse{} - mi := &file_extensions_extension_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_extensions_extension_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExtensionHandlerResponse) String() string { @@ -200,7 +206,7 @@ func (*ExtensionHandlerResponse) ProtoMessage() {} func (x *ExtensionHandlerResponse) ProtoReflect() protoreflect.Message { mi := &file_extensions_extension_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,9 +257,11 @@ type Wrapper struct { func (x *Wrapper) Reset() { *x = Wrapper{} - mi := &file_extensions_extension_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_extensions_extension_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Wrapper) String() string { @@ -264,7 +272,7 @@ func (*Wrapper) ProtoMessage() {} func (x *Wrapper) ProtoReflect() protoreflect.Message { mi := &file_extensions_extension_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,7 +367,7 @@ func file_extensions_extension_proto_rawDescGZIP() []byte { } var file_extensions_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_extensions_extension_proto_goTypes = []any{ +var file_extensions_extension_proto_goTypes = []interface{}{ (*Version)(nil), // 0: gnostic.extension.v1.Version (*ExtensionHandlerRequest)(nil), // 1: gnostic.extension.v1.ExtensionHandlerRequest (*ExtensionHandlerResponse)(nil), // 2: gnostic.extension.v1.ExtensionHandlerResponse @@ -382,6 +390,56 @@ func file_extensions_extension_proto_init() { if File_extensions_extension_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_extensions_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Version); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extensions_extension_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtensionHandlerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extensions_extension_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtensionHandlerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_extensions_extension_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Wrapper); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go-controller/vendor/github.com/google/gnostic-models/extensions/extensions.go b/go-controller/vendor/github.com/google/gnostic-models/extensions/extensions.go index 0768163e5a..ec8afd0092 100644 --- a/go-controller/vendor/github.com/google/gnostic-models/extensions/extensions.go +++ b/go-controller/vendor/github.com/google/gnostic-models/extensions/extensions.go @@ -19,8 +19,8 @@ import ( "log" "os" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/anypb" + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" ) type extensionHandler func(name string, yamlInput string) (bool, proto.Message, error) @@ -54,7 +54,7 @@ func Main(handler extensionHandler) { response.Errors = append(response.Errors, err.Error()) } else if handled { response.Handled = true - response.Value, err = anypb.New(output) + response.Value, err = ptypes.MarshalAny(output) if err != nil { response.Errors = append(response.Errors, err.Error()) } diff --git a/go-controller/vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.pb.go b/go-controller/vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.pb.go index 3b930b3de2..65c4c913ce 100644 --- a/go-controller/vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.pb.go +++ b/go-controller/vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v4.23.4 +// protoc-gen-go v1.27.1 +// protoc v3.19.3 // source: openapiv2/OpenAPIv2.proto package openapi_v2 @@ -43,7 +43,6 @@ type AdditionalPropertiesItem struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *AdditionalPropertiesItem_Schema // *AdditionalPropertiesItem_Boolean Oneof isAdditionalPropertiesItem_Oneof `protobuf_oneof:"oneof"` @@ -51,9 +50,11 @@ type AdditionalPropertiesItem struct { func (x *AdditionalPropertiesItem) Reset() { *x = AdditionalPropertiesItem{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AdditionalPropertiesItem) String() string { @@ -64,7 +65,7 @@ func (*AdditionalPropertiesItem) ProtoMessage() {} func (x *AdditionalPropertiesItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,9 +128,11 @@ type Any struct { func (x *Any) Reset() { *x = Any{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Any) String() string { @@ -140,7 +143,7 @@ func (*Any) ProtoMessage() {} func (x *Any) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -183,9 +186,11 @@ type ApiKeySecurity struct { func (x *ApiKeySecurity) Reset() { *x = ApiKeySecurity{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApiKeySecurity) String() string { @@ -196,7 +201,7 @@ func (*ApiKeySecurity) ProtoMessage() {} func (x *ApiKeySecurity) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,9 +263,11 @@ type BasicAuthenticationSecurity struct { func (x *BasicAuthenticationSecurity) Reset() { *x = BasicAuthenticationSecurity{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BasicAuthenticationSecurity) String() string { @@ -271,7 +278,7 @@ func (*BasicAuthenticationSecurity) ProtoMessage() {} func (x *BasicAuthenticationSecurity) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,9 +333,11 @@ type BodyParameter struct { func (x *BodyParameter) Reset() { *x = BodyParameter{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BodyParameter) String() string { @@ -339,7 +348,7 @@ func (*BodyParameter) ProtoMessage() {} func (x *BodyParameter) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -413,9 +422,11 @@ type Contact struct { func (x *Contact) Reset() { *x = Contact{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Contact) String() string { @@ -426,7 +437,7 @@ func (*Contact) ProtoMessage() {} func (x *Contact) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -479,9 +490,11 @@ type Default struct { func (x *Default) Reset() { *x = Default{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Default) String() string { @@ -492,7 +505,7 @@ func (*Default) ProtoMessage() {} func (x *Default) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -525,9 +538,11 @@ type Definitions struct { func (x *Definitions) Reset() { *x = Definitions{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Definitions) String() string { @@ -538,7 +553,7 @@ func (*Definitions) ProtoMessage() {} func (x *Definitions) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -591,9 +606,11 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Document) String() string { @@ -604,7 +621,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -741,9 +758,11 @@ type Examples struct { func (x *Examples) Reset() { *x = Examples{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Examples) String() string { @@ -754,7 +773,7 @@ func (*Examples) ProtoMessage() {} func (x *Examples) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -789,9 +808,11 @@ type ExternalDocs struct { func (x *ExternalDocs) Reset() { *x = ExternalDocs{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExternalDocs) String() string { @@ -802,7 +823,7 @@ func (*ExternalDocs) ProtoMessage() {} func (x *ExternalDocs) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -858,9 +879,11 @@ type FileSchema struct { func (x *FileSchema) Reset() { *x = FileSchema{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FileSchema) String() string { @@ -871,7 +894,7 @@ func (*FileSchema) ProtoMessage() {} func (x *FileSchema) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -993,9 +1016,11 @@ type FormDataParameterSubSchema struct { func (x *FormDataParameterSubSchema) Reset() { *x = FormDataParameterSubSchema{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FormDataParameterSubSchema) String() string { @@ -1006,7 +1031,7 @@ func (*FormDataParameterSubSchema) ProtoMessage() {} func (x *FormDataParameterSubSchema) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1210,9 +1235,11 @@ type Header struct { func (x *Header) Reset() { *x = Header{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Header) String() string { @@ -1223,7 +1250,7 @@ func (*Header) ProtoMessage() {} func (x *Header) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1406,9 +1433,11 @@ type HeaderParameterSubSchema struct { func (x *HeaderParameterSubSchema) Reset() { *x = HeaderParameterSubSchema{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *HeaderParameterSubSchema) String() string { @@ -1419,7 +1448,7 @@ func (*HeaderParameterSubSchema) ProtoMessage() {} func (x *HeaderParameterSubSchema) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1598,9 +1627,11 @@ type Headers struct { func (x *Headers) Reset() { *x = Headers{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Headers) String() string { @@ -1611,7 +1642,7 @@ func (*Headers) ProtoMessage() {} func (x *Headers) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1654,9 +1685,11 @@ type Info struct { func (x *Info) Reset() { *x = Info{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Info) String() string { @@ -1667,7 +1700,7 @@ func (*Info) ProtoMessage() {} func (x *Info) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1741,9 +1774,11 @@ type ItemsItem struct { func (x *ItemsItem) Reset() { *x = ItemsItem{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ItemsItem) String() string { @@ -1754,7 +1789,7 @@ func (*ItemsItem) ProtoMessage() {} func (x *ItemsItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1787,9 +1822,11 @@ type JsonReference struct { func (x *JsonReference) Reset() { *x = JsonReference{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *JsonReference) String() string { @@ -1800,7 +1837,7 @@ func (*JsonReference) ProtoMessage() {} func (x *JsonReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1843,9 +1880,11 @@ type License struct { func (x *License) Reset() { *x = License{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *License) String() string { @@ -1856,7 +1895,7 @@ func (*License) ProtoMessage() {} func (x *License) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1906,9 +1945,11 @@ type NamedAny struct { func (x *NamedAny) Reset() { *x = NamedAny{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedAny) String() string { @@ -1919,7 +1960,7 @@ func (*NamedAny) ProtoMessage() {} func (x *NamedAny) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1962,9 +2003,11 @@ type NamedHeader struct { func (x *NamedHeader) Reset() { *x = NamedHeader{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedHeader) String() string { @@ -1975,7 +2018,7 @@ func (*NamedHeader) ProtoMessage() {} func (x *NamedHeader) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2018,9 +2061,11 @@ type NamedParameter struct { func (x *NamedParameter) Reset() { *x = NamedParameter{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedParameter) String() string { @@ -2031,7 +2076,7 @@ func (*NamedParameter) ProtoMessage() {} func (x *NamedParameter) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2074,9 +2119,11 @@ type NamedPathItem struct { func (x *NamedPathItem) Reset() { *x = NamedPathItem{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedPathItem) String() string { @@ -2087,7 +2134,7 @@ func (*NamedPathItem) ProtoMessage() {} func (x *NamedPathItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2130,9 +2177,11 @@ type NamedResponse struct { func (x *NamedResponse) Reset() { *x = NamedResponse{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedResponse) String() string { @@ -2143,7 +2192,7 @@ func (*NamedResponse) ProtoMessage() {} func (x *NamedResponse) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2186,9 +2235,11 @@ type NamedResponseValue struct { func (x *NamedResponseValue) Reset() { *x = NamedResponseValue{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedResponseValue) String() string { @@ -2199,7 +2250,7 @@ func (*NamedResponseValue) ProtoMessage() {} func (x *NamedResponseValue) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2242,9 +2293,11 @@ type NamedSchema struct { func (x *NamedSchema) Reset() { *x = NamedSchema{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedSchema) String() string { @@ -2255,7 +2308,7 @@ func (*NamedSchema) ProtoMessage() {} func (x *NamedSchema) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2298,9 +2351,11 @@ type NamedSecurityDefinitionsItem struct { func (x *NamedSecurityDefinitionsItem) Reset() { *x = NamedSecurityDefinitionsItem{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedSecurityDefinitionsItem) String() string { @@ -2311,7 +2366,7 @@ func (*NamedSecurityDefinitionsItem) ProtoMessage() {} func (x *NamedSecurityDefinitionsItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2354,9 +2409,11 @@ type NamedString struct { func (x *NamedString) Reset() { *x = NamedString{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedString) String() string { @@ -2367,7 +2424,7 @@ func (*NamedString) ProtoMessage() {} func (x *NamedString) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2410,9 +2467,11 @@ type NamedStringArray struct { func (x *NamedStringArray) Reset() { *x = NamedStringArray{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedStringArray) String() string { @@ -2423,7 +2482,7 @@ func (*NamedStringArray) ProtoMessage() {} func (x *NamedStringArray) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2458,7 +2517,6 @@ type NonBodyParameter struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *NonBodyParameter_HeaderParameterSubSchema // *NonBodyParameter_FormDataParameterSubSchema // *NonBodyParameter_QueryParameterSubSchema @@ -2468,9 +2526,11 @@ type NonBodyParameter struct { func (x *NonBodyParameter) Reset() { *x = NonBodyParameter{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NonBodyParameter) String() string { @@ -2481,7 +2541,7 @@ func (*NonBodyParameter) ProtoMessage() {} func (x *NonBodyParameter) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2575,9 +2635,11 @@ type Oauth2AccessCodeSecurity struct { func (x *Oauth2AccessCodeSecurity) Reset() { *x = Oauth2AccessCodeSecurity{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Oauth2AccessCodeSecurity) String() string { @@ -2588,7 +2650,7 @@ func (*Oauth2AccessCodeSecurity) ProtoMessage() {} func (x *Oauth2AccessCodeSecurity) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2667,9 +2729,11 @@ type Oauth2ApplicationSecurity struct { func (x *Oauth2ApplicationSecurity) Reset() { *x = Oauth2ApplicationSecurity{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Oauth2ApplicationSecurity) String() string { @@ -2680,7 +2744,7 @@ func (*Oauth2ApplicationSecurity) ProtoMessage() {} func (x *Oauth2ApplicationSecurity) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2752,9 +2816,11 @@ type Oauth2ImplicitSecurity struct { func (x *Oauth2ImplicitSecurity) Reset() { *x = Oauth2ImplicitSecurity{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Oauth2ImplicitSecurity) String() string { @@ -2765,7 +2831,7 @@ func (*Oauth2ImplicitSecurity) ProtoMessage() {} func (x *Oauth2ImplicitSecurity) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2837,9 +2903,11 @@ type Oauth2PasswordSecurity struct { func (x *Oauth2PasswordSecurity) Reset() { *x = Oauth2PasswordSecurity{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Oauth2PasswordSecurity) String() string { @@ -2850,7 +2918,7 @@ func (*Oauth2PasswordSecurity) ProtoMessage() {} func (x *Oauth2PasswordSecurity) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2917,9 +2985,11 @@ type Oauth2Scopes struct { func (x *Oauth2Scopes) Reset() { *x = Oauth2Scopes{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Oauth2Scopes) String() string { @@ -2930,7 +3000,7 @@ func (*Oauth2Scopes) ProtoMessage() {} func (x *Oauth2Scopes) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2981,9 +3051,11 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Operation) String() string { @@ -2994,7 +3066,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3106,7 +3178,6 @@ type Parameter struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *Parameter_BodyParameter // *Parameter_NonBodyParameter Oneof isParameter_Oneof `protobuf_oneof:"oneof"` @@ -3114,9 +3185,11 @@ type Parameter struct { func (x *Parameter) Reset() { *x = Parameter{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Parameter) String() string { @@ -3127,7 +3200,7 @@ func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3190,9 +3263,11 @@ type ParameterDefinitions struct { func (x *ParameterDefinitions) Reset() { *x = ParameterDefinitions{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ParameterDefinitions) String() string { @@ -3203,7 +3278,7 @@ func (*ParameterDefinitions) ProtoMessage() {} func (x *ParameterDefinitions) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3231,7 +3306,6 @@ type ParametersItem struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *ParametersItem_Parameter // *ParametersItem_JsonReference Oneof isParametersItem_Oneof `protobuf_oneof:"oneof"` @@ -3239,9 +3313,11 @@ type ParametersItem struct { func (x *ParametersItem) Reset() { *x = ParametersItem{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ParametersItem) String() string { @@ -3252,7 +3328,7 @@ func (*ParametersItem) ProtoMessage() {} func (x *ParametersItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3324,9 +3400,11 @@ type PathItem struct { func (x *PathItem) Reset() { *x = PathItem{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PathItem) String() string { @@ -3337,7 +3415,7 @@ func (*PathItem) ProtoMessage() {} func (x *PathItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3457,9 +3535,11 @@ type PathParameterSubSchema struct { func (x *PathParameterSubSchema) Reset() { *x = PathParameterSubSchema{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PathParameterSubSchema) String() string { @@ -3470,7 +3550,7 @@ func (*PathParameterSubSchema) ProtoMessage() {} func (x *PathParameterSubSchema) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[41] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3651,9 +3731,11 @@ type Paths struct { func (x *Paths) Reset() { *x = Paths{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Paths) String() string { @@ -3664,7 +3746,7 @@ func (*Paths) ProtoMessage() {} func (x *Paths) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[42] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3720,9 +3802,11 @@ type PrimitivesItems struct { func (x *PrimitivesItems) Reset() { *x = PrimitivesItems{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PrimitivesItems) String() string { @@ -3733,7 +3817,7 @@ func (*PrimitivesItems) ProtoMessage() {} func (x *PrimitivesItems) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[43] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3884,9 +3968,11 @@ type Properties struct { func (x *Properties) Reset() { *x = Properties{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Properties) String() string { @@ -3897,7 +3983,7 @@ func (*Properties) ProtoMessage() {} func (x *Properties) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[44] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3956,9 +4042,11 @@ type QueryParameterSubSchema struct { func (x *QueryParameterSubSchema) Reset() { *x = QueryParameterSubSchema{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QueryParameterSubSchema) String() string { @@ -3969,7 +4057,7 @@ func (*QueryParameterSubSchema) ProtoMessage() {} func (x *QueryParameterSubSchema) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[45] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4159,9 +4247,11 @@ type Response struct { func (x *Response) Reset() { *x = Response{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Response) String() string { @@ -4172,7 +4262,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[46] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4233,9 +4323,11 @@ type ResponseDefinitions struct { func (x *ResponseDefinitions) Reset() { *x = ResponseDefinitions{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResponseDefinitions) String() string { @@ -4246,7 +4338,7 @@ func (*ResponseDefinitions) ProtoMessage() {} func (x *ResponseDefinitions) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[47] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4274,7 +4366,6 @@ type ResponseValue struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *ResponseValue_Response // *ResponseValue_JsonReference Oneof isResponseValue_Oneof `protobuf_oneof:"oneof"` @@ -4282,9 +4373,11 @@ type ResponseValue struct { func (x *ResponseValue) Reset() { *x = ResponseValue{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResponseValue) String() string { @@ -4295,7 +4388,7 @@ func (*ResponseValue) ProtoMessage() {} func (x *ResponseValue) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[48] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4359,9 +4452,11 @@ type Responses struct { func (x *Responses) Reset() { *x = Responses{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Responses) String() string { @@ -4372,7 +4467,7 @@ func (*Responses) ProtoMessage() {} func (x *Responses) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[49] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4442,9 +4537,11 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Schema) String() string { @@ -4455,7 +4552,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[50] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4693,7 +4790,6 @@ type SchemaItem struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *SchemaItem_Schema // *SchemaItem_FileSchema Oneof isSchemaItem_Oneof `protobuf_oneof:"oneof"` @@ -4701,9 +4797,11 @@ type SchemaItem struct { func (x *SchemaItem) Reset() { *x = SchemaItem{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SchemaItem) String() string { @@ -4714,7 +4812,7 @@ func (*SchemaItem) ProtoMessage() {} func (x *SchemaItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[51] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4776,9 +4874,11 @@ type SecurityDefinitions struct { func (x *SecurityDefinitions) Reset() { *x = SecurityDefinitions{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SecurityDefinitions) String() string { @@ -4789,7 +4889,7 @@ func (*SecurityDefinitions) ProtoMessage() {} func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[52] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4817,7 +4917,6 @@ type SecurityDefinitionsItem struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *SecurityDefinitionsItem_BasicAuthenticationSecurity // *SecurityDefinitionsItem_ApiKeySecurity // *SecurityDefinitionsItem_Oauth2ImplicitSecurity @@ -4829,9 +4928,11 @@ type SecurityDefinitionsItem struct { func (x *SecurityDefinitionsItem) Reset() { *x = SecurityDefinitionsItem{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SecurityDefinitionsItem) String() string { @@ -4842,7 +4943,7 @@ func (*SecurityDefinitionsItem) ProtoMessage() {} func (x *SecurityDefinitionsItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[53] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4956,9 +5057,11 @@ type SecurityRequirement struct { func (x *SecurityRequirement) Reset() { *x = SecurityRequirement{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SecurityRequirement) String() string { @@ -4969,7 +5072,7 @@ func (*SecurityRequirement) ProtoMessage() {} func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[54] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5001,9 +5104,11 @@ type StringArray struct { func (x *StringArray) Reset() { *x = StringArray{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *StringArray) String() string { @@ -5014,7 +5119,7 @@ func (*StringArray) ProtoMessage() {} func (x *StringArray) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[55] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5049,9 +5154,11 @@ type Tag struct { func (x *Tag) Reset() { *x = Tag{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Tag) String() string { @@ -5062,7 +5169,7 @@ func (*Tag) ProtoMessage() {} func (x *Tag) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[56] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5115,9 +5222,11 @@ type TypeItem struct { func (x *TypeItem) Reset() { *x = TypeItem{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TypeItem) String() string { @@ -5128,7 +5237,7 @@ func (*TypeItem) ProtoMessage() {} func (x *TypeItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[57] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5161,9 +5270,11 @@ type VendorExtension struct { func (x *VendorExtension) Reset() { *x = VendorExtension{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VendorExtension) String() string { @@ -5174,7 +5285,7 @@ func (*VendorExtension) ProtoMessage() {} func (x *VendorExtension) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[58] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5211,9 +5322,11 @@ type Xml struct { func (x *Xml) Reset() { *x = Xml{} - mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Xml) String() string { @@ -5224,7 +5337,7 @@ func (*Xml) ProtoMessage() {} func (x *Xml) ProtoReflect() protoreflect.Message { mi := &file_openapiv2_OpenAPIv2_proto_msgTypes[59] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6243,7 +6356,7 @@ func file_openapiv2_OpenAPIv2_proto_rawDescGZIP() []byte { } var file_openapiv2_OpenAPIv2_proto_msgTypes = make([]protoimpl.MessageInfo, 60) -var file_openapiv2_OpenAPIv2_proto_goTypes = []any{ +var file_openapiv2_OpenAPIv2_proto_goTypes = []interface{}{ (*AdditionalPropertiesItem)(nil), // 0: openapi.v2.AdditionalPropertiesItem (*Any)(nil), // 1: openapi.v2.Any (*ApiKeySecurity)(nil), // 2: openapi.v2.ApiKeySecurity @@ -6452,33 +6565,755 @@ func file_openapiv2_OpenAPIv2_proto_init() { if File_openapiv2_OpenAPIv2_proto != nil { return } - file_openapiv2_OpenAPIv2_proto_msgTypes[0].OneofWrappers = []any{ + if !protoimpl.UnsafeEnabled { + file_openapiv2_OpenAPIv2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdditionalPropertiesItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Any); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApiKeySecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BasicAuthenticationSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BodyParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Contact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Default); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Definitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Document); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Examples); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalDocs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FormDataParameterSubSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderParameterSubSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Headers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Info); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ItemsItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JsonReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*License); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedAny); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedPathItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedResponseValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedSecurityDefinitionsItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedString); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedStringArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NonBodyParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2AccessCodeSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2ApplicationSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2ImplicitSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2PasswordSecurity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Oauth2Scopes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParameterDefinitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParametersItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathParameterSubSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Paths); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrimitivesItems); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Properties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParameterSubSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseDefinitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Responses); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Schema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SchemaItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityDefinitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityDefinitionsItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityRequirement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VendorExtension); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Xml); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_openapiv2_OpenAPIv2_proto_msgTypes[0].OneofWrappers = []interface{}{ (*AdditionalPropertiesItem_Schema)(nil), (*AdditionalPropertiesItem_Boolean)(nil), } - file_openapiv2_OpenAPIv2_proto_msgTypes[30].OneofWrappers = []any{ + file_openapiv2_OpenAPIv2_proto_msgTypes[30].OneofWrappers = []interface{}{ (*NonBodyParameter_HeaderParameterSubSchema)(nil), (*NonBodyParameter_FormDataParameterSubSchema)(nil), (*NonBodyParameter_QueryParameterSubSchema)(nil), (*NonBodyParameter_PathParameterSubSchema)(nil), } - file_openapiv2_OpenAPIv2_proto_msgTypes[37].OneofWrappers = []any{ + file_openapiv2_OpenAPIv2_proto_msgTypes[37].OneofWrappers = []interface{}{ (*Parameter_BodyParameter)(nil), (*Parameter_NonBodyParameter)(nil), } - file_openapiv2_OpenAPIv2_proto_msgTypes[39].OneofWrappers = []any{ + file_openapiv2_OpenAPIv2_proto_msgTypes[39].OneofWrappers = []interface{}{ (*ParametersItem_Parameter)(nil), (*ParametersItem_JsonReference)(nil), } - file_openapiv2_OpenAPIv2_proto_msgTypes[48].OneofWrappers = []any{ + file_openapiv2_OpenAPIv2_proto_msgTypes[48].OneofWrappers = []interface{}{ (*ResponseValue_Response)(nil), (*ResponseValue_JsonReference)(nil), } - file_openapiv2_OpenAPIv2_proto_msgTypes[51].OneofWrappers = []any{ + file_openapiv2_OpenAPIv2_proto_msgTypes[51].OneofWrappers = []interface{}{ (*SchemaItem_Schema)(nil), (*SchemaItem_FileSchema)(nil), } - file_openapiv2_OpenAPIv2_proto_msgTypes[53].OneofWrappers = []any{ + file_openapiv2_OpenAPIv2_proto_msgTypes[53].OneofWrappers = []interface{}{ (*SecurityDefinitionsItem_BasicAuthenticationSecurity)(nil), (*SecurityDefinitionsItem_ApiKeySecurity)(nil), (*SecurityDefinitionsItem_Oauth2ImplicitSecurity)(nil), diff --git a/go-controller/vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.pb.go b/go-controller/vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.pb.go index b9df95a379..945b8d11ff 100644 --- a/go-controller/vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.pb.go +++ b/go-controller/vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v4.23.4 +// protoc-gen-go v1.27.1 +// protoc v3.19.3 // source: openapiv3/OpenAPIv3.proto package openapi_v3 @@ -43,7 +43,6 @@ type AdditionalPropertiesItem struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *AdditionalPropertiesItem_SchemaOrReference // *AdditionalPropertiesItem_Boolean Oneof isAdditionalPropertiesItem_Oneof `protobuf_oneof:"oneof"` @@ -51,9 +50,11 @@ type AdditionalPropertiesItem struct { func (x *AdditionalPropertiesItem) Reset() { *x = AdditionalPropertiesItem{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AdditionalPropertiesItem) String() string { @@ -64,7 +65,7 @@ func (*AdditionalPropertiesItem) ProtoMessage() {} func (x *AdditionalPropertiesItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,9 +128,11 @@ type Any struct { func (x *Any) Reset() { *x = Any{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Any) String() string { @@ -140,7 +143,7 @@ func (*Any) ProtoMessage() {} func (x *Any) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,7 +178,6 @@ type AnyOrExpression struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *AnyOrExpression_Any // *AnyOrExpression_Expression Oneof isAnyOrExpression_Oneof `protobuf_oneof:"oneof"` @@ -183,9 +185,11 @@ type AnyOrExpression struct { func (x *AnyOrExpression) Reset() { *x = AnyOrExpression{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AnyOrExpression) String() string { @@ -196,7 +200,7 @@ func (*AnyOrExpression) ProtoMessage() {} func (x *AnyOrExpression) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -260,9 +264,11 @@ type Callback struct { func (x *Callback) Reset() { *x = Callback{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Callback) String() string { @@ -273,7 +279,7 @@ func (*Callback) ProtoMessage() {} func (x *Callback) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -308,7 +314,6 @@ type CallbackOrReference struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *CallbackOrReference_Callback // *CallbackOrReference_Reference Oneof isCallbackOrReference_Oneof `protobuf_oneof:"oneof"` @@ -316,9 +321,11 @@ type CallbackOrReference struct { func (x *CallbackOrReference) Reset() { *x = CallbackOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CallbackOrReference) String() string { @@ -329,7 +336,7 @@ func (*CallbackOrReference) ProtoMessage() {} func (x *CallbackOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -391,9 +398,11 @@ type CallbacksOrReferences struct { func (x *CallbacksOrReferences) Reset() { *x = CallbacksOrReferences{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CallbacksOrReferences) String() string { @@ -404,7 +413,7 @@ func (*CallbacksOrReferences) ProtoMessage() {} func (x *CallbacksOrReferences) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -446,9 +455,11 @@ type Components struct { func (x *Components) Reset() { *x = Components{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Components) String() string { @@ -459,7 +470,7 @@ func (*Components) ProtoMessage() {} func (x *Components) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -558,9 +569,11 @@ type Contact struct { func (x *Contact) Reset() { *x = Contact{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Contact) String() string { @@ -571,7 +584,7 @@ func (*Contact) ProtoMessage() {} func (x *Contact) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -620,7 +633,6 @@ type DefaultType struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *DefaultType_Number // *DefaultType_Boolean // *DefaultType_String_ @@ -629,9 +641,11 @@ type DefaultType struct { func (x *DefaultType) Reset() { *x = DefaultType{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DefaultType) String() string { @@ -642,7 +656,7 @@ func (*DefaultType) ProtoMessage() {} func (x *DefaultType) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -720,9 +734,11 @@ type Discriminator struct { func (x *Discriminator) Reset() { *x = Discriminator{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Discriminator) String() string { @@ -733,7 +749,7 @@ func (*Discriminator) ProtoMessage() {} func (x *Discriminator) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -787,9 +803,11 @@ type Document struct { func (x *Document) Reset() { *x = Document{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Document) String() string { @@ -800,7 +818,7 @@ func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,9 +912,11 @@ type Encoding struct { func (x *Encoding) Reset() { *x = Encoding{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Encoding) String() string { @@ -907,7 +927,7 @@ func (*Encoding) ProtoMessage() {} func (x *Encoding) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,9 +994,11 @@ type Encodings struct { func (x *Encodings) Reset() { *x = Encodings{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Encodings) String() string { @@ -987,7 +1009,7 @@ func (*Encodings) ProtoMessage() {} func (x *Encodings) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1023,9 +1045,11 @@ type Example struct { func (x *Example) Reset() { *x = Example{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Example) String() string { @@ -1036,7 +1060,7 @@ func (*Example) ProtoMessage() {} func (x *Example) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1092,7 +1116,6 @@ type ExampleOrReference struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *ExampleOrReference_Example // *ExampleOrReference_Reference Oneof isExampleOrReference_Oneof `protobuf_oneof:"oneof"` @@ -1100,9 +1123,11 @@ type ExampleOrReference struct { func (x *ExampleOrReference) Reset() { *x = ExampleOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExampleOrReference) String() string { @@ -1113,7 +1138,7 @@ func (*ExampleOrReference) ProtoMessage() {} func (x *ExampleOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1175,9 +1200,11 @@ type ExamplesOrReferences struct { func (x *ExamplesOrReferences) Reset() { *x = ExamplesOrReferences{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExamplesOrReferences) String() string { @@ -1188,7 +1215,7 @@ func (*ExamplesOrReferences) ProtoMessage() {} func (x *ExamplesOrReferences) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1220,9 +1247,11 @@ type Expression struct { func (x *Expression) Reset() { *x = Expression{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Expression) String() string { @@ -1233,7 +1262,7 @@ func (*Expression) ProtoMessage() {} func (x *Expression) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1268,9 +1297,11 @@ type ExternalDocs struct { func (x *ExternalDocs) Reset() { *x = ExternalDocs{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExternalDocs) String() string { @@ -1281,7 +1312,7 @@ func (*ExternalDocs) ProtoMessage() {} func (x *ExternalDocs) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1339,9 +1370,11 @@ type Header struct { func (x *Header) Reset() { *x = Header{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Header) String() string { @@ -1352,7 +1385,7 @@ func (*Header) ProtoMessage() {} func (x *Header) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1457,7 +1490,6 @@ type HeaderOrReference struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *HeaderOrReference_Header // *HeaderOrReference_Reference Oneof isHeaderOrReference_Oneof `protobuf_oneof:"oneof"` @@ -1465,9 +1497,11 @@ type HeaderOrReference struct { func (x *HeaderOrReference) Reset() { *x = HeaderOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *HeaderOrReference) String() string { @@ -1478,7 +1512,7 @@ func (*HeaderOrReference) ProtoMessage() {} func (x *HeaderOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1540,9 +1574,11 @@ type HeadersOrReferences struct { func (x *HeadersOrReferences) Reset() { *x = HeadersOrReferences{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *HeadersOrReferences) String() string { @@ -1553,7 +1589,7 @@ func (*HeadersOrReferences) ProtoMessage() {} func (x *HeadersOrReferences) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1593,9 +1629,11 @@ type Info struct { func (x *Info) Reset() { *x = Info{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Info) String() string { @@ -1606,7 +1644,7 @@ func (*Info) ProtoMessage() {} func (x *Info) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1687,9 +1725,11 @@ type ItemsItem struct { func (x *ItemsItem) Reset() { *x = ItemsItem{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ItemsItem) String() string { @@ -1700,7 +1740,7 @@ func (*ItemsItem) ProtoMessage() {} func (x *ItemsItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1735,9 +1775,11 @@ type License struct { func (x *License) Reset() { *x = License{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *License) String() string { @@ -1748,7 +1790,7 @@ func (*License) ProtoMessage() {} func (x *License) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1801,9 +1843,11 @@ type Link struct { func (x *Link) Reset() { *x = Link{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Link) String() string { @@ -1814,7 +1858,7 @@ func (*Link) ProtoMessage() {} func (x *Link) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1884,7 +1928,6 @@ type LinkOrReference struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *LinkOrReference_Link // *LinkOrReference_Reference Oneof isLinkOrReference_Oneof `protobuf_oneof:"oneof"` @@ -1892,9 +1935,11 @@ type LinkOrReference struct { func (x *LinkOrReference) Reset() { *x = LinkOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LinkOrReference) String() string { @@ -1905,7 +1950,7 @@ func (*LinkOrReference) ProtoMessage() {} func (x *LinkOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1967,9 +2012,11 @@ type LinksOrReferences struct { func (x *LinksOrReferences) Reset() { *x = LinksOrReferences{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LinksOrReferences) String() string { @@ -1980,7 +2027,7 @@ func (*LinksOrReferences) ProtoMessage() {} func (x *LinksOrReferences) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2017,9 +2064,11 @@ type MediaType struct { func (x *MediaType) Reset() { *x = MediaType{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MediaType) String() string { @@ -2030,7 +2079,7 @@ func (*MediaType) ProtoMessage() {} func (x *MediaType) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2090,9 +2139,11 @@ type MediaTypes struct { func (x *MediaTypes) Reset() { *x = MediaTypes{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MediaTypes) String() string { @@ -2103,7 +2154,7 @@ func (*MediaTypes) ProtoMessage() {} func (x *MediaTypes) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2139,9 +2190,11 @@ type NamedAny struct { func (x *NamedAny) Reset() { *x = NamedAny{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedAny) String() string { @@ -2152,7 +2205,7 @@ func (*NamedAny) ProtoMessage() {} func (x *NamedAny) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2195,9 +2248,11 @@ type NamedCallbackOrReference struct { func (x *NamedCallbackOrReference) Reset() { *x = NamedCallbackOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedCallbackOrReference) String() string { @@ -2208,7 +2263,7 @@ func (*NamedCallbackOrReference) ProtoMessage() {} func (x *NamedCallbackOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2251,9 +2306,11 @@ type NamedEncoding struct { func (x *NamedEncoding) Reset() { *x = NamedEncoding{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedEncoding) String() string { @@ -2264,7 +2321,7 @@ func (*NamedEncoding) ProtoMessage() {} func (x *NamedEncoding) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2307,9 +2364,11 @@ type NamedExampleOrReference struct { func (x *NamedExampleOrReference) Reset() { *x = NamedExampleOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedExampleOrReference) String() string { @@ -2320,7 +2379,7 @@ func (*NamedExampleOrReference) ProtoMessage() {} func (x *NamedExampleOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2363,9 +2422,11 @@ type NamedHeaderOrReference struct { func (x *NamedHeaderOrReference) Reset() { *x = NamedHeaderOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedHeaderOrReference) String() string { @@ -2376,7 +2437,7 @@ func (*NamedHeaderOrReference) ProtoMessage() {} func (x *NamedHeaderOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2419,9 +2480,11 @@ type NamedLinkOrReference struct { func (x *NamedLinkOrReference) Reset() { *x = NamedLinkOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedLinkOrReference) String() string { @@ -2432,7 +2495,7 @@ func (*NamedLinkOrReference) ProtoMessage() {} func (x *NamedLinkOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2475,9 +2538,11 @@ type NamedMediaType struct { func (x *NamedMediaType) Reset() { *x = NamedMediaType{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedMediaType) String() string { @@ -2488,7 +2553,7 @@ func (*NamedMediaType) ProtoMessage() {} func (x *NamedMediaType) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2531,9 +2596,11 @@ type NamedParameterOrReference struct { func (x *NamedParameterOrReference) Reset() { *x = NamedParameterOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedParameterOrReference) String() string { @@ -2544,7 +2611,7 @@ func (*NamedParameterOrReference) ProtoMessage() {} func (x *NamedParameterOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2587,9 +2654,11 @@ type NamedPathItem struct { func (x *NamedPathItem) Reset() { *x = NamedPathItem{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedPathItem) String() string { @@ -2600,7 +2669,7 @@ func (*NamedPathItem) ProtoMessage() {} func (x *NamedPathItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2643,9 +2712,11 @@ type NamedRequestBodyOrReference struct { func (x *NamedRequestBodyOrReference) Reset() { *x = NamedRequestBodyOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedRequestBodyOrReference) String() string { @@ -2656,7 +2727,7 @@ func (*NamedRequestBodyOrReference) ProtoMessage() {} func (x *NamedRequestBodyOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2699,9 +2770,11 @@ type NamedResponseOrReference struct { func (x *NamedResponseOrReference) Reset() { *x = NamedResponseOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedResponseOrReference) String() string { @@ -2712,7 +2785,7 @@ func (*NamedResponseOrReference) ProtoMessage() {} func (x *NamedResponseOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2755,9 +2828,11 @@ type NamedSchemaOrReference struct { func (x *NamedSchemaOrReference) Reset() { *x = NamedSchemaOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedSchemaOrReference) String() string { @@ -2768,7 +2843,7 @@ func (*NamedSchemaOrReference) ProtoMessage() {} func (x *NamedSchemaOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2811,9 +2886,11 @@ type NamedSecuritySchemeOrReference struct { func (x *NamedSecuritySchemeOrReference) Reset() { *x = NamedSecuritySchemeOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedSecuritySchemeOrReference) String() string { @@ -2824,7 +2901,7 @@ func (*NamedSecuritySchemeOrReference) ProtoMessage() {} func (x *NamedSecuritySchemeOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[41] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2867,9 +2944,11 @@ type NamedServerVariable struct { func (x *NamedServerVariable) Reset() { *x = NamedServerVariable{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedServerVariable) String() string { @@ -2880,7 +2959,7 @@ func (*NamedServerVariable) ProtoMessage() {} func (x *NamedServerVariable) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[42] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2923,9 +3002,11 @@ type NamedString struct { func (x *NamedString) Reset() { *x = NamedString{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedString) String() string { @@ -2936,7 +3017,7 @@ func (*NamedString) ProtoMessage() {} func (x *NamedString) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[43] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2979,9 +3060,11 @@ type NamedStringArray struct { func (x *NamedStringArray) Reset() { *x = NamedStringArray{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamedStringArray) String() string { @@ -2992,7 +3075,7 @@ func (*NamedStringArray) ProtoMessage() {} func (x *NamedStringArray) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[44] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3036,9 +3119,11 @@ type OauthFlow struct { func (x *OauthFlow) Reset() { *x = OauthFlow{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *OauthFlow) String() string { @@ -3049,7 +3134,7 @@ func (*OauthFlow) ProtoMessage() {} func (x *OauthFlow) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[45] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3114,9 +3199,11 @@ type OauthFlows struct { func (x *OauthFlows) Reset() { *x = OauthFlows{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *OauthFlows) String() string { @@ -3127,7 +3214,7 @@ func (*OauthFlows) ProtoMessage() {} func (x *OauthFlows) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[46] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3187,9 +3274,11 @@ type Object struct { func (x *Object) Reset() { *x = Object{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Object) String() string { @@ -3200,7 +3289,7 @@ func (*Object) ProtoMessage() {} func (x *Object) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[47] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3245,9 +3334,11 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Operation) String() string { @@ -3258,7 +3349,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[48] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3388,9 +3479,11 @@ type Parameter struct { func (x *Parameter) Reset() { *x = Parameter{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Parameter) String() string { @@ -3401,7 +3494,7 @@ func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[49] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3520,7 +3613,6 @@ type ParameterOrReference struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *ParameterOrReference_Parameter // *ParameterOrReference_Reference Oneof isParameterOrReference_Oneof `protobuf_oneof:"oneof"` @@ -3528,9 +3620,11 @@ type ParameterOrReference struct { func (x *ParameterOrReference) Reset() { *x = ParameterOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ParameterOrReference) String() string { @@ -3541,7 +3635,7 @@ func (*ParameterOrReference) ProtoMessage() {} func (x *ParameterOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[50] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3603,9 +3697,11 @@ type ParametersOrReferences struct { func (x *ParametersOrReferences) Reset() { *x = ParametersOrReferences{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ParametersOrReferences) String() string { @@ -3616,7 +3712,7 @@ func (*ParametersOrReferences) ProtoMessage() {} func (x *ParametersOrReferences) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[51] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3662,9 +3758,11 @@ type PathItem struct { func (x *PathItem) Reset() { *x = PathItem{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PathItem) String() string { @@ -3675,7 +3773,7 @@ func (*PathItem) ProtoMessage() {} func (x *PathItem) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[52] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3800,9 +3898,11 @@ type Paths struct { func (x *Paths) Reset() { *x = Paths{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Paths) String() string { @@ -3813,7 +3913,7 @@ func (*Paths) ProtoMessage() {} func (x *Paths) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[53] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3852,9 +3952,11 @@ type Properties struct { func (x *Properties) Reset() { *x = Properties{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Properties) String() string { @@ -3865,7 +3967,7 @@ func (*Properties) ProtoMessage() {} func (x *Properties) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[54] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3900,9 +4002,11 @@ type Reference struct { func (x *Reference) Reset() { *x = Reference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Reference) String() string { @@ -3913,7 +4017,7 @@ func (*Reference) ProtoMessage() {} func (x *Reference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[55] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3959,9 +4063,11 @@ type RequestBodiesOrReferences struct { func (x *RequestBodiesOrReferences) Reset() { *x = RequestBodiesOrReferences{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RequestBodiesOrReferences) String() string { @@ -3972,7 +4078,7 @@ func (*RequestBodiesOrReferences) ProtoMessage() {} func (x *RequestBodiesOrReferences) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[56] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4008,9 +4114,11 @@ type RequestBody struct { func (x *RequestBody) Reset() { *x = RequestBody{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RequestBody) String() string { @@ -4021,7 +4129,7 @@ func (*RequestBody) ProtoMessage() {} func (x *RequestBody) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[57] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4070,7 +4178,6 @@ type RequestBodyOrReference struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *RequestBodyOrReference_RequestBody // *RequestBodyOrReference_Reference Oneof isRequestBodyOrReference_Oneof `protobuf_oneof:"oneof"` @@ -4078,9 +4185,11 @@ type RequestBodyOrReference struct { func (x *RequestBodyOrReference) Reset() { *x = RequestBodyOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RequestBodyOrReference) String() string { @@ -4091,7 +4200,7 @@ func (*RequestBodyOrReference) ProtoMessage() {} func (x *RequestBodyOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[58] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4158,9 +4267,11 @@ type Response struct { func (x *Response) Reset() { *x = Response{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Response) String() string { @@ -4171,7 +4282,7 @@ func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[59] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4227,7 +4338,6 @@ type ResponseOrReference struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *ResponseOrReference_Response // *ResponseOrReference_Reference Oneof isResponseOrReference_Oneof `protobuf_oneof:"oneof"` @@ -4235,9 +4345,11 @@ type ResponseOrReference struct { func (x *ResponseOrReference) Reset() { *x = ResponseOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResponseOrReference) String() string { @@ -4248,7 +4360,7 @@ func (*ResponseOrReference) ProtoMessage() {} func (x *ResponseOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[60] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4313,9 +4425,11 @@ type Responses struct { func (x *Responses) Reset() { *x = Responses{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Responses) String() string { @@ -4326,7 +4440,7 @@ func (*Responses) ProtoMessage() {} func (x *Responses) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[61] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4372,9 +4486,11 @@ type ResponsesOrReferences struct { func (x *ResponsesOrReferences) Reset() { *x = ResponsesOrReferences{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResponsesOrReferences) String() string { @@ -4385,7 +4501,7 @@ func (*ResponsesOrReferences) ProtoMessage() {} func (x *ResponsesOrReferences) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[62] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4453,9 +4569,11 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Schema) String() string { @@ -4466,7 +4584,7 @@ func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[63] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4739,7 +4857,6 @@ type SchemaOrReference struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *SchemaOrReference_Schema // *SchemaOrReference_Reference Oneof isSchemaOrReference_Oneof `protobuf_oneof:"oneof"` @@ -4747,9 +4864,11 @@ type SchemaOrReference struct { func (x *SchemaOrReference) Reset() { *x = SchemaOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SchemaOrReference) String() string { @@ -4760,7 +4879,7 @@ func (*SchemaOrReference) ProtoMessage() {} func (x *SchemaOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[64] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4822,9 +4941,11 @@ type SchemasOrReferences struct { func (x *SchemasOrReferences) Reset() { *x = SchemasOrReferences{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SchemasOrReferences) String() string { @@ -4835,7 +4956,7 @@ func (*SchemasOrReferences) ProtoMessage() {} func (x *SchemasOrReferences) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[65] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4868,9 +4989,11 @@ type SecurityRequirement struct { func (x *SecurityRequirement) Reset() { *x = SecurityRequirement{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SecurityRequirement) String() string { @@ -4881,7 +5004,7 @@ func (*SecurityRequirement) ProtoMessage() {} func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[66] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4922,9 +5045,11 @@ type SecurityScheme struct { func (x *SecurityScheme) Reset() { *x = SecurityScheme{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SecurityScheme) String() string { @@ -4935,7 +5060,7 @@ func (*SecurityScheme) ProtoMessage() {} func (x *SecurityScheme) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[67] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5019,7 +5144,6 @@ type SecuritySchemeOrReference struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *SecuritySchemeOrReference_SecurityScheme // *SecuritySchemeOrReference_Reference Oneof isSecuritySchemeOrReference_Oneof `protobuf_oneof:"oneof"` @@ -5027,9 +5151,11 @@ type SecuritySchemeOrReference struct { func (x *SecuritySchemeOrReference) Reset() { *x = SecuritySchemeOrReference{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SecuritySchemeOrReference) String() string { @@ -5040,7 +5166,7 @@ func (*SecuritySchemeOrReference) ProtoMessage() {} func (x *SecuritySchemeOrReference) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[68] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5102,9 +5228,11 @@ type SecuritySchemesOrReferences struct { func (x *SecuritySchemesOrReferences) Reset() { *x = SecuritySchemesOrReferences{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SecuritySchemesOrReferences) String() string { @@ -5115,7 +5243,7 @@ func (*SecuritySchemesOrReferences) ProtoMessage() {} func (x *SecuritySchemesOrReferences) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[69] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5151,9 +5279,11 @@ type Server struct { func (x *Server) Reset() { *x = Server{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Server) String() string { @@ -5164,7 +5294,7 @@ func (*Server) ProtoMessage() {} func (x *Server) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[70] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5221,9 +5351,11 @@ type ServerVariable struct { func (x *ServerVariable) Reset() { *x = ServerVariable{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ServerVariable) String() string { @@ -5234,7 +5366,7 @@ func (*ServerVariable) ProtoMessage() {} func (x *ServerVariable) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[71] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5287,9 +5419,11 @@ type ServerVariables struct { func (x *ServerVariables) Reset() { *x = ServerVariables{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ServerVariables) String() string { @@ -5300,7 +5434,7 @@ func (*ServerVariables) ProtoMessage() {} func (x *ServerVariables) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[72] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5329,7 +5463,6 @@ type SpecificationExtension struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Oneof: - // // *SpecificationExtension_Number // *SpecificationExtension_Boolean // *SpecificationExtension_String_ @@ -5338,9 +5471,11 @@ type SpecificationExtension struct { func (x *SpecificationExtension) Reset() { *x = SpecificationExtension{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SpecificationExtension) String() string { @@ -5351,7 +5486,7 @@ func (*SpecificationExtension) ProtoMessage() {} func (x *SpecificationExtension) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[73] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5426,9 +5561,11 @@ type StringArray struct { func (x *StringArray) Reset() { *x = StringArray{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *StringArray) String() string { @@ -5439,7 +5576,7 @@ func (*StringArray) ProtoMessage() {} func (x *StringArray) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[74] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5471,9 +5608,11 @@ type Strings struct { func (x *Strings) Reset() { *x = Strings{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Strings) String() string { @@ -5484,7 +5623,7 @@ func (*Strings) ProtoMessage() {} func (x *Strings) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[75] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5520,9 +5659,11 @@ type Tag struct { func (x *Tag) Reset() { *x = Tag{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Tag) String() string { @@ -5533,7 +5674,7 @@ func (*Tag) ProtoMessage() {} func (x *Tag) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[76] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5592,9 +5733,11 @@ type Xml struct { func (x *Xml) Reset() { *x = Xml{} - mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Xml) String() string { @@ -5605,7 +5748,7 @@ func (*Xml) ProtoMessage() {} func (x *Xml) ProtoReflect() protoreflect.Message { mi := &file_openapiv3_OpenAPIv3_proto_msgTypes[77] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6638,7 +6781,7 @@ func file_openapiv3_OpenAPIv3_proto_rawDescGZIP() []byte { } var file_openapiv3_OpenAPIv3_proto_msgTypes = make([]protoimpl.MessageInfo, 78) -var file_openapiv3_OpenAPIv3_proto_goTypes = []any{ +var file_openapiv3_OpenAPIv3_proto_goTypes = []interface{}{ (*AdditionalPropertiesItem)(nil), // 0: openapi.v3.AdditionalPropertiesItem (*Any)(nil), // 1: openapi.v3.Any (*AnyOrExpression)(nil), // 2: openapi.v3.AnyOrExpression @@ -6897,56 +7040,994 @@ func file_openapiv3_OpenAPIv3_proto_init() { if File_openapiv3_OpenAPIv3_proto != nil { return } - file_openapiv3_OpenAPIv3_proto_msgTypes[0].OneofWrappers = []any{ + if !protoimpl.UnsafeEnabled { + file_openapiv3_OpenAPIv3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdditionalPropertiesItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Any); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnyOrExpression); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Callback); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CallbackOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CallbacksOrReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Components); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Contact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DefaultType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Discriminator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Document); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Encoding); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Encodings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Example); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExampleOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExamplesOrReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Expression); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalDocs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeadersOrReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Info); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ItemsItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*License); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Link); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinkOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinksOrReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MediaType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MediaTypes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedAny); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedCallbackOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedEncoding); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedExampleOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedHeaderOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedLinkOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedMediaType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedParameterOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedPathItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedRequestBodyOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedResponseOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedSchemaOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedSecuritySchemeOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedServerVariable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedString); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamedStringArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OauthFlow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OauthFlows); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Object); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParameterOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParametersOrReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Paths); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Properties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Reference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequestBodiesOrReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequestBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequestBodyOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Responses); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponsesOrReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Schema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SchemaOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SchemasOrReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityRequirement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityScheme); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecuritySchemeOrReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecuritySchemesOrReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Server); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerVariable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerVariables); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpecificationExtension); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Strings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Xml); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_openapiv3_OpenAPIv3_proto_msgTypes[0].OneofWrappers = []interface{}{ (*AdditionalPropertiesItem_SchemaOrReference)(nil), (*AdditionalPropertiesItem_Boolean)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[2].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[2].OneofWrappers = []interface{}{ (*AnyOrExpression_Any)(nil), (*AnyOrExpression_Expression)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[4].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[4].OneofWrappers = []interface{}{ (*CallbackOrReference_Callback)(nil), (*CallbackOrReference_Reference)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[8].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[8].OneofWrappers = []interface{}{ (*DefaultType_Number)(nil), (*DefaultType_Boolean)(nil), (*DefaultType_String_)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[14].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[14].OneofWrappers = []interface{}{ (*ExampleOrReference_Example)(nil), (*ExampleOrReference_Reference)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[19].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[19].OneofWrappers = []interface{}{ (*HeaderOrReference_Header)(nil), (*HeaderOrReference_Reference)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[25].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[25].OneofWrappers = []interface{}{ (*LinkOrReference_Link)(nil), (*LinkOrReference_Reference)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[50].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[50].OneofWrappers = []interface{}{ (*ParameterOrReference_Parameter)(nil), (*ParameterOrReference_Reference)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[58].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[58].OneofWrappers = []interface{}{ (*RequestBodyOrReference_RequestBody)(nil), (*RequestBodyOrReference_Reference)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[60].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[60].OneofWrappers = []interface{}{ (*ResponseOrReference_Response)(nil), (*ResponseOrReference_Reference)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[64].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[64].OneofWrappers = []interface{}{ (*SchemaOrReference_Schema)(nil), (*SchemaOrReference_Reference)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[68].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[68].OneofWrappers = []interface{}{ (*SecuritySchemeOrReference_SecurityScheme)(nil), (*SecuritySchemeOrReference_Reference)(nil), } - file_openapiv3_OpenAPIv3_proto_msgTypes[73].OneofWrappers = []any{ + file_openapiv3_OpenAPIv3_proto_msgTypes[73].OneofWrappers = []interface{}{ (*SpecificationExtension_Number)(nil), (*SpecificationExtension_Boolean)(nil), (*SpecificationExtension_String_)(nil), diff --git a/go-controller/vendor/github.com/google/gnostic-models/openapiv3/annotations.pb.go b/go-controller/vendor/github.com/google/gnostic-models/openapiv3/annotations.pb.go deleted file mode 100644 index f9f1bd2654..0000000000 --- a/go-controller/vendor/github.com/google/gnostic-models/openapiv3/annotations.pb.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2022 Google LLC. All Rights Reserved. -// -// 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 protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.1 -// protoc v4.23.4 -// source: openapiv3/annotations.proto - -package openapi_v3 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var file_openapiv3_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FileOptions)(nil), - ExtensionType: (*Document)(nil), - Field: 1143, - Name: "openapi.v3.document", - Tag: "bytes,1143,opt,name=document", - Filename: "openapiv3/annotations.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*Operation)(nil), - Field: 1143, - Name: "openapi.v3.operation", - Tag: "bytes,1143,opt,name=operation", - Filename: "openapiv3/annotations.proto", - }, - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*Schema)(nil), - Field: 1143, - Name: "openapi.v3.schema", - Tag: "bytes,1143,opt,name=schema", - Filename: "openapiv3/annotations.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*Schema)(nil), - Field: 1143, - Name: "openapi.v3.property", - Tag: "bytes,1143,opt,name=property", - Filename: "openapiv3/annotations.proto", - }, -} - -// Extension fields to descriptorpb.FileOptions. -var ( - // optional openapi.v3.Document document = 1143; - E_Document = &file_openapiv3_annotations_proto_extTypes[0] -) - -// Extension fields to descriptorpb.MethodOptions. -var ( - // optional openapi.v3.Operation operation = 1143; - E_Operation = &file_openapiv3_annotations_proto_extTypes[1] -) - -// Extension fields to descriptorpb.MessageOptions. -var ( - // optional openapi.v3.Schema schema = 1143; - E_Schema = &file_openapiv3_annotations_proto_extTypes[2] -) - -// Extension fields to descriptorpb.FieldOptions. -var ( - // optional openapi.v3.Schema property = 1143; - E_Property = &file_openapiv3_annotations_proto_extTypes[3] -) - -var File_openapiv3_annotations_proto protoreflect.FileDescriptor - -var file_openapiv3_annotations_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x33, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x76, 0x33, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x76, 0x33, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x4f, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xf7, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x54, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf7, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x4c, 0x0a, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf7, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x4e, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf7, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x42, 0x0a, 0x0e, 0x6f, - 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x33, 0x42, 0x10, 0x41, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x16, 0x2e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x33, 0x3b, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x4f, 0x41, 0x53, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_openapiv3_annotations_proto_goTypes = []any{ - (*descriptorpb.FileOptions)(nil), // 0: google.protobuf.FileOptions - (*descriptorpb.MethodOptions)(nil), // 1: google.protobuf.MethodOptions - (*descriptorpb.MessageOptions)(nil), // 2: google.protobuf.MessageOptions - (*descriptorpb.FieldOptions)(nil), // 3: google.protobuf.FieldOptions - (*Document)(nil), // 4: openapi.v3.Document - (*Operation)(nil), // 5: openapi.v3.Operation - (*Schema)(nil), // 6: openapi.v3.Schema -} -var file_openapiv3_annotations_proto_depIdxs = []int32{ - 0, // 0: openapi.v3.document:extendee -> google.protobuf.FileOptions - 1, // 1: openapi.v3.operation:extendee -> google.protobuf.MethodOptions - 2, // 2: openapi.v3.schema:extendee -> google.protobuf.MessageOptions - 3, // 3: openapi.v3.property:extendee -> google.protobuf.FieldOptions - 4, // 4: openapi.v3.document:type_name -> openapi.v3.Document - 5, // 5: openapi.v3.operation:type_name -> openapi.v3.Operation - 6, // 6: openapi.v3.schema:type_name -> openapi.v3.Schema - 6, // 7: openapi.v3.property:type_name -> openapi.v3.Schema - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 4, // [4:8] is the sub-list for extension type_name - 0, // [0:4] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_openapiv3_annotations_proto_init() } -func file_openapiv3_annotations_proto_init() { - if File_openapiv3_annotations_proto != nil { - return - } - file_openapiv3_OpenAPIv3_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_openapiv3_annotations_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 4, - NumServices: 0, - }, - GoTypes: file_openapiv3_annotations_proto_goTypes, - DependencyIndexes: file_openapiv3_annotations_proto_depIdxs, - ExtensionInfos: file_openapiv3_annotations_proto_extTypes, - }.Build() - File_openapiv3_annotations_proto = out.File - file_openapiv3_annotations_proto_rawDesc = nil - file_openapiv3_annotations_proto_goTypes = nil - file_openapiv3_annotations_proto_depIdxs = nil -} diff --git a/go-controller/vendor/github.com/google/gnostic-models/openapiv3/annotations.proto b/go-controller/vendor/github.com/google/gnostic-models/openapiv3/annotations.proto deleted file mode 100644 index 09ee0aac51..0000000000 --- a/go-controller/vendor/github.com/google/gnostic-models/openapiv3/annotations.proto +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Google LLC. All Rights Reserved. -// -// 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. - -syntax = "proto3"; - -package openapi.v3; - -import "google/protobuf/descriptor.proto"; -import "openapiv3/OpenAPIv3.proto"; - -// The Go package name. -option go_package = "./openapiv3;openapi_v3"; -// This option lets the proto compiler generate Java code inside the package -// name (see below) instead of inside an outer class. It creates a simpler -// developer experience by reducing one-level of name nesting and be -// consistent with most programming languages that don't support outer classes. -option java_multiple_files = true; -// The Java outer classname should be the filename in UpperCamelCase. This -// class is only used to hold proto descriptor, so developers don't need to -// work with it directly. -option java_outer_classname = "AnnotationsProto"; -// The Java package name must be proto package name with proper prefix. -option java_package = "org.openapi_v3"; -// A reasonable prefix for the Objective-C symbols generated from the package. -// It should at a minimum be 3 characters long, all uppercase, and convention -// is to use an abbreviation of the package name. Something short, but -// hopefully unique enough to not conflict with things that may come along in -// the future. 'GPB' is reserved for the protocol buffer implementation itself. -option objc_class_prefix = "OAS"; - -extend google.protobuf.FileOptions { - Document document = 1143; -} - -extend google.protobuf.MethodOptions { - Operation operation = 1143; -} - -extend google.protobuf.MessageOptions { - Schema schema = 1143; -} - -extend google.protobuf.FieldOptions { - Schema property = 1143; -} diff --git a/go-controller/vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go b/go-controller/vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go index 720f3cdf57..c6d09dae40 100644 --- a/go-controller/vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go +++ b/go-controller/vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go @@ -14,29 +14,22 @@ import ( ) // SortSlices returns a [cmp.Transformer] option that sorts all []V. -// The lessOrCompareFunc function must be either -// a less function of the form "func(T, T) bool" or -// a compare function of the format "func(T, T) int" -// which is used to sort any slice with element type V that is assignable to T. +// The less function must be of the form "func(T, T) bool" which is used to +// sort any slice with element type V that is assignable to T. // -// A less function must be: +// The less function must be: // - Deterministic: less(x, y) == less(x, y) // - Irreflexive: !less(x, x) // - Transitive: if !less(x, y) and !less(y, z), then !less(x, z) // -// A compare function must be: -// - Deterministic: compare(x, y) == compare(x, y) -// - Irreflexive: compare(x, x) == 0 -// - Transitive: if !less(x, y) and !less(y, z), then !less(x, z) -// -// The function does not have to be "total". That is, if x != y, but -// less or compare report inequality, their relative order is maintained. +// The less function does not have to be "total". That is, if !less(x, y) and +// !less(y, x) for two elements x and y, their relative order is maintained. // // SortSlices can be used in conjunction with [EquateEmpty]. -func SortSlices(lessOrCompareFunc interface{}) cmp.Option { - vf := reflect.ValueOf(lessOrCompareFunc) - if (!function.IsType(vf.Type(), function.Less) && !function.IsType(vf.Type(), function.Compare)) || vf.IsNil() { - panic(fmt.Sprintf("invalid less or compare function: %T", lessOrCompareFunc)) +func SortSlices(lessFunc interface{}) cmp.Option { + vf := reflect.ValueOf(lessFunc) + if !function.IsType(vf.Type(), function.Less) || vf.IsNil() { + panic(fmt.Sprintf("invalid less function: %T", lessFunc)) } ss := sliceSorter{vf.Type().In(0), vf} return cmp.FilterValues(ss.filter, cmp.Transformer("cmpopts.SortSlices", ss.sort)) @@ -86,40 +79,28 @@ func (ss sliceSorter) checkSort(v reflect.Value) { } func (ss sliceSorter) less(v reflect.Value, i, j int) bool { vx, vy := v.Index(i), v.Index(j) - vo := ss.fnc.Call([]reflect.Value{vx, vy})[0] - if vo.Kind() == reflect.Bool { - return vo.Bool() - } else { - return vo.Int() < 0 - } + return ss.fnc.Call([]reflect.Value{vx, vy})[0].Bool() } -// SortMaps returns a [cmp.Transformer] option that flattens map[K]V types to be -// a sorted []struct{K, V}. The lessOrCompareFunc function must be either -// a less function of the form "func(T, T) bool" or -// a compare function of the format "func(T, T) int" -// which is used to sort any map with key K that is assignable to T. +// SortMaps returns a [cmp.Transformer] option that flattens map[K]V types to be a +// sorted []struct{K, V}. The less function must be of the form +// "func(T, T) bool" which is used to sort any map with key K that is +// assignable to T. // // Flattening the map into a slice has the property that [cmp.Equal] is able to // use [cmp.Comparer] options on K or the K.Equal method if it exists. // -// A less function must be: +// The less function must be: // - Deterministic: less(x, y) == less(x, y) // - Irreflexive: !less(x, x) // - Transitive: if !less(x, y) and !less(y, z), then !less(x, z) // - Total: if x != y, then either less(x, y) or less(y, x) // -// A compare function must be: -// - Deterministic: compare(x, y) == compare(x, y) -// - Irreflexive: compare(x, x) == 0 -// - Transitive: if compare(x, y) < 0 and compare(y, z) < 0, then compare(x, z) < 0 -// - Total: if x != y, then compare(x, y) != 0 -// // SortMaps can be used in conjunction with [EquateEmpty]. -func SortMaps(lessOrCompareFunc interface{}) cmp.Option { - vf := reflect.ValueOf(lessOrCompareFunc) - if (!function.IsType(vf.Type(), function.Less) && !function.IsType(vf.Type(), function.Compare)) || vf.IsNil() { - panic(fmt.Sprintf("invalid less or compare function: %T", lessOrCompareFunc)) +func SortMaps(lessFunc interface{}) cmp.Option { + vf := reflect.ValueOf(lessFunc) + if !function.IsType(vf.Type(), function.Less) || vf.IsNil() { + panic(fmt.Sprintf("invalid less function: %T", lessFunc)) } ms := mapSorter{vf.Type().In(0), vf} return cmp.FilterValues(ms.filter, cmp.Transformer("cmpopts.SortMaps", ms.sort)) @@ -162,10 +143,5 @@ func (ms mapSorter) checkSort(v reflect.Value) { } func (ms mapSorter) less(v reflect.Value, i, j int) bool { vx, vy := v.Index(i).Field(0), v.Index(j).Field(0) - vo := ms.fnc.Call([]reflect.Value{vx, vy})[0] - if vo.Kind() == reflect.Bool { - return vo.Bool() - } else { - return vo.Int() < 0 - } + return ms.fnc.Call([]reflect.Value{vx, vy})[0].Bool() } diff --git a/go-controller/vendor/github.com/google/go-cmp/cmp/internal/function/func.go b/go-controller/vendor/github.com/google/go-cmp/cmp/internal/function/func.go index def01a6be3..d127d43623 100644 --- a/go-controller/vendor/github.com/google/go-cmp/cmp/internal/function/func.go +++ b/go-controller/vendor/github.com/google/go-cmp/cmp/internal/function/func.go @@ -19,7 +19,6 @@ const ( tbFunc // func(T) bool ttbFunc // func(T, T) bool - ttiFunc // func(T, T) int trbFunc // func(T, R) bool tibFunc // func(T, I) bool trFunc // func(T) R @@ -29,13 +28,11 @@ const ( Transformer = trFunc // func(T) R ValueFilter = ttbFunc // func(T, T) bool Less = ttbFunc // func(T, T) bool - Compare = ttiFunc // func(T, T) int ValuePredicate = tbFunc // func(T) bool KeyValuePredicate = trbFunc // func(T, R) bool ) var boolType = reflect.TypeOf(true) -var intType = reflect.TypeOf(0) // IsType reports whether the reflect.Type is of the specified function type. func IsType(t reflect.Type, ft funcType) bool { @@ -52,10 +49,6 @@ func IsType(t reflect.Type, ft funcType) bool { if ni == 2 && no == 1 && t.In(0) == t.In(1) && t.Out(0) == boolType { return true } - case ttiFunc: // func(T, T) int - if ni == 2 && no == 1 && t.In(0) == t.In(1) && t.Out(0) == intType { - return true - } case trbFunc: // func(T, R) bool if ni == 2 && no == 1 && t.Out(0) == boolType { return true diff --git a/go-controller/vendor/github.com/google/go-cmp/cmp/options.go b/go-controller/vendor/github.com/google/go-cmp/cmp/options.go index ba3fce81ff..754496f3b3 100644 --- a/go-controller/vendor/github.com/google/go-cmp/cmp/options.go +++ b/go-controller/vendor/github.com/google/go-cmp/cmp/options.go @@ -232,15 +232,7 @@ func (validator) apply(s *state, vx, vy reflect.Value) { if t := s.curPath.Index(-2).Type(); t.Name() != "" { // Named type with unexported fields. name = fmt.Sprintf("%q.%v", t.PkgPath(), t.Name()) // e.g., "path/to/package".MyType - isProtoMessage := func(t reflect.Type) bool { - m, ok := reflect.PointerTo(t).MethodByName("ProtoReflect") - return ok && m.Type.NumIn() == 1 && m.Type.NumOut() == 1 && - m.Type.Out(0).PkgPath() == "google.golang.org/protobuf/reflect/protoreflect" && - m.Type.Out(0).Name() == "Message" - } - if isProtoMessage(t) { - help = `consider using "google.golang.org/protobuf/testing/protocmp".Transform to compare proto.Message types` - } else if _, ok := reflect.New(t).Interface().(error); ok { + if _, ok := reflect.New(t).Interface().(error); ok { help = "consider using cmpopts.EquateErrors to compare error values" } else if t.Comparable() { help = "consider using cmpopts.EquateComparable to compare comparable Go types" diff --git a/go-controller/vendor/github.com/google/gofuzz/.travis.yml b/go-controller/vendor/github.com/google/gofuzz/.travis.yml new file mode 100644 index 0000000000..061d72ae07 --- /dev/null +++ b/go-controller/vendor/github.com/google/gofuzz/.travis.yml @@ -0,0 +1,10 @@ +language: go + +go: + - 1.11.x + - 1.12.x + - 1.13.x + - master + +script: + - go test -cover diff --git a/go-controller/vendor/github.com/google/gofuzz/CONTRIBUTING.md b/go-controller/vendor/github.com/google/gofuzz/CONTRIBUTING.md new file mode 100644 index 0000000000..97c1b34fd5 --- /dev/null +++ b/go-controller/vendor/github.com/google/gofuzz/CONTRIBUTING.md @@ -0,0 +1,67 @@ +# How to contribute # + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + + +## Contributor License Agreement ## + +Contributions to any Google project must be accompanied by a Contributor +License Agreement. This is not a copyright **assignment**, it simply gives +Google permission to use and redistribute your contributions as part of the +project. + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual + CLA][]. + + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA][]. + +You generally only need to submit a CLA once, so if you've already submitted +one (even if it was for a different project), you probably don't need to do it +again. + +[individual CLA]: https://developers.google.com/open-source/cla/individual +[corporate CLA]: https://developers.google.com/open-source/cla/corporate + + +## Submitting a patch ## + + 1. It's generally best to start by opening a new issue describing the bug or + feature you're intending to fix. Even if you think it's relatively minor, + it's helpful to know what people are working on. Mention in the initial + issue that you are planning to work on that bug or feature so that it can + be assigned to you. + + 1. Follow the normal process of [forking][] the project, and setup a new + branch to work in. It's important that each group of changes be done in + separate branches in order to ensure that a pull request only includes the + commits related to that bug or feature. + + 1. Go makes it very simple to ensure properly formatted code, so always run + `go fmt` on your code before committing it. You should also run + [golint][] over your code. As noted in the [golint readme][], it's not + strictly necessary that your code be completely "lint-free", but this will + help you find common style issues. + + 1. Any significant changes should almost always be accompanied by tests. The + project already has good test coverage, so look at some of the existing + tests if you're unsure how to go about it. [gocov][] and [gocov-html][] + are invaluable tools for seeing which parts of your code aren't being + exercised by your tests. + + 1. Do your best to have [well-formed commit messages][] for each change. + This provides consistency throughout the project, and ensures that commit + messages are able to be formatted properly by various git tools. + + 1. Finally, push the commits to your fork and submit a [pull request][]. + +[forking]: https://help.github.com/articles/fork-a-repo +[golint]: https://github.com/golang/lint +[golint readme]: https://github.com/golang/lint/blob/master/README +[gocov]: https://github.com/axw/gocov +[gocov-html]: https://github.com/matm/gocov-html +[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits +[pull request]: https://help.github.com/articles/creating-a-pull-request diff --git a/go-controller/vendor/k8s.io/apiserver/LICENSE b/go-controller/vendor/github.com/google/gofuzz/LICENSE similarity index 100% rename from go-controller/vendor/k8s.io/apiserver/LICENSE rename to go-controller/vendor/github.com/google/gofuzz/LICENSE diff --git a/go-controller/vendor/sigs.k8s.io/randfill/README.md b/go-controller/vendor/github.com/google/gofuzz/README.md similarity index 53% rename from go-controller/vendor/sigs.k8s.io/randfill/README.md rename to go-controller/vendor/github.com/google/gofuzz/README.md index d892fc9f5d..b503aae7d7 100644 --- a/go-controller/vendor/sigs.k8s.io/randfill/README.md +++ b/go-controller/vendor/github.com/google/gofuzz/README.md @@ -1,46 +1,39 @@ -randfill +gofuzz ====== -randfill is a library for populating go objects with random values. +gofuzz is a library for populating go objects with random values. -This is a fork of github.com/google/gofuzz, which was archived. - -NOTE: This repo is supported only for use within Kubernetes. It is not our -intention to support general use. That said, if it works for you, that's -great! If you have a problem, please feel free to file an issue, but be aware -that it may not be a priority for us to fix it unless it is affecting -Kubernetes. PRs are welcome, within reason. - -[![GoDoc](https://godoc.org/sigs.k8s.io/randfill?status.svg)](https://godoc.org/sigs.k8s.io/randfill) +[![GoDoc](https://godoc.org/github.com/google/gofuzz?status.svg)](https://godoc.org/github.com/google/gofuzz) +[![Travis](https://travis-ci.org/google/gofuzz.svg?branch=master)](https://travis-ci.org/google/gofuzz) This is useful for testing: * Do your project's objects really serialize/unserialize correctly in all cases? * Is there an incorrectly formatted object that will cause your project to panic? -Import with ```import "sigs.k8s.io/randfill"``` +Import with ```import "github.com/google/gofuzz"``` You can use it on single variables: ```go -f := randfill.New() +f := fuzz.New() var myInt int -f.Fill(&myInt) // myInt gets a random value. +f.Fuzz(&myInt) // myInt gets a random value. ``` You can use it on maps: ```go -f := randfill.New().NilChance(0).NumElements(1, 1) +f := fuzz.New().NilChance(0).NumElements(1, 1) var myMap map[ComplexKeyType]string -f.Fill(&myMap) // myMap will have exactly one element. +f.Fuzz(&myMap) // myMap will have exactly one element. ``` Customize the chance of getting a nil pointer: ```go -f := randfill.New().NilChance(.5) +f := fuzz.New().NilChance(.5) var fancyStruct struct { A, B, C, D *string } -f.Fill(&fancyStruct) // About half the pointers should be set. +f.Fuzz(&fancyStruct) // About half the pointers should be set. ``` You can even customize the randomization completely if needed: @@ -56,27 +49,25 @@ type MyInfo struct { BInfo *string } -f := randfill.New().NilChance(0).Funcs( - func(e *MyInfo, c randfill.Continue) { +f := fuzz.New().NilChance(0).Funcs( + func(e *MyInfo, c fuzz.Continue) { switch c.Intn(2) { case 0: e.Type = A - c.Fill(&e.AInfo) + c.Fuzz(&e.AInfo) case 1: e.Type = B - c.Fill(&e.BInfo) + c.Fuzz(&e.BInfo) } }, ) var myObject MyInfo -f.Fill(&myObject) // Type will correspond to whether A or B info is set. +f.Fuzz(&myObject) // Type will correspond to whether A or B info is set. ``` See more examples in ```example_test.go```. -## dvyukov/go-fuzz integration - You can use this library for easier [go-fuzz](https://github.com/dvyukov/go-fuzz)ing. go-fuzz provides the user a byte-slice, which should be converted to different inputs for the tested function. This library can help convert the byte slice. Consider for @@ -85,11 +76,11 @@ example a fuzz test for a the function `mypackage.MyFunc` that takes an int argu // +build gofuzz package mypackage -import "sigs.k8s.io/randfill" +import fuzz "github.com/google/gofuzz" func Fuzz(data []byte) int { var i int - randfill.NewFromGoFuzz(data).Fill(&i) + fuzz.NewFromGoFuzz(data).Fuzz(&i) MyFunc(i) return 0 } diff --git a/go-controller/vendor/sigs.k8s.io/randfill/bytesource/bytesource.go b/go-controller/vendor/github.com/google/gofuzz/bytesource/bytesource.go similarity index 100% rename from go-controller/vendor/sigs.k8s.io/randfill/bytesource/bytesource.go rename to go-controller/vendor/github.com/google/gofuzz/bytesource/bytesource.go diff --git a/go-controller/vendor/k8s.io/client-go/kubernetes/typed/resource/v1beta2/fake/doc.go b/go-controller/vendor/github.com/google/gofuzz/doc.go similarity index 77% rename from go-controller/vendor/k8s.io/client-go/kubernetes/typed/resource/v1beta2/fake/doc.go rename to go-controller/vendor/github.com/google/gofuzz/doc.go index 16f4439906..9f9956d4a6 100644 --- a/go-controller/vendor/k8s.io/client-go/kubernetes/typed/resource/v1beta2/fake/doc.go +++ b/go-controller/vendor/github.com/google/gofuzz/doc.go @@ -1,5 +1,5 @@ /* -Copyright The Kubernetes Authors. +Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake +// Package fuzz is a library for populating go objects with random values. +package fuzz diff --git a/go-controller/vendor/github.com/google/gofuzz/fuzz.go b/go-controller/vendor/github.com/google/gofuzz/fuzz.go new file mode 100644 index 0000000000..761520a8ce --- /dev/null +++ b/go-controller/vendor/github.com/google/gofuzz/fuzz.go @@ -0,0 +1,605 @@ +/* +Copyright 2014 Google Inc. All rights reserved. + +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 fuzz + +import ( + "fmt" + "math/rand" + "reflect" + "regexp" + "time" + + "github.com/google/gofuzz/bytesource" + "strings" +) + +// fuzzFuncMap is a map from a type to a fuzzFunc that handles that type. +type fuzzFuncMap map[reflect.Type]reflect.Value + +// Fuzzer knows how to fill any object with random fields. +type Fuzzer struct { + fuzzFuncs fuzzFuncMap + defaultFuzzFuncs fuzzFuncMap + r *rand.Rand + nilChance float64 + minElements int + maxElements int + maxDepth int + skipFieldPatterns []*regexp.Regexp +} + +// New returns a new Fuzzer. Customize your Fuzzer further by calling Funcs, +// RandSource, NilChance, or NumElements in any order. +func New() *Fuzzer { + return NewWithSeed(time.Now().UnixNano()) +} + +func NewWithSeed(seed int64) *Fuzzer { + f := &Fuzzer{ + defaultFuzzFuncs: fuzzFuncMap{ + reflect.TypeOf(&time.Time{}): reflect.ValueOf(fuzzTime), + }, + + fuzzFuncs: fuzzFuncMap{}, + r: rand.New(rand.NewSource(seed)), + nilChance: .2, + minElements: 1, + maxElements: 10, + maxDepth: 100, + } + return f +} + +// NewFromGoFuzz is a helper function that enables using gofuzz (this +// project) with go-fuzz (https://github.com/dvyukov/go-fuzz) for continuous +// fuzzing. Essentially, it enables translating the fuzzing bytes from +// go-fuzz to any Go object using this library. +// +// This implementation promises a constant translation from a given slice of +// bytes to the fuzzed objects. This promise will remain over future +// versions of Go and of this library. +// +// Note: the returned Fuzzer should not be shared between multiple goroutines, +// as its deterministic output will no longer be available. +// +// Example: use go-fuzz to test the function `MyFunc(int)` in the package +// `mypackage`. Add the file: "mypacakge_fuzz.go" with the content: +// +// // +build gofuzz +// package mypacakge +// import fuzz "github.com/google/gofuzz" +// func Fuzz(data []byte) int { +// var i int +// fuzz.NewFromGoFuzz(data).Fuzz(&i) +// MyFunc(i) +// return 0 +// } +func NewFromGoFuzz(data []byte) *Fuzzer { + return New().RandSource(bytesource.New(data)) +} + +// Funcs adds each entry in fuzzFuncs as a custom fuzzing function. +// +// Each entry in fuzzFuncs must be a function taking two parameters. +// The first parameter must be a pointer or map. It is the variable that +// function will fill with random data. The second parameter must be a +// fuzz.Continue, which will provide a source of randomness and a way +// to automatically continue fuzzing smaller pieces of the first parameter. +// +// These functions are called sensibly, e.g., if you wanted custom string +// fuzzing, the function `func(s *string, c fuzz.Continue)` would get +// called and passed the address of strings. Maps and pointers will always +// be made/new'd for you, ignoring the NilChange option. For slices, it +// doesn't make much sense to pre-create them--Fuzzer doesn't know how +// long you want your slice--so take a pointer to a slice, and make it +// yourself. (If you don't want your map/pointer type pre-made, take a +// pointer to it, and make it yourself.) See the examples for a range of +// custom functions. +func (f *Fuzzer) Funcs(fuzzFuncs ...interface{}) *Fuzzer { + for i := range fuzzFuncs { + v := reflect.ValueOf(fuzzFuncs[i]) + if v.Kind() != reflect.Func { + panic("Need only funcs!") + } + t := v.Type() + if t.NumIn() != 2 || t.NumOut() != 0 { + panic("Need 2 in and 0 out params!") + } + argT := t.In(0) + switch argT.Kind() { + case reflect.Ptr, reflect.Map: + default: + panic("fuzzFunc must take pointer or map type") + } + if t.In(1) != reflect.TypeOf(Continue{}) { + panic("fuzzFunc's second parameter must be type fuzz.Continue") + } + f.fuzzFuncs[argT] = v + } + return f +} + +// RandSource causes f to get values from the given source of randomness. +// Use if you want deterministic fuzzing. +func (f *Fuzzer) RandSource(s rand.Source) *Fuzzer { + f.r = rand.New(s) + return f +} + +// NilChance sets the probability of creating a nil pointer, map, or slice to +// 'p'. 'p' should be between 0 (no nils) and 1 (all nils), inclusive. +func (f *Fuzzer) NilChance(p float64) *Fuzzer { + if p < 0 || p > 1 { + panic("p should be between 0 and 1, inclusive.") + } + f.nilChance = p + return f +} + +// NumElements sets the minimum and maximum number of elements that will be +// added to a non-nil map or slice. +func (f *Fuzzer) NumElements(atLeast, atMost int) *Fuzzer { + if atLeast > atMost { + panic("atLeast must be <= atMost") + } + if atLeast < 0 { + panic("atLeast must be >= 0") + } + f.minElements = atLeast + f.maxElements = atMost + return f +} + +func (f *Fuzzer) genElementCount() int { + if f.minElements == f.maxElements { + return f.minElements + } + return f.minElements + f.r.Intn(f.maxElements-f.minElements+1) +} + +func (f *Fuzzer) genShouldFill() bool { + return f.r.Float64() >= f.nilChance +} + +// MaxDepth sets the maximum number of recursive fuzz calls that will be made +// before stopping. This includes struct members, pointers, and map and slice +// elements. +func (f *Fuzzer) MaxDepth(d int) *Fuzzer { + f.maxDepth = d + return f +} + +// Skip fields which match the supplied pattern. Call this multiple times if needed +// This is useful to skip XXX_ fields generated by protobuf +func (f *Fuzzer) SkipFieldsWithPattern(pattern *regexp.Regexp) *Fuzzer { + f.skipFieldPatterns = append(f.skipFieldPatterns, pattern) + return f +} + +// Fuzz recursively fills all of obj's fields with something random. First +// this tries to find a custom fuzz function (see Funcs). If there is no +// custom function this tests whether the object implements fuzz.Interface and, +// if so, calls Fuzz on it to fuzz itself. If that fails, this will see if +// there is a default fuzz function provided by this package. If all of that +// fails, this will generate random values for all primitive fields and then +// recurse for all non-primitives. +// +// This is safe for cyclic or tree-like structs, up to a limit. Use the +// MaxDepth method to adjust how deep you need it to recurse. +// +// obj must be a pointer. Only exported (public) fields can be set (thanks, +// golang :/ ) Intended for tests, so will panic on bad input or unimplemented +// fields. +func (f *Fuzzer) Fuzz(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + f.fuzzWithContext(v, 0) +} + +// FuzzNoCustom is just like Fuzz, except that any custom fuzz function for +// obj's type will not be called and obj will not be tested for fuzz.Interface +// conformance. This applies only to obj and not other instances of obj's +// type. +// Not safe for cyclic or tree-like structs! +// obj must be a pointer. Only exported (public) fields can be set (thanks, golang :/ ) +// Intended for tests, so will panic on bad input or unimplemented fields. +func (f *Fuzzer) FuzzNoCustom(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + f.fuzzWithContext(v, flagNoCustomFuzz) +} + +const ( + // Do not try to find a custom fuzz function. Does not apply recursively. + flagNoCustomFuzz uint64 = 1 << iota +) + +func (f *Fuzzer) fuzzWithContext(v reflect.Value, flags uint64) { + fc := &fuzzerContext{fuzzer: f} + fc.doFuzz(v, flags) +} + +// fuzzerContext carries context about a single fuzzing run, which lets Fuzzer +// be thread-safe. +type fuzzerContext struct { + fuzzer *Fuzzer + curDepth int +} + +func (fc *fuzzerContext) doFuzz(v reflect.Value, flags uint64) { + if fc.curDepth >= fc.fuzzer.maxDepth { + return + } + fc.curDepth++ + defer func() { fc.curDepth-- }() + + if !v.CanSet() { + return + } + + if flags&flagNoCustomFuzz == 0 { + // Check for both pointer and non-pointer custom functions. + if v.CanAddr() && fc.tryCustom(v.Addr()) { + return + } + if fc.tryCustom(v) { + return + } + } + + if fn, ok := fillFuncMap[v.Kind()]; ok { + fn(v, fc.fuzzer.r) + return + } + + switch v.Kind() { + case reflect.Map: + if fc.fuzzer.genShouldFill() { + v.Set(reflect.MakeMap(v.Type())) + n := fc.fuzzer.genElementCount() + for i := 0; i < n; i++ { + key := reflect.New(v.Type().Key()).Elem() + fc.doFuzz(key, 0) + val := reflect.New(v.Type().Elem()).Elem() + fc.doFuzz(val, 0) + v.SetMapIndex(key, val) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Ptr: + if fc.fuzzer.genShouldFill() { + v.Set(reflect.New(v.Type().Elem())) + fc.doFuzz(v.Elem(), 0) + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Slice: + if fc.fuzzer.genShouldFill() { + n := fc.fuzzer.genElementCount() + v.Set(reflect.MakeSlice(v.Type(), n, n)) + for i := 0; i < n; i++ { + fc.doFuzz(v.Index(i), 0) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Array: + if fc.fuzzer.genShouldFill() { + n := v.Len() + for i := 0; i < n; i++ { + fc.doFuzz(v.Index(i), 0) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Struct: + for i := 0; i < v.NumField(); i++ { + skipField := false + fieldName := v.Type().Field(i).Name + for _, pattern := range fc.fuzzer.skipFieldPatterns { + if pattern.MatchString(fieldName) { + skipField = true + break + } + } + if !skipField { + fc.doFuzz(v.Field(i), 0) + } + } + case reflect.Chan: + fallthrough + case reflect.Func: + fallthrough + case reflect.Interface: + fallthrough + default: + panic(fmt.Sprintf("Can't handle %#v", v.Interface())) + } +} + +// tryCustom searches for custom handlers, and returns true iff it finds a match +// and successfully randomizes v. +func (fc *fuzzerContext) tryCustom(v reflect.Value) bool { + // First: see if we have a fuzz function for it. + doCustom, ok := fc.fuzzer.fuzzFuncs[v.Type()] + if !ok { + // Second: see if it can fuzz itself. + if v.CanInterface() { + intf := v.Interface() + if fuzzable, ok := intf.(Interface); ok { + fuzzable.Fuzz(Continue{fc: fc, Rand: fc.fuzzer.r}) + return true + } + } + // Finally: see if there is a default fuzz function. + doCustom, ok = fc.fuzzer.defaultFuzzFuncs[v.Type()] + if !ok { + return false + } + } + + switch v.Kind() { + case reflect.Ptr: + if v.IsNil() { + if !v.CanSet() { + return false + } + v.Set(reflect.New(v.Type().Elem())) + } + case reflect.Map: + if v.IsNil() { + if !v.CanSet() { + return false + } + v.Set(reflect.MakeMap(v.Type())) + } + default: + return false + } + + doCustom.Call([]reflect.Value{v, reflect.ValueOf(Continue{ + fc: fc, + Rand: fc.fuzzer.r, + })}) + return true +} + +// Interface represents an object that knows how to fuzz itself. Any time we +// find a type that implements this interface we will delegate the act of +// fuzzing itself. +type Interface interface { + Fuzz(c Continue) +} + +// Continue can be passed to custom fuzzing functions to allow them to use +// the correct source of randomness and to continue fuzzing their members. +type Continue struct { + fc *fuzzerContext + + // For convenience, Continue implements rand.Rand via embedding. + // Use this for generating any randomness if you want your fuzzing + // to be repeatable for a given seed. + *rand.Rand +} + +// Fuzz continues fuzzing obj. obj must be a pointer. +func (c Continue) Fuzz(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + c.fc.doFuzz(v, 0) +} + +// FuzzNoCustom continues fuzzing obj, except that any custom fuzz function for +// obj's type will not be called and obj will not be tested for fuzz.Interface +// conformance. This applies only to obj and not other instances of obj's +// type. +func (c Continue) FuzzNoCustom(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + c.fc.doFuzz(v, flagNoCustomFuzz) +} + +// RandString makes a random string up to 20 characters long. The returned string +// may include a variety of (valid) UTF-8 encodings. +func (c Continue) RandString() string { + return randString(c.Rand) +} + +// RandUint64 makes random 64 bit numbers. +// Weirdly, rand doesn't have a function that gives you 64 random bits. +func (c Continue) RandUint64() uint64 { + return randUint64(c.Rand) +} + +// RandBool returns true or false randomly. +func (c Continue) RandBool() bool { + return randBool(c.Rand) +} + +func fuzzInt(v reflect.Value, r *rand.Rand) { + v.SetInt(int64(randUint64(r))) +} + +func fuzzUint(v reflect.Value, r *rand.Rand) { + v.SetUint(randUint64(r)) +} + +func fuzzTime(t *time.Time, c Continue) { + var sec, nsec int64 + // Allow for about 1000 years of random time values, which keeps things + // like JSON parsing reasonably happy. + sec = c.Rand.Int63n(1000 * 365 * 24 * 60 * 60) + c.Fuzz(&nsec) + *t = time.Unix(sec, nsec) +} + +var fillFuncMap = map[reflect.Kind]func(reflect.Value, *rand.Rand){ + reflect.Bool: func(v reflect.Value, r *rand.Rand) { + v.SetBool(randBool(r)) + }, + reflect.Int: fuzzInt, + reflect.Int8: fuzzInt, + reflect.Int16: fuzzInt, + reflect.Int32: fuzzInt, + reflect.Int64: fuzzInt, + reflect.Uint: fuzzUint, + reflect.Uint8: fuzzUint, + reflect.Uint16: fuzzUint, + reflect.Uint32: fuzzUint, + reflect.Uint64: fuzzUint, + reflect.Uintptr: fuzzUint, + reflect.Float32: func(v reflect.Value, r *rand.Rand) { + v.SetFloat(float64(r.Float32())) + }, + reflect.Float64: func(v reflect.Value, r *rand.Rand) { + v.SetFloat(r.Float64()) + }, + reflect.Complex64: func(v reflect.Value, r *rand.Rand) { + v.SetComplex(complex128(complex(r.Float32(), r.Float32()))) + }, + reflect.Complex128: func(v reflect.Value, r *rand.Rand) { + v.SetComplex(complex(r.Float64(), r.Float64())) + }, + reflect.String: func(v reflect.Value, r *rand.Rand) { + v.SetString(randString(r)) + }, + reflect.UnsafePointer: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, +} + +// randBool returns true or false randomly. +func randBool(r *rand.Rand) bool { + return r.Int31()&(1<<30) == 0 +} + +type int63nPicker interface { + Int63n(int64) int64 +} + +// UnicodeRange describes a sequential range of unicode characters. +// Last must be numerically greater than First. +type UnicodeRange struct { + First, Last rune +} + +// UnicodeRanges describes an arbitrary number of sequential ranges of unicode characters. +// To be useful, each range must have at least one character (First <= Last) and +// there must be at least one range. +type UnicodeRanges []UnicodeRange + +// choose returns a random unicode character from the given range, using the +// given randomness source. +func (ur UnicodeRange) choose(r int63nPicker) rune { + count := int64(ur.Last - ur.First + 1) + return ur.First + rune(r.Int63n(count)) +} + +// CustomStringFuzzFunc constructs a FuzzFunc which produces random strings. +// Each character is selected from the range ur. If there are no characters +// in the range (cr.Last < cr.First), this will panic. +func (ur UnicodeRange) CustomStringFuzzFunc() func(s *string, c Continue) { + ur.check() + return func(s *string, c Continue) { + *s = ur.randString(c.Rand) + } +} + +// check is a function that used to check whether the first of ur(UnicodeRange) +// is greater than the last one. +func (ur UnicodeRange) check() { + if ur.Last < ur.First { + panic("The last encoding must be greater than the first one.") + } +} + +// randString of UnicodeRange makes a random string up to 20 characters long. +// Each character is selected form ur(UnicodeRange). +func (ur UnicodeRange) randString(r *rand.Rand) string { + n := r.Intn(20) + sb := strings.Builder{} + sb.Grow(n) + for i := 0; i < n; i++ { + sb.WriteRune(ur.choose(r)) + } + return sb.String() +} + +// defaultUnicodeRanges sets a default unicode range when user do not set +// CustomStringFuzzFunc() but wants fuzz string. +var defaultUnicodeRanges = UnicodeRanges{ + {' ', '~'}, // ASCII characters + {'\u00a0', '\u02af'}, // Multi-byte encoded characters + {'\u4e00', '\u9fff'}, // Common CJK (even longer encodings) +} + +// CustomStringFuzzFunc constructs a FuzzFunc which produces random strings. +// Each character is selected from one of the ranges of ur(UnicodeRanges). +// Each range has an equal probability of being chosen. If there are no ranges, +// or a selected range has no characters (.Last < .First), this will panic. +// Do not modify any of the ranges in ur after calling this function. +func (ur UnicodeRanges) CustomStringFuzzFunc() func(s *string, c Continue) { + // Check unicode ranges slice is empty. + if len(ur) == 0 { + panic("UnicodeRanges is empty.") + } + // if not empty, each range should be checked. + for i := range ur { + ur[i].check() + } + return func(s *string, c Continue) { + *s = ur.randString(c.Rand) + } +} + +// randString of UnicodeRanges makes a random string up to 20 characters long. +// Each character is selected form one of the ranges of ur(UnicodeRanges), +// and each range has an equal probability of being chosen. +func (ur UnicodeRanges) randString(r *rand.Rand) string { + n := r.Intn(20) + sb := strings.Builder{} + sb.Grow(n) + for i := 0; i < n; i++ { + sb.WriteRune(ur[r.Intn(len(ur))].choose(r)) + } + return sb.String() +} + +// randString makes a random string up to 20 characters long. The returned string +// may include a variety of (valid) UTF-8 encodings. +func randString(r *rand.Rand) string { + return defaultUnicodeRanges.randString(r) +} + +// randUint64 makes random 64 bit numbers. +// Weirdly, rand doesn't have a function that gives you 64 random bits. +func randUint64(r *rand.Rand) uint64 { + return uint64(r.Uint32())<<32 | uint64(r.Uint32()) +} diff --git a/go-controller/vendor/github.com/gorilla/websocket/README.md b/go-controller/vendor/github.com/gorilla/websocket/README.md index ff8bfab0b2..2517a28715 100644 --- a/go-controller/vendor/github.com/gorilla/websocket/README.md +++ b/go-controller/vendor/github.com/gorilla/websocket/README.md @@ -7,13 +7,19 @@ Gorilla WebSocket is a [Go](http://golang.org/) implementation of the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. +--- + +⚠️ **[The Gorilla WebSocket Package is looking for a new maintainer](https://github.com/gorilla/websocket/issues/370)** + +--- + ### Documentation * [API Reference](https://pkg.go.dev/github.com/gorilla/websocket?tab=doc) -* [Chat example](https://github.com/gorilla/websocket/tree/main/examples/chat) -* [Command example](https://github.com/gorilla/websocket/tree/main/examples/command) -* [Client and server example](https://github.com/gorilla/websocket/tree/main/examples/echo) -* [File watch example](https://github.com/gorilla/websocket/tree/main/examples/filewatch) +* [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat) +* [Command example](https://github.com/gorilla/websocket/tree/master/examples/command) +* [Client and server example](https://github.com/gorilla/websocket/tree/master/examples/echo) +* [File watch example](https://github.com/gorilla/websocket/tree/master/examples/filewatch) ### Status @@ -29,4 +35,5 @@ package API is stable. The Gorilla WebSocket package passes the server tests in the [Autobahn Test Suite](https://github.com/crossbario/autobahn-testsuite) using the application in the [examples/autobahn -subdirectory](https://github.com/gorilla/websocket/tree/main/examples/autobahn). +subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn). + diff --git a/go-controller/vendor/github.com/gorilla/websocket/client.go b/go-controller/vendor/github.com/gorilla/websocket/client.go index 00917ea341..2efd83555d 100644 --- a/go-controller/vendor/github.com/gorilla/websocket/client.go +++ b/go-controller/vendor/github.com/gorilla/websocket/client.go @@ -9,8 +9,8 @@ import ( "context" "crypto/tls" "errors" - "fmt" "io" + "io/ioutil" "net" "net/http" "net/http/httptrace" @@ -51,34 +51,18 @@ func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufS // // It is safe to call Dialer's methods concurrently. type Dialer struct { - // The following custom dial functions can be set to establish - // connections to either the backend server or the proxy (if it - // exists). The scheme of the dialed entity (either backend or - // proxy) determines which custom dial function is selected: - // either NetDialTLSContext for HTTPS or NetDialContext/NetDial - // for HTTP. Since the "Proxy" function can determine the scheme - // dynamically, it can make sense to set multiple custom dial - // functions simultaneously. - // // NetDial specifies the dial function for creating TCP connections. If - // NetDial is nil, net.Dialer DialContext is used. - // If "Proxy" field is also set, this function dials the proxy--not - // the backend server. + // NetDial is nil, net.Dial is used. NetDial func(network, addr string) (net.Conn, error) // NetDialContext specifies the dial function for creating TCP connections. If // NetDialContext is nil, NetDial is used. - // If "Proxy" field is also set, this function dials the proxy--not - // the backend server. NetDialContext func(ctx context.Context, network, addr string) (net.Conn, error) // NetDialTLSContext specifies the dial function for creating TLS/TCP connections. If // NetDialTLSContext is nil, NetDialContext is used. // If NetDialTLSContext is set, Dial assumes the TLS handshake is done there and // TLSClientConfig is ignored. - // If "Proxy" field is also set, this function dials the proxy (and performs - // the TLS handshake with the proxy, ignoring TLSClientConfig). In this TLS proxy - // dialing case the TLSClientConfig could still be necessary for TLS to the backend server. NetDialTLSContext func(ctx context.Context, network, addr string) (net.Conn, error) // Proxy specifies a function to return a proxy for a given @@ -89,7 +73,7 @@ type Dialer struct { // TLSClientConfig specifies the TLS configuration to use with tls.Client. // If nil, the default configuration is used. - // If NetDialTLSContext is set, Dial assumes the TLS handshake + // If either NetDialTLS or NetDialTLSContext are set, Dial assumes the TLS handshake // is done there and TLSClientConfig is ignored. TLSClientConfig *tls.Config @@ -260,16 +244,71 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h defer cancel() } - var proxyURL *url.URL + // Get network dial function. + var netDial func(network, add string) (net.Conn, error) + + switch u.Scheme { + case "http": + if d.NetDialContext != nil { + netDial = func(network, addr string) (net.Conn, error) { + return d.NetDialContext(ctx, network, addr) + } + } else if d.NetDial != nil { + netDial = d.NetDial + } + case "https": + if d.NetDialTLSContext != nil { + netDial = func(network, addr string) (net.Conn, error) { + return d.NetDialTLSContext(ctx, network, addr) + } + } else if d.NetDialContext != nil { + netDial = func(network, addr string) (net.Conn, error) { + return d.NetDialContext(ctx, network, addr) + } + } else if d.NetDial != nil { + netDial = d.NetDial + } + default: + return nil, nil, errMalformedURL + } + + if netDial == nil { + netDialer := &net.Dialer{} + netDial = func(network, addr string) (net.Conn, error) { + return netDialer.DialContext(ctx, network, addr) + } + } + + // If needed, wrap the dial function to set the connection deadline. + if deadline, ok := ctx.Deadline(); ok { + forwardDial := netDial + netDial = func(network, addr string) (net.Conn, error) { + c, err := forwardDial(network, addr) + if err != nil { + return nil, err + } + err = c.SetDeadline(deadline) + if err != nil { + c.Close() + return nil, err + } + return c, nil + } + } + + // If needed, wrap the dial function to connect through a proxy. if d.Proxy != nil { - proxyURL, err = d.Proxy(req) + proxyURL, err := d.Proxy(req) if err != nil { return nil, nil, err } - } - netDial, err := d.netDialFn(ctx, proxyURL, u) - if err != nil { - return nil, nil, err + if proxyURL != nil { + dialer, err := proxy_FromURL(proxyURL, netDialerFunc(netDial)) + if err != nil { + return nil, nil, err + } + netDial = dialer.Dial + } } hostPort, hostNoPort := hostPortNoPort(u) @@ -278,30 +317,24 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h trace.GetConn(hostPort) } - netConn, err := netDial(ctx, "tcp", hostPort) - if err != nil { - return nil, nil, err - } + netConn, err := netDial("tcp", hostPort) if trace != nil && trace.GotConn != nil { trace.GotConn(httptrace.GotConnInfo{ Conn: netConn, }) } + if err != nil { + return nil, nil, err + } - // Close the network connection when returning an error. The variable - // netConn is set to nil before the success return at the end of the - // function. defer func() { if netConn != nil { - // It's safe to ignore the error from Close() because this code is - // only executed when returning a more important error to the - // application. - _ = netConn.Close() + netConn.Close() } }() - // Do TLS handshake over established connection if a proxy exists. - if proxyURL != nil && u.Scheme == "https" { + if u.Scheme == "https" && d.NetDialTLSContext == nil { + // If NetDialTLSContext is set, assume that the TLS handshake has already been done cfg := cloneTLSConfig(d.TLSClientConfig) if cfg.ServerName == "" { @@ -337,17 +370,6 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h resp, err := http.ReadResponse(conn.br, req) if err != nil { - if d.TLSClientConfig != nil { - for _, proto := range d.TLSClientConfig.NextProtos { - if proto != "http/1.1" { - return nil, nil, fmt.Errorf( - "websocket: protocol %q was given but is not supported;"+ - "sharing tls.Config with net/http Transport can cause this error: %w", - proto, err, - ) - } - } - } return nil, nil, err } @@ -366,7 +388,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h // debugging. buf := make([]byte, 1024) n, _ := io.ReadFull(resp.Body, buf) - resp.Body = io.NopCloser(bytes.NewReader(buf[:n])) + resp.Body = ioutil.NopCloser(bytes.NewReader(buf[:n])) return nil, resp, ErrBadHandshake } @@ -384,134 +406,17 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h break } - resp.Body = io.NopCloser(bytes.NewReader([]byte{})) + resp.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) conn.subprotocol = resp.Header.Get("Sec-Websocket-Protocol") - if err := netConn.SetDeadline(time.Time{}); err != nil { - return nil, resp, err - } - - // Success! Set netConn to nil to stop the deferred function above from - // closing the network connection. - netConn = nil - + netConn.SetDeadline(time.Time{}) + netConn = nil // to avoid close in defer. return conn, resp, nil } -// Returns the dial function to establish the connection to either the backend -// server or the proxy (if it exists). If the dialed entity is HTTPS, then the -// returned dial function *also* performs the TLS handshake to the dialed entity. -// NOTE: If a proxy exists, it is possible for a second TLS handshake to be -// necessary over the established connection. -func (d *Dialer) netDialFn(ctx context.Context, proxyURL *url.URL, backendURL *url.URL) (netDialerFunc, error) { - var netDial netDialerFunc - if proxyURL != nil { - netDial = d.netDialFromURL(proxyURL) - } else { - netDial = d.netDialFromURL(backendURL) - } - // If needed, wrap the dial function to set the connection deadline. - if deadline, ok := ctx.Deadline(); ok { - netDial = netDialWithDeadline(netDial, deadline) - } - // Proxy dialing is wrapped to implement CONNECT method and possibly proxy auth. - if proxyURL != nil { - return proxyFromURL(proxyURL, netDial) - } - return netDial, nil -} - -// Returns function to create the connection depending on the Dialer's -// custom dialing functions and the passed URL of entity connecting to. -func (d *Dialer) netDialFromURL(u *url.URL) netDialerFunc { - var netDial netDialerFunc - switch { - case d.NetDialContext != nil: - netDial = d.NetDialContext - case d.NetDial != nil: - netDial = func(ctx context.Context, net, addr string) (net.Conn, error) { - return d.NetDial(net, addr) - } - default: - netDial = (&net.Dialer{}).DialContext - } - // If dialed entity is HTTPS, then either use custom TLS dialing function (if exists) - // or wrap the previously computed "netDial" to use TLS config for handshake. - if u.Scheme == "https" { - if d.NetDialTLSContext != nil { - netDial = d.NetDialTLSContext - } else { - netDial = netDialWithTLSHandshake(netDial, d.TLSClientConfig, u) - } - } - return netDial -} - -// Returns wrapped "netDial" function, performing TLS handshake after connecting. -func netDialWithTLSHandshake(netDial netDialerFunc, tlsConfig *tls.Config, u *url.URL) netDialerFunc { - return func(ctx context.Context, unused, addr string) (net.Conn, error) { - hostPort, hostNoPort := hostPortNoPort(u) - trace := httptrace.ContextClientTrace(ctx) - if trace != nil && trace.GetConn != nil { - trace.GetConn(hostPort) - } - // Creates TCP connection to addr using passed "netDial" function. - conn, err := netDial(ctx, "tcp", addr) - if err != nil { - return nil, err - } - cfg := cloneTLSConfig(tlsConfig) - if cfg.ServerName == "" { - cfg.ServerName = hostNoPort - } - tlsConn := tls.Client(conn, cfg) - // Do the TLS handshake using TLSConfig over the wrapped connection. - if trace != nil && trace.TLSHandshakeStart != nil { - trace.TLSHandshakeStart() - } - err = doHandshake(ctx, tlsConn, cfg) - if trace != nil && trace.TLSHandshakeDone != nil { - trace.TLSHandshakeDone(tlsConn.ConnectionState(), err) - } - if err != nil { - tlsConn.Close() - return nil, err - } - return tlsConn, nil - } -} - -// Returns wrapped "netDial" function, setting passed deadline. -func netDialWithDeadline(netDial netDialerFunc, deadline time.Time) netDialerFunc { - return func(ctx context.Context, network, addr string) (net.Conn, error) { - c, err := netDial(ctx, network, addr) - if err != nil { - return nil, err - } - err = c.SetDeadline(deadline) - if err != nil { - c.Close() - return nil, err - } - return c, nil - } -} - func cloneTLSConfig(cfg *tls.Config) *tls.Config { if cfg == nil { return &tls.Config{} } return cfg.Clone() } - -func doHandshake(ctx context.Context, tlsConn *tls.Conn, cfg *tls.Config) error { - if err := tlsConn.HandshakeContext(ctx); err != nil { - return err - } - if !cfg.InsecureSkipVerify { - if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil { - return err - } - } - return nil -} diff --git a/go-controller/vendor/github.com/gorilla/websocket/compression.go b/go-controller/vendor/github.com/gorilla/websocket/compression.go index fe1079edbc..813ffb1e84 100644 --- a/go-controller/vendor/github.com/gorilla/websocket/compression.go +++ b/go-controller/vendor/github.com/gorilla/websocket/compression.go @@ -33,11 +33,7 @@ func decompressNoContextTakeover(r io.Reader) io.ReadCloser { "\x01\x00\x00\xff\xff" fr, _ := flateReaderPool.Get().(io.ReadCloser) - mr := io.MultiReader(r, strings.NewReader(tail)) - if err := fr.(flate.Resetter).Reset(mr, nil); err != nil { - // Reset never fails, but handle error in case that changes. - fr = flate.NewReader(mr) - } + fr.(flate.Resetter).Reset(io.MultiReader(r, strings.NewReader(tail)), nil) return &flateReadWrapper{fr} } diff --git a/go-controller/vendor/github.com/gorilla/websocket/conn.go b/go-controller/vendor/github.com/gorilla/websocket/conn.go index 9562ffd497..331eebc850 100644 --- a/go-controller/vendor/github.com/gorilla/websocket/conn.go +++ b/go-controller/vendor/github.com/gorilla/websocket/conn.go @@ -6,10 +6,11 @@ package websocket import ( "bufio" - "crypto/rand" "encoding/binary" "errors" "io" + "io/ioutil" + "math/rand" "net" "strconv" "strings" @@ -180,16 +181,16 @@ var ( errInvalidControlFrame = errors.New("websocket: invalid control frame") ) -// maskRand is an io.Reader for generating mask bytes. The reader is initialized -// to crypto/rand Reader. Tests swap the reader to a math/rand reader for -// reproducible results. -var maskRand = rand.Reader - -// newMaskKey returns a new 32 bit value for masking client frames. func newMaskKey() [4]byte { - var k [4]byte - _, _ = io.ReadFull(maskRand, k[:]) - return k + n := rand.Uint32() + return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)} +} + +func hideTempErr(err error) error { + if e, ok := err.(net.Error); ok && e.Temporary() { + err = &netError{msg: e.Error(), timeout: e.Timeout()} + } + return err } func isControl(frameType int) bool { @@ -357,6 +358,7 @@ func (c *Conn) RemoteAddr() net.Addr { // Write methods func (c *Conn) writeFatal(err error) error { + err = hideTempErr(err) c.writeErrMu.Lock() if c.writeErr == nil { c.writeErr = err @@ -370,9 +372,7 @@ func (c *Conn) read(n int) ([]byte, error) { if err == io.EOF { err = errUnexpectedEOF } - // Discard is guaranteed to succeed because the number of bytes to discard - // is less than or equal to the number of bytes buffered. - _, _ = c.br.Discard(len(p)) + c.br.Discard(len(p)) return p, err } @@ -387,9 +387,7 @@ func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error return err } - if err := c.conn.SetWriteDeadline(deadline); err != nil { - return c.writeFatal(err) - } + c.conn.SetWriteDeadline(deadline) if len(buf1) == 0 { _, err = c.conn.Write(buf0) } else { @@ -399,7 +397,7 @@ func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error return c.writeFatal(err) } if frameType == CloseMessage { - _ = c.writeFatal(ErrCloseSent) + c.writeFatal(ErrCloseSent) } return nil } @@ -438,27 +436,21 @@ func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) er maskBytes(key, 0, buf[6:]) } - if deadline.IsZero() { - // No timeout for zero time. - <-c.mu - } else { - d := time.Until(deadline) + d := 1000 * time.Hour + if !deadline.IsZero() { + d = deadline.Sub(time.Now()) if d < 0 { return errWriteTimeout } - select { - case <-c.mu: - default: - timer := time.NewTimer(d) - select { - case <-c.mu: - timer.Stop() - case <-timer.C: - return errWriteTimeout - } - } } + timer := time.NewTimer(d) + select { + case <-c.mu: + timer.Stop() + case <-timer.C: + return errWriteTimeout + } defer func() { c.mu <- struct{}{} }() c.writeErrMu.Lock() @@ -468,14 +460,13 @@ func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) er return err } - if err := c.conn.SetWriteDeadline(deadline); err != nil { - return c.writeFatal(err) - } - if _, err = c.conn.Write(buf); err != nil { + c.conn.SetWriteDeadline(deadline) + _, err = c.conn.Write(buf) + if err != nil { return c.writeFatal(err) } if messageType == CloseMessage { - _ = c.writeFatal(ErrCloseSent) + c.writeFatal(ErrCloseSent) } return err } @@ -639,7 +630,7 @@ func (w *messageWriter) flushFrame(final bool, extra []byte) error { } if final { - _ = w.endMessage(errWriteClosed) + w.endMessage(errWriteClosed) return nil } @@ -804,7 +795,7 @@ func (c *Conn) advanceFrame() (int, error) { // 1. Skip remainder of previous frame. if c.readRemaining > 0 { - if _, err := io.CopyN(io.Discard, c.br, c.readRemaining); err != nil { + if _, err := io.CopyN(ioutil.Discard, c.br, c.readRemaining); err != nil { return noFrame, err } } @@ -826,7 +817,7 @@ func (c *Conn) advanceFrame() (int, error) { rsv2 := p[0]&rsv2Bit != 0 rsv3 := p[0]&rsv3Bit != 0 mask := p[1]&maskBit != 0 - _ = c.setReadRemaining(int64(p[1] & 0x7f)) // will not fail because argument is >= 0 + c.setReadRemaining(int64(p[1] & 0x7f)) c.readDecompress = false if rsv1 { @@ -931,8 +922,7 @@ func (c *Conn) advanceFrame() (int, error) { } if c.readLimit > 0 && c.readLength > c.readLimit { - // Make a best effort to send a close message describing the problem. - _ = c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait)) + c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait)) return noFrame, ErrReadLimit } @@ -944,7 +934,7 @@ func (c *Conn) advanceFrame() (int, error) { var payload []byte if c.readRemaining > 0 { payload, err = c.read(int(c.readRemaining)) - _ = c.setReadRemaining(0) // will not fail because argument is >= 0 + c.setReadRemaining(0) if err != nil { return noFrame, err } @@ -991,8 +981,7 @@ func (c *Conn) handleProtocolError(message string) error { if len(data) > maxControlFramePayloadSize { data = data[:maxControlFramePayloadSize] } - // Make a best effor to send a close message describing the problem. - _ = c.WriteControl(CloseMessage, data, time.Now().Add(writeWait)) + c.WriteControl(CloseMessage, data, time.Now().Add(writeWait)) return errors.New("websocket: " + message) } @@ -1019,7 +1008,7 @@ func (c *Conn) NextReader() (messageType int, r io.Reader, err error) { for c.readErr == nil { frameType, err := c.advanceFrame() if err != nil { - c.readErr = err + c.readErr = hideTempErr(err) break } @@ -1059,13 +1048,13 @@ func (r *messageReader) Read(b []byte) (int, error) { b = b[:c.readRemaining] } n, err := c.br.Read(b) - c.readErr = err + c.readErr = hideTempErr(err) if c.isServer { c.readMaskPos = maskBytes(c.readMaskKey, c.readMaskPos, b[:n]) } rem := c.readRemaining rem -= int64(n) - _ = c.setReadRemaining(rem) // rem is guaranteed to be >= 0 + c.setReadRemaining(rem) if c.readRemaining > 0 && c.readErr == io.EOF { c.readErr = errUnexpectedEOF } @@ -1080,7 +1069,7 @@ func (r *messageReader) Read(b []byte) (int, error) { frameType, err := c.advanceFrame() switch { case err != nil: - c.readErr = err + c.readErr = hideTempErr(err) case frameType == TextMessage || frameType == BinaryMessage: c.readErr = errors.New("websocket: internal error, unexpected text or binary in Reader") } @@ -1105,7 +1094,7 @@ func (c *Conn) ReadMessage() (messageType int, p []byte, err error) { if err != nil { return messageType, nil, err } - p, err = io.ReadAll(r) + p, err = ioutil.ReadAll(r) return messageType, p, err } @@ -1147,8 +1136,7 @@ func (c *Conn) SetCloseHandler(h func(code int, text string) error) { if h == nil { h = func(code int, text string) error { message := FormatCloseMessage(code, "") - // Make a best effor to send the close message. - _ = c.WriteControl(CloseMessage, message, time.Now().Add(writeWait)) + c.WriteControl(CloseMessage, message, time.Now().Add(writeWait)) return nil } } @@ -1170,9 +1158,13 @@ func (c *Conn) PingHandler() func(appData string) error { func (c *Conn) SetPingHandler(h func(appData string) error) { if h == nil { h = func(message string) error { - // Make a best effort to send the pong message. - _ = c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait)) - return nil + err := c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait)) + if err == ErrCloseSent { + return nil + } else if e, ok := err.(net.Error); ok && e.Temporary() { + return nil + } + return err } } c.handlePing = h @@ -1197,16 +1189,8 @@ func (c *Conn) SetPongHandler(h func(appData string) error) { c.handlePong = h } -// NetConn returns the underlying connection that is wrapped by c. -// Note that writing to or reading from this connection directly will corrupt the -// WebSocket connection. -func (c *Conn) NetConn() net.Conn { - return c.conn -} - // UnderlyingConn returns the internal net.Conn. This can be used to further // modifications to connection specific flags. -// Deprecated: Use the NetConn method. func (c *Conn) UnderlyingConn() net.Conn { return c.conn } diff --git a/go-controller/vendor/github.com/gorilla/websocket/proxy.go b/go-controller/vendor/github.com/gorilla/websocket/proxy.go index d716a05884..e0f466b72f 100644 --- a/go-controller/vendor/github.com/gorilla/websocket/proxy.go +++ b/go-controller/vendor/github.com/gorilla/websocket/proxy.go @@ -6,52 +6,34 @@ package websocket import ( "bufio" - "bytes" - "context" "encoding/base64" "errors" "net" "net/http" "net/url" "strings" - - "golang.org/x/net/proxy" ) -type netDialerFunc func(ctx context.Context, network, addr string) (net.Conn, error) +type netDialerFunc func(network, addr string) (net.Conn, error) func (fn netDialerFunc) Dial(network, addr string) (net.Conn, error) { - return fn(context.Background(), network, addr) + return fn(network, addr) } -func (fn netDialerFunc) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { - return fn(ctx, network, addr) -} - -func proxyFromURL(proxyURL *url.URL, forwardDial netDialerFunc) (netDialerFunc, error) { - if proxyURL.Scheme == "http" || proxyURL.Scheme == "https" { - return (&httpProxyDialer{proxyURL: proxyURL, forwardDial: forwardDial}).DialContext, nil - } - dialer, err := proxy.FromURL(proxyURL, forwardDial) - if err != nil { - return nil, err - } - if d, ok := dialer.(proxy.ContextDialer); ok { - return d.DialContext, nil - } - return func(ctx context.Context, net, addr string) (net.Conn, error) { - return dialer.Dial(net, addr) - }, nil +func init() { + proxy_RegisterDialerType("http", func(proxyURL *url.URL, forwardDialer proxy_Dialer) (proxy_Dialer, error) { + return &httpProxyDialer{proxyURL: proxyURL, forwardDial: forwardDialer.Dial}, nil + }) } type httpProxyDialer struct { proxyURL *url.URL - forwardDial netDialerFunc + forwardDial func(network, addr string) (net.Conn, error) } -func (hpd *httpProxyDialer) DialContext(ctx context.Context, network string, addr string) (net.Conn, error) { +func (hpd *httpProxyDialer) Dial(network string, addr string) (net.Conn, error) { hostPort, _ := hostPortNoPort(hpd.proxyURL) - conn, err := hpd.forwardDial(ctx, network, hostPort) + conn, err := hpd.forwardDial(network, hostPort) if err != nil { return nil, err } @@ -64,6 +46,7 @@ func (hpd *httpProxyDialer) DialContext(ctx context.Context, network string, add connectHeader.Set("Proxy-Authorization", "Basic "+credential) } } + connectReq := &http.Request{ Method: http.MethodConnect, URL: &url.URL{Opaque: addr}, @@ -76,7 +59,7 @@ func (hpd *httpProxyDialer) DialContext(ctx context.Context, network string, add return nil, err } - // Read response. It's OK to use and discard buffered reader here because + // Read response. It's OK to use and discard buffered reader here becaue // the remote server does not speak until spoken to. br := bufio.NewReader(conn) resp, err := http.ReadResponse(br, connectReq) @@ -85,18 +68,8 @@ func (hpd *httpProxyDialer) DialContext(ctx context.Context, network string, add return nil, err } - // Close the response body to silence false positives from linters. Reset - // the buffered reader first to ensure that Close() does not read from - // conn. - // Note: Applications must call resp.Body.Close() on a response returned - // http.ReadResponse to inspect trailers or read another response from the - // buffered reader. The call to resp.Body.Close() does not release - // resources. - br.Reset(bytes.NewReader(nil)) - _ = resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - _ = conn.Close() + if resp.StatusCode != 200 { + conn.Close() f := strings.SplitN(resp.Status, " ", 2) return nil, errors.New(f[1]) } diff --git a/go-controller/vendor/github.com/gorilla/websocket/server.go b/go-controller/vendor/github.com/gorilla/websocket/server.go index 02ea01fdcd..24d53b38ab 100644 --- a/go-controller/vendor/github.com/gorilla/websocket/server.go +++ b/go-controller/vendor/github.com/gorilla/websocket/server.go @@ -6,7 +6,8 @@ package websocket import ( "bufio" - "net" + "errors" + "io" "net/http" "net/url" "strings" @@ -100,8 +101,8 @@ func checkSameOrigin(r *http.Request) bool { func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header) string { if u.Subprotocols != nil { clientProtocols := Subprotocols(r) - for _, clientProtocol := range clientProtocols { - for _, serverProtocol := range u.Subprotocols { + for _, serverProtocol := range u.Subprotocols { + for _, clientProtocol := range clientProtocols { if clientProtocol == serverProtocol { return clientProtocol } @@ -129,8 +130,7 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade } if !tokenListContainsValue(r.Header, "Upgrade", "websocket") { - w.Header().Set("Upgrade", "websocket") - return u.returnError(w, r, http.StatusUpgradeRequired, badHandshake+"'websocket' token not found in 'Upgrade' header") + return u.returnError(w, r, http.StatusBadRequest, badHandshake+"'websocket' token not found in 'Upgrade' header") } if r.Method != http.MethodGet { @@ -154,8 +154,8 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade } challengeKey := r.Header.Get("Sec-Websocket-Key") - if !isValidChallengeKey(challengeKey) { - return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: 'Sec-WebSocket-Key' header must be Base64 encoded value of 16-byte in length") + if challengeKey == "" { + return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: 'Sec-WebSocket-Key' header is missing or blank") } subprotocol := u.selectSubprotocol(r, responseHeader) @@ -172,37 +172,28 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade } } - netConn, brw, err := http.NewResponseController(w).Hijack() + h, ok := w.(http.Hijacker) + if !ok { + return u.returnError(w, r, http.StatusInternalServerError, "websocket: response does not implement http.Hijacker") + } + var brw *bufio.ReadWriter + netConn, brw, err := h.Hijack() if err != nil { - return u.returnError(w, r, http.StatusInternalServerError, - "websocket: hijack: "+err.Error()) + return u.returnError(w, r, http.StatusInternalServerError, err.Error()) } - // Close the network connection when returning an error. The variable - // netConn is set to nil before the success return at the end of the - // function. - defer func() { - if netConn != nil { - // It's safe to ignore the error from Close() because this code is - // only executed when returning a more important error to the - // application. - _ = netConn.Close() - } - }() + if brw.Reader.Buffered() > 0 { + netConn.Close() + return nil, errors.New("websocket: client sent data before handshake is complete") + } var br *bufio.Reader - if u.ReadBufferSize == 0 && brw.Reader.Size() > 256 { - // Use hijacked buffered reader as the connection reader. + if u.ReadBufferSize == 0 && bufioReaderSize(netConn, brw.Reader) > 256 { + // Reuse hijacked buffered reader as connection reader. br = brw.Reader - } else if brw.Reader.Buffered() > 0 { - // Wrap the network connection to read buffered data in brw.Reader - // before reading from the network connection. This should be rare - // because a client must not send message data before receiving the - // handshake response. - netConn = &brNetConn{br: brw.Reader, Conn: netConn} } - buf := brw.Writer.AvailableBuffer() + buf := bufioWriterBuffer(netConn, brw.Writer) var writeBuf []byte if u.WriteBufferPool == nil && u.WriteBufferSize == 0 && len(buf) >= maxFrameHeaderSize+256 { @@ -256,30 +247,20 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade } p = append(p, "\r\n"...) + // Clear deadlines set by HTTP server. + netConn.SetDeadline(time.Time{}) + if u.HandshakeTimeout > 0 { - if err := netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout)); err != nil { - return nil, err - } - } else { - // Clear deadlines set by HTTP server. - if err := netConn.SetDeadline(time.Time{}); err != nil { - return nil, err - } + netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout)) } - if _, err = netConn.Write(p); err != nil { + netConn.Close() return nil, err } if u.HandshakeTimeout > 0 { - if err := netConn.SetWriteDeadline(time.Time{}); err != nil { - return nil, err - } + netConn.SetWriteDeadline(time.Time{}) } - // Success! Set netConn to nil to stop the deferred function above from - // closing the network connection. - netConn = nil - return c, nil } @@ -346,28 +327,39 @@ func IsWebSocketUpgrade(r *http.Request) bool { tokenListContainsValue(r.Header, "Upgrade", "websocket") } -type brNetConn struct { - br *bufio.Reader - net.Conn +// bufioReaderSize size returns the size of a bufio.Reader. +func bufioReaderSize(originalReader io.Reader, br *bufio.Reader) int { + // This code assumes that peek on a reset reader returns + // bufio.Reader.buf[:0]. + // TODO: Use bufio.Reader.Size() after Go 1.10 + br.Reset(originalReader) + if p, err := br.Peek(0); err == nil { + return cap(p) + } + return 0 } -func (b *brNetConn) Read(p []byte) (n int, err error) { - if b.br != nil { - // Limit read to buferred data. - if n := b.br.Buffered(); len(p) > n { - p = p[:n] - } - n, err = b.br.Read(p) - if b.br.Buffered() == 0 { - b.br = nil - } - return n, err - } - return b.Conn.Read(p) +// writeHook is an io.Writer that records the last slice passed to it vio +// io.Writer.Write. +type writeHook struct { + p []byte } -// NetConn returns the underlying connection that is wrapped by b. -func (b *brNetConn) NetConn() net.Conn { - return b.Conn +func (wh *writeHook) Write(p []byte) (int, error) { + wh.p = p + return len(p), nil } +// bufioWriterBuffer grabs the buffer from a bufio.Writer. +func bufioWriterBuffer(originalWriter io.Writer, bw *bufio.Writer) []byte { + // This code assumes that bufio.Writer.buf[:1] is passed to the + // bufio.Writer's underlying writer. + var wh writeHook + bw.Reset(&wh) + bw.WriteByte(0) + bw.Flush() + + bw.Reset(originalWriter) + + return wh.p[:cap(wh.p)] +} diff --git a/go-controller/vendor/github.com/gorilla/websocket/tls_handshake.go b/go-controller/vendor/github.com/gorilla/websocket/tls_handshake.go new file mode 100644 index 0000000000..a62b68ccb1 --- /dev/null +++ b/go-controller/vendor/github.com/gorilla/websocket/tls_handshake.go @@ -0,0 +1,21 @@ +//go:build go1.17 +// +build go1.17 + +package websocket + +import ( + "context" + "crypto/tls" +) + +func doHandshake(ctx context.Context, tlsConn *tls.Conn, cfg *tls.Config) error { + if err := tlsConn.HandshakeContext(ctx); err != nil { + return err + } + if !cfg.InsecureSkipVerify { + if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil { + return err + } + } + return nil +} diff --git a/go-controller/vendor/github.com/gorilla/websocket/tls_handshake_116.go b/go-controller/vendor/github.com/gorilla/websocket/tls_handshake_116.go new file mode 100644 index 0000000000..e1b2b44f6e --- /dev/null +++ b/go-controller/vendor/github.com/gorilla/websocket/tls_handshake_116.go @@ -0,0 +1,21 @@ +//go:build !go1.17 +// +build !go1.17 + +package websocket + +import ( + "context" + "crypto/tls" +) + +func doHandshake(ctx context.Context, tlsConn *tls.Conn, cfg *tls.Config) error { + if err := tlsConn.Handshake(); err != nil { + return err + } + if !cfg.InsecureSkipVerify { + if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil { + return err + } + } + return nil +} diff --git a/go-controller/vendor/github.com/gorilla/websocket/util.go b/go-controller/vendor/github.com/gorilla/websocket/util.go index 31a5dee646..7bf2f66c67 100644 --- a/go-controller/vendor/github.com/gorilla/websocket/util.go +++ b/go-controller/vendor/github.com/gorilla/websocket/util.go @@ -281,18 +281,3 @@ headers: } return result } - -// isValidChallengeKey checks if the argument meets RFC6455 specification. -func isValidChallengeKey(s string) bool { - // From RFC6455: - // - // A |Sec-WebSocket-Key| header field with a base64-encoded (see - // Section 4 of [RFC4648]) value that, when decoded, is 16 bytes in - // length. - - if s == "" { - return false - } - decoded, err := base64.StdEncoding.DecodeString(s) - return err == nil && len(decoded) == 16 -} diff --git a/go-controller/vendor/github.com/gorilla/websocket/x_net_proxy.go b/go-controller/vendor/github.com/gorilla/websocket/x_net_proxy.go new file mode 100644 index 0000000000..2e668f6b88 --- /dev/null +++ b/go-controller/vendor/github.com/gorilla/websocket/x_net_proxy.go @@ -0,0 +1,473 @@ +// Code generated by golang.org/x/tools/cmd/bundle. DO NOT EDIT. +//go:generate bundle -o x_net_proxy.go golang.org/x/net/proxy + +// Package proxy provides support for a variety of protocols to proxy network +// data. +// + +package websocket + +import ( + "errors" + "io" + "net" + "net/url" + "os" + "strconv" + "strings" + "sync" +) + +type proxy_direct struct{} + +// Direct is a direct proxy: one that makes network connections directly. +var proxy_Direct = proxy_direct{} + +func (proxy_direct) Dial(network, addr string) (net.Conn, error) { + return net.Dial(network, addr) +} + +// A PerHost directs connections to a default Dialer unless the host name +// requested matches one of a number of exceptions. +type proxy_PerHost struct { + def, bypass proxy_Dialer + + bypassNetworks []*net.IPNet + bypassIPs []net.IP + bypassZones []string + bypassHosts []string +} + +// NewPerHost returns a PerHost Dialer that directs connections to either +// defaultDialer or bypass, depending on whether the connection matches one of +// the configured rules. +func proxy_NewPerHost(defaultDialer, bypass proxy_Dialer) *proxy_PerHost { + return &proxy_PerHost{ + def: defaultDialer, + bypass: bypass, + } +} + +// Dial connects to the address addr on the given network through either +// defaultDialer or bypass. +func (p *proxy_PerHost) Dial(network, addr string) (c net.Conn, err error) { + host, _, err := net.SplitHostPort(addr) + if err != nil { + return nil, err + } + + return p.dialerForRequest(host).Dial(network, addr) +} + +func (p *proxy_PerHost) dialerForRequest(host string) proxy_Dialer { + if ip := net.ParseIP(host); ip != nil { + for _, net := range p.bypassNetworks { + if net.Contains(ip) { + return p.bypass + } + } + for _, bypassIP := range p.bypassIPs { + if bypassIP.Equal(ip) { + return p.bypass + } + } + return p.def + } + + for _, zone := range p.bypassZones { + if strings.HasSuffix(host, zone) { + return p.bypass + } + if host == zone[1:] { + // For a zone ".example.com", we match "example.com" + // too. + return p.bypass + } + } + for _, bypassHost := range p.bypassHosts { + if bypassHost == host { + return p.bypass + } + } + return p.def +} + +// AddFromString parses a string that contains comma-separated values +// specifying hosts that should use the bypass proxy. Each value is either an +// IP address, a CIDR range, a zone (*.example.com) or a host name +// (localhost). A best effort is made to parse the string and errors are +// ignored. +func (p *proxy_PerHost) AddFromString(s string) { + hosts := strings.Split(s, ",") + for _, host := range hosts { + host = strings.TrimSpace(host) + if len(host) == 0 { + continue + } + if strings.Contains(host, "/") { + // We assume that it's a CIDR address like 127.0.0.0/8 + if _, net, err := net.ParseCIDR(host); err == nil { + p.AddNetwork(net) + } + continue + } + if ip := net.ParseIP(host); ip != nil { + p.AddIP(ip) + continue + } + if strings.HasPrefix(host, "*.") { + p.AddZone(host[1:]) + continue + } + p.AddHost(host) + } +} + +// AddIP specifies an IP address that will use the bypass proxy. Note that +// this will only take effect if a literal IP address is dialed. A connection +// to a named host will never match an IP. +func (p *proxy_PerHost) AddIP(ip net.IP) { + p.bypassIPs = append(p.bypassIPs, ip) +} + +// AddNetwork specifies an IP range that will use the bypass proxy. Note that +// this will only take effect if a literal IP address is dialed. A connection +// to a named host will never match. +func (p *proxy_PerHost) AddNetwork(net *net.IPNet) { + p.bypassNetworks = append(p.bypassNetworks, net) +} + +// AddZone specifies a DNS suffix that will use the bypass proxy. A zone of +// "example.com" matches "example.com" and all of its subdomains. +func (p *proxy_PerHost) AddZone(zone string) { + if strings.HasSuffix(zone, ".") { + zone = zone[:len(zone)-1] + } + if !strings.HasPrefix(zone, ".") { + zone = "." + zone + } + p.bypassZones = append(p.bypassZones, zone) +} + +// AddHost specifies a host name that will use the bypass proxy. +func (p *proxy_PerHost) AddHost(host string) { + if strings.HasSuffix(host, ".") { + host = host[:len(host)-1] + } + p.bypassHosts = append(p.bypassHosts, host) +} + +// A Dialer is a means to establish a connection. +type proxy_Dialer interface { + // Dial connects to the given address via the proxy. + Dial(network, addr string) (c net.Conn, err error) +} + +// Auth contains authentication parameters that specific Dialers may require. +type proxy_Auth struct { + User, Password string +} + +// FromEnvironment returns the dialer specified by the proxy related variables in +// the environment. +func proxy_FromEnvironment() proxy_Dialer { + allProxy := proxy_allProxyEnv.Get() + if len(allProxy) == 0 { + return proxy_Direct + } + + proxyURL, err := url.Parse(allProxy) + if err != nil { + return proxy_Direct + } + proxy, err := proxy_FromURL(proxyURL, proxy_Direct) + if err != nil { + return proxy_Direct + } + + noProxy := proxy_noProxyEnv.Get() + if len(noProxy) == 0 { + return proxy + } + + perHost := proxy_NewPerHost(proxy, proxy_Direct) + perHost.AddFromString(noProxy) + return perHost +} + +// proxySchemes is a map from URL schemes to a function that creates a Dialer +// from a URL with such a scheme. +var proxy_proxySchemes map[string]func(*url.URL, proxy_Dialer) (proxy_Dialer, error) + +// RegisterDialerType takes a URL scheme and a function to generate Dialers from +// a URL with that scheme and a forwarding Dialer. Registered schemes are used +// by FromURL. +func proxy_RegisterDialerType(scheme string, f func(*url.URL, proxy_Dialer) (proxy_Dialer, error)) { + if proxy_proxySchemes == nil { + proxy_proxySchemes = make(map[string]func(*url.URL, proxy_Dialer) (proxy_Dialer, error)) + } + proxy_proxySchemes[scheme] = f +} + +// FromURL returns a Dialer given a URL specification and an underlying +// Dialer for it to make network requests. +func proxy_FromURL(u *url.URL, forward proxy_Dialer) (proxy_Dialer, error) { + var auth *proxy_Auth + if u.User != nil { + auth = new(proxy_Auth) + auth.User = u.User.Username() + if p, ok := u.User.Password(); ok { + auth.Password = p + } + } + + switch u.Scheme { + case "socks5": + return proxy_SOCKS5("tcp", u.Host, auth, forward) + } + + // If the scheme doesn't match any of the built-in schemes, see if it + // was registered by another package. + if proxy_proxySchemes != nil { + if f, ok := proxy_proxySchemes[u.Scheme]; ok { + return f(u, forward) + } + } + + return nil, errors.New("proxy: unknown scheme: " + u.Scheme) +} + +var ( + proxy_allProxyEnv = &proxy_envOnce{ + names: []string{"ALL_PROXY", "all_proxy"}, + } + proxy_noProxyEnv = &proxy_envOnce{ + names: []string{"NO_PROXY", "no_proxy"}, + } +) + +// envOnce looks up an environment variable (optionally by multiple +// names) once. It mitigates expensive lookups on some platforms +// (e.g. Windows). +// (Borrowed from net/http/transport.go) +type proxy_envOnce struct { + names []string + once sync.Once + val string +} + +func (e *proxy_envOnce) Get() string { + e.once.Do(e.init) + return e.val +} + +func (e *proxy_envOnce) init() { + for _, n := range e.names { + e.val = os.Getenv(n) + if e.val != "" { + return + } + } +} + +// SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address +// with an optional username and password. See RFC 1928 and RFC 1929. +func proxy_SOCKS5(network, addr string, auth *proxy_Auth, forward proxy_Dialer) (proxy_Dialer, error) { + s := &proxy_socks5{ + network: network, + addr: addr, + forward: forward, + } + if auth != nil { + s.user = auth.User + s.password = auth.Password + } + + return s, nil +} + +type proxy_socks5 struct { + user, password string + network, addr string + forward proxy_Dialer +} + +const proxy_socks5Version = 5 + +const ( + proxy_socks5AuthNone = 0 + proxy_socks5AuthPassword = 2 +) + +const proxy_socks5Connect = 1 + +const ( + proxy_socks5IP4 = 1 + proxy_socks5Domain = 3 + proxy_socks5IP6 = 4 +) + +var proxy_socks5Errors = []string{ + "", + "general failure", + "connection forbidden", + "network unreachable", + "host unreachable", + "connection refused", + "TTL expired", + "command not supported", + "address type not supported", +} + +// Dial connects to the address addr on the given network via the SOCKS5 proxy. +func (s *proxy_socks5) Dial(network, addr string) (net.Conn, error) { + switch network { + case "tcp", "tcp6", "tcp4": + default: + return nil, errors.New("proxy: no support for SOCKS5 proxy connections of type " + network) + } + + conn, err := s.forward.Dial(s.network, s.addr) + if err != nil { + return nil, err + } + if err := s.connect(conn, addr); err != nil { + conn.Close() + return nil, err + } + return conn, nil +} + +// connect takes an existing connection to a socks5 proxy server, +// and commands the server to extend that connection to target, +// which must be a canonical address with a host and port. +func (s *proxy_socks5) connect(conn net.Conn, target string) error { + host, portStr, err := net.SplitHostPort(target) + if err != nil { + return err + } + + port, err := strconv.Atoi(portStr) + if err != nil { + return errors.New("proxy: failed to parse port number: " + portStr) + } + if port < 1 || port > 0xffff { + return errors.New("proxy: port number out of range: " + portStr) + } + + // the size here is just an estimate + buf := make([]byte, 0, 6+len(host)) + + buf = append(buf, proxy_socks5Version) + if len(s.user) > 0 && len(s.user) < 256 && len(s.password) < 256 { + buf = append(buf, 2 /* num auth methods */, proxy_socks5AuthNone, proxy_socks5AuthPassword) + } else { + buf = append(buf, 1 /* num auth methods */, proxy_socks5AuthNone) + } + + if _, err := conn.Write(buf); err != nil { + return errors.New("proxy: failed to write greeting to SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + if _, err := io.ReadFull(conn, buf[:2]); err != nil { + return errors.New("proxy: failed to read greeting from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + if buf[0] != 5 { + return errors.New("proxy: SOCKS5 proxy at " + s.addr + " has unexpected version " + strconv.Itoa(int(buf[0]))) + } + if buf[1] == 0xff { + return errors.New("proxy: SOCKS5 proxy at " + s.addr + " requires authentication") + } + + // See RFC 1929 + if buf[1] == proxy_socks5AuthPassword { + buf = buf[:0] + buf = append(buf, 1 /* password protocol version */) + buf = append(buf, uint8(len(s.user))) + buf = append(buf, s.user...) + buf = append(buf, uint8(len(s.password))) + buf = append(buf, s.password...) + + if _, err := conn.Write(buf); err != nil { + return errors.New("proxy: failed to write authentication request to SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + if _, err := io.ReadFull(conn, buf[:2]); err != nil { + return errors.New("proxy: failed to read authentication reply from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + if buf[1] != 0 { + return errors.New("proxy: SOCKS5 proxy at " + s.addr + " rejected username/password") + } + } + + buf = buf[:0] + buf = append(buf, proxy_socks5Version, proxy_socks5Connect, 0 /* reserved */) + + if ip := net.ParseIP(host); ip != nil { + if ip4 := ip.To4(); ip4 != nil { + buf = append(buf, proxy_socks5IP4) + ip = ip4 + } else { + buf = append(buf, proxy_socks5IP6) + } + buf = append(buf, ip...) + } else { + if len(host) > 255 { + return errors.New("proxy: destination host name too long: " + host) + } + buf = append(buf, proxy_socks5Domain) + buf = append(buf, byte(len(host))) + buf = append(buf, host...) + } + buf = append(buf, byte(port>>8), byte(port)) + + if _, err := conn.Write(buf); err != nil { + return errors.New("proxy: failed to write connect request to SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + if _, err := io.ReadFull(conn, buf[:4]); err != nil { + return errors.New("proxy: failed to read connect reply from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + failure := "unknown error" + if int(buf[1]) < len(proxy_socks5Errors) { + failure = proxy_socks5Errors[buf[1]] + } + + if len(failure) > 0 { + return errors.New("proxy: SOCKS5 proxy at " + s.addr + " failed to connect: " + failure) + } + + bytesToDiscard := 0 + switch buf[3] { + case proxy_socks5IP4: + bytesToDiscard = net.IPv4len + case proxy_socks5IP6: + bytesToDiscard = net.IPv6len + case proxy_socks5Domain: + _, err := io.ReadFull(conn, buf[:1]) + if err != nil { + return errors.New("proxy: failed to read domain length from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + bytesToDiscard = int(buf[0]) + default: + return errors.New("proxy: got unknown address type " + strconv.Itoa(int(buf[3])) + " from SOCKS5 proxy at " + s.addr) + } + + if cap(buf) < bytesToDiscard { + buf = make([]byte, bytesToDiscard) + } else { + buf = buf[:bytesToDiscard] + } + if _, err := io.ReadFull(conn, buf); err != nil { + return errors.New("proxy: failed to read address from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + // Also need to discard the port number + if _, err := io.ReadFull(conn, buf[:2]); err != nil { + return errors.New("proxy: failed to read port from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + return nil +} diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/clientset.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/clientset.go index 6f4518f097..f374a5c511 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/clientset.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -19,8 +19,8 @@ limitations under the License. package versioned import ( - fmt "fmt" - http "net/http" + "fmt" + "net/http" k8sv1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1" discovery "k8s.io/client-go/discovery" diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/clientset_generated.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/clientset_generated.go index eb8da4c265..a67d14acb8 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/clientset_generated.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -31,12 +31,8 @@ import ( // NewSimpleClientset returns a clientset that will respond with the provided objects. // It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement +// without applying any validations and/or defaults. It shouldn't be considered a replacement // for a real clientset and is mostly useful in simple unit tests. -// -// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves -// server side apply testing. NewClientset is only available when apply configurations are generated (e.g. -// via --with-applyconfig). func NewSimpleClientset(objects ...runtime.Object) *Clientset { o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) for _, obj := range objects { diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/doc.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/doc.go index 64c6b6be35..44e8061b76 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/doc.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/register.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/register.go index e6f64d71b9..3cdc1ac5b1 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/register.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme/doc.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme/doc.go index 8514bb55f2..743391c14b 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme/doc.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme/register.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme/register.go index 522a30ca3e..d6a1737fdb 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme/register.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/doc.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/doc.go index 19ad6aefe7..faa8377ce2 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/doc.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/doc.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/doc.go index 33fd99c15d..b38fd4c55d 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/doc.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/fake_ipamclaim.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/fake_ipamclaim.go index e410e0b7e3..00db990cf9 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/fake_ipamclaim.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/fake_ipamclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -19,32 +19,123 @@ limitations under the License. package fake import ( + "context" + v1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" - ipamclaimsv1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1" - gentype "k8s.io/client-go/gentype" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" ) -// fakeIPAMClaims implements IPAMClaimInterface -type fakeIPAMClaims struct { - *gentype.FakeClientWithList[*v1alpha1.IPAMClaim, *v1alpha1.IPAMClaimList] +// FakeIPAMClaims implements IPAMClaimInterface +type FakeIPAMClaims struct { Fake *FakeK8sV1alpha1 + ns string +} + +var ipamclaimsResource = v1alpha1.SchemeGroupVersion.WithResource("ipamclaims") + +var ipamclaimsKind = v1alpha1.SchemeGroupVersion.WithKind("IPAMClaim") + +// Get takes name of the iPAMClaim, and returns the corresponding iPAMClaim object, and an error if there is any. +func (c *FakeIPAMClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IPAMClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(ipamclaimsResource, c.ns, name), &v1alpha1.IPAMClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.IPAMClaim), err +} + +// List takes label and field selectors, and returns the list of IPAMClaims that match those selectors. +func (c *FakeIPAMClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IPAMClaimList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(ipamclaimsResource, ipamclaimsKind, c.ns, opts), &v1alpha1.IPAMClaimList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.IPAMClaimList{ListMeta: obj.(*v1alpha1.IPAMClaimList).ListMeta} + for _, item := range obj.(*v1alpha1.IPAMClaimList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested iPAMClaims. +func (c *FakeIPAMClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(ipamclaimsResource, c.ns, opts)) + +} + +// Create takes the representation of a iPAMClaim and creates it. Returns the server's representation of the iPAMClaim, and an error, if there is any. +func (c *FakeIPAMClaims) Create(ctx context.Context, iPAMClaim *v1alpha1.IPAMClaim, opts v1.CreateOptions) (result *v1alpha1.IPAMClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(ipamclaimsResource, c.ns, iPAMClaim), &v1alpha1.IPAMClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.IPAMClaim), err +} + +// Update takes the representation of a iPAMClaim and updates it. Returns the server's representation of the iPAMClaim, and an error, if there is any. +func (c *FakeIPAMClaims) Update(ctx context.Context, iPAMClaim *v1alpha1.IPAMClaim, opts v1.UpdateOptions) (result *v1alpha1.IPAMClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(ipamclaimsResource, c.ns, iPAMClaim), &v1alpha1.IPAMClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.IPAMClaim), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeIPAMClaims) UpdateStatus(ctx context.Context, iPAMClaim *v1alpha1.IPAMClaim, opts v1.UpdateOptions) (*v1alpha1.IPAMClaim, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(ipamclaimsResource, "status", c.ns, iPAMClaim), &v1alpha1.IPAMClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.IPAMClaim), err +} + +// Delete takes name of the iPAMClaim and deletes it. Returns an error if one occurs. +func (c *FakeIPAMClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(ipamclaimsResource, c.ns, name, opts), &v1alpha1.IPAMClaim{}) + + return err } -func newFakeIPAMClaims(fake *FakeK8sV1alpha1, namespace string) ipamclaimsv1alpha1.IPAMClaimInterface { - return &fakeIPAMClaims{ - gentype.NewFakeClientWithList[*v1alpha1.IPAMClaim, *v1alpha1.IPAMClaimList]( - fake.Fake, - namespace, - v1alpha1.SchemeGroupVersion.WithResource("ipamclaims"), - v1alpha1.SchemeGroupVersion.WithKind("IPAMClaim"), - func() *v1alpha1.IPAMClaim { return &v1alpha1.IPAMClaim{} }, - func() *v1alpha1.IPAMClaimList { return &v1alpha1.IPAMClaimList{} }, - func(dst, src *v1alpha1.IPAMClaimList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha1.IPAMClaimList) []*v1alpha1.IPAMClaim { return gentype.ToPointerSlice(list.Items) }, - func(list *v1alpha1.IPAMClaimList, items []*v1alpha1.IPAMClaim) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, +// DeleteCollection deletes a collection of objects. +func (c *FakeIPAMClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(ipamclaimsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.IPAMClaimList{}) + return err +} + +// Patch applies the patch and returns the patched iPAMClaim. +func (c *FakeIPAMClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IPAMClaim, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ipamclaimsResource, c.ns, name, pt, data, subresources...), &v1alpha1.IPAMClaim{}) + + if obj == nil { + return nil, err } + return obj.(*v1alpha1.IPAMClaim), err } diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/fake_ipamclaims_client.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/fake_ipamclaims_client.go index 65c4b4c979..adc0c545ed 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/fake_ipamclaims_client.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/fake/fake_ipamclaims_client.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -29,7 +29,7 @@ type FakeK8sV1alpha1 struct { } func (c *FakeK8sV1alpha1) IPAMClaims(namespace string) v1alpha1.IPAMClaimInterface { - return newFakeIPAMClaims(c, namespace) + return &FakeIPAMClaims{c, namespace} } // RESTClient returns a RESTClient that is used to communicate diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/generated_expansion.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/generated_expansion.go index b70abd3102..c5c3006e82 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/generated_expansion.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/ipamclaim.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/ipamclaim.go index f4d088c1b9..bfc26c0c5a 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/ipamclaim.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/ipamclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -19,14 +19,15 @@ limitations under the License. package v1alpha1 import ( - context "context" + "context" + "time" - ipamclaimsv1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" + v1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" scheme "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" + rest "k8s.io/client-go/rest" ) // IPAMClaimsGetter has a method to return a IPAMClaimInterface. @@ -37,34 +38,158 @@ type IPAMClaimsGetter interface { // IPAMClaimInterface has methods to work with IPAMClaim resources. type IPAMClaimInterface interface { - Create(ctx context.Context, iPAMClaim *ipamclaimsv1alpha1.IPAMClaim, opts v1.CreateOptions) (*ipamclaimsv1alpha1.IPAMClaim, error) - Update(ctx context.Context, iPAMClaim *ipamclaimsv1alpha1.IPAMClaim, opts v1.UpdateOptions) (*ipamclaimsv1alpha1.IPAMClaim, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, iPAMClaim *ipamclaimsv1alpha1.IPAMClaim, opts v1.UpdateOptions) (*ipamclaimsv1alpha1.IPAMClaim, error) + Create(ctx context.Context, iPAMClaim *v1alpha1.IPAMClaim, opts v1.CreateOptions) (*v1alpha1.IPAMClaim, error) + Update(ctx context.Context, iPAMClaim *v1alpha1.IPAMClaim, opts v1.UpdateOptions) (*v1alpha1.IPAMClaim, error) + UpdateStatus(ctx context.Context, iPAMClaim *v1alpha1.IPAMClaim, opts v1.UpdateOptions) (*v1alpha1.IPAMClaim, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*ipamclaimsv1alpha1.IPAMClaim, error) - List(ctx context.Context, opts v1.ListOptions) (*ipamclaimsv1alpha1.IPAMClaimList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.IPAMClaim, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.IPAMClaimList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ipamclaimsv1alpha1.IPAMClaim, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IPAMClaim, err error) IPAMClaimExpansion } // iPAMClaims implements IPAMClaimInterface type iPAMClaims struct { - *gentype.ClientWithList[*ipamclaimsv1alpha1.IPAMClaim, *ipamclaimsv1alpha1.IPAMClaimList] + client rest.Interface + ns string } // newIPAMClaims returns a IPAMClaims func newIPAMClaims(c *K8sV1alpha1Client, namespace string) *iPAMClaims { return &iPAMClaims{ - gentype.NewClientWithList[*ipamclaimsv1alpha1.IPAMClaim, *ipamclaimsv1alpha1.IPAMClaimList]( - "ipamclaims", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *ipamclaimsv1alpha1.IPAMClaim { return &ipamclaimsv1alpha1.IPAMClaim{} }, - func() *ipamclaimsv1alpha1.IPAMClaimList { return &ipamclaimsv1alpha1.IPAMClaimList{} }, - ), + client: c.RESTClient(), + ns: namespace, } } + +// Get takes name of the iPAMClaim, and returns the corresponding iPAMClaim object, and an error if there is any. +func (c *iPAMClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IPAMClaim, err error) { + result = &v1alpha1.IPAMClaim{} + err = c.client.Get(). + Namespace(c.ns). + Resource("ipamclaims"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of IPAMClaims that match those selectors. +func (c *iPAMClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IPAMClaimList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.IPAMClaimList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("ipamclaims"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested iPAMClaims. +func (c *iPAMClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("ipamclaims"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a iPAMClaim and creates it. Returns the server's representation of the iPAMClaim, and an error, if there is any. +func (c *iPAMClaims) Create(ctx context.Context, iPAMClaim *v1alpha1.IPAMClaim, opts v1.CreateOptions) (result *v1alpha1.IPAMClaim, err error) { + result = &v1alpha1.IPAMClaim{} + err = c.client.Post(). + Namespace(c.ns). + Resource("ipamclaims"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(iPAMClaim). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a iPAMClaim and updates it. Returns the server's representation of the iPAMClaim, and an error, if there is any. +func (c *iPAMClaims) Update(ctx context.Context, iPAMClaim *v1alpha1.IPAMClaim, opts v1.UpdateOptions) (result *v1alpha1.IPAMClaim, err error) { + result = &v1alpha1.IPAMClaim{} + err = c.client.Put(). + Namespace(c.ns). + Resource("ipamclaims"). + Name(iPAMClaim.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(iPAMClaim). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *iPAMClaims) UpdateStatus(ctx context.Context, iPAMClaim *v1alpha1.IPAMClaim, opts v1.UpdateOptions) (result *v1alpha1.IPAMClaim, err error) { + result = &v1alpha1.IPAMClaim{} + err = c.client.Put(). + Namespace(c.ns). + Resource("ipamclaims"). + Name(iPAMClaim.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(iPAMClaim). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the iPAMClaim and deletes it. Returns an error if one occurs. +func (c *iPAMClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("ipamclaims"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *iPAMClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("ipamclaims"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched iPAMClaim. +func (c *iPAMClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IPAMClaim, err error) { + result = &v1alpha1.IPAMClaim{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("ipamclaims"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/ipamclaims_client.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/ipamclaims_client.go index 3545777356..d6b8684d89 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/ipamclaims_client.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/typed/ipamclaims/v1alpha1/ipamclaims_client.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -19,10 +19,10 @@ limitations under the License. package v1alpha1 import ( - http "net/http" + "net/http" - ipamclaimsv1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" - scheme "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme" + v1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" + "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -85,10 +85,10 @@ func New(c rest.Interface) *K8sV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := ipamclaimsv1alpha1.SchemeGroupVersion + gv := v1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/factory.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/factory.go index 7efe7e95a6..8ba00a69fc 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/factory.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -42,7 +42,6 @@ type sharedInformerFactory struct { lock sync.Mutex defaultResync time.Duration customResync map[reflect.Type]time.Duration - transform cache.TransformFunc informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -81,14 +80,6 @@ func WithNamespace(namespace string) SharedInformerOption { } } -// WithTransform sets a transform on all informers. -func WithTransform(transform cache.TransformFunc) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.transform = transform - return factory - } -} - // NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync) @@ -193,7 +184,6 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal } informer = newFunc(f.client, resyncPeriod) - informer.SetTransform(f.transform) f.informers[informerType] = informer return informer @@ -228,7 +218,6 @@ type SharedInformerFactory interface { // Start initializes all requested informers. They are handled in goroutines // which run until the stop channel gets closed. - // Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync. Start(stopCh <-chan struct{}) // Shutdown marks a factory as shutting down. At that point no new diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/generic.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/generic.go index d5dabd6983..94f709e9bb 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/generic.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -19,7 +19,7 @@ limitations under the License. package externalversions import ( - fmt "fmt" + "fmt" v1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/internalinterfaces/factory_interfaces.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/internalinterfaces/factory_interfaces.go index cb5a445987..8d1429d5f3 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/interface.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/interface.go index b2cad1c067..c93d99e4be 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/interface.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/v1alpha1/interface.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/v1alpha1/interface.go index 455310ee4d..1ab51a9ed7 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/v1alpha1/interface.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/v1alpha1/ipamclaim.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/v1alpha1/ipamclaim.go index 8caa586ce5..fd46dc78b7 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/v1alpha1/ipamclaim.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/ipamclaims/v1alpha1/ipamclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -19,13 +19,13 @@ limitations under the License. package v1alpha1 import ( - context "context" + "context" time "time" - crdipamclaimsv1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" + ipamclaimsv1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" versioned "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned" internalinterfaces "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers/externalversions/internalinterfaces" - ipamclaimsv1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1" + v1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -36,7 +36,7 @@ import ( // IPAMClaims. type IPAMClaimInformer interface { Informer() cache.SharedIndexInformer - Lister() ipamclaimsv1alpha1.IPAMClaimLister + Lister() v1alpha1.IPAMClaimLister } type iPAMClaimInformer struct { @@ -71,7 +71,7 @@ func NewFilteredIPAMClaimInformer(client versioned.Interface, namespace string, return client.K8sV1alpha1().IPAMClaims(namespace).Watch(context.TODO(), options) }, }, - &crdipamclaimsv1alpha1.IPAMClaim{}, + &ipamclaimsv1alpha1.IPAMClaim{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *iPAMClaimInformer) defaultInformer(client versioned.Interface, resyncPe } func (f *iPAMClaimInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&crdipamclaimsv1alpha1.IPAMClaim{}, f.defaultInformer) + return f.factory.InformerFor(&ipamclaimsv1alpha1.IPAMClaim{}, f.defaultInformer) } -func (f *iPAMClaimInformer) Lister() ipamclaimsv1alpha1.IPAMClaimLister { - return ipamclaimsv1alpha1.NewIPAMClaimLister(f.Informer().GetIndexer()) +func (f *iPAMClaimInformer) Lister() v1alpha1.IPAMClaimLister { + return v1alpha1.NewIPAMClaimLister(f.Informer().GetIndexer()) } diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1/expansion_generated.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1/expansion_generated.go index bb37e41381..086ab4ab65 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1/expansion_generated.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1/ipamclaim.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1/ipamclaim.go index 474e11b48e..409fc70d06 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1/ipamclaim.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers/ipamclaims/v1alpha1/ipamclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2025 The Kubernetes Authors +Copyright 2024 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. @@ -19,10 +19,10 @@ limitations under the License. package v1alpha1 import ( - ipamclaimsv1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" + v1alpha1 "github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" ) // IPAMClaimLister helps list IPAMClaims. @@ -30,7 +30,7 @@ import ( type IPAMClaimLister interface { // List lists all IPAMClaims in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*ipamclaimsv1alpha1.IPAMClaim, err error) + List(selector labels.Selector) (ret []*v1alpha1.IPAMClaim, err error) // IPAMClaims returns an object that can list and get IPAMClaims. IPAMClaims(namespace string) IPAMClaimNamespaceLister IPAMClaimListerExpansion @@ -38,17 +38,25 @@ type IPAMClaimLister interface { // iPAMClaimLister implements the IPAMClaimLister interface. type iPAMClaimLister struct { - listers.ResourceIndexer[*ipamclaimsv1alpha1.IPAMClaim] + indexer cache.Indexer } // NewIPAMClaimLister returns a new IPAMClaimLister. func NewIPAMClaimLister(indexer cache.Indexer) IPAMClaimLister { - return &iPAMClaimLister{listers.New[*ipamclaimsv1alpha1.IPAMClaim](indexer, ipamclaimsv1alpha1.Resource("ipamclaim"))} + return &iPAMClaimLister{indexer: indexer} +} + +// List lists all IPAMClaims in the indexer. +func (s *iPAMClaimLister) List(selector labels.Selector) (ret []*v1alpha1.IPAMClaim, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.IPAMClaim)) + }) + return ret, err } // IPAMClaims returns an object that can list and get IPAMClaims. func (s *iPAMClaimLister) IPAMClaims(namespace string) IPAMClaimNamespaceLister { - return iPAMClaimNamespaceLister{listers.NewNamespaced[*ipamclaimsv1alpha1.IPAMClaim](s.ResourceIndexer, namespace)} + return iPAMClaimNamespaceLister{indexer: s.indexer, namespace: namespace} } // IPAMClaimNamespaceLister helps list and get IPAMClaims. @@ -56,15 +64,36 @@ func (s *iPAMClaimLister) IPAMClaims(namespace string) IPAMClaimNamespaceLister type IPAMClaimNamespaceLister interface { // List lists all IPAMClaims in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*ipamclaimsv1alpha1.IPAMClaim, err error) + List(selector labels.Selector) (ret []*v1alpha1.IPAMClaim, err error) // Get retrieves the IPAMClaim from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*ipamclaimsv1alpha1.IPAMClaim, error) + Get(name string) (*v1alpha1.IPAMClaim, error) IPAMClaimNamespaceListerExpansion } // iPAMClaimNamespaceLister implements the IPAMClaimNamespaceLister // interface. type iPAMClaimNamespaceLister struct { - listers.ResourceIndexer[*ipamclaimsv1alpha1.IPAMClaim] + indexer cache.Indexer + namespace string +} + +// List lists all IPAMClaims in the indexer for a given namespace. +func (s iPAMClaimNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.IPAMClaim, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.IPAMClaim)) + }) + return ret, err +} + +// Get retrieves the IPAMClaim from the indexer for a given namespace and name. +func (s iPAMClaimNamespaceLister) Get(name string) (*v1alpha1.IPAMClaim, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("ipamclaim"), name) + } + return obj.(*v1alpha1.IPAMClaim), nil } diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/types.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/types.go index 434368d247..ca94219215 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/types.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/types.go @@ -4,13 +4,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5 paths=./... object crd output:artifacts:code=./,config=../../../../artifacts +//go:generate go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.13.0 paths=./... object crd output:artifacts:code=./,config=../../../../artifacts -//go:generate go run k8s.io/code-generator/cmd/client-gen@v0.32.5 --go-header-file ../../../../hack/custom-boilerplate.go.txt --clientset-name versioned --input-base "" --input github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1 --output-pkg github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset --output-dir ./apis/clientset .. +//go:generate go run k8s.io/code-generator/cmd/client-gen@v0.28.0 client-gen --go-header-file ../../../../hack/custom-boilerplate.go.txt --clientset-name versioned --input-base "" --input github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1 --output-package github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset .. -//go:generate go run k8s.io/code-generator/cmd/lister-gen@v0.32.5 --go-header-file ../../../../hack/custom-boilerplate.go.txt --output-pkg github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers --output-dir ./apis/listers ./ +//go:generate go run k8s.io/code-generator/cmd/lister-gen@v0.28.0 lister-gen --go-header-file ../../../../hack/custom-boilerplate.go.txt --input-dirs github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1 --output-package github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers .. -//go:generate go run k8s.io/code-generator/cmd/informer-gen@v0.32.5 --go-header-file ../../../../hack/custom-boilerplate.go.txt --versioned-clientset-package github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned --listers-package github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers --output-pkg github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers --output-dir ./apis/informers ./ +//go:generate go run k8s.io/code-generator/cmd/informer-gen@v0.28.0 informer-gen --go-header-file ../../../../hack/custom-boilerplate.go.txt --input-dirs github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1 --versioned-clientset-package github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/clientset/versioned --listers-package github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/listers --output-package github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/apis/informers .. // +genclient // +kubebuilder:object:root=true @@ -35,14 +35,9 @@ type IPAMClaimSpec struct { Interface string `json:"interface"` } -// IPAMClaimStatus contains the observed status of the IPAMClaim. type IPAMClaimStatus struct { // The list of IP addresses (v4, v6) that were allocated for the pod interface IPs []string `json:"ips"` - // The name of the pod holding the IPAMClaim - OwnerPod *OwnerPod `json:"ownerPod,omitempty"` - // Conditions contains details for one aspect of the current state of this API Resource - Conditions []metav1.Condition `json:"conditions,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -52,7 +47,3 @@ type IPAMClaimList struct { metav1.ListMeta `json:"metadata,omitempty"` Items []IPAMClaim `json:"items"` } - -type OwnerPod struct { - Name string `json:"name,omitempty"` -} diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/zz_generated.deepcopy.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/zz_generated.deepcopy.go index f504722fe9..737efd7a84 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/zz_generated.deepcopy.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/ipamclaims/pkg/crd/ipamclaims/v1alpha1/zz_generated.deepcopy.go @@ -5,7 +5,6 @@ package v1alpha1 import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ) @@ -91,18 +90,6 @@ func (in *IPAMClaimStatus) DeepCopyInto(out *IPAMClaimStatus) { *out = make([]string, len(*in)) copy(*out, *in) } - if in.OwnerPod != nil { - in, out := &in.OwnerPod, &out.OwnerPod - *out = new(OwnerPod) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMClaimStatus. @@ -114,18 +101,3 @@ func (in *IPAMClaimStatus) DeepCopy() *IPAMClaimStatus { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OwnerPod) DeepCopyInto(out *OwnerPod) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnerPod. -func (in *OwnerPod) DeepCopy() *OwnerPod { - if in == nil { - return nil - } - out := new(OwnerPod) - in.DeepCopyInto(out) - return out -} diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1/types.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1/types.go index 042a5867e0..7e202ed8d0 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1/types.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1/types.go @@ -2,9 +2,9 @@ package v1 import ( "encoding/json" - "net" - + "errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "net" ) // +genclient @@ -107,7 +107,6 @@ type NetworkStatus struct { Interface string `json:"interface,omitempty"` IPs []string `json:"ips,omitempty"` Mac string `json:"mac,omitempty"` - Mtu int `json:"mtu,omitempty"` Default bool `json:"default,omitempty"` DNS DNS `json:"dns,omitempty"` DeviceInfo *DeviceInfo `json:"device-info,omitempty"` @@ -177,6 +176,9 @@ func (nse *NetworkSelectionElement) UnmarshalJSON(b []byte) error { if err := json.Unmarshal(b, &netSelectionElement); err != nil { return err } + if len(netSelectionElement.IPRequest) > 0 && netSelectionElement.IPAMClaimReference != "" { + return TooManyIPSources + } *nse = NetworkSelectionElement(netSelectionElement) return nil } @@ -195,3 +197,5 @@ type NoK8sNetworkError struct { } func (e *NoK8sNetworkError) Error() string { return string(e.Message) } + +var TooManyIPSources = errors.New("cannot provide a static IP and a reference of an IPAM claim in the same network selection element") diff --git a/go-controller/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/utils/net-attach-def.go b/go-controller/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/utils/net-attach-def.go index acebe13a4a..4bca1645fb 100644 --- a/go-controller/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/utils/net-attach-def.go +++ b/go-controller/vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/utils/net-attach-def.go @@ -122,117 +122,6 @@ func GetNetworkStatus(pod *corev1.Pod) ([]v1.NetworkStatus, error) { return netStatuses, err } -// gatewayInterfaceIndex determines the index of the first interface that has a gateway -func gatewayInterfaceIndex(ips []*cni100.IPConfig) int { - for _, ipConfig := range ips { - if ipConfig.Gateway != nil && ipConfig.Interface != nil { - return *ipConfig.Interface - } - } - return -1 -} - -// CreateNetworkStatuses creates an array of NetworkStatus from CNI result -// Not to be confused with CreateNetworkStatus (singular) -// This is the preferred method and picks up when CNI ADD results contain multiple container interfaces -func CreateNetworkStatuses(r cnitypes.Result, networkName string, defaultNetwork bool, dev *v1.DeviceInfo) ([]*v1.NetworkStatus, error) { - var networkStatuses []*v1.NetworkStatus - // indexMap is from original CNI result index to networkStatuses index - indexMap := make(map[int]int) - - // Convert whatever the IPAM result was into the current Result type - result, err := cni100.NewResultFromResult(r) - if err != nil { - return nil, fmt.Errorf("error converting the type.Result to cni100.Result: %v", err) - } - - if len(result.Interfaces) == 1 { - networkStatus, err := CreateNetworkStatus(r, networkName, defaultNetwork, dev) - return []*v1.NetworkStatus{networkStatus}, err - } - - // Discover default routes upfront and reuse them if necessary. - var useDefaultRoute []string - for _, route := range result.Routes { - if isDefaultRoute(route) { - useDefaultRoute = append(useDefaultRoute, route.GW.String()) - } - } - - // Same for DNS - v1dns := convertDNS(result.DNS) - - // Check for a gateway-associated interface, we'll use this later if we did to mark as the default. - gwInterfaceIdx := -1 - if defaultNetwork { - gwInterfaceIdx = gatewayInterfaceIndex(result.IPs) - } - - // Initialize NetworkStatus for each container interface (e.g. with sandbox present) - indexOfFoundPodInterface := 0 - foundFirstSandboxIface := false - didSetDefault := false - for i, iface := range result.Interfaces { - if iface.Sandbox != "" { - isDefault := false - - // If there's a gateway listed for this interface index found in the ips, we mark that interface as default - // notably, we use the first one we find. - if defaultNetwork && i == gwInterfaceIdx && !didSetDefault { - isDefault = true - didSetDefault = true - } - - // Otherwise, if we didn't find it, we use the first sandbox interface. - if defaultNetwork && gwInterfaceIdx == -1 && !foundFirstSandboxIface { - isDefault = true - foundFirstSandboxIface = true - } - - ns := &v1.NetworkStatus{ - Name: networkName, - Default: isDefault, - Interface: iface.Name, - Mac: iface.Mac, - Mtu: iface.Mtu, - IPs: []string{}, - Gateway: useDefaultRoute, - DeviceInfo: dev, - DNS: *v1dns, - } - networkStatuses = append(networkStatuses, ns) - // Map original index to the new slice index - indexMap[i] = indexOfFoundPodInterface - indexOfFoundPodInterface++ - } - } - - var defaultNetworkStatus *v1.NetworkStatus - if len(networkStatuses) > 0 { - // Set the default network status to the last network status. - defaultNetworkStatus = networkStatuses[len(networkStatuses)-1] - } - - // Map IPs to network interface based on index - for _, ipConfig := range result.IPs { - if ipConfig.Interface != nil { - originalIndex := *ipConfig.Interface - if newIndex, ok := indexMap[originalIndex]; ok { - ns := networkStatuses[newIndex] - ns.IPs = append(ns.IPs, ipConfig.Address.IP.String()) - } - } else { - // If the IPs don't specify the interface assign the IP to the default network status. This keeps the behaviour - // consistent with previous multus versions. - if defaultNetworkStatus != nil { - defaultNetworkStatus.IPs = append(defaultNetworkStatus.IPs, ipConfig.Address.IP.String()) - } - } - } - - return networkStatuses, nil -} - // CreateNetworkStatus create NetworkStatus from CNI result func CreateNetworkStatus(r cnitypes.Result, networkName string, defaultNetwork bool, dev *v1.DeviceInfo) (*v1.NetworkStatus, error) { netStatus := &v1.NetworkStatus{} @@ -250,7 +139,6 @@ func CreateNetworkStatus(r cnitypes.Result, networkName string, defaultNetwork b if ifs.Sandbox != "" { netStatus.Interface = ifs.Name netStatus.Mac = ifs.Mac - netStatus.Mtu = ifs.Mtu } } diff --git a/go-controller/vendor/github.com/leodido/go-urn/.gitignore b/go-controller/vendor/github.com/leodido/go-urn/.gitignore deleted file mode 100644 index 427454f8f1..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*.exe -*.dll -*.so -*.dylib - -*.test - -*.out -*.txt - -vendor/ -/removecomments -/snake2camel \ No newline at end of file diff --git a/go-controller/vendor/github.com/leodido/go-urn/LICENSE b/go-controller/vendor/github.com/leodido/go-urn/LICENSE deleted file mode 100644 index 8c3504a5a9..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Leonardo Di Donato - -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. diff --git a/go-controller/vendor/github.com/leodido/go-urn/README.md b/go-controller/vendor/github.com/leodido/go-urn/README.md deleted file mode 100644 index 619475bfbb..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/README.md +++ /dev/null @@ -1,153 +0,0 @@ -[![Build](https://img.shields.io/circleci/build/github/leodido/go-urn?style=for-the-badge)](https://app.circleci.com/pipelines/github/leodido/go-urn) [![Coverage](https://img.shields.io/codecov/c/github/leodido/go-urn.svg?style=for-the-badge)](https://codecov.io/gh/leodido/go-urn) [![Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge)](https://godoc.org/github.com/leodido/go-urn) - -**A parser for URNs**. - -> As seen on [RFC 2141](https://datatracker.ietf.org/doc/html/rfc2141), [RFC 7643](https://datatracker.ietf.org/doc/html/rfc7643#section-10), and on [RFC 8141](https://datatracker.ietf.org/doc/html/rfc8141). - -[API documentation](https://godoc.org/github.com/leodido/go-urn). - -Starting with version 1.3 this library also supports [RFC 7643 SCIM URNs](https://datatracker.ietf.org/doc/html/rfc7643#section-10). - -Starting with version 1.4 this library also supports [RFC 8141 URNs (2017)](https://datatracker.ietf.org/doc/html/rfc8141). - -## Installation - -``` -go get github.com/leodido/go-urn -``` - -## Features - -1. RFC 2141 URNs parsing (default) -2. RFC 8141 URNs parsing (supersedes RFC 2141) -3. RFC 7643 SCIM URNs parsing -4. Normalization as per RFCs -5. Lexical equivalence as per RFCs -6. Precise, fine-grained errors - -## Performances - -This implementation results to be really fast. - -Usually below 400 ns on my machine[1](#mymachine). - -Notice it also performs, while parsing: - -1. fine-grained and informative erroring -2. specific-string normalization - -``` -ok/00/urn:a:b______________________________________/-10 51372006 109.0 ns/op 275 B/op 3 allocs/op -ok/01/URN:foo:a123,456_____________________________/-10 36024072 160.8 ns/op 296 B/op 6 allocs/op -ok/02/urn:foo:a123%2C456___________________________/-10 31901007 188.4 ns/op 320 B/op 7 allocs/op -ok/03/urn:ietf:params:scim:schemas:core:2.0:User___/-10 22736756 266.6 ns/op 376 B/op 6 allocs/op -ok/04/urn:ietf:params:scim:schemas:extension:enterp/-10 18291859 335.2 ns/op 408 B/op 6 allocs/op -ok/05/urn:ietf:params:scim:schemas:extension:enterp/-10 15283087 379.4 ns/op 440 B/op 6 allocs/op -ok/06/urn:burnout:nss______________________________/-10 39407593 155.1 ns/op 288 B/op 6 allocs/op -ok/07/urn:abcdefghilmnopqrstuvzabcdefghilm:x_______/-10 27832718 211.4 ns/op 307 B/op 4 allocs/op -ok/08/urn:urnurnurn:urn____________________________/-10 33269596 168.1 ns/op 293 B/op 6 allocs/op -ok/09/urn:ciao:!!*_________________________________/-10 41100675 148.8 ns/op 288 B/op 6 allocs/op -ok/10/urn:ciao:=@__________________________________/-10 37214253 149.7 ns/op 284 B/op 6 allocs/op -ok/11/urn:ciao:@!=%2C(xyz)+a,b.*@g=$_'_____________/-10 26534240 229.8 ns/op 336 B/op 7 allocs/op -ok/12/URN:x:abc%1Dz%2F%3az_________________________/-10 28166396 211.8 ns/op 336 B/op 7 allocs/op -no/13/URN:---xxx:x_________________________________/-10 23635159 255.6 ns/op 419 B/op 5 allocs/op -no/14/urn::colon:nss_______________________________/-10 23594779 258.4 ns/op 419 B/op 5 allocs/op -no/15/URN:@,:x_____________________________________/-10 23742535 261.5 ns/op 419 B/op 5 allocs/op -no/16/URN:URN:NSS__________________________________/-10 27432714 223.3 ns/op 371 B/op 5 allocs/op -no/17/urn:UrN:NSS__________________________________/-10 26922117 224.9 ns/op 371 B/op 5 allocs/op -no/18/urn:a:%______________________________________/-10 24926733 224.6 ns/op 371 B/op 5 allocs/op -no/19/urn:urn:NSS__________________________________/-10 27652641 220.7 ns/op 371 B/op 5 allocs/op -``` - -* [1]: Apple M1 Pro - - -## Example - -For more examples take a look at the [examples file](examples_test.go). - - -```go -package main - -import ( - "fmt" - "github.com/leodido/go-urn" -) - -func main() { - var uid = "URN:foo:a123,456" - - // Parse the input string as a RFC 2141 URN only - u, e := urn.NewMachine().Parse(uid) - if e != nil { - fmt.Errorf(err) - - return - } - - fmt.Println(u.ID) - fmt.Println(u.SS) - - // Output: - // foo - // a123,456 -} -``` - -```go -package main - -import ( - "fmt" - "github.com/leodido/go-urn" -) - -func main() { - var uid = "URN:foo:a123,456" - - // Parse the input string as a RFC 2141 URN only - u, ok := urn.Parse([]byte(uid)) - if !ok { - panic("error parsing urn") - } - - fmt.Println(u.ID) - fmt.Println(u.SS) - - // Output: - // foo - // a123,456 -} -``` - -```go -package main - -import ( - "fmt" - "github.com/leodido/go-urn" -) - -func main() { - input := "urn:ietf:params:scim:api:messages:2.0:ListResponse" - - // Parsing the input string as a RFC 7643 SCIM URN - u, ok := urn.Parse([]byte(input), urn.WithParsingMode(urn.RFC7643Only)) - if !ok { - panic("error parsing urn") - } - - fmt.Println(u.IsSCIM()) - scim := u.SCIM() - fmt.Println(scim.Type.String()) - fmt.Println(scim.Name) - fmt.Println(scim.Other) - - // Output: - // true - // api - // messages - // 2.0:ListResponse -} -``` \ No newline at end of file diff --git a/go-controller/vendor/github.com/leodido/go-urn/kind.go b/go-controller/vendor/github.com/leodido/go-urn/kind.go deleted file mode 100644 index f5e140f0a4..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/kind.go +++ /dev/null @@ -1,10 +0,0 @@ -package urn - -type Kind int - -const ( - NONE Kind = iota - RFC2141 - RFC7643 - RFC8141 -) diff --git a/go-controller/vendor/github.com/leodido/go-urn/machine.go b/go-controller/vendor/github.com/leodido/go-urn/machine.go deleted file mode 100644 index aec1ba69cb..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/machine.go +++ /dev/null @@ -1,5046 +0,0 @@ -package urn - -import ( - "fmt" - - scimschema "github.com/leodido/go-urn/scim/schema" -) - -var ( - errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]" - errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its beginning) [col %d]" - errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]" - errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]" - errHex = "expecting the percent encoded chars to be well-formed (%%alnum{2}) [col %d]" - errSCIMNamespace = "expecing the SCIM namespace identifier (ietf:params:scim) [col %d]" - errSCIMType = "expecting a correct SCIM type (schemas, api, param) [col %d]" - errSCIMName = "expecting one or more alnum char in the SCIM name part [col %d]" - errSCIMOther = "expecting a well-formed other SCIM part [col %d]" - errSCIMOtherIncomplete = "expecting a not empty SCIM other part after colon [col %d]" - err8141InformalID = "informal URN namespace must be in the form urn-[1-9][0-9] [col %d]" - err8141SpecificString = "expecting the specific string to contain alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] not in first position) chars [col %d]" - err8141Identifier = "expecting the indentifier to be a string with (length 2 to 32 chars) containing alnum (or dashes) not starting or ending with a dash [col %d]" - err8141RComponentStart = "expecting only one r-component (starting with the ?+ sequence) [col %d]" - err8141QComponentStart = "expecting only one q-component (starting with the ?= sequence) [col %d]" - err8141MalformedRComp = "expecting a non-empty r-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]" - err8141MalformedQComp = "expecting a non-empty q-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]" -) -var _toStateActions []byte = []byte{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 33, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -} - -var _eofActions []byte = []byte{ - 0, 1, 1, 1, 1, 4, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 8, 9, - 9, 4, 4, 11, 1, 1, 1, 1, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, - 12, 14, 14, 14, 14, 16, 18, 20, - 20, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 1, 1, 1, 1, 21, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 23, 24, 24, 25, 25, 0, 26, 28, - 28, 29, 29, 30, 30, 26, 26, 31, - 31, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 21, - 21, 22, 22, 22, 34, 34, 35, 37, - 37, 38, 40, 41, 41, 38, 42, 42, - 42, 44, 42, 48, 48, 48, 50, 44, - 50, 0, -} - -const start int = 1 -const firstFinal int = 172 - -const enScimOnly int = 44 -const enRfc8141Only int = 83 -const enFail int = 193 -const enMain int = 1 - -// Machine is the interface representing the FSM -type Machine interface { - Error() error - Parse(input []byte) (*URN, error) - WithParsingMode(ParsingMode) -} - -type machine struct { - data []byte - cs int - p, pe, eof, pb int - err error - startParsingAt int - parsingMode ParsingMode - parsingModeSet bool -} - -// NewMachine creates a new FSM able to parse RFC 2141 strings. -func NewMachine(options ...Option) Machine { - m := &machine{ - parsingModeSet: false, - } - - for _, o := range options { - o(m) - } - // Set default parsing mode - if !m.parsingModeSet { - m.WithParsingMode(DefaultParsingMode) - } - - return m -} - -// Err returns the error that occurred on the last call to Parse. -// -// If the result is nil, then the line was parsed successfully. -func (m *machine) Error() error { - return m.err -} - -func (m *machine) text() []byte { - return m.data[m.pb:m.p] -} - -// Parse parses the input byte array as a RFC 2141 or RFC7643 string. -func (m *machine) Parse(input []byte) (*URN, error) { - m.data = input - m.p = 0 - m.pb = 0 - m.pe = len(input) - m.eof = len(input) - m.err = nil - m.cs = m.startParsingAt - output := &URN{ - tolower: []int{}, - } - { - if (m.p) == (m.pe) { - goto _testEof - } - if m.cs == 0 { - goto _out - } - _resume: - switch m.cs { - case 1: - switch (m.data)[(m.p)] { - case 85: - goto tr1 - case 117: - goto tr1 - } - goto tr0 - case 0: - goto _out - case 2: - switch (m.data)[(m.p)] { - case 82: - goto tr2 - case 114: - goto tr2 - } - goto tr0 - case 3: - switch (m.data)[(m.p)] { - case 78: - goto tr3 - case 110: - goto tr3 - } - goto tr0 - case 4: - if (m.data)[(m.p)] == 58 { - goto tr4 - } - goto tr0 - case 5: - switch (m.data)[(m.p)] { - case 85: - goto tr7 - case 117: - goto tr7 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr6 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr6 - } - default: - goto tr6 - } - goto tr5 - case 6: - switch (m.data)[(m.p)] { - case 45: - goto tr9 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr9 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr9 - } - default: - goto tr9 - } - goto tr8 - case 7: - switch (m.data)[(m.p)] { - case 45: - goto tr11 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr11 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr11 - } - default: - goto tr11 - } - goto tr8 - case 8: - switch (m.data)[(m.p)] { - case 45: - goto tr12 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr12 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr12 - } - default: - goto tr12 - } - goto tr8 - case 9: - switch (m.data)[(m.p)] { - case 45: - goto tr13 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr13 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr13 - } - default: - goto tr13 - } - goto tr8 - case 10: - switch (m.data)[(m.p)] { - case 45: - goto tr14 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr14 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr14 - } - default: - goto tr14 - } - goto tr8 - case 11: - switch (m.data)[(m.p)] { - case 45: - goto tr15 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr15 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr15 - } - default: - goto tr15 - } - goto tr8 - case 12: - switch (m.data)[(m.p)] { - case 45: - goto tr16 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr16 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr16 - } - default: - goto tr16 - } - goto tr8 - case 13: - switch (m.data)[(m.p)] { - case 45: - goto tr17 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr17 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr17 - } - default: - goto tr17 - } - goto tr8 - case 14: - switch (m.data)[(m.p)] { - case 45: - goto tr18 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr18 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr18 - } - default: - goto tr18 - } - goto tr8 - case 15: - switch (m.data)[(m.p)] { - case 45: - goto tr19 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr19 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr19 - } - default: - goto tr19 - } - goto tr8 - case 16: - switch (m.data)[(m.p)] { - case 45: - goto tr20 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr20 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr20 - } - default: - goto tr20 - } - goto tr8 - case 17: - switch (m.data)[(m.p)] { - case 45: - goto tr21 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr21 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr21 - } - default: - goto tr21 - } - goto tr8 - case 18: - switch (m.data)[(m.p)] { - case 45: - goto tr22 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr22 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr22 - } - default: - goto tr22 - } - goto tr8 - case 19: - switch (m.data)[(m.p)] { - case 45: - goto tr23 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr23 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr23 - } - default: - goto tr23 - } - goto tr8 - case 20: - switch (m.data)[(m.p)] { - case 45: - goto tr24 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr24 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr24 - } - default: - goto tr24 - } - goto tr8 - case 21: - switch (m.data)[(m.p)] { - case 45: - goto tr25 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr25 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr25 - } - default: - goto tr25 - } - goto tr8 - case 22: - switch (m.data)[(m.p)] { - case 45: - goto tr26 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr26 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr26 - } - default: - goto tr26 - } - goto tr8 - case 23: - switch (m.data)[(m.p)] { - case 45: - goto tr27 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr27 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr27 - } - default: - goto tr27 - } - goto tr8 - case 24: - switch (m.data)[(m.p)] { - case 45: - goto tr28 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr28 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr28 - } - default: - goto tr28 - } - goto tr8 - case 25: - switch (m.data)[(m.p)] { - case 45: - goto tr29 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr29 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr29 - } - default: - goto tr29 - } - goto tr8 - case 26: - switch (m.data)[(m.p)] { - case 45: - goto tr30 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr30 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr30 - } - default: - goto tr30 - } - goto tr8 - case 27: - switch (m.data)[(m.p)] { - case 45: - goto tr31 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr31 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr31 - } - default: - goto tr31 - } - goto tr8 - case 28: - switch (m.data)[(m.p)] { - case 45: - goto tr32 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr32 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr32 - } - default: - goto tr32 - } - goto tr8 - case 29: - switch (m.data)[(m.p)] { - case 45: - goto tr33 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr33 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr33 - } - default: - goto tr33 - } - goto tr8 - case 30: - switch (m.data)[(m.p)] { - case 45: - goto tr34 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr34 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr34 - } - default: - goto tr34 - } - goto tr8 - case 31: - switch (m.data)[(m.p)] { - case 45: - goto tr35 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr35 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr35 - } - default: - goto tr35 - } - goto tr8 - case 32: - switch (m.data)[(m.p)] { - case 45: - goto tr36 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr36 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr36 - } - default: - goto tr36 - } - goto tr8 - case 33: - switch (m.data)[(m.p)] { - case 45: - goto tr37 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr37 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr37 - } - default: - goto tr37 - } - goto tr8 - case 34: - switch (m.data)[(m.p)] { - case 45: - goto tr38 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr38 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr38 - } - default: - goto tr38 - } - goto tr8 - case 35: - switch (m.data)[(m.p)] { - case 45: - goto tr39 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr39 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr39 - } - default: - goto tr39 - } - goto tr8 - case 36: - switch (m.data)[(m.p)] { - case 45: - goto tr40 - case 58: - goto tr10 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr40 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr40 - } - default: - goto tr40 - } - goto tr8 - case 37: - if (m.data)[(m.p)] == 58 { - goto tr10 - } - goto tr8 - case 38: - switch (m.data)[(m.p)] { - case 33: - goto tr42 - case 36: - goto tr42 - case 37: - goto tr43 - case 61: - goto tr42 - case 95: - goto tr42 - } - switch { - case (m.data)[(m.p)] < 48: - if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr42 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr42 - } - case (m.data)[(m.p)] >= 64: - goto tr42 - } - default: - goto tr42 - } - goto tr41 - case 172: - switch (m.data)[(m.p)] { - case 33: - goto tr212 - case 36: - goto tr212 - case 37: - goto tr213 - case 61: - goto tr212 - case 95: - goto tr212 - } - switch { - case (m.data)[(m.p)] < 48: - if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr212 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr212 - } - case (m.data)[(m.p)] >= 64: - goto tr212 - } - default: - goto tr212 - } - goto tr41 - case 39: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr45 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr45 - } - default: - goto tr46 - } - goto tr44 - case 40: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr47 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr47 - } - default: - goto tr48 - } - goto tr44 - case 173: - switch (m.data)[(m.p)] { - case 33: - goto tr212 - case 36: - goto tr212 - case 37: - goto tr213 - case 61: - goto tr212 - case 95: - goto tr212 - } - switch { - case (m.data)[(m.p)] < 48: - if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr212 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr212 - } - case (m.data)[(m.p)] >= 64: - goto tr212 - } - default: - goto tr212 - } - goto tr44 - case 41: - switch (m.data)[(m.p)] { - case 45: - goto tr9 - case 58: - goto tr10 - case 82: - goto tr49 - case 114: - goto tr49 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr9 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr9 - } - default: - goto tr9 - } - goto tr5 - case 42: - switch (m.data)[(m.p)] { - case 45: - goto tr11 - case 58: - goto tr10 - case 78: - goto tr50 - case 110: - goto tr50 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr11 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr11 - } - default: - goto tr11 - } - goto tr5 - case 43: - if (m.data)[(m.p)] == 45 { - goto tr12 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr12 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr12 - } - default: - goto tr12 - } - goto tr51 - case 44: - switch (m.data)[(m.p)] { - case 85: - goto tr52 - case 117: - goto tr52 - } - goto tr0 - case 45: - switch (m.data)[(m.p)] { - case 82: - goto tr53 - case 114: - goto tr53 - } - goto tr0 - case 46: - switch (m.data)[(m.p)] { - case 78: - goto tr54 - case 110: - goto tr54 - } - goto tr0 - case 47: - if (m.data)[(m.p)] == 58 { - goto tr55 - } - goto tr0 - case 48: - if (m.data)[(m.p)] == 105 { - goto tr57 - } - goto tr56 - case 49: - if (m.data)[(m.p)] == 101 { - goto tr58 - } - goto tr56 - case 50: - if (m.data)[(m.p)] == 116 { - goto tr59 - } - goto tr56 - case 51: - if (m.data)[(m.p)] == 102 { - goto tr60 - } - goto tr56 - case 52: - if (m.data)[(m.p)] == 58 { - goto tr61 - } - goto tr56 - case 53: - if (m.data)[(m.p)] == 112 { - goto tr62 - } - goto tr56 - case 54: - if (m.data)[(m.p)] == 97 { - goto tr63 - } - goto tr56 - case 55: - if (m.data)[(m.p)] == 114 { - goto tr64 - } - goto tr56 - case 56: - if (m.data)[(m.p)] == 97 { - goto tr65 - } - goto tr56 - case 57: - if (m.data)[(m.p)] == 109 { - goto tr66 - } - goto tr56 - case 58: - if (m.data)[(m.p)] == 115 { - goto tr67 - } - goto tr56 - case 59: - if (m.data)[(m.p)] == 58 { - goto tr68 - } - goto tr56 - case 60: - if (m.data)[(m.p)] == 115 { - goto tr69 - } - goto tr56 - case 61: - if (m.data)[(m.p)] == 99 { - goto tr70 - } - goto tr56 - case 62: - if (m.data)[(m.p)] == 105 { - goto tr71 - } - goto tr56 - case 63: - if (m.data)[(m.p)] == 109 { - goto tr72 - } - goto tr56 - case 64: - if (m.data)[(m.p)] == 58 { - goto tr73 - } - goto tr56 - case 65: - switch (m.data)[(m.p)] { - case 97: - goto tr75 - case 112: - goto tr76 - case 115: - goto tr77 - } - goto tr74 - case 66: - if (m.data)[(m.p)] == 112 { - goto tr78 - } - goto tr74 - case 67: - if (m.data)[(m.p)] == 105 { - goto tr79 - } - goto tr74 - case 68: - if (m.data)[(m.p)] == 58 { - goto tr80 - } - goto tr74 - case 69: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr82 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr82 - } - default: - goto tr82 - } - goto tr81 - case 174: - if (m.data)[(m.p)] == 58 { - goto tr215 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr214 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr214 - } - default: - goto tr214 - } - goto tr81 - case 70: - switch (m.data)[(m.p)] { - case 33: - goto tr84 - case 36: - goto tr84 - case 37: - goto tr85 - case 61: - goto tr84 - case 95: - goto tr84 - } - switch { - case (m.data)[(m.p)] < 48: - if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr84 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr84 - } - case (m.data)[(m.p)] >= 64: - goto tr84 - } - default: - goto tr84 - } - goto tr83 - case 175: - switch (m.data)[(m.p)] { - case 33: - goto tr216 - case 36: - goto tr216 - case 37: - goto tr217 - case 61: - goto tr216 - case 95: - goto tr216 - } - switch { - case (m.data)[(m.p)] < 48: - if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr216 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr216 - } - case (m.data)[(m.p)] >= 64: - goto tr216 - } - default: - goto tr216 - } - goto tr83 - case 71: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr87 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr87 - } - default: - goto tr88 - } - goto tr86 - case 72: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr89 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr89 - } - default: - goto tr90 - } - goto tr86 - case 176: - switch (m.data)[(m.p)] { - case 33: - goto tr216 - case 36: - goto tr216 - case 37: - goto tr217 - case 61: - goto tr216 - case 95: - goto tr216 - } - switch { - case (m.data)[(m.p)] < 48: - if 39 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr216 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr216 - } - case (m.data)[(m.p)] >= 64: - goto tr216 - } - default: - goto tr216 - } - goto tr86 - case 73: - if (m.data)[(m.p)] == 97 { - goto tr91 - } - goto tr74 - case 74: - if (m.data)[(m.p)] == 114 { - goto tr92 - } - goto tr74 - case 75: - if (m.data)[(m.p)] == 97 { - goto tr93 - } - goto tr74 - case 76: - if (m.data)[(m.p)] == 109 { - goto tr79 - } - goto tr74 - case 77: - if (m.data)[(m.p)] == 99 { - goto tr94 - } - goto tr74 - case 78: - if (m.data)[(m.p)] == 104 { - goto tr95 - } - goto tr74 - case 79: - if (m.data)[(m.p)] == 101 { - goto tr96 - } - goto tr74 - case 80: - if (m.data)[(m.p)] == 109 { - goto tr97 - } - goto tr74 - case 81: - if (m.data)[(m.p)] == 97 { - goto tr98 - } - goto tr74 - case 82: - if (m.data)[(m.p)] == 115 { - goto tr79 - } - goto tr74 - case 83: - switch (m.data)[(m.p)] { - case 85: - goto tr99 - case 117: - goto tr99 - } - goto tr0 - case 84: - switch (m.data)[(m.p)] { - case 82: - goto tr100 - case 114: - goto tr100 - } - goto tr0 - case 85: - switch (m.data)[(m.p)] { - case 78: - goto tr101 - case 110: - goto tr101 - } - goto tr0 - case 86: - if (m.data)[(m.p)] == 58 { - goto tr102 - } - goto tr0 - case 87: - switch (m.data)[(m.p)] { - case 85: - goto tr105 - case 117: - goto tr105 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr104 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr104 - } - default: - goto tr104 - } - goto tr103 - case 88: - if (m.data)[(m.p)] == 45 { - goto tr107 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr108 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr108 - } - default: - goto tr108 - } - goto tr106 - case 89: - if (m.data)[(m.p)] == 45 { - goto tr109 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr110 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr110 - } - default: - goto tr110 - } - goto tr106 - case 90: - if (m.data)[(m.p)] == 45 { - goto tr111 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr112 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr112 - } - default: - goto tr112 - } - goto tr106 - case 91: - if (m.data)[(m.p)] == 45 { - goto tr113 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr114 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr114 - } - default: - goto tr114 - } - goto tr106 - case 92: - if (m.data)[(m.p)] == 45 { - goto tr115 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr116 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr116 - } - default: - goto tr116 - } - goto tr106 - case 93: - if (m.data)[(m.p)] == 45 { - goto tr117 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr118 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr118 - } - default: - goto tr118 - } - goto tr106 - case 94: - if (m.data)[(m.p)] == 45 { - goto tr119 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr120 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr120 - } - default: - goto tr120 - } - goto tr106 - case 95: - if (m.data)[(m.p)] == 45 { - goto tr121 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr122 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr122 - } - default: - goto tr122 - } - goto tr106 - case 96: - if (m.data)[(m.p)] == 45 { - goto tr123 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr124 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr124 - } - default: - goto tr124 - } - goto tr106 - case 97: - if (m.data)[(m.p)] == 45 { - goto tr125 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr126 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr126 - } - default: - goto tr126 - } - goto tr106 - case 98: - if (m.data)[(m.p)] == 45 { - goto tr127 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr128 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr128 - } - default: - goto tr128 - } - goto tr106 - case 99: - if (m.data)[(m.p)] == 45 { - goto tr129 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr130 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr130 - } - default: - goto tr130 - } - goto tr106 - case 100: - if (m.data)[(m.p)] == 45 { - goto tr131 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr132 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr132 - } - default: - goto tr132 - } - goto tr106 - case 101: - if (m.data)[(m.p)] == 45 { - goto tr133 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr134 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr134 - } - default: - goto tr134 - } - goto tr106 - case 102: - if (m.data)[(m.p)] == 45 { - goto tr135 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr136 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr136 - } - default: - goto tr136 - } - goto tr106 - case 103: - if (m.data)[(m.p)] == 45 { - goto tr137 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr138 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr138 - } - default: - goto tr138 - } - goto tr106 - case 104: - if (m.data)[(m.p)] == 45 { - goto tr139 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr140 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr140 - } - default: - goto tr140 - } - goto tr106 - case 105: - if (m.data)[(m.p)] == 45 { - goto tr141 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr142 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr142 - } - default: - goto tr142 - } - goto tr106 - case 106: - if (m.data)[(m.p)] == 45 { - goto tr143 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr144 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr144 - } - default: - goto tr144 - } - goto tr106 - case 107: - if (m.data)[(m.p)] == 45 { - goto tr145 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr146 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr146 - } - default: - goto tr146 - } - goto tr106 - case 108: - if (m.data)[(m.p)] == 45 { - goto tr147 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr148 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr148 - } - default: - goto tr148 - } - goto tr106 - case 109: - if (m.data)[(m.p)] == 45 { - goto tr149 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr150 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr150 - } - default: - goto tr150 - } - goto tr106 - case 110: - if (m.data)[(m.p)] == 45 { - goto tr151 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr152 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr152 - } - default: - goto tr152 - } - goto tr106 - case 111: - if (m.data)[(m.p)] == 45 { - goto tr153 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr154 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr154 - } - default: - goto tr154 - } - goto tr106 - case 112: - if (m.data)[(m.p)] == 45 { - goto tr155 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr156 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr156 - } - default: - goto tr156 - } - goto tr106 - case 113: - if (m.data)[(m.p)] == 45 { - goto tr157 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr158 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr158 - } - default: - goto tr158 - } - goto tr106 - case 114: - if (m.data)[(m.p)] == 45 { - goto tr159 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr160 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr160 - } - default: - goto tr160 - } - goto tr106 - case 115: - if (m.data)[(m.p)] == 45 { - goto tr161 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr162 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr162 - } - default: - goto tr162 - } - goto tr106 - case 116: - if (m.data)[(m.p)] == 45 { - goto tr163 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr164 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr164 - } - default: - goto tr164 - } - goto tr106 - case 117: - if (m.data)[(m.p)] == 45 { - goto tr165 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr166 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr166 - } - default: - goto tr166 - } - goto tr106 - case 118: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr167 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr167 - } - default: - goto tr167 - } - goto tr106 - case 119: - if (m.data)[(m.p)] == 58 { - goto tr168 - } - goto tr106 - case 120: - switch (m.data)[(m.p)] { - case 33: - goto tr170 - case 37: - goto tr171 - case 61: - goto tr170 - case 95: - goto tr170 - case 126: - goto tr170 - } - switch { - case (m.data)[(m.p)] < 48: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr170 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr170 - } - case (m.data)[(m.p)] >= 64: - goto tr170 - } - default: - goto tr170 - } - goto tr169 - case 177: - switch (m.data)[(m.p)] { - case 33: - goto tr218 - case 35: - goto tr219 - case 37: - goto tr220 - case 61: - goto tr218 - case 63: - goto tr221 - case 95: - goto tr218 - case 126: - goto tr218 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr218 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr218 - } - default: - goto tr218 - } - goto tr169 - case 178: - switch (m.data)[(m.p)] { - case 33: - goto tr222 - case 37: - goto tr223 - case 61: - goto tr222 - case 95: - goto tr222 - case 126: - goto tr222 - } - switch { - case (m.data)[(m.p)] < 63: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr222 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr222 - } - default: - goto tr222 - } - goto tr183 - case 179: - switch (m.data)[(m.p)] { - case 33: - goto tr224 - case 37: - goto tr225 - case 61: - goto tr224 - case 95: - goto tr224 - case 126: - goto tr224 - } - switch { - case (m.data)[(m.p)] < 63: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr224 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr224 - } - default: - goto tr224 - } - goto tr183 - case 121: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr173 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr173 - } - default: - goto tr174 - } - goto tr172 - case 122: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr175 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr175 - } - default: - goto tr176 - } - goto tr172 - case 180: - switch (m.data)[(m.p)] { - case 33: - goto tr224 - case 37: - goto tr225 - case 61: - goto tr224 - case 95: - goto tr224 - case 126: - goto tr224 - } - switch { - case (m.data)[(m.p)] < 63: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr224 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr224 - } - default: - goto tr224 - } - goto tr172 - case 123: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr178 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr178 - } - default: - goto tr179 - } - goto tr177 - case 124: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr180 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr180 - } - default: - goto tr181 - } - goto tr177 - case 181: - switch (m.data)[(m.p)] { - case 33: - goto tr218 - case 35: - goto tr219 - case 37: - goto tr220 - case 61: - goto tr218 - case 63: - goto tr221 - case 95: - goto tr218 - case 126: - goto tr218 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr218 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr218 - } - default: - goto tr218 - } - goto tr177 - case 125: - switch (m.data)[(m.p)] { - case 43: - goto tr182 - case 61: - goto tr184 - } - goto tr183 - case 126: - switch (m.data)[(m.p)] { - case 33: - goto tr186 - case 37: - goto tr187 - case 61: - goto tr186 - case 63: - goto tr188 - case 95: - goto tr186 - case 126: - goto tr186 - } - switch { - case (m.data)[(m.p)] < 48: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr186 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr186 - } - case (m.data)[(m.p)] >= 64: - goto tr186 - } - default: - goto tr186 - } - goto tr185 - case 182: - switch (m.data)[(m.p)] { - case 33: - goto tr226 - case 35: - goto tr227 - case 37: - goto tr228 - case 61: - goto tr226 - case 63: - goto tr229 - case 95: - goto tr226 - case 126: - goto tr226 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr226 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr226 - } - default: - goto tr226 - } - goto tr185 - case 127: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr190 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr190 - } - default: - goto tr191 - } - goto tr189 - case 128: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr192 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr192 - } - default: - goto tr193 - } - goto tr189 - case 183: - switch (m.data)[(m.p)] { - case 33: - goto tr226 - case 35: - goto tr227 - case 37: - goto tr228 - case 61: - goto tr226 - case 63: - goto tr229 - case 95: - goto tr226 - case 126: - goto tr226 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr226 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr226 - } - default: - goto tr226 - } - goto tr189 - case 184: - switch (m.data)[(m.p)] { - case 33: - goto tr226 - case 35: - goto tr227 - case 37: - goto tr228 - case 43: - goto tr230 - case 61: - goto tr231 - case 63: - goto tr229 - case 95: - goto tr226 - case 126: - goto tr226 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr226 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr226 - } - default: - goto tr226 - } - goto tr185 - case 185: - switch (m.data)[(m.p)] { - case 33: - goto tr232 - case 35: - goto tr233 - case 37: - goto tr234 - case 47: - goto tr226 - case 61: - goto tr232 - case 63: - goto tr235 - case 95: - goto tr232 - case 126: - goto tr232 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr232 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr232 - } - default: - goto tr232 - } - goto tr185 - case 186: - switch (m.data)[(m.p)] { - case 33: - goto tr204 - case 35: - goto tr227 - case 37: - goto tr237 - case 47: - goto tr226 - case 61: - goto tr204 - case 63: - goto tr229 - case 95: - goto tr204 - case 126: - goto tr204 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr204 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr204 - } - default: - goto tr204 - } - goto tr236 - case 187: - switch (m.data)[(m.p)] { - case 33: - goto tr238 - case 35: - goto tr239 - case 37: - goto tr240 - case 61: - goto tr238 - case 63: - goto tr241 - case 95: - goto tr238 - case 126: - goto tr238 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr238 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr238 - } - default: - goto tr238 - } - goto tr203 - case 129: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr195 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr195 - } - default: - goto tr196 - } - goto tr194 - case 130: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr197 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr197 - } - default: - goto tr198 - } - goto tr194 - case 188: - switch (m.data)[(m.p)] { - case 33: - goto tr238 - case 35: - goto tr239 - case 37: - goto tr240 - case 61: - goto tr238 - case 63: - goto tr241 - case 95: - goto tr238 - case 126: - goto tr238 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr238 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr238 - } - default: - goto tr238 - } - goto tr194 - case 189: - switch (m.data)[(m.p)] { - case 33: - goto tr238 - case 35: - goto tr239 - case 37: - goto tr240 - case 61: - goto tr242 - case 63: - goto tr241 - case 95: - goto tr238 - case 126: - goto tr238 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr238 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr238 - } - default: - goto tr238 - } - goto tr203 - case 190: - switch (m.data)[(m.p)] { - case 33: - goto tr243 - case 35: - goto tr244 - case 37: - goto tr245 - case 47: - goto tr238 - case 61: - goto tr243 - case 63: - goto tr246 - case 95: - goto tr243 - case 126: - goto tr243 - } - switch { - case (m.data)[(m.p)] < 64: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 59 { - goto tr243 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr243 - } - default: - goto tr243 - } - goto tr203 - case 131: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr200 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr200 - } - default: - goto tr201 - } - goto tr199 - case 132: - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr197 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr197 - } - default: - goto tr198 - } - goto tr199 - case 133: - if (m.data)[(m.p)] == 43 { - goto tr202 - } - goto tr185 - case 191: - switch (m.data)[(m.p)] { - case 33: - goto tr232 - case 35: - goto tr233 - case 37: - goto tr234 - case 61: - goto tr232 - case 63: - goto tr247 - case 95: - goto tr232 - case 126: - goto tr232 - } - switch { - case (m.data)[(m.p)] < 48: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr232 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr232 - } - case (m.data)[(m.p)] >= 64: - goto tr232 - } - default: - goto tr232 - } - goto tr185 - case 134: - switch (m.data)[(m.p)] { - case 43: - goto tr202 - case 61: - goto tr184 - } - goto tr185 - case 135: - switch (m.data)[(m.p)] { - case 33: - goto tr204 - case 37: - goto tr205 - case 61: - goto tr204 - case 63: - goto tr206 - case 95: - goto tr204 - case 126: - goto tr204 - } - switch { - case (m.data)[(m.p)] < 48: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr204 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr204 - } - case (m.data)[(m.p)] >= 64: - goto tr204 - } - default: - goto tr204 - } - goto tr203 - case 136: - if (m.data)[(m.p)] == 61 { - goto tr207 - } - goto tr203 - case 192: - switch (m.data)[(m.p)] { - case 33: - goto tr243 - case 35: - goto tr244 - case 37: - goto tr245 - case 61: - goto tr243 - case 63: - goto tr248 - case 95: - goto tr243 - case 126: - goto tr243 - } - switch { - case (m.data)[(m.p)] < 48: - if 36 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 46 { - goto tr243 - } - case (m.data)[(m.p)] > 59: - switch { - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr243 - } - case (m.data)[(m.p)] >= 64: - goto tr243 - } - default: - goto tr243 - } - goto tr203 - case 137: - if (m.data)[(m.p)] == 58 { - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr167 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr167 - } - default: - goto tr167 - } - goto tr106 - case 138: - switch (m.data)[(m.p)] { - case 45: - goto tr165 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr166 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr166 - } - default: - goto tr166 - } - goto tr106 - case 139: - switch (m.data)[(m.p)] { - case 45: - goto tr163 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr164 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr164 - } - default: - goto tr164 - } - goto tr106 - case 140: - switch (m.data)[(m.p)] { - case 45: - goto tr161 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr162 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr162 - } - default: - goto tr162 - } - goto tr106 - case 141: - switch (m.data)[(m.p)] { - case 45: - goto tr159 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr160 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr160 - } - default: - goto tr160 - } - goto tr106 - case 142: - switch (m.data)[(m.p)] { - case 45: - goto tr157 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr158 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr158 - } - default: - goto tr158 - } - goto tr106 - case 143: - switch (m.data)[(m.p)] { - case 45: - goto tr155 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr156 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr156 - } - default: - goto tr156 - } - goto tr106 - case 144: - switch (m.data)[(m.p)] { - case 45: - goto tr153 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr154 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr154 - } - default: - goto tr154 - } - goto tr106 - case 145: - switch (m.data)[(m.p)] { - case 45: - goto tr151 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr152 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr152 - } - default: - goto tr152 - } - goto tr106 - case 146: - switch (m.data)[(m.p)] { - case 45: - goto tr149 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr150 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr150 - } - default: - goto tr150 - } - goto tr106 - case 147: - switch (m.data)[(m.p)] { - case 45: - goto tr147 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr148 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr148 - } - default: - goto tr148 - } - goto tr106 - case 148: - switch (m.data)[(m.p)] { - case 45: - goto tr145 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr146 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr146 - } - default: - goto tr146 - } - goto tr106 - case 149: - switch (m.data)[(m.p)] { - case 45: - goto tr143 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr144 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr144 - } - default: - goto tr144 - } - goto tr106 - case 150: - switch (m.data)[(m.p)] { - case 45: - goto tr141 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr142 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr142 - } - default: - goto tr142 - } - goto tr106 - case 151: - switch (m.data)[(m.p)] { - case 45: - goto tr139 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr140 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr140 - } - default: - goto tr140 - } - goto tr106 - case 152: - switch (m.data)[(m.p)] { - case 45: - goto tr137 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr138 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr138 - } - default: - goto tr138 - } - goto tr106 - case 153: - switch (m.data)[(m.p)] { - case 45: - goto tr135 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr136 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr136 - } - default: - goto tr136 - } - goto tr106 - case 154: - switch (m.data)[(m.p)] { - case 45: - goto tr133 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr134 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr134 - } - default: - goto tr134 - } - goto tr106 - case 155: - switch (m.data)[(m.p)] { - case 45: - goto tr131 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr132 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr132 - } - default: - goto tr132 - } - goto tr106 - case 156: - switch (m.data)[(m.p)] { - case 45: - goto tr129 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr130 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr130 - } - default: - goto tr130 - } - goto tr106 - case 157: - switch (m.data)[(m.p)] { - case 45: - goto tr127 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr128 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr128 - } - default: - goto tr128 - } - goto tr106 - case 158: - switch (m.data)[(m.p)] { - case 45: - goto tr125 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr126 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr126 - } - default: - goto tr126 - } - goto tr106 - case 159: - switch (m.data)[(m.p)] { - case 45: - goto tr123 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr124 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr124 - } - default: - goto tr124 - } - goto tr106 - case 160: - switch (m.data)[(m.p)] { - case 45: - goto tr121 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr122 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr122 - } - default: - goto tr122 - } - goto tr106 - case 161: - switch (m.data)[(m.p)] { - case 45: - goto tr119 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr120 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr120 - } - default: - goto tr120 - } - goto tr106 - case 162: - switch (m.data)[(m.p)] { - case 45: - goto tr117 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr118 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr118 - } - default: - goto tr118 - } - goto tr106 - case 163: - switch (m.data)[(m.p)] { - case 45: - goto tr115 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr116 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr116 - } - default: - goto tr116 - } - goto tr106 - case 164: - switch (m.data)[(m.p)] { - case 45: - goto tr113 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr114 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr114 - } - default: - goto tr114 - } - goto tr106 - case 165: - switch (m.data)[(m.p)] { - case 45: - goto tr111 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr112 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr112 - } - default: - goto tr112 - } - goto tr106 - case 166: - switch (m.data)[(m.p)] { - case 45: - goto tr109 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr110 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr110 - } - default: - goto tr110 - } - goto tr106 - case 167: - switch (m.data)[(m.p)] { - case 45: - goto tr107 - case 82: - goto tr208 - case 114: - goto tr208 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr108 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr108 - } - default: - goto tr108 - } - goto tr103 - case 168: - switch (m.data)[(m.p)] { - case 45: - goto tr109 - case 58: - goto tr168 - case 78: - goto tr209 - case 110: - goto tr209 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr110 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr110 - } - default: - goto tr110 - } - goto tr103 - case 169: - switch (m.data)[(m.p)] { - case 45: - goto tr210 - case 58: - goto tr168 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr112 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr112 - } - default: - goto tr112 - } - goto tr106 - case 170: - switch (m.data)[(m.p)] { - case 45: - goto tr113 - case 48: - goto tr211 - } - switch { - case (m.data)[(m.p)] < 65: - if 49 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr114 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr211 - } - default: - goto tr211 - } - goto tr106 - case 171: - if (m.data)[(m.p)] == 45 { - goto tr115 - } - switch { - case (m.data)[(m.p)] < 65: - if 48 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 57 { - goto tr116 - } - case (m.data)[(m.p)] > 90: - if 97 <= (m.data)[(m.p)] && (m.data)[(m.p)] <= 122 { - goto tr116 - } - default: - goto tr116 - } - goto tr106 - case 193: - switch (m.data)[(m.p)] { - case 10: - goto tr183 - case 13: - goto tr183 - } - goto tr249 - } - - tr183: - m.cs = 0 - goto _again - tr0: - m.cs = 0 - goto f0 - tr5: - m.cs = 0 - goto f3 - tr8: - m.cs = 0 - goto f5 - tr41: - m.cs = 0 - goto f7 - tr44: - m.cs = 0 - goto f8 - tr51: - m.cs = 0 - goto f10 - tr56: - m.cs = 0 - goto f11 - tr74: - m.cs = 0 - goto f13 - tr81: - m.cs = 0 - goto f15 - tr83: - m.cs = 0 - goto f17 - tr86: - m.cs = 0 - goto f19 - tr103: - m.cs = 0 - goto f20 - tr106: - m.cs = 0 - goto f21 - tr169: - m.cs = 0 - goto f22 - tr172: - m.cs = 0 - goto f23 - tr177: - m.cs = 0 - goto f24 - tr185: - m.cs = 0 - goto f25 - tr189: - m.cs = 0 - goto f27 - tr194: - m.cs = 0 - goto f28 - tr199: - m.cs = 0 - goto f29 - tr203: - m.cs = 0 - goto f30 - tr236: - m.cs = 0 - goto f46 - tr1: - m.cs = 2 - goto f1 - tr2: - m.cs = 3 - goto _again - tr3: - m.cs = 4 - goto _again - tr4: - m.cs = 5 - goto f2 - tr6: - m.cs = 6 - goto f4 - tr9: - m.cs = 7 - goto _again - tr11: - m.cs = 8 - goto _again - tr12: - m.cs = 9 - goto _again - tr13: - m.cs = 10 - goto _again - tr14: - m.cs = 11 - goto _again - tr15: - m.cs = 12 - goto _again - tr16: - m.cs = 13 - goto _again - tr17: - m.cs = 14 - goto _again - tr18: - m.cs = 15 - goto _again - tr19: - m.cs = 16 - goto _again - tr20: - m.cs = 17 - goto _again - tr21: - m.cs = 18 - goto _again - tr22: - m.cs = 19 - goto _again - tr23: - m.cs = 20 - goto _again - tr24: - m.cs = 21 - goto _again - tr25: - m.cs = 22 - goto _again - tr26: - m.cs = 23 - goto _again - tr27: - m.cs = 24 - goto _again - tr28: - m.cs = 25 - goto _again - tr29: - m.cs = 26 - goto _again - tr30: - m.cs = 27 - goto _again - tr31: - m.cs = 28 - goto _again - tr32: - m.cs = 29 - goto _again - tr33: - m.cs = 30 - goto _again - tr34: - m.cs = 31 - goto _again - tr35: - m.cs = 32 - goto _again - tr36: - m.cs = 33 - goto _again - tr37: - m.cs = 34 - goto _again - tr38: - m.cs = 35 - goto _again - tr39: - m.cs = 36 - goto _again - tr40: - m.cs = 37 - goto _again - tr10: - m.cs = 38 - goto f6 - tr213: - m.cs = 39 - goto _again - tr43: - m.cs = 39 - goto f4 - tr45: - m.cs = 40 - goto _again - tr46: - m.cs = 40 - goto f9 - tr7: - m.cs = 41 - goto f1 - tr49: - m.cs = 42 - goto _again - tr50: - m.cs = 43 - goto _again - tr52: - m.cs = 45 - goto f1 - tr53: - m.cs = 46 - goto _again - tr54: - m.cs = 47 - goto _again - tr55: - m.cs = 48 - goto f2 - tr57: - m.cs = 49 - goto f4 - tr58: - m.cs = 50 - goto _again - tr59: - m.cs = 51 - goto _again - tr60: - m.cs = 52 - goto _again - tr61: - m.cs = 53 - goto _again - tr62: - m.cs = 54 - goto _again - tr63: - m.cs = 55 - goto _again - tr64: - m.cs = 56 - goto _again - tr65: - m.cs = 57 - goto _again - tr66: - m.cs = 58 - goto _again - tr67: - m.cs = 59 - goto _again - tr68: - m.cs = 60 - goto _again - tr69: - m.cs = 61 - goto _again - tr70: - m.cs = 62 - goto _again - tr71: - m.cs = 63 - goto _again - tr72: - m.cs = 64 - goto _again - tr73: - m.cs = 65 - goto f12 - tr75: - m.cs = 66 - goto f4 - tr78: - m.cs = 67 - goto _again - tr79: - m.cs = 68 - goto _again - tr80: - m.cs = 69 - goto f14 - tr215: - m.cs = 70 - goto f35 - tr217: - m.cs = 71 - goto _again - tr85: - m.cs = 71 - goto f18 - tr87: - m.cs = 72 - goto _again - tr88: - m.cs = 72 - goto f9 - tr76: - m.cs = 73 - goto f4 - tr91: - m.cs = 74 - goto _again - tr92: - m.cs = 75 - goto _again - tr93: - m.cs = 76 - goto _again - tr77: - m.cs = 77 - goto f4 - tr94: - m.cs = 78 - goto _again - tr95: - m.cs = 79 - goto _again - tr96: - m.cs = 80 - goto _again - tr97: - m.cs = 81 - goto _again - tr98: - m.cs = 82 - goto _again - tr99: - m.cs = 84 - goto f1 - tr100: - m.cs = 85 - goto _again - tr101: - m.cs = 86 - goto _again - tr102: - m.cs = 87 - goto f2 - tr104: - m.cs = 88 - goto f4 - tr107: - m.cs = 89 - goto _again - tr109: - m.cs = 90 - goto _again - tr111: - m.cs = 91 - goto _again - tr113: - m.cs = 92 - goto _again - tr115: - m.cs = 93 - goto _again - tr117: - m.cs = 94 - goto _again - tr119: - m.cs = 95 - goto _again - tr121: - m.cs = 96 - goto _again - tr123: - m.cs = 97 - goto _again - tr125: - m.cs = 98 - goto _again - tr127: - m.cs = 99 - goto _again - tr129: - m.cs = 100 - goto _again - tr131: - m.cs = 101 - goto _again - tr133: - m.cs = 102 - goto _again - tr135: - m.cs = 103 - goto _again - tr137: - m.cs = 104 - goto _again - tr139: - m.cs = 105 - goto _again - tr141: - m.cs = 106 - goto _again - tr143: - m.cs = 107 - goto _again - tr145: - m.cs = 108 - goto _again - tr147: - m.cs = 109 - goto _again - tr149: - m.cs = 110 - goto _again - tr151: - m.cs = 111 - goto _again - tr153: - m.cs = 112 - goto _again - tr155: - m.cs = 113 - goto _again - tr157: - m.cs = 114 - goto _again - tr159: - m.cs = 115 - goto _again - tr161: - m.cs = 116 - goto _again - tr163: - m.cs = 117 - goto _again - tr165: - m.cs = 118 - goto _again - tr167: - m.cs = 119 - goto _again - tr168: - m.cs = 120 - goto f6 - tr225: - m.cs = 121 - goto _again - tr223: - m.cs = 121 - goto f4 - tr173: - m.cs = 122 - goto _again - tr174: - m.cs = 122 - goto f9 - tr220: - m.cs = 123 - goto _again - tr171: - m.cs = 123 - goto f4 - tr178: - m.cs = 124 - goto _again - tr179: - m.cs = 124 - goto f9 - tr221: - m.cs = 125 - goto f38 - tr182: - m.cs = 126 - goto _again - tr228: - m.cs = 127 - goto _again - tr187: - m.cs = 127 - goto f26 - tr234: - m.cs = 127 - goto f44 - tr190: - m.cs = 128 - goto _again - tr191: - m.cs = 128 - goto f9 - tr240: - m.cs = 129 - goto _again - tr205: - m.cs = 129 - goto f31 - tr245: - m.cs = 129 - goto f50 - tr195: - m.cs = 130 - goto _again - tr196: - m.cs = 130 - goto f9 - tr237: - m.cs = 131 - goto f31 - tr200: - m.cs = 132 - goto _again - tr201: - m.cs = 132 - goto f9 - tr188: - m.cs = 133 - goto f26 - tr247: - m.cs = 134 - goto f45 - tr184: - m.cs = 135 - goto _again - tr206: - m.cs = 136 - goto f31 - tr248: - m.cs = 136 - goto f50 - tr166: - m.cs = 137 - goto _again - tr164: - m.cs = 138 - goto _again - tr162: - m.cs = 139 - goto _again - tr160: - m.cs = 140 - goto _again - tr158: - m.cs = 141 - goto _again - tr156: - m.cs = 142 - goto _again - tr154: - m.cs = 143 - goto _again - tr152: - m.cs = 144 - goto _again - tr150: - m.cs = 145 - goto _again - tr148: - m.cs = 146 - goto _again - tr146: - m.cs = 147 - goto _again - tr144: - m.cs = 148 - goto _again - tr142: - m.cs = 149 - goto _again - tr140: - m.cs = 150 - goto _again - tr138: - m.cs = 151 - goto _again - tr136: - m.cs = 152 - goto _again - tr134: - m.cs = 153 - goto _again - tr132: - m.cs = 154 - goto _again - tr130: - m.cs = 155 - goto _again - tr128: - m.cs = 156 - goto _again - tr126: - m.cs = 157 - goto _again - tr124: - m.cs = 158 - goto _again - tr122: - m.cs = 159 - goto _again - tr120: - m.cs = 160 - goto _again - tr118: - m.cs = 161 - goto _again - tr116: - m.cs = 162 - goto _again - tr114: - m.cs = 163 - goto _again - tr112: - m.cs = 164 - goto _again - tr110: - m.cs = 165 - goto _again - tr108: - m.cs = 166 - goto _again - tr105: - m.cs = 167 - goto f1 - tr208: - m.cs = 168 - goto _again - tr209: - m.cs = 169 - goto _again - tr210: - m.cs = 170 - goto f2 - tr211: - m.cs = 171 - goto _again - tr212: - m.cs = 172 - goto _again - tr42: - m.cs = 172 - goto f4 - tr47: - m.cs = 173 - goto _again - tr48: - m.cs = 173 - goto f9 - tr214: - m.cs = 174 - goto _again - tr82: - m.cs = 174 - goto f16 - tr216: - m.cs = 175 - goto _again - tr84: - m.cs = 175 - goto f18 - tr89: - m.cs = 176 - goto _again - tr90: - m.cs = 176 - goto f9 - tr218: - m.cs = 177 - goto _again - tr170: - m.cs = 177 - goto f4 - tr219: - m.cs = 178 - goto f38 - tr227: - m.cs = 178 - goto f42 - tr233: - m.cs = 178 - goto f45 - tr239: - m.cs = 178 - goto f48 - tr244: - m.cs = 178 - goto f51 - tr224: - m.cs = 179 - goto _again - tr222: - m.cs = 179 - goto f4 - tr175: - m.cs = 180 - goto _again - tr176: - m.cs = 180 - goto f9 - tr180: - m.cs = 181 - goto _again - tr181: - m.cs = 181 - goto f9 - tr226: - m.cs = 182 - goto _again - tr186: - m.cs = 182 - goto f26 - tr232: - m.cs = 182 - goto f44 - tr192: - m.cs = 183 - goto _again - tr193: - m.cs = 183 - goto f9 - tr229: - m.cs = 184 - goto f42 - tr235: - m.cs = 184 - goto f45 - tr230: - m.cs = 185 - goto _again - tr231: - m.cs = 186 - goto _again - tr238: - m.cs = 187 - goto _again - tr204: - m.cs = 187 - goto f31 - tr243: - m.cs = 187 - goto f50 - tr197: - m.cs = 188 - goto _again - tr198: - m.cs = 188 - goto f9 - tr241: - m.cs = 189 - goto _again - tr246: - m.cs = 189 - goto f50 - tr242: - m.cs = 190 - goto _again - tr202: - m.cs = 191 - goto _again - tr207: - m.cs = 192 - goto _again - tr249: - m.cs = 193 - goto _again - - f4: - - m.pb = m.p - - goto _again - f9: - - // List of positions in the buffer to later lowercase - output.tolower = append(output.tolower, m.p-m.pb) - - goto _again - f2: - - output.prefix = string(m.text()) - - goto _again - f6: - - output.ID = string(m.text()) - - goto _again - f38: - - output.SS = string(m.text()) - // Iterate upper letters lowering them - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] + 32 - } - output.norm = string(m.text()) - // Revert the buffer to the original - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] - 32 - } - - goto _again - f0: - - m.err = fmt.Errorf(errPrefix, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f5: - - m.err = fmt.Errorf(errIdentifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f7: - - m.err = fmt.Errorf(errSpecificString, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f23: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - goto _again - f11: - - m.err = fmt.Errorf(errSCIMNamespace, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f13: - - m.err = fmt.Errorf(errSCIMType, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f15: - - m.err = fmt.Errorf(errSCIMName, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f17: - - if m.p == m.pe { - m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) - } else { - m.err = fmt.Errorf(errSCIMOther, m.p) - } - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f14: - - output.scim.Type = scimschema.TypeFromString(string(m.text())) - - goto _again - f16: - - output.scim.pos = m.p - - goto _again - f35: - - output.scim.Name = string(m.data[output.scim.pos:m.p]) - - goto _again - f18: - - output.scim.pos = m.p - - goto _again - f22: - - m.err = fmt.Errorf(err8141SpecificString, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f21: - - m.err = fmt.Errorf(err8141Identifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f42: - - output.rComponent = string(m.text()) - - goto _again - f48: - - output.qComponent = string(m.text()) - - goto _again - f44: - - if output.rStart { - m.err = fmt.Errorf(err8141RComponentStart, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - output.rStart = true - - goto _again - f50: - - if output.qStart { - m.err = fmt.Errorf(err8141QComponentStart, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - output.qStart = true - - goto _again - f25: - - m.err = fmt.Errorf(err8141MalformedRComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f30: - - m.err = fmt.Errorf(err8141MalformedQComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f1: - - m.pb = m.p - - if m.parsingMode != RFC8141Only { - // Throw an error when: - // - we are entering here matching the the prefix in the namespace identifier part - // - looking ahead (3 chars) we find a colon - if pos := m.p + 3; pos < m.pe && m.data[pos] == 58 && output.prefix != "" { - m.err = fmt.Errorf(errNoUrnWithinID, pos) - (m.p)-- - - m.cs = 193 - goto _again - - } - } - - goto _again - f12: - - output.ID = string(m.text()) - - output.scim = &SCIM{} - - goto _again - f3: - - m.err = fmt.Errorf(errIdentifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - m.err = fmt.Errorf(errPrefix, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f10: - - m.err = fmt.Errorf(errIdentifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - m.err = fmt.Errorf(errNoUrnWithinID, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f8: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(errSpecificString, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f19: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - if m.p == m.pe { - m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) - } else { - m.err = fmt.Errorf(errSCIMOther, m.p) - } - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f24: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(err8141SpecificString, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f27: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(err8141MalformedRComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f28: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(err8141MalformedQComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f20: - - m.err = fmt.Errorf(err8141Identifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - m.err = fmt.Errorf(errPrefix, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f26: - - if output.rStart { - m.err = fmt.Errorf(err8141RComponentStart, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - output.rStart = true - - m.pb = m.p - - goto _again - f45: - - if output.rStart { - m.err = fmt.Errorf(err8141RComponentStart, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - output.rStart = true - - output.rComponent = string(m.text()) - - goto _again - f31: - - if output.qStart { - m.err = fmt.Errorf(err8141QComponentStart, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - output.qStart = true - - m.pb = m.p - - goto _again - f51: - - if output.qStart { - m.err = fmt.Errorf(err8141QComponentStart, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - output.qStart = true - - output.qComponent = string(m.text()) - - goto _again - f46: - - m.err = fmt.Errorf(err8141MalformedRComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - m.err = fmt.Errorf(err8141MalformedQComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - f29: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(err8141MalformedRComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - m.err = fmt.Errorf(err8141MalformedQComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - goto _again - - _again: - switch _toStateActions[m.cs] { - case 33: - - (m.p)-- - - m.err = fmt.Errorf(err8141InformalID, m.p) - m.cs = 193 - goto _again - } - - if m.cs == 0 { - goto _out - } - if (m.p)++; (m.p) != (m.pe) { - goto _resume - } - _testEof: - { - } - if (m.p) == (m.eof) { - switch _eofActions[m.cs] { - case 1: - - m.err = fmt.Errorf(errPrefix, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 6: - - m.err = fmt.Errorf(errIdentifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 8: - - m.err = fmt.Errorf(errSpecificString, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 24: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - case 12: - - m.err = fmt.Errorf(errSCIMNamespace, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 14: - - m.err = fmt.Errorf(errSCIMType, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 16: - - m.err = fmt.Errorf(errSCIMName, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 18: - - if m.p == m.pe { - m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) - } else { - m.err = fmt.Errorf(errSCIMOther, m.p) - } - (m.p)-- - - m.cs = 193 - goto _again - - case 23: - - m.err = fmt.Errorf(err8141SpecificString, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 22: - - m.err = fmt.Errorf(err8141Identifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 26: - - m.err = fmt.Errorf(err8141MalformedRComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 31: - - m.err = fmt.Errorf(err8141MalformedQComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 34: - - output.SS = string(m.text()) - // Iterate upper letters lowering them - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] + 32 - } - output.norm = string(m.text()) - // Revert the buffer to the original - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] - 32 - } - - output.kind = RFC2141 - - case 38: - - output.SS = string(m.text()) - // Iterate upper letters lowering them - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] + 32 - } - output.norm = string(m.text()) - // Revert the buffer to the original - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] - 32 - } - - output.kind = RFC8141 - - case 4: - - m.err = fmt.Errorf(errIdentifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - m.err = fmt.Errorf(errPrefix, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 11: - - m.err = fmt.Errorf(errIdentifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - m.err = fmt.Errorf(errNoUrnWithinID, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 9: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(errSpecificString, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 20: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - if m.p == m.pe { - m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) - } else { - m.err = fmt.Errorf(errSCIMOther, m.p) - } - (m.p)-- - - m.cs = 193 - goto _again - - case 25: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(err8141SpecificString, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 28: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(err8141MalformedRComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 29: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(err8141MalformedQComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 21: - - m.err = fmt.Errorf(err8141Identifier, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - m.err = fmt.Errorf(errPrefix, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 42: - - output.rComponent = string(m.text()) - - output.kind = RFC8141 - - case 48: - - output.qComponent = string(m.text()) - - output.kind = RFC8141 - - case 41: - - output.fComponent = string(m.text()) - - output.kind = RFC8141 - - case 40: - - m.pb = m.p - - output.fComponent = string(m.text()) - - output.kind = RFC8141 - - case 30: - - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - - m.err = fmt.Errorf(err8141MalformedRComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - m.err = fmt.Errorf(err8141MalformedQComp, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - case 35: - - output.scim.Name = string(m.data[output.scim.pos:m.p]) - - output.SS = string(m.text()) - // Iterate upper letters lowering them - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] + 32 - } - output.norm = string(m.text()) - // Revert the buffer to the original - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] - 32 - } - - output.kind = RFC7643 - - case 37: - - output.scim.Other = string(m.data[output.scim.pos:m.p]) - - output.SS = string(m.text()) - // Iterate upper letters lowering them - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] + 32 - } - output.norm = string(m.text()) - // Revert the buffer to the original - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] - 32 - } - - output.kind = RFC7643 - - case 44: - - if output.rStart { - m.err = fmt.Errorf(err8141RComponentStart, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - output.rStart = true - - output.rComponent = string(m.text()) - - output.kind = RFC8141 - - case 50: - - if output.qStart { - m.err = fmt.Errorf(err8141QComponentStart, m.p) - (m.p)-- - - m.cs = 193 - goto _again - - } - output.qStart = true - - output.qComponent = string(m.text()) - - output.kind = RFC8141 - } - } - - _out: - { - } - } - - if m.cs < firstFinal || m.cs == enFail { - return nil, m.err - } - - return output, nil -} - -func (m *machine) WithParsingMode(x ParsingMode) { - m.parsingMode = x - switch m.parsingMode { - case RFC2141Only: - m.startParsingAt = enMain - case RFC8141Only: - m.startParsingAt = enRfc8141Only - case RFC7643Only: - m.startParsingAt = enScimOnly - } - m.parsingModeSet = true -} diff --git a/go-controller/vendor/github.com/leodido/go-urn/machine.go.rl b/go-controller/vendor/github.com/leodido/go-urn/machine.go.rl deleted file mode 100644 index 0a17421998..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/machine.go.rl +++ /dev/null @@ -1,386 +0,0 @@ -package urn - -import ( - "fmt" - - scimschema "github.com/leodido/go-urn/scim/schema" -) - -var ( - errPrefix = "expecting the prefix to be the \"urn\" string (whatever case) [col %d]" - errIdentifier = "expecting the identifier to be string (1..31 alnum chars, also containing dashes but not at its beginning) [col %d]" - errSpecificString = "expecting the specific string to be a string containing alnum, hex, or others ([()+,-.:=@;$_!*']) chars [col %d]" - errNoUrnWithinID = "expecting the identifier to not contain the \"urn\" reserved string [col %d]" - errHex = "expecting the percent encoded chars to be well-formed (%%alnum{2}) [col %d]" - errSCIMNamespace = "expecing the SCIM namespace identifier (ietf:params:scim) [col %d]" - errSCIMType = "expecting a correct SCIM type (schemas, api, param) [col %d]" - errSCIMName = "expecting one or more alnum char in the SCIM name part [col %d]" - errSCIMOther = "expecting a well-formed other SCIM part [col %d]" - errSCIMOtherIncomplete = "expecting a not empty SCIM other part after colon [col %d]" - err8141InformalID = "informal URN namespace must be in the form urn-[1-9][0-9] [col %d]" - err8141SpecificString = "expecting the specific string to contain alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] not in first position) chars [col %d]" - err8141Identifier = "expecting the indentifier to be a string with (length 2 to 32 chars) containing alnum (or dashes) not starting or ending with a dash [col %d]" - err8141RComponentStart = "expecting only one r-component (starting with the ?+ sequence) [col %d]" - err8141QComponentStart = "expecting only one q-component (starting with the ?= sequence) [col %d]" - err8141MalformedRComp = "expecting a non-empty r-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]" - err8141MalformedQComp = "expecting a non-empty q-component containing alnum, hex, or others ([~&()+,-.:=@;$_!*'] or [/?] but not at its beginning) [col %d]" -) - -%%{ -machine urn; - -# unsigned alphabet -alphtype uint8; - -action mark { - m.pb = m.p -} - -action tolower { - // List of positions in the buffer to later lowercase - output.tolower = append(output.tolower, m.p - m.pb) -} - -action set_pre { - output.prefix = string(m.text()) -} - -action throw_pre_urn_err { - if m.parsingMode != RFC8141Only { - // Throw an error when: - // - we are entering here matching the the prefix in the namespace identifier part - // - looking ahead (3 chars) we find a colon - if pos := m.p + 3; pos < m.pe && m.data[pos] == 58 && output.prefix != "" { - m.err = fmt.Errorf(errNoUrnWithinID, pos) - fhold; - fgoto fail; - } - } -} - -action set_nid { - output.ID = string(m.text()) -} - -action set_nss { - output.SS = string(m.text()) - // Iterate upper letters lowering them - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] + 32 - } - output.norm = string(m.text()) - // Revert the buffer to the original - for _, i := range output.tolower { - m.data[m.pb+i] = m.data[m.pb+i] - 32 - } -} - -action err_pre { - m.err = fmt.Errorf(errPrefix, m.p) - fhold; - fgoto fail; -} - -action err_nid { - m.err = fmt.Errorf(errIdentifier, m.p) - fhold; - fgoto fail; -} - -action err_nss { - m.err = fmt.Errorf(errSpecificString, m.p) - fhold; - fgoto fail; -} - -action err_urn { - m.err = fmt.Errorf(errNoUrnWithinID, m.p) - fhold; - fgoto fail; -} - -action err_hex { - if m.parsingMode == RFC2141Only || m.parsingMode == RFC8141Only { - m.err = fmt.Errorf(errHex, m.p) - fhold; - fgoto fail; - } -} - -action base_type { - output.kind = RFC2141; -} - -pre = ([uU] @err(err_pre) [rR] @err(err_pre) [nN] @err(err_pre)) >mark >throw_pre_urn_err %set_pre; - -nid = (alnum >mark (alnum | '-'){0,31}) $err(err_nid) %set_nid; - -hex = '%' (digit | lower | upper >tolower){2} $err(err_hex); - -sss = (alnum | [()+,\-.:=@;$_!*']); - -nss = (sss | hex)+ $err(err_nss); - -nid_not_urn = (nid - pre %err(err_urn)); - -urn = pre ':' @err(err_pre) (nid_not_urn ':' nss >mark %set_nss) %eof(base_type); - -### SCIM BEG - -action err_scim_nid { - m.err = fmt.Errorf(errSCIMNamespace, m.p) - fhold; - fgoto fail; -} - -action err_scim_type { - m.err = fmt.Errorf(errSCIMType, m.p) - fhold; - fgoto fail; -} - -action err_scim_name { - m.err = fmt.Errorf(errSCIMName, m.p) - fhold; - fgoto fail; -} - -action err_scim_other { - if m.p == m.pe { - m.err = fmt.Errorf(errSCIMOtherIncomplete, m.p-1) - } else { - m.err = fmt.Errorf(errSCIMOther, m.p) - } - fhold; - fgoto fail; -} - -action scim_type { - output.kind = RFC7643; -} - -action create_scim { - output.scim = &SCIM{}; -} - -action set_scim_type { - output.scim.Type = scimschema.TypeFromString(string(m.text())) -} - -action mark_scim_name { - output.scim.pos = m.p -} - -action set_scim_name { - output.scim.Name = string(m.data[output.scim.pos:m.p]) -} - -action mark_scim_other { - output.scim.pos = m.p -} - -action set_scim_other { - output.scim.Other = string(m.data[output.scim.pos:m.p]) -} - -scim_nid = 'ietf:params:scim' >mark %set_nid %create_scim $err(err_scim_nid); - -scim_other = ':' (sss | hex)+ >mark_scim_other %set_scim_other $err(err_scim_other); - -scim_name = (alnum)+ >mark_scim_name %set_scim_name $err(err_scim_name); - -scim_type = ('schemas' | 'api' | 'param') >mark %set_scim_type $err(err_scim_type); - -scim_only := pre ':' @err(err_pre) (scim_nid ':' scim_type ':' scim_name scim_other? %set_nss) %eof(scim_type); - -### SCIM END - -### 8141 BEG - -action err_nss_8141 { - m.err = fmt.Errorf(err8141SpecificString, m.p) - fhold; - fgoto fail; -} - -action err_nid_8141 { - m.err = fmt.Errorf(err8141Identifier, m.p) - fhold; - fgoto fail; -} - -action rfc8141_type { - output.kind = RFC8141; -} - -action set_r_component { - output.rComponent = string(m.text()) -} - -action set_q_component { - output.qComponent = string(m.text()) -} - -action set_f_component { - output.fComponent = string(m.text()) -} - -action informal_nid_match { - fhold; - m.err = fmt.Errorf(err8141InformalID, m.p); - fgoto fail; -} - -action mark_r_start { - if output.rStart { - m.err = fmt.Errorf(err8141RComponentStart, m.p) - fhold; - fgoto fail; - } - output.rStart = true -} - -action mark_q_start { - if output.qStart { - m.err = fmt.Errorf(err8141QComponentStart, m.p) - fhold; - fgoto fail; - } - output.qStart = true -} - -action err_malformed_r_component { - m.err = fmt.Errorf(err8141MalformedRComp, m.p) - fhold; - fgoto fail; -} - -action err_malformed_q_component { - m.err = fmt.Errorf(err8141MalformedQComp, m.p) - fhold; - fgoto fail; -} - -pchar = (sss | '~' | '&' | hex); - -component = pchar (pchar | '/' | '?')*; - -r_start = ('?+') %mark_r_start; - -r_component = r_start <: (r_start | component)+ $err(err_malformed_r_component) >mark %set_r_component; - -q_start = ('?=') %mark_q_start; - -q_component = q_start <: (q_start | component)+ $err(err_malformed_q_component) >mark %set_q_component; - -rq_components = (r_component :>> q_component? | q_component); - -fragment = (pchar | '/' | '?')*; - -f_component = '#' fragment >mark %set_f_component; - -nss_rfc8141 = (pchar >mark (pchar | '/')*) $err(err_nss_8141) %set_nss; - -nid_rfc8141 = (alnum >mark (alnum | '-'){0,30} alnum) $err(err_nid_8141) %set_nid; - -informal_id = pre ('-' [a-zA-z0] %to(informal_nid_match)); - -nid_rfc8141_not_urn = (nid_rfc8141 - informal_id?); - -rfc8141_only := pre ':' @err(err_pre) nid_rfc8141_not_urn ':' nss_rfc8141 rq_components? f_component? %eof(rfc8141_type); - -### 8141 END - -fail := (any - [\n\r])* @err{ fgoto main; }; - -main := urn; - -}%% - -%% write data noerror noprefix; - -// Machine is the interface representing the FSM -type Machine interface { - Error() error - Parse(input []byte) (*URN, error) - WithParsingMode(ParsingMode) -} - -type machine struct { - data []byte - cs int - p, pe, eof, pb int - err error - startParsingAt int - parsingMode ParsingMode - parsingModeSet bool -} - -// NewMachine creates a new FSM able to parse RFC 2141 strings. -func NewMachine(options ...Option) Machine { - m := &machine{ - parsingModeSet: false, - } - - for _, o := range options { - o(m) - } - // Set default parsing mode - if !m.parsingModeSet { - m.WithParsingMode(DefaultParsingMode) - } - - %% access m.; - %% variable p m.p; - %% variable pe m.pe; - %% variable eof m.eof; - %% variable data m.data; - - return m -} - -// Err returns the error that occurred on the last call to Parse. -// -// If the result is nil, then the line was parsed successfully. -func (m *machine) Error() error { - return m.err -} - -func (m *machine) text() []byte { - return m.data[m.pb:m.p] -} - -// Parse parses the input byte array as a RFC 2141 or RFC7643 string. -func (m *machine) Parse(input []byte) (*URN, error) { - m.data = input - m.p = 0 - m.pb = 0 - m.pe = len(input) - m.eof = len(input) - m.err = nil - m.cs = m.startParsingAt - output := &URN{ - tolower: []int{}, - } - - %% write exec; - - if m.cs < first_final || m.cs == en_fail { - return nil, m.err - } - - return output, nil -} - -func (m *machine) WithParsingMode(x ParsingMode) { - m.parsingMode = x - switch m.parsingMode { - case RFC2141Only: - m.startParsingAt = en_main - case RFC8141Only: - m.startParsingAt = en_rfc8141_only - case RFC7643Only: - m.startParsingAt = en_scim_only - } - m.parsingModeSet = true -} \ No newline at end of file diff --git a/go-controller/vendor/github.com/leodido/go-urn/makefile b/go-controller/vendor/github.com/leodido/go-urn/makefile deleted file mode 100644 index 68d5dd0f1b..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/makefile +++ /dev/null @@ -1,51 +0,0 @@ -SHELL := /bin/bash -RAGEL := ragel -GOFMT := go fmt - -export GO_TEST=env GOTRACEBACK=all go test $(GO_ARGS) - -.PHONY: build -build: machine.go - -.PHONY: clean -clean: - @rm -rf docs - @rm -f machine.go - -.PHONY: images -images: docs/urn.png - -.PHONY: snake2camel -snake2camel: - @cd ./tools/snake2camel; go build -o ../../snake2camel . - -.PHONY: removecomments -removecomments: - @cd ./tools/removecomments; go build -o ../../removecomments . - -machine.go: machine.go.rl - -machine.go: snake2camel - -machine.go: removecomments - -machine.go: - $(RAGEL) -Z -G1 -e -o $@ $< - @./removecomments $@ - @./snake2camel $@ - $(GOFMT) $@ - -docs/urn.dot: machine.go.rl - @mkdir -p docs - $(RAGEL) -Z -e -Vp $< -o $@ - -docs/urn.png: docs/urn.dot - dot $< -Tpng -o $@ - -.PHONY: bench -bench: *_test.go machine.go - go test -bench=. -benchmem -benchtime=5s ./... - -.PHONY: tests -tests: *_test.go - $(GO_TEST) ./... diff --git a/go-controller/vendor/github.com/leodido/go-urn/options.go b/go-controller/vendor/github.com/leodido/go-urn/options.go deleted file mode 100644 index c543835a28..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/options.go +++ /dev/null @@ -1,9 +0,0 @@ -package urn - -type Option func(Machine) - -func WithParsingMode(mode ParsingMode) Option { - return func(m Machine) { - m.WithParsingMode(mode) - } -} diff --git a/go-controller/vendor/github.com/leodido/go-urn/parsing_mode.go b/go-controller/vendor/github.com/leodido/go-urn/parsing_mode.go deleted file mode 100644 index fce5aadc3c..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/parsing_mode.go +++ /dev/null @@ -1,12 +0,0 @@ -package urn - -type ParsingMode int - -const ( - Default ParsingMode = iota - RFC2141Only - RFC7643Only - RFC8141Only -) - -const DefaultParsingMode = RFC2141Only diff --git a/go-controller/vendor/github.com/leodido/go-urn/scim.go b/go-controller/vendor/github.com/leodido/go-urn/scim.go deleted file mode 100644 index f6b7aefbad..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/scim.go +++ /dev/null @@ -1,48 +0,0 @@ -package urn - -import ( - "encoding/json" - "fmt" - - scimschema "github.com/leodido/go-urn/scim/schema" -) - -const errInvalidSCIMURN = "invalid SCIM URN: %s" - -type SCIM struct { - Type scimschema.Type - Name string - Other string - pos int -} - -func (s SCIM) MarshalJSON() ([]byte, error) { - return json.Marshal(s.String()) -} - -func (s *SCIM) UnmarshalJSON(bytes []byte) error { - var str string - if err := json.Unmarshal(bytes, &str); err != nil { - return err - } - // Parse as SCIM - value, ok := Parse([]byte(str), WithParsingMode(RFC7643Only)) - if !ok { - return fmt.Errorf(errInvalidSCIMURN, str) - } - if value.RFC() != RFC7643 { - return fmt.Errorf(errInvalidSCIMURN, str) - } - *s = *value.SCIM() - - return nil -} - -func (s *SCIM) String() string { - ret := fmt.Sprintf("urn:ietf:params:scim:%s:%s", s.Type.String(), s.Name) - if s.Other != "" { - ret += fmt.Sprintf(":%s", s.Other) - } - - return ret -} diff --git a/go-controller/vendor/github.com/leodido/go-urn/scim/schema/type.go b/go-controller/vendor/github.com/leodido/go-urn/scim/schema/type.go deleted file mode 100644 index 134918230f..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/scim/schema/type.go +++ /dev/null @@ -1,36 +0,0 @@ -package scimschema - -type Type int - -const ( - Unsupported Type = iota - Schemas - API - Param -) - -func (t Type) String() string { - switch t { - case Schemas: - return "schemas" - case API: - return "api" - case Param: - return "param" - } - - return "" -} - -func TypeFromString(input string) Type { - switch input { - case "schemas": - return Schemas - case "api": - return API - case "param": - return Param - } - - return Unsupported -} diff --git a/go-controller/vendor/github.com/leodido/go-urn/urn.go b/go-controller/vendor/github.com/leodido/go-urn/urn.go deleted file mode 100644 index 894d6258dc..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/urn.go +++ /dev/null @@ -1,141 +0,0 @@ -package urn - -import ( - "encoding/json" - "fmt" - "strings" -) - -const errInvalidURN = "invalid URN: %s" - -// URN represents an Uniform Resource Name. -// -// The general form represented is: -// -// urn:: -// -// Details at https://tools.ietf.org/html/rfc2141. -type URN struct { - prefix string // Static prefix. Equal to "urn" when empty. - ID string // Namespace identifier (NID) - SS string // Namespace specific string (NSS) - norm string // Normalized namespace specific string - kind Kind - scim *SCIM - rComponent string // RFC8141 - qComponent string // RFC8141 - fComponent string // RFC8141 - rStart bool // RFC8141 - qStart bool // RFC8141 - tolower []int -} - -// Normalize turns the receiving URN into its norm version. -// -// Which means: lowercase prefix, lowercase namespace identifier, and immutate namespace specific string chars (except tokens which are lowercased). -func (u *URN) Normalize() *URN { - return &URN{ - prefix: "urn", - ID: strings.ToLower(u.ID), - SS: u.norm, - // rComponent: u.rComponent, - // qComponent: u.qComponent, - // fComponent: u.fComponent, - } -} - -// Equal checks the lexical equivalence of the current URN with another one. -func (u *URN) Equal(x *URN) bool { - if x == nil { - return false - } - nu := u.Normalize() - nx := x.Normalize() - - return nu.prefix == nx.prefix && nu.ID == nx.ID && nu.SS == nx.SS -} - -// String reassembles the URN into a valid URN string. -// -// This requires both ID and SS fields to be non-empty. -// Otherwise it returns an empty string. -// -// Default URN prefix is "urn". -func (u *URN) String() string { - var res string - if u.ID != "" && u.SS != "" { - if u.prefix == "" { - res += "urn" - } - res += u.prefix + ":" + u.ID + ":" + u.SS - if u.rComponent != "" { - res += "?+" + u.rComponent - } - if u.qComponent != "" { - res += "?=" + u.qComponent - } - if u.fComponent != "" { - res += "#" + u.fComponent - } - } - - return res -} - -// Parse is responsible to create an URN instance from a byte array matching the correct URN syntax (RFC 2141). -func Parse(u []byte, options ...Option) (*URN, bool) { - urn, err := NewMachine(options...).Parse(u) - if err != nil { - return nil, false - } - - return urn, true -} - -// MarshalJSON marshals the URN to JSON string form (e.g. `"urn:oid:1.2.3.4"`). -func (u URN) MarshalJSON() ([]byte, error) { - return json.Marshal(u.String()) -} - -// UnmarshalJSON unmarshals a URN from JSON string form (e.g. `"urn:oid:1.2.3.4"`). -func (u *URN) UnmarshalJSON(bytes []byte) error { - var str string - if err := json.Unmarshal(bytes, &str); err != nil { - return err - } - if value, ok := Parse([]byte(str)); !ok { - return fmt.Errorf(errInvalidURN, str) - } else { - *u = *value - } - - return nil -} - -func (u *URN) IsSCIM() bool { - return u.kind == RFC7643 -} - -func (u *URN) SCIM() *SCIM { - if u.kind != RFC7643 { - return nil - } - - return u.scim -} - -func (u *URN) RFC() Kind { - return u.kind -} - -func (u *URN) FComponent() string { - return u.fComponent -} - -func (u *URN) QComponent() string { - return u.qComponent -} - -func (u *URN) RComponent() string { - return u.rComponent -} diff --git a/go-controller/vendor/github.com/leodido/go-urn/urn8141.go b/go-controller/vendor/github.com/leodido/go-urn/urn8141.go deleted file mode 100644 index da4dd062e3..0000000000 --- a/go-controller/vendor/github.com/leodido/go-urn/urn8141.go +++ /dev/null @@ -1,30 +0,0 @@ -package urn - -import ( - "encoding/json" - "fmt" -) - -const errInvalidURN8141 = "invalid URN per RFC 8141: %s" - -type URN8141 struct { - *URN -} - -func (u URN8141) MarshalJSON() ([]byte, error) { - return json.Marshal(u.String()) -} - -func (u *URN8141) UnmarshalJSON(bytes []byte) error { - var str string - if err := json.Unmarshal(bytes, &str); err != nil { - return err - } - if value, ok := Parse([]byte(str), WithParsingMode(RFC8141Only)); !ok { - return fmt.Errorf(errInvalidURN8141, str) - } else { - *u = URN8141{value} - } - - return nil -} diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/cache/cache.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/cache/cache.go index 4840aa2461..ffe871fd3e 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/cache/cache.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/cache/cache.go @@ -6,12 +6,15 @@ import ( "encoding/gob" "encoding/hex" "fmt" + "log" + "os" "reflect" "sort" "strings" "sync" "github.com/go-logr/logr" + "github.com/go-logr/stdr" "github.com/ovn-kubernetes/libovsdb/mapper" "github.com/ovn-kubernetes/libovsdb/model" "github.com/ovn-kubernetes/libovsdb/ovsdb" @@ -51,7 +54,7 @@ func NewErrCacheInconsistent(details string) *ErrCacheInconsistent { // ErrIndexExists is returned when an item in the database cannot be inserted due to existing indexes type ErrIndexExists struct { Table string - Value any + Value interface{} Index string New string Existing []string @@ -61,14 +64,14 @@ func (e *ErrIndexExists) Error() string { return fmt.Sprintf("cannot insert %s in the %s table. item %s has identical indexes. index: %s, value: %v", e.New, e.Table, e.Existing, e.Index, e.Value) } -func NewIndexExistsError(table string, value any, index string, n string, existing []string) *ErrIndexExists { +func NewIndexExistsError(table string, value interface{}, index string, new string, existing []string) *ErrIndexExists { return &ErrIndexExists{ - table, value, index, n, existing, + table, value, index, new, existing, } } // map of unique values to uuids -type valueToUUIDs map[any]uuidset +type valueToUUIDs map[interface{}]uuidset // map of column name(s) to unique values, to UUIDs type columnToValue map[index]valueToUUIDs @@ -500,17 +503,17 @@ func (r *RowCache) RowsShallow() map[string]model.Model { // conditions against all rows of a table. // //nolint:gocyclo // warns overall function is complex but ignores inner functions -func (r *RowCache) uuidsByConditionsAsIndexes(conditions []ovsdb.Condition, nativeValues []any) (uuidset, error) { +func (r *RowCache) uuidsByConditionsAsIndexes(conditions []ovsdb.Condition, nativeValues []interface{}) (uuidset, error) { type indexableCondition struct { column string - keys []any - nativeValue any + keys []interface{} + nativeValue interface{} } // build an indexable condition, more appropriate for our processing, from // an ovsdb condition. Only equality based conditions can be used as indexes // (or `includes` conditions on map values). - toIndexableCondition := func(condition ovsdb.Condition, nativeValue any) *indexableCondition { + toIndexableCondition := func(condition ovsdb.Condition, nativeValue interface{}) *indexableCondition { if condition.Column == "_uuid" { return nil } @@ -525,7 +528,7 @@ func (r *RowCache) uuidsByConditionsAsIndexes(conditions []ovsdb.Condition, nati if condition.Function == ovsdb.ConditionIncludes && isSet { return nil } - keys := []any{} + keys := []interface{}{} if v.Kind() == reflect.Map && condition.Function == ovsdb.ConditionIncludes { for _, key := range v.MapKeys() { keys = append(keys, key.Interface()) @@ -675,7 +678,7 @@ func (r *RowCache) RowsByCondition(conditions []ovsdb.Condition) (map[string]mod } // one pass to obtain the native values - nativeValues := make([]any, 0, len(conditions)) + nativeValues := make([]interface{}, 0, len(conditions)) for _, condition := range conditions { tSchema := schema.Column(condition.Column) nativeValue, err := ovsdb.OvsToNative(tSchema, condition.Value) @@ -771,7 +774,7 @@ func (r *RowCache) Len() int { return len(r.cache) } -func (r *RowCache) Index(columns ...string) (map[any][]string, error) { +func (r *RowCache) Index(columns ...string) (map[interface{}][]string, error) { r.mutex.RLock() defer r.mutex.RUnlock() spec := newIndexFromColumns(columns...) @@ -779,7 +782,7 @@ func (r *RowCache) Index(columns ...string) (map[any][]string, error) { if !ok { return nil, fmt.Errorf("%v is not an index", columns) } - dbIndex := make(map[any][]string, len(index)) + dbIndex := make(map[interface{}][]string, len(index)) for k, v := range index { dbIndex[k] = v.list() } @@ -789,7 +792,7 @@ func (r *RowCache) Index(columns ...string) (map[any][]string, error) { // EventHandler can handle events when the contents of the cache changes type EventHandler interface { OnAdd(table string, model model.Model) - OnUpdate(table string, old model.Model, newModel model.Model) + OnUpdate(table string, old model.Model, new model.Model) OnDelete(table string, model model.Model) } @@ -797,7 +800,7 @@ type EventHandler interface { // It allows a caller to only implement the functions they need type EventHandlerFuncs struct { AddFunc func(table string, model model.Model) - UpdateFunc func(table string, old model.Model, newModel model.Model) + UpdateFunc func(table string, old model.Model, new model.Model) DeleteFunc func(table string, model model.Model) } @@ -809,9 +812,9 @@ func (e *EventHandlerFuncs) OnAdd(table string, model model.Model) { } // OnUpdate calls UpdateFunc if it is not nil -func (e *EventHandlerFuncs) OnUpdate(table string, old, newModel model.Model) { +func (e *EventHandlerFuncs) OnUpdate(table string, old, new model.Model) { if e.UpdateFunc != nil { - e.UpdateFunc(table, old, newModel) + e.UpdateFunc(table, old, new) } } @@ -844,7 +847,7 @@ func NewTableCache(dbModel model.DatabaseModel, data Data, logger *logr.Logger) return nil, fmt.Errorf("tablecache without valid databasemodel cannot be populated") } if logger == nil { - l := logr.Discard() + l := stdr.NewWithOptions(log.New(os.Stderr, "", log.LstdFlags), stdr.Options{LogCaller: stdr.All}).WithName("cache") logger = &l } else { l := logger.WithName("cache") @@ -910,7 +913,7 @@ func (t *TableCache) Tables() []string { // Update implements the update method of the NotificationHandler interface // this populates a channel with updates so they can be processed after the initial // state has been Populated -func (t *TableCache) Update(_ any, tableUpdates ovsdb.TableUpdates) error { +func (t *TableCache) Update(context interface{}, tableUpdates ovsdb.TableUpdates) error { if len(tableUpdates) == 0 { return nil } @@ -924,7 +927,7 @@ func (t *TableCache) Update(_ any, tableUpdates ovsdb.TableUpdates) error { // Update2 implements the update method of the NotificationHandler interface // this populates a channel with updates so they can be processed after the initial // state has been Populated -func (t *TableCache) Update2(_ any, tableUpdates ovsdb.TableUpdates2) error { +func (t *TableCache) Update2(context interface{}, tableUpdates ovsdb.TableUpdates2) error { if len(tableUpdates) == 0 { return nil } @@ -936,15 +939,15 @@ func (t *TableCache) Update2(_ any, tableUpdates ovsdb.TableUpdates2) error { } // Locked implements the locked method of the NotificationHandler interface -func (t *TableCache) Locked([]any) { +func (t *TableCache) Locked([]interface{}) { } // Stolen implements the stolen method of the NotificationHandler interface -func (t *TableCache) Stolen([]any) { +func (t *TableCache) Stolen([]interface{}) { } // Echo implements the echo method of the NotificationHandler interface -func (t *TableCache) Echo([]any) { +func (t *TableCache) Echo([]interface{}) { } // Disconnected implements the disconnected method of the NotificationHandler interface @@ -1127,14 +1130,14 @@ func (e *eventProcessor) AddEventHandler(handler EventHandler) { } // AddEvent writes an event to the channel -func (e *eventProcessor) AddEvent(eventType string, table string, old model.Model, newModel model.Model) { +func (e *eventProcessor) AddEvent(eventType string, table string, old model.Model, new model.Model) { // We don't need to check for error here since there // is only a single writer. RPC is run in blocking mode event := event{ eventType: eventType, table: table, old: old, - new: newModel, + new: new, } select { case e.events <- &event: @@ -1173,30 +1176,30 @@ func (e *eventProcessor) Run(stopCh <-chan struct{}) { type cacheUpdate interface { GetUpdatedTables() []string - ForEachModelUpdate(table string, do func(uuid string, old, newModel model.Model) error) error + ForEachModelUpdate(table string, do func(uuid string, old, new model.Model) error) error } func (t *TableCache) ApplyCacheUpdate(update cacheUpdate) error { tables := update.GetUpdatedTables() for _, table := range tables { tCache := t.cache[table] - err := update.ForEachModelUpdate(table, func(uuid string, old, newModel model.Model) error { + err := update.ForEachModelUpdate(table, func(uuid string, old, new model.Model) error { switch { - case old == nil && newModel != nil: - t.logger.V(5).Info("inserting model", "table", table, "uuid", uuid, "model", newModel) - err := tCache.Create(uuid, newModel, false) + case old == nil && new != nil: + t.logger.V(5).Info("inserting model", "table", table, "uuid", uuid, "model", new) + err := tCache.Create(uuid, new, false) if err != nil { return err } - t.eventProcessor.AddEvent(addEvent, table, nil, newModel) - case old != nil && newModel != nil: - t.logger.V(5).Info("updating model", "table", table, "uuid", uuid, "old", old, "new", newModel) - _, err := tCache.Update(uuid, newModel, false) + t.eventProcessor.AddEvent(addEvent, table, nil, new) + case old != nil && new != nil: + t.logger.V(5).Info("updating model", "table", table, "uuid", uuid, "old", old, "new", new) + _, err := tCache.Update(uuid, new, false) if err != nil { return err } - t.eventProcessor.AddEvent(updateEvent, table, old, newModel) - case newModel == nil: + t.eventProcessor.AddEvent(updateEvent, table, old, new) + case new == nil: t.logger.V(5).Info("deleting model", "table", table, "uuid", uuid, "model", old) err := tCache.Delete(uuid) if err != nil { @@ -1213,7 +1216,7 @@ func (t *TableCache) ApplyCacheUpdate(update cacheUpdate) error { return nil } -func valueFromIndex(info *mapper.Info, columnKeys []model.ColumnKey) (any, error) { +func valueFromIndex(info *mapper.Info, columnKeys []model.ColumnKey) (interface{}, error) { if len(columnKeys) > 1 { var buf bytes.Buffer enc := gob.NewEncoder(&buf) @@ -1247,7 +1250,7 @@ func valueFromIndex(info *mapper.Info, columnKeys []model.ColumnKey) (any, error return val, err } -func valueFromColumnKey(info *mapper.Info, columnKey model.ColumnKey) (any, error) { +func valueFromColumnKey(info *mapper.Info, columnKey model.ColumnKey) (interface{}, error) { val, err := info.FieldByColumn(columnKey.Column) if err != nil { return nil, err @@ -1266,7 +1269,7 @@ func valueFromColumnKey(info *mapper.Info, columnKey model.ColumnKey) (any, erro return val, err } -func valueFromMap(aMap any, key any) (any, error) { +func valueFromMap(aMap interface{}, key interface{}) (interface{}, error) { m := reflect.ValueOf(aMap) if m.Kind() != reflect.Map { return nil, fmt.Errorf("expected map but got %s", m.Kind()) diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/cache/doc.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/cache/doc.go index 25f1597e2d..3b176f2775 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/cache/doc.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/cache/doc.go @@ -3,7 +3,7 @@ Package cache provides a cache of model.Model elements that can be used in an OV The cache can be accessed using a simple API: - cache.Table("Open_vSwitch").Row("") + cache.Table("Open_vSwitch").Row("") It implements the ovsdb.NotificationHandler interface such that it can be populated automatically by diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/api.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/api.go index 5539283ff9..f6a8d6fb34 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/api.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/api.go @@ -19,12 +19,12 @@ type API interface { // Models can be structs or pointers to structs // If the slice is null, the entire cache will be copied into the slice // If it has a capacity != 0, only 'capacity' elements will be filled in - List(ctx context.Context, result any) error + List(ctx context.Context, result interface{}) error // Create a Conditional API from a Function that is used to filter cached data // The function must accept a Model implementation and return a boolean. E.g: // ConditionFromFunc(func(l *LogicalSwitch) bool { return l.Enabled }) - WhereCache(predicate any) ConditionalAPI + WhereCache(predicate interface{}) ConditionalAPI // Create a ConditionalAPI from a Model's index data, where operations // apply to elements that match the values provided in one or more @@ -61,7 +61,7 @@ type API interface { type ConditionalAPI interface { // List uses the condition to search on the cache and populates // the slice of Models objects based on their type - List(ctx context.Context, result any) error + List(ctx context.Context, result interface{}) error // Mutate returns the operations needed to perform the mutation specified // By the model and the list of Mutation objects @@ -73,14 +73,14 @@ type ConditionalAPI interface { // By default, all the non-default values contained in model will be updated. // Optional fields can be passed (pointer to fields in the model) to select the // the fields to be updated - Update(model.Model, ...any) ([]ovsdb.Operation, error) + Update(model.Model, ...interface{}) ([]ovsdb.Operation, error) // Delete returns the Operations needed to delete the models selected via the condition Delete() ([]ovsdb.Operation, error) // Wait returns the operations needed to perform the wait specified // by the until condition, timeout, row and columns based on provided parameters. - Wait(ovsdb.WaitCondition, *int, model.Model, ...any) ([]ovsdb.Operation, error) + Wait(ovsdb.WaitCondition, *int, model.Model, ...interface{}) ([]ovsdb.Operation, error) } // ErrWrongType is used to report the user provided parameter has the wrong type @@ -99,14 +99,13 @@ var ErrNotFound = errors.New("object not found") // api struct implements both API and ConditionalAPI // Where() can be used to create a ConditionalAPI api type api struct { - cache *cache.TableCache - cond Conditional - logger *logr.Logger - validateModel bool + cache *cache.TableCache + cond Conditional + logger *logr.Logger } // List populates a slice of Models given as parameter based on the configured Condition -func (a api) List(_ context.Context, result any) error { +func (a api) List(ctx context.Context, result interface{}) error { resultPtr := reflect.ValueOf(result) if resultPtr.Type().Kind() != reflect.Ptr { return &ErrWrongType{resultPtr.Type(), "Expected pointer to slice of valid Models"} @@ -179,29 +178,29 @@ func (a api) List(_ context.Context, result any) error { // Where returns a conditionalAPI based on model indexes. All provided models // must be the same type. func (a api) Where(models ...model.Model) ConditionalAPI { - return newConditionalAPI(a.cache, a.conditionFromModels(models), a.logger, a.validateModel) + return newConditionalAPI(a.cache, a.conditionFromModels(models), a.logger) } // WhereAny returns a conditionalAPI based on a Condition list that matches any // of the conditions individually func (a api) WhereAny(m model.Model, cond ...model.Condition) ConditionalAPI { - return newConditionalAPI(a.cache, a.conditionFromExplicitConditions(false, m, cond...), a.logger, a.validateModel) + return newConditionalAPI(a.cache, a.conditionFromExplicitConditions(false, m, cond...), a.logger) } // WhereAll returns a conditionalAPI based on a Condition list that matches all // of the conditions together func (a api) WhereAll(m model.Model, cond ...model.Condition) ConditionalAPI { - return newConditionalAPI(a.cache, a.conditionFromExplicitConditions(true, m, cond...), a.logger, a.validateModel) + return newConditionalAPI(a.cache, a.conditionFromExplicitConditions(true, m, cond...), a.logger) } // WhereCache returns a conditionalAPI based a Predicate -func (a api) WhereCache(predicate any) ConditionalAPI { - return newConditionalAPI(a.cache, a.conditionFromFunc(predicate), a.logger, a.validateModel) +func (a api) WhereCache(predicate interface{}) ConditionalAPI { + return newConditionalAPI(a.cache, a.conditionFromFunc(predicate), a.logger) } // Conditional interface implementation // FromFunc returns a Condition from a function -func (a api) conditionFromFunc(predicate any) Conditional { +func (a api) conditionFromFunc(predicate interface{}) Conditional { table, err := a.getTableFromFunc(predicate) if err != nil { return newErrorConditional(err) @@ -255,7 +254,7 @@ func (a api) conditionFromExplicitConditions(matchAll bool, m model.Model, cond // // The way the cache is searched depends on the fields already populated in 'result' // Any table index (including _uuid) will be used for comparison -func (a api) Get(_ context.Context, m model.Model) error { +func (a api) Get(ctx context.Context, m model.Model) error { table, err := a.getTableFromModel(m) if err != nil { return err @@ -281,127 +280,98 @@ func (a api) Get(_ context.Context, m model.Model) error { // Create is a generic function capable of creating any row in the DB // A valid Model (pointer to object) must be provided. func (a api) Create(models ...model.Model) ([]ovsdb.Operation, error) { - if len(models) == 0 { - return nil, nil - } - var operations []ovsdb.Operation - var tableName string - var err error - for _, m := range models { + for _, model := range models { var realUUID, namedUUID string - var currentTable string + var err error - currentTable, err = a.getTableFromModel(m) + tableName, err := a.getTableFromModel(model) if err != nil { return nil, err } - if a.validateModel { - if err := validateModel(m); err != nil { - return nil, err - } - } - - if tableName == "" { - tableName = currentTable - } else if currentTable != tableName { - return nil, fmt.Errorf("models must belong to the same table for a single Create operation (%s != %s)", currentTable, tableName) - } - // Use the DatabaseModel associated with the cache to get info - info, err := a.cache.DatabaseModel().NewModelInfo(m) + // Read _uuid field, and use it as named-uuid + info, err := a.cache.DatabaseModel().NewModelInfo(model) if err != nil { return nil, err } - if uuid, err := info.FieldByColumn("_uuid"); err == nil { tmpUUID := uuid.(string) if ovsdb.IsNamedUUID(tmpUUID) { namedUUID = tmpUUID } else if ovsdb.IsValidUUID(tmpUUID) { realUUID = tmpUUID - } } else { - return nil, fmt.Errorf("error accessing _uuid field: %w", err) + return nil, err } - // Use the Mapper associated with the cache to create the row row, err := a.cache.Mapper().NewRow(info) if err != nil { return nil, err } - // UUID is given in the operation, not the object delete(row, "_uuid") - op := ovsdb.Operation{ + operations = append(operations, ovsdb.Operation{ Op: ovsdb.OperationInsert, Table: tableName, Row: row, UUID: realUUID, UUIDName: namedUUID, - } - operations = append(operations, op) + }) } return operations, nil } // Mutate returns the operations needed to transform the one Model into another one func (a api) Mutate(model model.Model, mutationObjs ...model.Mutation) ([]ovsdb.Operation, error) { + var mutations []ovsdb.Mutation + var operations []ovsdb.Operation + if len(mutationObjs) < 1 { return nil, fmt.Errorf("at least one Mutation must be provided") } - tableName, err := a.getTableFromModel(model) + tableName := a.cache.DatabaseModel().FindTable(reflect.ValueOf(model).Type()) + if tableName == "" { + return nil, fmt.Errorf("table not found for object") + } + table := a.cache.Mapper().Schema.Table(tableName) + if table == nil { + return nil, fmt.Errorf("schema error: table not found in Database Model for type %s", reflect.TypeOf(model)) + } + + conditions, err := a.cond.Generate() if err != nil { return nil, err } - tableSchema := a.cache.DatabaseModel().Schema.Table(tableName) - if tableSchema == nil { - return nil, fmt.Errorf("schema not found for table %s", tableName) - } + info, err := a.cache.DatabaseModel().NewModelInfo(model) if err != nil { return nil, err } - // Validate mutations if validation is enabled - if a.validateModel { - err = validateMutations(model, info, mutationObjs...) + for _, mobj := range mutationObjs { + col, err := info.ColumnByPtr(mobj.Field) if err != nil { return nil, err } - } - // Convert model.Mutation to ovsdb.Mutation and store them - var mutations []ovsdb.Mutation - for _, mutationObj := range mutationObjs { - columnName, err := info.ColumnByPtr(mutationObj.Field) + mutation, err := a.cache.Mapper().NewMutation(info, col, mobj.Mutator, mobj.Value) if err != nil { - return nil, fmt.Errorf("could not get column for mutation field: %w", err) - } - mutation, err := a.cache.Mapper().NewMutation(info, columnName, mutationObj.Mutator, mutationObj.Value) - if err != nil { - return nil, fmt.Errorf("failed to create OVSDB mutation for column '%s': %w", columnName, err) + return nil, err } mutations = append(mutations, *mutation) } - - conditions, err := a.cond.Generate() - if err != nil { - return nil, err - } - - var operations []ovsdb.Operation for _, condition := range conditions { operations = append(operations, ovsdb.Operation{ Op: ovsdb.OperationMutate, Table: tableName, - Where: condition, Mutations: mutations, + Where: condition, }, ) } @@ -412,19 +382,13 @@ func (a api) Mutate(model model.Model, mutationObjs ...model.Mutation) ([]ovsdb. // Update is a generic function capable of updating any mutable field in any row in the database // Additional fields can be passed (variadic opts) to indicate fields to be updated // All immutable fields will be ignored -func (a api) Update(model model.Model, fields ...any) ([]ovsdb.Operation, error) { - tableName, err := a.getTableFromModel(model) +func (a api) Update(model model.Model, fields ...interface{}) ([]ovsdb.Operation, error) { + var operations []ovsdb.Operation + table, err := a.getTableFromModel(model) if err != nil { return nil, err } - - if a.validateModel { - if err := validateModel(model); err != nil { - return nil, err - } - } - - tableSchema := a.cache.DatabaseModel().Schema.Table(tableName) + tableSchema := a.cache.Mapper().Schema.Table(table) info, err := a.cache.DatabaseModel().NewModelInfo(model) if err != nil { return nil, err @@ -437,46 +401,38 @@ func (a api) Update(model model.Model, fields ...any) ([]ovsdb.Operation, error) return nil, err } if !tableSchema.Columns[colName].Mutable() { - return nil, fmt.Errorf("unable to update field %s of table %s as it is not mutable", colName, tableName) + return nil, fmt.Errorf("unable to update field %s of table %s as it is not mutable", colName, table) } } } - // Convert the model to a row, considering only specified fields if provided + conditions, err := a.cond.Generate() + if err != nil { + return nil, err + } + row, err := a.cache.Mapper().NewRow(info, fields...) if err != nil { return nil, err } - // Remove immutable fields from the row for colName, column := range tableSchema.Columns { if !column.Mutable() { - // Only delete if the key actually exists in the row map - if _, exists := row[colName]; exists { - a.logger.V(2).Info("removing immutable field from update row", "name", colName) - delete(row, colName) - } + a.logger.V(2).Info("removing immutable field", "name", colName) + delete(row, colName) } } - // Also remove _uuid explicitly if it exists delete(row, "_uuid") - // Check if the row is empty after removing immutable fields if len(row) == 0 { return nil, fmt.Errorf("attempted to update using an empty row. please check that all fields you wish to update are mutable") } - conditions, err := a.cond.Generate() - if err != nil { - return nil, err - } - - var operations []ovsdb.Operation for _, condition := range conditions { operations = append(operations, ovsdb.Operation{ Op: ovsdb.OperationUpdate, - Table: tableName, + Table: table, Row: row, Where: condition, }, @@ -506,7 +462,7 @@ func (a api) Delete() ([]ovsdb.Operation, error) { return operations, nil } -func (a api) Wait(untilConFun ovsdb.WaitCondition, timeout *int, model model.Model, fields ...any) ([]ovsdb.Operation, error) { +func (a api) Wait(untilConFun ovsdb.WaitCondition, timeout *int, model model.Model, fields ...interface{}) ([]ovsdb.Operation, error) { var operations []ovsdb.Operation /* @@ -582,7 +538,7 @@ func (a api) Wait(untilConFun ovsdb.WaitCondition, timeout *int, model model.Mod // getTableFromModel returns the table name from a Model object after performing // type verifications on the model -func (a api) getTableFromModel(m any) (string, error) { +func (a api) getTableFromModel(m interface{}) (string, error) { if _, ok := m.(model.Model); !ok { return "", &ErrWrongType{reflect.TypeOf(m), "Type does not implement Model interface"} } @@ -595,7 +551,7 @@ func (a api) getTableFromModel(m any) (string, error) { // getTableFromModel returns the table name from a the predicate after performing // type verifications -func (a api) getTableFromFunc(predicate any) (string, error) { +func (a api) getTableFromFunc(predicate interface{}) (string, error) { predType := reflect.TypeOf(predicate) if predType == nil || predType.Kind() != reflect.Func { return "", &ErrWrongType{predType, "Expected function"} @@ -620,20 +576,18 @@ func (a api) getTableFromFunc(predicate any) (string, error) { } // newAPI returns a new API to interact with the database -func newAPI(cache *cache.TableCache, logger *logr.Logger, validateModel bool) API { +func newAPI(cache *cache.TableCache, logger *logr.Logger) API { return api{ - cache: cache, - logger: logger, - validateModel: validateModel, + cache: cache, + logger: logger, } } // newConditionalAPI returns a new ConditionalAPI to interact with the database -func newConditionalAPI(cache *cache.TableCache, cond Conditional, logger *logr.Logger, validateModel bool) ConditionalAPI { +func newConditionalAPI(cache *cache.TableCache, cond Conditional, logger *logr.Logger) ConditionalAPI { return api{ - cache: cache, - cond: cond, - logger: logger, - validateModel: validateModel, + cache: cache, + cond: cond, + logger: logger, } } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/api_test_model.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/api_test_model.go index 9f692e4e45..7a97b6d08c 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/api_test_model.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/api_test_model.go @@ -7,7 +7,7 @@ import ( "github.com/ovn-kubernetes/libovsdb/cache" "github.com/ovn-kubernetes/libovsdb/model" "github.com/ovn-kubernetes/libovsdb/ovsdb" - "github.com/stretchr/testify/require" + "github.com/stretchr/testify/assert" ) var apiTestSchema = []byte(`{ @@ -106,107 +106,21 @@ var apiTestSchema = []byte(`{ "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}}}, "indexes": [["name"]], - "isRoot": false}, - "Bridge": { - "columns": { - "name": { - "type": "string", - "mutable": false}, - "datapath_type": { - "type": "string"}, - "datapath_version": { - "type": "string"}, - "datapath_id": { - "type": {"key": "string", "min": 0, "max": 1}, - "ephemeral": true}, - "stp_enable": { - "type": "boolean"}, - "rstp_enable": { - "type": "boolean"}, - "mcast_snooping_enable": { - "type": "boolean"}, - "ports": { - "type": {"key": {"type": "uuid", - "refTable": "Port"}, - "min": 0, "max": "unlimited"}}, - "mirrors": { - "type": {"key": {"type": "uuid", - "refTable": "Mirror"}, - "min": 0, "max": "unlimited"}}, - "netflow": { - "type": {"key": {"type": "uuid", - "refTable": "NetFlow"}, - "min": 0, "max": 1}}, - "sflow": { - "type": {"key": {"type": "uuid", - "refTable": "sFlow"}, - "min": 0, "max": 1}}, - "ipfix": { - "type": {"key": {"type": "uuid", - "refTable": "IPFIX"}, - "min": 0, "max": 1}}, - "controller": { - "type": {"key": {"type": "uuid", - "refTable": "Controller"}, - "min": 0, "max": "unlimited"}}, - "protocols": { - "type": {"key": {"type": "string", - "enum": ["set", ["OpenFlow10", - "OpenFlow11", - "OpenFlow12", - "OpenFlow13", - "OpenFlow14", - "OpenFlow15"]]}, - "min": 0, "max": "unlimited"}}, - "fail_mode": { - "type": {"key": {"type": "string", - "enum": ["set", ["standalone", "secure"]]}, - "min": 0, "max": 1}}, - "status": { - "type": {"key": "string", "value": "string", - "min": 0, "max": "unlimited"}, - "ephemeral": true}, - "rstp_status": { - "type": {"key": "string", "value": "string", - "min": 0, "max": "unlimited"}, - "ephemeral": true}, - "other_config": { - "type": {"key": "string", "value": "string", - "min": 0, "max": "unlimited"}}, - "external_ids": { - "type": {"key": "string", "value": "string", - "min": 0, "max": "unlimited"}}, - "flood_vlans": { - "type": {"key": {"type": "integer", - "minInteger": 0, - "maxInteger": 4095}, - "min": 0, "max": 4096}}, - "flow_tables": { - "type": {"key": {"type": "integer", - "minInteger": 0, - "maxInteger": 254}, - "value": {"type": "uuid", - "refTable": "Flow_Table"}, - "min": 0, "max": "unlimited"}}, - "auto_attach": { - "type": {"key": {"type": "uuid", - "refTable": "AutoAttach"}, - "min": 0, "max": 1}}}, - "indexes": [["name"]]} + "isRoot": false} } }`) type testLogicalSwitch struct { UUID string `ovsdb:"_uuid"` - ACLs []string `ovsdb:"acls"` - DNSRecords []string `ovsdb:"dns_records"` - ExternalIDs map[string]string `ovsdb:"external_ids"` - ForwardingGroups []string `ovsdb:"forwarding_groups"` - LoadBalancer []string `ovsdb:"load_balancer"` + Ports []string `ovsdb:"ports"` + ExternalIds map[string]string `ovsdb:"external_ids"` Name string `ovsdb:"name"` + QosRules []string `ovsdb:"qos_rules"` + LoadBalancer []string `ovsdb:"load_balancer"` + DNSRecords []string `ovsdb:"dns_records"` OtherConfig map[string]string `ovsdb:"other_config"` - Ports []string `ovsdb:"ports"` - QOSRules []string `ovsdb:"qos_rules"` + ForwardingGroups []string `ovsdb:"forwarding_groups"` + Acls []string `ovsdb:"acls"` } // Table returns the table name. It's part of the Model interface @@ -214,24 +128,24 @@ func (*testLogicalSwitch) Table() string { return "Logical_Switch" } -// LogicalSwitchPort struct defines an object in Logical_Switch_Port table +//LogicalSwitchPort struct defines an object in Logical_Switch_Port table type testLogicalSwitchPort struct { UUID string `ovsdb:"_uuid"` - Addresses []string `ovsdb:"addresses"` + Up *bool `ovsdb:"up"` Dhcpv4Options *string `ovsdb:"dhcpv4_options"` - Dhcpv6Options *string `ovsdb:"dhcpv6_options"` + Name string `ovsdb:"name"` DynamicAddresses *string `ovsdb:"dynamic_addresses"` - Enabled *bool `ovsdb:"enabled"` - ExternalIDs map[string]string `ovsdb:"external_ids"` HaChassisGroup *string `ovsdb:"ha_chassis_group"` - Name string `ovsdb:"name"` Options map[string]string `ovsdb:"options"` - ParentName *string `ovsdb:"parent_name"` + Enabled *bool `ovsdb:"enabled"` + Addresses []string `ovsdb:"addresses"` + Dhcpv6Options *string `ovsdb:"dhcpv6_options"` + TagRequest *int `ovsdb:"tag_request"` + Tag *int `ovsdb:"tag"` PortSecurity []string `ovsdb:"port_security"` - Tag *int `ovsdb:"tag" validate:"omitempty,min=1,max=4095"` - TagRequest *int `ovsdb:"tag_request" validate:"omitempty,min=0,max=4095"` + ExternalIds map[string]string `ovsdb:"external_ids"` Type string `ovsdb:"type"` - Up *bool `ovsdb:"up"` + ParentName *string `ovsdb:"parent_name"` } // Table returns the table name. It's part of the Model interface @@ -239,51 +153,15 @@ func (*testLogicalSwitchPort) Table() string { return "Logical_Switch_Port" } -// Bridge defines an object in Bridge table -type testBridge struct { - UUID string `ovsdb:"_uuid"` - AutoAttach *string `ovsdb:"auto_attach"` - Controller []string `ovsdb:"controller"` - DatapathID *string `ovsdb:"datapath_id"` - DatapathType string `ovsdb:"datapath_type"` - DatapathVersion string `ovsdb:"datapath_version"` - ExternalIDs map[string]string `ovsdb:"external_ids"` - FailMode *string `ovsdb:"fail_mode" validate:"omitempty,oneof='standalone' 'secure'"` - FloodVLANs []int `ovsdb:"flood_vlans" validate:"max=4096,dive,min=0,max=4095"` - FlowTables map[int]string `ovsdb:"flow_tables" validate:"dive,keys,min=0,max=254"` - IPFIX *string `ovsdb:"ipfix"` - McastSnoopingEnable bool `ovsdb:"mcast_snooping_enable"` - Mirrors []string `ovsdb:"mirrors"` - Name string `ovsdb:"name"` - Netflow *string `ovsdb:"netflow"` - OtherConfig map[string]string `ovsdb:"other_config"` - Ports []string `ovsdb:"ports"` - Protocols []string `ovsdb:"protocols" validate:"dive,oneof='OpenFlow10' 'OpenFlow11' 'OpenFlow12' 'OpenFlow13' 'OpenFlow14' 'OpenFlow15'"` - RSTPEnable bool `ovsdb:"rstp_enable"` - RSTPStatus map[string]string `ovsdb:"rstp_status"` - Sflow *string `ovsdb:"sflow"` - Status map[string]string `ovsdb:"status"` - STPEnable bool `ovsdb:"stp_enable"` -} - -// Table returns the table name. It's part of the Model interface -func (*testBridge) Table() string { - return "Bridge" -} - func apiTestCache(t testing.TB, data map[string]map[string]model.Model) *cache.TableCache { var schema ovsdb.DatabaseSchema err := json.Unmarshal(apiTestSchema, &schema) - require.NoError(t, err) - db, err := model.NewClientDBModel("OVN_Northbound", map[string]model.Model{ - "Logical_Switch": &testLogicalSwitch{}, - "Logical_Switch_Port": &testLogicalSwitchPort{}, - "Bridge": &testBridge{}, - }) - require.NoError(t, err) + assert.Nil(t, err) + db, err := model.NewClientDBModel("OVN_Northbound", map[string]model.Model{"Logical_Switch": &testLogicalSwitch{}, "Logical_Switch_Port": &testLogicalSwitchPort{}}) + assert.Nil(t, err) dbModel, errs := model.NewDatabaseModel(schema, db) - require.Empty(t, errs) + assert.Empty(t, errs) cache, err := cache.NewTableCache(dbModel, data, nil) - require.NoError(t, err) + assert.Nil(t, err) return cache } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/client.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/client.go index c1f4720b31..3926ad6ddf 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/client.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/client.go @@ -6,8 +6,10 @@ import ( "encoding/json" "errors" "fmt" + "log" "net" "net/url" + "os" "reflect" "strings" "sync" @@ -17,6 +19,7 @@ import ( "github.com/cenkalti/rpc2" "github.com/cenkalti/rpc2/jsonrpc" "github.com/go-logr/logr" + "github.com/go-logr/stdr" "github.com/ovn-kubernetes/libovsdb/cache" "github.com/ovn-kubernetes/libovsdb/mapper" "github.com/ovn-kubernetes/libovsdb/model" @@ -164,9 +167,12 @@ func newOVSDBClient(clientDBModel model.ClientDBModel, opts ...Option) (*ovsdbCl } if ovs.options.logger == nil { - // If no logger is provided, use a Discard logger - logger := logr.Discard() - ovs.logger = &logger + // create a new logger to log to stdout + l := stdr.NewWithOptions(log.New(os.Stderr, "", log.LstdFlags), stdr.Options{LogCaller: stdr.All}).WithName("libovsdb").WithValues( + "database", ovs.primaryDBName, + ) + stdr.SetVerbosity(5) + ovs.logger = &l } else { // add the "database" value to the structured logger // to make it easier to tell between different DBs (e.g. ovn nbdb vs. sbdb) @@ -252,6 +258,7 @@ func (o *ovsdbClient) connect(ctx context.Context, reconnect bool) error { o.resetRPCClient() connectErrors = append(connectErrors, fmt.Errorf("failed to connect to %s: %w", endpoint.address, err)) + continue } else { o.logger.V(3).Info("successfully connected", "endpoint", endpoint.address, "sid", sid) endpoint.serverID = sid @@ -278,11 +285,11 @@ func (o *ovsdbClient) connect(ctx context.Context, reconnect bool) error { o.logger.V(3).Info("reconnected - restarting monitors") for dbName, db := range o.databases { db.monitorsMutex.Lock() + defer db.monitorsMutex.Unlock() // Purge entire cache if no monitors exist to update dynamically if len(db.monitors) == 0 { db.cache.Purge(db.model) - db.monitorsMutex.Unlock() continue } @@ -292,11 +299,9 @@ func (o *ovsdbClient) connect(ctx context.Context, reconnect bool) error { err := o.monitor(ctx, MonitorCookie{DatabaseName: dbName, ID: id}, true, request) if err != nil { o.resetRPCClient() - db.monitorsMutex.Unlock() return err } } - db.monitorsMutex.Unlock() } } @@ -394,7 +399,7 @@ func (o *ovsdbClient) tryEndpoint(ctx context.Context, u *url.URL) (string, erro db.cacheMutex.Unlock() return "", err } - db.api = newAPI(db.cache, o.logger, o.options.validateModel) + db.api = newAPI(db.cache, o.logger) } db.cacheMutex.Unlock() } @@ -424,16 +429,16 @@ func (o *ovsdbClient) createRPC2Client(conn net.Conn) { } o.rpcClient = rpc2.NewClientWithCodec(jsonrpc.NewJSONCodec(conn)) o.rpcClient.SetBlocking(true) - o.rpcClient.Handle("echo", func(_ *rpc2.Client, args []any, reply *[]any) error { + o.rpcClient.Handle("echo", func(_ *rpc2.Client, args []interface{}, reply *[]interface{}) error { return o.echo(args, reply) }) - o.rpcClient.Handle("update", func(_ *rpc2.Client, args []json.RawMessage, reply *[]any) error { + o.rpcClient.Handle("update", func(_ *rpc2.Client, args []json.RawMessage, reply *[]interface{}) error { return o.update(args, reply) }) - o.rpcClient.Handle("update2", func(_ *rpc2.Client, args []json.RawMessage, reply *[]any) error { + o.rpcClient.Handle("update2", func(_ *rpc2.Client, args []json.RawMessage, reply *[]interface{}) error { return o.update2(args, reply) }) - o.rpcClient.Handle("update3", func(_ *rpc2.Client, args []json.RawMessage, reply *[]any) error { + o.rpcClient.Handle("update3", func(_ *rpc2.Client, args []json.RawMessage, reply *[]interface{}) error { return o.update3(args, reply) }) go o.rpcClient.Run() @@ -593,7 +598,7 @@ func (o *ovsdbClient) DisconnectNotify() chan struct{} { } // RFC 7047 : Section 4.1.6 : Echo -func (o *ovsdbClient) echo(args []any, reply *[]any) error { +func (o *ovsdbClient) echo(args []interface{}, reply *[]interface{}) error { *reply = args return nil } @@ -602,9 +607,9 @@ func (o *ovsdbClient) echo(args []any, reply *[]any) error { // params is an array of length 2: [json-value, table-updates] // - json-value: the arbitrary json-value passed when creating the Monitor, i.e. the "cookie" // - table-updates: map of table name to table-update. Table-update is a map of uuid to (old, new) row paris -func (o *ovsdbClient) update(params []json.RawMessage, reply *[]any) error { +func (o *ovsdbClient) update(params []json.RawMessage, reply *[]interface{}) error { cookie := MonitorCookie{} - *reply = []any{} + *reply = []interface{}{} if len(params) > 2 { return fmt.Errorf("update requires exactly 2 args") } @@ -647,9 +652,9 @@ func (o *ovsdbClient) update(params []json.RawMessage, reply *[]any) error { } // update2 handling from ovsdb-server.7 -func (o *ovsdbClient) update2(params []json.RawMessage, reply *[]any) error { +func (o *ovsdbClient) update2(params []json.RawMessage, reply *[]interface{}) error { cookie := MonitorCookie{} - *reply = []any{} + *reply = []interface{}{} if len(params) > 2 { return fmt.Errorf("update2 requires exactly 2 args") } @@ -688,9 +693,9 @@ func (o *ovsdbClient) update2(params []json.RawMessage, reply *[]any) error { } // update3 handling from ovsdb-server.7 -func (o *ovsdbClient) update3(params []json.RawMessage, reply *[]any) error { +func (o *ovsdbClient) update3(params []json.RawMessage, reply *[]interface{}) error { cookie := MonitorCookie{} - *reply = []any{} + *reply = []interface{}{} if len(params) > 3 { return fmt.Errorf("update requires exactly 3 args") } @@ -840,11 +845,7 @@ func (o *ovsdbClient) transact(ctx context.Context, dbName string, skipChWrite b } if !skipChWrite && o.trafficSeen != nil { - select { - case o.trafficSeen <- struct{}{}: - default: - // If the channel is full, drop the message - } + o.trafficSeen <- struct{}{} } return reply, nil } @@ -928,10 +929,10 @@ func (o *ovsdbClient) monitor(ctx context.Context, cookie MonitorCookie, reconne for _, err := range monitor.Errors { errString = append(errString, err.Error()) } - return errors.New(strings.Join(errString, ". ")) + return fmt.Errorf(strings.Join(errString, ". ")) } if len(monitor.Tables) == 0 { - return errors.New("at least one table should be monitored") + return fmt.Errorf("at least one table should be monitored") } dbName := cookie.DatabaseName db := o.databases[dbName] @@ -959,7 +960,7 @@ func (o *ovsdbClient) monitor(ctx context.Context, cookie MonitorCookie, reconne } db.modelMutex.RUnlock() - var args []any + var args []interface{} if monitor.Method == ovsdb.ConditionalMonitorSinceRPC { // If we are reconnecting a CondSince monitor that is the only // monitor, then we can use its LastTransactionID since it is @@ -974,7 +975,7 @@ func (o *ovsdbClient) monitor(ctx context.Context, cookie MonitorCookie, reconne args = ovsdb.NewMonitorArgs(dbName, cookie, requests) } var err error - var tableUpdates any + var tableUpdates interface{} var lastTransactionFound bool switch monitor.Method { @@ -1073,7 +1074,7 @@ func (o *ovsdbClient) monitor(ctx context.Context, cookie MonitorCookie, reconne // Echo tests the liveness of the OVSDB connetion func (o *ovsdbClient) Echo(ctx context.Context) error { args := ovsdb.NewEchoArgs() - var reply []any + var reply []interface{} o.rpcMutex.RLock() defer o.rpcMutex.RUnlock() if o.rpcClient == nil { @@ -1096,9 +1097,9 @@ func (o *ovsdbClient) Echo(ctx context.Context) error { func (o *ovsdbClient) watchForLeaderChange() error { updates := make(chan model.Model) o.databases[serverDB].cache.AddEventHandler(&cache.EventHandlerFuncs{ - UpdateFunc: func(table string, _, n model.Model) { + UpdateFunc: func(table string, _, new model.Model) { if table == "Database" { - updates <- n + updates <- new } }, }) @@ -1196,34 +1197,72 @@ func (o *ovsdbClient) handleClientErrors(stopCh <-chan struct{}) { } } +func (o *ovsdbClient) sendEcho(args []interface{}, reply *[]interface{}) *rpc2.Call { + o.rpcMutex.RLock() + defer o.rpcMutex.RUnlock() + if o.rpcClient == nil { + return nil + } + return o.rpcClient.Go("echo", args, reply, make(chan *rpc2.Call, 1)) +} + func (o *ovsdbClient) handleInactivityProbes() { defer o.handlerShutdown.Done() + echoReplied := make(chan string) + var lastEcho string stopCh := o.stopCh trafficSeen := o.trafficSeen - timer := time.NewTimer(o.options.inactivityTimeout) for { select { case <-stopCh: - timer.Stop() return case <-trafficSeen: - // We got some traffic from the server - // Timer must be stopped and drained of stale values before resetting it - // See: https://pkg.go.dev/time#NewTimer - if !timer.Stop() { - <-timer.C + // We got some traffic from the server, restart our timer + case ts := <-echoReplied: + // Got a response from the server, check it against lastEcho; if same clear lastEcho; if not same Disconnect() + if ts != lastEcho { + o.Disconnect() + return } - case <-timer.C: - // We timed out, send an echo request - ctx, cancel := context.WithTimeout(context.Background(), o.options.inactivityTimeout) - err := o.Echo(ctx) - if err != nil { - o.logger.V(3).Error(err, "server echo reply error") + lastEcho = "" + case <-time.After(o.options.inactivityTimeout): + // If there's a lastEcho already, then we didn't get a server reply, disconnect + if lastEcho != "" { + o.Disconnect() + return + } + // Otherwise send an echo + thisEcho := fmt.Sprintf("%d", time.Now().UnixMicro()) + args := []interface{}{"libovsdb echo", thisEcho} + var reply []interface{} + // Can't use o.Echo() because it blocks; we need the Call object direct from o.rpcClient.Go() + call := o.sendEcho(args, &reply) + if call == nil { o.Disconnect() + return } - cancel() + lastEcho = thisEcho + go func() { + // Wait for the echo reply + select { + case <-stopCh: + return + case <-call.Done: + if call.Error != nil { + // RPC timeout; disconnect + o.logger.V(3).Error(call.Error, "server echo reply error") + o.Disconnect() + } else if !reflect.DeepEqual(args, reply) { + o.logger.V(3).Info("warning: incorrect server echo reply", + "expected", args, "reply", reply) + o.Disconnect() + } else { + // Otherwise stuff thisEcho into the echoReplied channel + echoReplied <- thisEcho + } + } + }() } - timer.Reset(o.options.inactivityTimeout) } } @@ -1413,7 +1452,7 @@ func (o *ovsdbClient) Create(models ...model.Model) ([]ovsdb.Operation, error) { } // List implements the API interface's List function -func (o *ovsdbClient) List(ctx context.Context, result any) error { +func (o *ovsdbClient) List(ctx context.Context, result interface{}) error { primaryDB := o.primaryDB() waitForCacheConsistent(ctx, primaryDB, o.logger, o.primaryDBName) defer primaryDB.cacheMutex.RUnlock() @@ -1436,6 +1475,6 @@ func (o *ovsdbClient) WhereAll(m model.Model, conditions ...model.Condition) Con } // WhereCache implements the API interface's WhereCache function -func (o *ovsdbClient) WhereCache(predicate any) ConditionalAPI { +func (o *ovsdbClient) WhereCache(predicate interface{}) ConditionalAPI { return o.primaryDB().api.WhereCache(predicate) } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/condition.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/condition.go index 2e217c78ee..1269339cea 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/condition.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/condition.go @@ -176,7 +176,7 @@ func newExplicitConditional(table string, cache *cache.TableCache, matchAll bool // to match on models. type predicateConditional struct { tableName string - predicate any + predicate interface{} cache *cache.TableCache } @@ -215,7 +215,7 @@ func (c *predicateConditional) Generate() ([][]ovsdb.Condition, error) { } // newPredicateConditional creates a new predicateConditional -func newPredicateConditional(table string, cache *cache.TableCache, predicate any) (Conditional, error) { +func newPredicateConditional(table string, cache *cache.TableCache, predicate interface{}) (Conditional, error) { return &predicateConditional{ tableName: table, predicate: predicate, diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/doc.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/doc.go index 2f1aabba6b..90e409ee70 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/doc.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/doc.go @@ -4,29 +4,30 @@ Package client connects to, monitors and interacts with OVSDB servers (RFC7047). This package uses structs, that contain the 'ovs' field tag to determine which field goes to which column in the database. We refer to pointers to this structs as Models. Example: - type MyLogicalSwitch struct { - UUID string `ovsdb:"_uuid"` // _uuid tag is mandatory - Name string `ovsdb:"name"` - Ports []string `ovsdb:"ports"` - Config map[string]string `ovsdb:"other_config"` - } + type MyLogicalSwitch struct { + UUID string `ovsdb:"_uuid"` // _uuid tag is mandatory + Name string `ovsdb:"name"` + Ports []string `ovsdb:"ports"` + Config map[string]string `ovsdb:"other_config"` + } Based on these Models a Database Model (see ClientDBModel type) is built to represent the entire OVSDB: - clientDBModel, _ := client.NewClientDBModel("OVN_Northbound", - map[string]client.Model{ - "Logical_Switch": &MyLogicalSwitch{}, - }) + clientDBModel, _ := client.NewClientDBModel("OVN_Northbound", + map[string]client.Model{ + "Logical_Switch": &MyLogicalSwitch{}, + }) + The ClientDBModel represents the entire Database (or the part of it we're interested in). Using it, the libovsdb.client package is able to properly encode and decode OVSDB messages and store them in Model instances. A client instance is created by simply specifying the connection information and the database model: - ovs, _ := client.Connect(context.Background(), clientDBModel) + ovs, _ := client.Connect(context.Background(), clientDBModel) -# Main API +Main API After creating a OvsdbClient using the Connect() function, we can use a number of CRUD-like to interact with the database: @@ -42,7 +43,7 @@ and passed to client.Transact(). Others, such as List() and Get(), interact with the client's internal cache and are able to return Model instances (or a list thereof) directly. -# Conditions +Conditions Some API functions (Create() and Get()), can be run directly. Others, require us to use a ConditionalAPI. The ConditionalAPI injects RFC7047 Conditions into ovsdb Operations as well as @@ -110,7 +111,7 @@ cache element, an operation will be created matching on the "_uuid" column. The quite large depending on the cache size and the provided function. Most likely there is a way to express the same condition using Where() or WhereAll() which will be more efficient. -# Get +Get Get() operation is a simple operation capable of retrieving one Model based on some of its schema indexes. E.g: @@ -118,7 +119,7 @@ Get() operation is a simple operation capable of retrieving one Model based on s err := ovs.Get(ls) fmt.Printf("Name of the switch is: &s", ls.Name) -# List +List List() searches the cache and populates a slice of Models. It can be used directly or using WhereCache() @@ -130,7 +131,7 @@ List() searches the cache and populates a slice of Models. It can be used direct return strings.HasPrefix(ls.Name, "ext_") }).List(lsList) -# Create +Create Create returns a list of operations to create the models provided. E.g: @@ -142,7 +143,7 @@ Update returns a list of operations to update the matching rows to match the val ls := &LogicalSwitch{ExternalIDs: map[string]string {"foo": "bar"}} ops, err := ovs.Where(...).Update(&ls, &ls.ExternalIDs} -# Mutate +Mutate Mutate returns a list of operations needed to mutate the matching rows as described by the list of Mutation objects. E.g: @@ -153,10 +154,11 @@ Mutate returns a list of operations needed to mutate the matching rows as descri Value: map[string]string{"foo":"bar"}, }) -# Delete +Delete Delete returns a list of operations needed to delete the matching rows. E.g: ops, err := ovs.Where(...).Delete() + */ package client diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/monitor.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/monitor.go index 09fca8f3f0..767a4cf3d6 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/monitor.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/monitor.go @@ -68,7 +68,7 @@ type TableMonitor struct { Fields []string } -func newTableMonitor(o *ovsdbClient, m model.Model, conditions []model.Condition, fields []any) (*TableMonitor, error) { +func newTableMonitor(o *ovsdbClient, m model.Model, conditions []model.Condition, fields []interface{}) (*TableMonitor, error) { dbModel := o.primaryDB().model tableName := dbModel.FindTable(reflect.TypeOf(m)) if tableName == "" { @@ -113,7 +113,7 @@ func newTableMonitor(o *ovsdbClient, m model.Model, conditions []model.Condition }, nil } -func WithTable(m model.Model, fields ...any) MonitorOption { +func WithTable(m model.Model, fields ...interface{}) MonitorOption { return func(o *ovsdbClient, monitor *Monitor) error { tableMonitor, err := newTableMonitor(o, m, []model.Condition{}, fields) if err != nil { @@ -124,7 +124,7 @@ func WithTable(m model.Model, fields ...any) MonitorOption { } } -func WithConditionalTable(m model.Model, conditions []model.Condition, fields ...any) MonitorOption { +func WithConditionalTable(m model.Model, conditions []model.Condition, fields ...interface{}) MonitorOption { return func(o *ovsdbClient, monitor *Monitor) error { tableMonitor, err := newTableMonitor(o, m, conditions, fields) if err != nil { diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/options.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/options.go index 93e7d5b874..81ccffe203 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/options.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/options.go @@ -2,7 +2,6 @@ package client import ( "crypto/tls" - "errors" "net/url" "time" @@ -22,7 +21,6 @@ type options struct { tlsConfig *tls.Config reconnect bool leaderOnly bool - validateModel bool timeout time.Duration backoff backoff.BackOff logger *logr.Logger @@ -122,9 +120,6 @@ func WithReconnect(timeout time.Duration, backoff backoff.BackOff) Option { func WithInactivityCheck(inactivityTimeout, reconnectTimeout time.Duration, reconnectBackoff backoff.BackOff) Option { return func(o *options) error { - if reconnectTimeout >= inactivityTimeout { - return errors.New("inactivity timeout value should be greater than reconnect timeout value") - } o.reconnect = true o.timeout = reconnectTimeout o.backoff = reconnectBackoff @@ -167,15 +162,3 @@ func WithMetricsRegistryNamespaceSubsystem(r prometheus.Registerer, namespace, s return nil } } - -// WithValidateModel allows for client-side tag-based schema validation on API.Create(), API.Mutate() and API.Update() -// including following constraints -// - Integer/Real Ranges: Checks if a number is within the defined minInteger/maxInteger or minReal/maxReal bounds. -// - Length/Size Constraints: Verifies that strings, sets, and maps adhere to minLength and maxLength requirements. -// - Enumerations: Ensures that a value is one of the predefined choices in a schema enum. -func WithValidateModel() Option { - return func(o *options) error { - o.validateModel = true - return nil - } -} diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/validation.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/validation.go deleted file mode 100644 index be41432e34..0000000000 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/client/validation.go +++ /dev/null @@ -1,123 +0,0 @@ -package client - -import ( - "errors" - "fmt" - "reflect" - "strings" - - "github.com/ovn-kubernetes/libovsdb/mapper" - - "github.com/go-playground/validator/v10" - "github.com/ovn-kubernetes/libovsdb/model" -) - -// global validator instance -// Validator is designed to be thread-safe and used as a singleton instance. https://pkg.go.dev/github.com/go-playground/validator/v10#hdr-Singleton -var validate *validator.Validate - -func init() { - validate = validator.New(validator.WithRequiredStructEnabled()) - // Register custom validations if needed in the future - // e.g., validate.RegisterValidation("custom_tag", customValidationFunc) -} - -// formatValidationErrors formats validator.ValidationErrors into a detailed human-readable string -func formatValidationErrors(modelName string, context string, validationErrs validator.ValidationErrors) string { - var sb strings.Builder - sb.WriteString(fmt.Sprintf("validation error for model %s", modelName)) - - // Append context if provided (e.g., "mutation on column X") - if context != "" { - sb.WriteString(fmt.Sprintf(": %s", context)) - } - - if len(validationErrs) > 0 { - sb.WriteString("; details: [") - var fieldErrorMessages []string - for _, fe := range validationErrs { - targetField := fe.Namespace() // e.g., "Model.Field" or "Model.Nested.Field" - // For validate.Var on simple type, Namespace might be empty. - if targetField == "" { - targetField = fe.Field() // Fallback to field name if any - } - if targetField == "" { // If still empty, use a generic term - targetField = "" - } - - errMsg := fmt.Sprintf("field '%s' (value: '%v') failed on rule '%s'", targetField, fe.Value(), fe.ActualTag()) - if fe.Param() != "" { - errMsg += fmt.Sprintf(" (param: %s)", fe.Param()) - } - fieldErrorMessages = append(fieldErrorMessages, errMsg) - } - sb.WriteString(strings.Join(fieldErrorMessages, ", ")) - sb.WriteString("]") - } - return sb.String() -} - -// validateModel performs validation on a given model struct using its tags. -func validateModel(m model.Model) error { - if m == nil { - return fmt.Errorf("model cannot be nil") - } - - // Perform the validation - err := validate.Struct(m) - if err != nil { - modelType := reflect.TypeOf(m).Elem() - modelNameStr := modelType.String() - var validationErrs validator.ValidationErrors - if errors.As(err, &validationErrs) { - formattedErr := formatValidationErrors(modelNameStr, "", validationErrs) - return fmt.Errorf("model validation failed: %s: %w", formattedErr, validationErrs) - } - return fmt.Errorf("error while validating model of type %s: %w", modelNameStr, err) - } - return nil -} - -// validateMutations performs validation on a given slice of mutations. -func validateMutations(model model.Model, info *mapper.Info, mutations ...model.Mutation) error { - modelType := reflect.TypeOf(model).Elem() - modelNameStr := modelType.String() - - for _, mutation := range mutations { - columnName, err := info.ColumnByPtr(mutation.Field) - if err != nil { - return fmt.Errorf("could not get column for mutation field: %w", err) - } - // Find the struct field corresponding to the column name - var structField reflect.StructField - var found bool - for i := 0; i < modelType.NumField(); i++ { - if modelType.Field(i).Tag.Get("ovsdb") == columnName { - structField = modelType.Field(i) - found = true - break - } - } - if !found { - return fmt.Errorf("could not find struct field for column %s", columnName) - } - - // Extract the validate tag - validateTag := structField.Tag.Get("validate") - - // Validate the mutation value if a tag exists - if validateTag != "" { - err = validate.Var(mutation.Value, validateTag) - if err != nil { - var validationErrs validator.ValidationErrors - if errors.As(err, &validationErrs) { - context := fmt.Sprintf("mutation on column %s", columnName) - formattedErr := formatValidationErrors(modelNameStr, context, validationErrs) - return fmt.Errorf("mutation validation failed: %s: %w", formattedErr, validationErrs) - } - return fmt.Errorf("error while validating mutation for model of type %s on column %s: %w", modelNameStr, columnName, err) - } - } - } - return nil -} diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/database.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/database.go index 37246388a4..9bdb69568b 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/database.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/database.go @@ -27,7 +27,7 @@ type Transaction interface { // Update abstracts an update that can be committed to a database type Update interface { GetUpdatedTables() []string - ForEachModelUpdate(table string, do func(uuid string, old, newModel model.Model) error) error + ForEachModelUpdate(table string, do func(uuid string, old, new model.Model) error) error ForEachRowUpdate(table string, do func(uuid string, row ovsdb.RowUpdate2) error) error ForReferenceUpdates(do func(references References) error) error } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/inmemory/inmemory.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/inmemory/inmemory.go index ab2f9d5a39..763dcd7fd0 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/inmemory/inmemory.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/inmemory/inmemory.go @@ -2,9 +2,12 @@ package inmemory import ( "fmt" + "log" + "os" "sync" "github.com/go-logr/logr" + "github.com/go-logr/stdr" "github.com/google/uuid" "github.com/ovn-kubernetes/libovsdb/cache" dbase "github.com/ovn-kubernetes/libovsdb/database" @@ -21,13 +24,14 @@ type inMemoryDatabase struct { mutex sync.RWMutex } -func NewDatabase(models map[string]model.ClientDBModel, logger *logr.Logger) dbase.Database { +func NewDatabase(models map[string]model.ClientDBModel) dbase.Database { + logger := stdr.NewWithOptions(log.New(os.Stderr, "", log.LstdFlags), stdr.Options{LogCaller: stdr.All}).WithName("database") return &inMemoryDatabase{ databases: make(map[string]*cache.TableCache), models: models, references: make(map[string]dbase.References), mutex: sync.RWMutex{}, - logger: logger, + logger: &logger, } } @@ -70,7 +74,7 @@ func (db *inMemoryDatabase) Exists(name string) bool { return ok } -func (db *inMemoryDatabase) Commit(database string, _ uuid.UUID, update dbase.Update) error { +func (db *inMemoryDatabase) Commit(database string, id uuid.UUID, update dbase.Update) error { if !db.Exists(database) { return fmt.Errorf("db does not exist") } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/transaction/transaction.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/transaction/transaction.go index 4afa4d5b2d..77b8e920c0 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/transaction/transaction.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/database/transaction/transaction.go @@ -169,9 +169,9 @@ func (t *Transaction) Transact(operations ...ovsdb.Operation) ([]*ovsdb.Operatio func (t *Transaction) applyReferenceUpdates(update updates.ModelUpdates) error { tables := update.GetUpdatedTables() for _, table := range tables { - err := update.ForEachModelUpdate(table, func(uuid string, old, newModel model.Model) error { + err := update.ForEachModelUpdate(table, func(uuid string, old, new model.Model) error { // track deleted rows due to reference updates - if old != nil && newModel == nil { + if old != nil && new == nil { t.DeletedRows[uuid] = struct{}{} } // warm the cache with updated and deleted rows due to reference @@ -302,7 +302,7 @@ func (t *Transaction) Insert(op *ovsdb.Operation) (ovsdb.OperationResult, *updat return result, &update } -func (t *Transaction) Select(table string, where []ovsdb.Condition, _ []string) ovsdb.OperationResult { +func (t *Transaction) Select(table string, where []ovsdb.Condition, columns []string) ovsdb.OperationResult { var results []ovsdb.Row dbModel := t.Model @@ -479,7 +479,7 @@ Loop: return ovsdb.ResultFromError(&ovsdb.TimedOut{}) } -func (t *Transaction) Commit(_ bool) ovsdb.OperationResult { +func (t *Transaction) Commit(durable bool) ovsdb.OperationResult { return ovsdb.ResultFromError(&ovsdb.NotSupported{}) } @@ -487,10 +487,10 @@ func (t *Transaction) Abort() ovsdb.OperationResult { return ovsdb.ResultFromError(&ovsdb.NotSupported{}) } -func (t *Transaction) Comment(_ string) ovsdb.OperationResult { +func (t *Transaction) Comment(comment string) ovsdb.OperationResult { return ovsdb.ResultFromError(&ovsdb.NotSupported{}) } -func (t *Transaction) Assert(_ string) ovsdb.OperationResult { +func (t *Transaction) Assert(lock string) ovsdb.OperationResult { return ovsdb.ResultFromError(&ovsdb.NotSupported{}) } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/mapper/info.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/mapper/info.go index 73804a61e7..0e24ef25ec 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/mapper/info.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/mapper/info.go @@ -28,7 +28,7 @@ func NewErrColumnNotFound(column, table string) *ErrColumnNotFound { // Info is a struct that wraps an object with its metadata type Info struct { // FieldName indexed by column - Obj any + Obj interface{} Metadata Metadata } @@ -40,7 +40,7 @@ type Metadata struct { } // FieldByColumn returns the field value that corresponds to a column -func (i *Info) FieldByColumn(column string) (any, error) { +func (i *Info) FieldByColumn(column string) (interface{}, error) { fieldName, ok := i.Metadata.Fields[column] if !ok { return nil, NewErrColumnNotFound(column, i.Metadata.TableName) @@ -55,7 +55,7 @@ func (i *Info) hasColumn(column string) bool { } // SetField sets the field in the column to the specified value -func (i *Info) SetField(column string, value any) error { +func (i *Info) SetField(column string, value interface{}) error { fieldName, ok := i.Metadata.Fields[column] if !ok { return fmt.Errorf("SetField: column %s not found in orm info", column) @@ -71,7 +71,7 @@ func (i *Info) SetField(column string, value any) error { } // ColumnByPtr returns the column name that corresponds to the field by the field's pointer -func (i *Info) ColumnByPtr(fieldPtr any) (string, error) { +func (i *Info) ColumnByPtr(fieldPtr interface{}) (string, error) { fieldPtrVal := reflect.ValueOf(fieldPtr) if fieldPtrVal.Kind() != reflect.Ptr { return "", ovsdb.NewErrWrongType("ColumnByPointer", "pointer to a field in the struct", fieldPtr) @@ -124,7 +124,7 @@ OUTER: } // NewInfo creates a MapperInfo structure around an object based on a given table schema -func NewInfo(tableName string, table *ovsdb.TableSchema, obj any) (*Info, error) { +func NewInfo(tableName string, table *ovsdb.TableSchema, obj interface{}) (*Info, error) { objPtrVal := reflect.ValueOf(obj) if objPtrVal.Type().Kind() != reflect.Ptr { return nil, ovsdb.NewErrWrongType("NewMapperInfo", "pointer to a struct", obj) diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/mapper/mapper.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/mapper/mapper.go index bf971fe71e..24ce7b3b8c 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/mapper/mapper.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/mapper/mapper.go @@ -12,14 +12,12 @@ import ( // to what column in the database id through field a field tag. // The tag used is "ovsdb" and has the following structure // 'ovsdb:"${COLUMN_NAME}"' -// // where COLUMN_NAME is the name of the column and must match the schema // -// Example: -// -// type MyObj struct { -// Name string `ovsdb:"name"` -// } +//Example: +// type MyObj struct { +// Name string `ovsdb:"name"` +// } type Mapper struct { Schema ovsdb.DatabaseSchema } @@ -54,7 +52,7 @@ func (m Mapper) GetRowData(row *ovsdb.Row, result *Info) error { return m.getData(*row, result) } -// getData transforms a map[string]any containing OvS types (e.g: a ResultRow +// getData transforms a map[string]interface{} containing OvS types (e.g: a ResultRow // has this format) to orm struct // The result object must be given as pointer to an object with the right tags func (m Mapper) getData(ovsData ovsdb.Row, result *Info) error { @@ -83,16 +81,16 @@ func (m Mapper) getData(ovsData ovsdb.Row, result *Info) error { return nil } -// NewRow transforms an orm struct to a map[string] any that can be used as libovsdb.Row +// NewRow transforms an orm struct to a map[string] interface{} that can be used as libovsdb.Row // By default, default or null values are skipped. This behavior can be modified by specifying // a list of fields (pointers to fields in the struct) to be added to the row -func (m Mapper) NewRow(data *Info, fields ...any) (ovsdb.Row, error) { +func (m Mapper) NewRow(data *Info, fields ...interface{}) (ovsdb.Row, error) { columns := make(map[string]*ovsdb.ColumnSchema) for k, v := range data.Metadata.TableSchema.Columns { columns[k] = v } columns["_uuid"] = &ovsdb.UUIDColumn - ovsRow := make(map[string]any, len(columns)) + ovsRow := make(map[string]interface{}, len(columns)) for name, column := range columns { nativeElem, err := data.FieldByColumn(name) if err != nil { @@ -137,7 +135,7 @@ func (m Mapper) NewRow(data *Info, fields ...any) (ovsdb.Row, error) { // object has valid data. The order in which they are traversed matches the order defined // in the schema. // By `valid data` we mean non-default data. -func (m Mapper) NewEqualityCondition(data *Info, fields ...any) ([]ovsdb.Condition, error) { +func (m Mapper) NewEqualityCondition(data *Info, fields ...interface{}) ([]ovsdb.Condition, error) { var conditions []ovsdb.Condition var condIndex [][]string @@ -187,7 +185,7 @@ func (m Mapper) NewEqualityCondition(data *Info, fields ...any) ([]ovsdb.Conditi // EqualFields compares two mapped objects. // The indexes to use for comparison are, the _uuid, the table indexes and the columns that correspond // to the mapped fields pointed to by 'fields'. They must be pointers to fields on the first mapped element (i.e: one) -func (m Mapper) EqualFields(one, other *Info, fields ...any) (bool, error) { +func (m Mapper) EqualFields(one, other *Info, fields ...interface{}) (bool, error) { indexes := []string{} for _, f := range fields { col, err := one.ColumnByPtr(f) @@ -200,7 +198,7 @@ func (m Mapper) EqualFields(one, other *Info, fields ...any) (bool, error) { } // NewCondition returns a ovsdb.Condition based on the model -func (m Mapper) NewCondition(data *Info, field any, function ovsdb.ConditionFunction, value any) (*ovsdb.Condition, error) { +func (m Mapper) NewCondition(data *Info, field interface{}, function ovsdb.ConditionFunction, value interface{}) (*ovsdb.Condition, error) { column, err := data.ColumnByPtr(field) if err != nil { return nil, err @@ -228,7 +226,7 @@ func (m Mapper) NewCondition(data *Info, field any, function ovsdb.ConditionFunc // NewMutation creates a RFC7047 mutation object based on an ORM object and the mutation fields (in native format) // It takes care of field validation against the column type -func (m Mapper) NewMutation(data *Info, column string, mutator ovsdb.Mutator, value any) (*ovsdb.Mutation, error) { +func (m Mapper) NewMutation(data *Info, column string, mutator ovsdb.Mutator, value interface{}) (*ovsdb.Mutation, error) { // Check the column exists in the object if !data.hasColumn(column) { return nil, fmt.Errorf("mutation contains column %s that does not exist in object %v", column, data) @@ -242,7 +240,7 @@ func (m Mapper) NewMutation(data *Info, column string, mutator ovsdb.Mutator, va return nil, err } - var ovsValue any + var ovsValue interface{} var err error // Usually a mutation value is of the same type of the value being mutated // except for delete mutation of maps where it can also be a list of same type of diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/client.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/client.go index 2701bc5829..e8a39260e9 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/client.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/client.go @@ -11,7 +11,7 @@ import ( // ColumnKey addresses a column and optionally a key within a column type ColumnKey struct { Column string - Key any + Key interface{} } // ClientIndex defines a client index by a set of columns @@ -36,13 +36,6 @@ func (db ClientDBModel) newModel(table string) (Model, error) { return model.Interface().(Model), nil } -// Types returns the ClientDBModel Types -// The ClientDBModel types is a map of reflect.Types indexed by string -// The reflect.Type is a pointer to a struct that contains 'ovs' tags. -func (db ClientDBModel) Types() map[string]reflect.Type { - return db.types -} - // Name returns the database name func (db ClientDBModel) Name() string { return db.name diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/database.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/database.go index 985ca5a90e..30ccff67b1 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/database.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/database.go @@ -106,7 +106,7 @@ func generateModelInfo(dbSchema ovsdb.DatabaseSchema, modelTypes map[string]refl } // NewModelInfo returns a mapper.Info object based on a provided model -func (db DatabaseModel) NewModelInfo(obj any) (*mapper.Info, error) { +func (db DatabaseModel) NewModelInfo(obj interface{}) (*mapper.Info, error) { meta, ok := db.metadata[reflect.TypeOf(obj)] if !ok { return nil, ovsdb.NewErrWrongType("NewModelInfo", "type that is part of the DatabaseModel", obj) diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/model.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/model.go index ea267ec54a..249db69921 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/model.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/model/model.go @@ -16,14 +16,13 @@ import ( // The struct may also have non-tagged fields (which will be ignored by the API calls) // The Model interface must be implemented by the pointer to such type // Example: -// -// type MyLogicalRouter struct { -// UUID string `ovsdb:"_uuid"` -// Name string `ovsdb:"name"` -// ExternalIDs map[string]string `ovsdb:"external_ids"` -// LoadBalancers []string `ovsdb:"load_balancer"` -// } -type Model any +//type MyLogicalRouter struct { +// UUID string `ovsdb:"_uuid"` +// Name string `ovsdb:"name"` +// ExternalIDs map[string]string `ovsdb:"external_ids"` +// LoadBalancers []string `ovsdb:"load_balancer"` +//} +type Model interface{} type CloneableModel interface { CloneModel() Model @@ -81,21 +80,21 @@ func modelSetUUID(model Model, uuid string) error { // Condition is a model-based representation of an OVSDB Condition type Condition struct { // Pointer to the field of the model where the operation applies - Field any + Field interface{} // Condition function Function ovsdb.ConditionFunction // Value to use in the condition - Value any + Value interface{} } // Mutation is a model-based representation of an OVSDB Mutation type Mutation struct { // Pointer to the field of the model that shall be mutated - Field any + Field interface{} // String representing the mutator (as per RFC7047) Mutator ovsdb.Mutator // Value to use in the mutation - Value any + Value interface{} } // CreateModel creates a new Model instance based on an OVSDB Row information diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/bindings.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/bindings.go index 14b733d727..aebe2c2d0a 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/bindings.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/bindings.go @@ -16,7 +16,7 @@ var ( type ErrWrongType struct { from string expected string - got any + got interface{} } func (e *ErrWrongType) Error() string { @@ -25,7 +25,7 @@ func (e *ErrWrongType) Error() string { } // NewErrWrongType creates a new ErrWrongType -func NewErrWrongType(from, expected string, got any) error { +func NewErrWrongType(from, expected string, got interface{}) error { return &ErrWrongType{ from: from, expected: expected, @@ -73,7 +73,7 @@ func NativeType(column *ColumnSchema) reflect.Type { keyType := NativeTypeFromAtomic(column.TypeObj.Key.Type) // optional type if column.TypeObj.Min() == 0 && column.TypeObj.Max() == 1 { - return reflect.PointerTo(keyType) + return reflect.PtrTo(keyType) } // non-optional type with max 1 if column.TypeObj.Min() == 1 && column.TypeObj.Max() == 1 { @@ -86,7 +86,7 @@ func NativeType(column *ColumnSchema) reflect.Type { } // OvsToNativeAtomic returns the native type of the basic ovs type -func OvsToNativeAtomic(basicType string, ovsElem any) (any, error) { +func OvsToNativeAtomic(basicType string, ovsElem interface{}) (interface{}, error) { switch basicType { case TypeReal, TypeString, TypeBoolean: naType := NativeTypeFromAtomic(basicType) @@ -112,7 +112,7 @@ func OvsToNativeAtomic(basicType string, ovsElem any) (any, error) { } } -func OvsToNativeSlice(baseType string, ovsElem any) (any, error) { +func OvsToNativeSlice(baseType string, ovsElem interface{}) (interface{}, error) { naType := NativeTypeFromAtomic(baseType) var nativeSet reflect.Value switch ovsSet := ovsElem.(type) { @@ -139,7 +139,7 @@ func OvsToNativeSlice(baseType string, ovsElem any) (any, error) { } // OvsToNative transforms an ovs type to native one based on the column type information -func OvsToNative(column *ColumnSchema, ovsElem any) (any, error) { +func OvsToNative(column *ColumnSchema, ovsElem interface{}) (interface{}, error) { switch column.Type { case TypeReal, TypeString, TypeBoolean, TypeInteger, TypeUUID: return OvsToNativeAtomic(column.Type, ovsElem) @@ -147,7 +147,7 @@ func OvsToNative(column *ColumnSchema, ovsElem any) (any, error) { return OvsToNativeAtomic(column.TypeObj.Key.Type, ovsElem) case TypeSet: naType := NativeType(column) - // The inner slice is []any + // The inner slice is []interface{} // We need to convert it to the real type os slice switch naType.Kind() { case reflect.Ptr: @@ -186,7 +186,7 @@ func OvsToNative(column *ColumnSchema, ovsElem any) (any, error) { if !ok { return nil, NewErrWrongType("OvsToNative", "OvsMap", ovsElem) } - // The inner slice is map[interface]any + // The inner slice is map[interface]interface{} // We need to convert it to the real type os slice nativeMap := reflect.MakeMapWithSize(naType, len(ovsMap.GoMap)) for k, v := range ovsMap.GoMap { @@ -207,7 +207,7 @@ func OvsToNative(column *ColumnSchema, ovsElem any) (any, error) { } // NativeToOvsAtomic returns the OVS type of the atomic native value -func NativeToOvsAtomic(basicType string, nativeElem any) (any, error) { +func NativeToOvsAtomic(basicType string, nativeElem interface{}) (interface{}, error) { naType := NativeTypeFromAtomic(basicType) if reflect.TypeOf(nativeElem) != naType { return nil, NewErrWrongType("NativeToOvsAtomic", naType.String(), nativeElem) @@ -221,7 +221,7 @@ func NativeToOvsAtomic(basicType string, nativeElem any) (any, error) { } // NativeToOvs transforms an native type to a ovs type based on the column type information -func NativeToOvs(column *ColumnSchema, rawElem any) (any, error) { +func NativeToOvs(column *ColumnSchema, rawElem interface{}) (interface{}, error) { naType := NativeType(column) if t := reflect.TypeOf(rawElem); t != naType { return nil, NewErrWrongType("NativeToOvs", naType.String(), rawElem) @@ -235,7 +235,7 @@ func NativeToOvs(column *ColumnSchema, rawElem any) (any, error) { case TypeSet: var ovsSet OvsSet if column.TypeObj.Key.Type == TypeUUID { - ovsSlice := []any{} + ovsSlice := []interface{}{} if _, ok := rawElem.([]string); ok { for _, v := range rawElem.([]string) { uuid := UUID{GoUUID: v} @@ -262,7 +262,7 @@ func NativeToOvs(column *ColumnSchema, rawElem any) (any, error) { return ovsSet, nil case TypeMap: nativeMapVal := reflect.ValueOf(rawElem) - ovsMap := make(map[any]any, nativeMapVal.Len()) + ovsMap := make(map[interface{}]interface{}, nativeMapVal.Len()) for _, key := range nativeMapVal.MapKeys() { ovsKey, err := NativeToOvsAtomic(column.TypeObj.Key.Type, key.Interface()) if err != nil { @@ -283,7 +283,7 @@ func NativeToOvs(column *ColumnSchema, rawElem any) (any, error) { // IsDefaultValue checks if a provided native element corresponds to the default value of its // designated column type -func IsDefaultValue(column *ColumnSchema, nativeElem any) bool { +func IsDefaultValue(column *ColumnSchema, nativeElem interface{}) bool { switch column.Type { case TypeEnum: return isDefaultBaseValue(nativeElem, column.TypeObj.Key.Type) @@ -293,7 +293,7 @@ func IsDefaultValue(column *ColumnSchema, nativeElem any) bool { } // ValidateMutationAtomic checks if the mutation is valid for a specific AtomicType -func validateMutationAtomic(atype string, mutator Mutator, value any) error { +func validateMutationAtomic(atype string, mutator Mutator, value interface{}) error { nType := NativeTypeFromAtomic(atype) if reflect.TypeOf(value) != nType { return NewErrWrongType(fmt.Sprintf("Mutation of atomic type %s", atype), nType.String(), value) @@ -323,7 +323,7 @@ func validateMutationAtomic(atype string, mutator Mutator, value any) error { // ValidateMutation checks if the mutation value and mutator string area appropriate // for a given column based on the rules specified RFC7047 -func ValidateMutation(column *ColumnSchema, mutator Mutator, value any) error { +func ValidateMutation(column *ColumnSchema, mutator Mutator, value interface{}) error { if !column.Mutable() { return fmt.Errorf("column is not mutable") } @@ -377,7 +377,7 @@ func ValidateMutation(column *ColumnSchema, mutator Mutator, value any) error { } } -func ValidateCondition(column *ColumnSchema, function ConditionFunction, nativeValue any) error { +func ValidateCondition(column *ColumnSchema, function ConditionFunction, nativeValue interface{}) error { if NativeType(column) != reflect.TypeOf(nativeValue) { return NewErrWrongType(fmt.Sprintf("Condition for column %s", column), NativeType(column).String(), nativeValue) @@ -399,7 +399,7 @@ func ValidateCondition(column *ColumnSchema, function ConditionFunction, nativeV } } -func isDefaultBaseValue(elem any, etype ExtendedType) bool { +func isDefaultBaseValue(elem interface{}, etype ExtendedType) bool { value := reflect.ValueOf(elem) if !value.IsValid() { return true diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/condition.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/condition.go index 326e695548..783ac0f554 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/condition.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/condition.go @@ -37,7 +37,7 @@ const ( type Condition struct { Column string Function ConditionFunction - Value any + Value interface{} } func (c Condition) String() string { @@ -45,7 +45,7 @@ func (c Condition) String() string { } // NewCondition returns a new condition -func NewCondition(column string, function ConditionFunction, value any) Condition { +func NewCondition(column string, function ConditionFunction, value interface{}) Condition { return Condition{ Column: column, Function: function, @@ -55,13 +55,13 @@ func NewCondition(column string, function ConditionFunction, value any) Conditio // MarshalJSON marshals a condition to a 3 element JSON array func (c Condition) MarshalJSON() ([]byte, error) { - v := []any{c.Column, c.Function, c.Value} + v := []interface{}{c.Column, c.Function, c.Value} return json.Marshal(v) } // UnmarshalJSON converts a 3 element JSON array to a Condition func (c *Condition) UnmarshalJSON(b []byte) error { - var v []any + var v []interface{} err := json.Unmarshal(b, &v) if err != nil { return err @@ -95,7 +95,7 @@ func (c *Condition) UnmarshalJSON(b []byte) error { // Evaluate will evaluate the condition on the two provided values // The conditions operately differently depending on the type of // the provided values. The behavior is as described in RFC7047 -func (c ConditionFunction) Evaluate(a any, b any) (bool, error) { +func (c ConditionFunction) Evaluate(a interface{}, b interface{}) (bool, error) { x := reflect.ValueOf(a) y := reflect.ValueOf(b) if x.Kind() != y.Kind() { diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/map.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/map.go index a80bfa16fc..893a9774fc 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/map.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/map.go @@ -14,16 +14,16 @@ import ( // values in the map. All of the s must have the same key and // value types. type OvsMap struct { - GoMap map[any]any + GoMap map[interface{}]interface{} } // MarshalJSON marshalls an OVSDB style Map to a byte array func (o OvsMap) MarshalJSON() ([]byte, error) { if len(o.GoMap) > 0 { - var ovsMap, innerMap []any + var ovsMap, innerMap []interface{} ovsMap = append(ovsMap, "map") for key, val := range o.GoMap { - var mapSeg []any + var mapSeg []interface{} mapSeg = append(mapSeg, key) mapSeg = append(mapSeg, val) innerMap = append(innerMap, mapSeg) @@ -36,16 +36,16 @@ func (o OvsMap) MarshalJSON() ([]byte, error) { // UnmarshalJSON unmarshals an OVSDB style Map from a byte array func (o *OvsMap) UnmarshalJSON(b []byte) (err error) { - var oMap []any - o.GoMap = make(map[any]any) + var oMap []interface{} + o.GoMap = make(map[interface{}]interface{}) if err := json.Unmarshal(b, &oMap); err == nil && len(oMap) > 1 { - innerSlice := oMap[1].([]any) + innerSlice := oMap[1].([]interface{}) for _, val := range innerSlice { - f := val.([]any) - var k any + f := val.([]interface{}) + var k interface{} switch f[0].(type) { - case []any: - vSet := f[0].([]any) + case []interface{}: + vSet := f[0].([]interface{}) if len(vSet) != 2 || vSet[0] == "map" { return &json.UnmarshalTypeError{Value: reflect.ValueOf(oMap).String(), Type: reflect.TypeOf(*o)} } @@ -58,8 +58,8 @@ func (o *OvsMap) UnmarshalJSON(b []byte) (err error) { k = f[0] } switch f[1].(type) { - case []any: - vSet := f[1].([]any) + case []interface{}: + vSet := f[1].([]interface{}) if len(vSet) != 2 || vSet[0] == "map" { return &json.UnmarshalTypeError{Value: reflect.ValueOf(oMap).String(), Type: reflect.TypeOf(*o)} } @@ -77,13 +77,13 @@ func (o *OvsMap) UnmarshalJSON(b []byte) (err error) { } // NewOvsMap will return an OVSDB style map from a provided Golang Map -func NewOvsMap(goMap any) (OvsMap, error) { +func NewOvsMap(goMap interface{}) (OvsMap, error) { v := reflect.ValueOf(goMap) if v.Kind() != reflect.Map { return OvsMap{}, fmt.Errorf("ovsmap supports only go map types") } - genMap := make(map[any]any) + genMap := make(map[interface{}]interface{}) keys := v.MapKeys() for _, key := range keys { genMap[key.Interface()] = v.MapIndex(key).Interface() diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/monitor_select.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/monitor_select.go index 58e57f7192..b97e062857 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/monitor_select.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/monitor_select.go @@ -11,12 +11,12 @@ type MonitorSelect struct { } // NewMonitorSelect returns a new MonitorSelect with the provided values -func NewMonitorSelect(withInitialState, withInserts, withDeletes, withModifies bool) *MonitorSelect { +func NewMonitorSelect(initial, insert, delete, modify bool) *MonitorSelect { return &MonitorSelect{ - initial: &withInitialState, - insert: &withInserts, - delete: &withDeletes, - modify: &withModifies, + initial: &initial, + insert: &insert, + delete: &delete, + modify: &modify, } } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/mutation.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/mutation.go index 66f8f047ac..dc8b0f6d4d 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/mutation.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/mutation.go @@ -28,11 +28,11 @@ const ( type Mutation struct { Column string Mutator Mutator - Value any + Value interface{} } // NewMutation returns a new mutation -func NewMutation(column string, mutator Mutator, value any) *Mutation { +func NewMutation(column string, mutator Mutator, value interface{}) *Mutation { return &Mutation{ Column: column, Mutator: mutator, @@ -42,13 +42,13 @@ func NewMutation(column string, mutator Mutator, value any) *Mutation { // MarshalJSON marshals a mutation to a 3 element JSON array func (m Mutation) MarshalJSON() ([]byte, error) { - v := []any{m.Column, m.Mutator, m.Value} + v := []interface{}{m.Column, m.Mutator, m.Value} return json.Marshal(v) } // UnmarshalJSON converts a 3 element JSON array to a Mutation func (m *Mutation) UnmarshalJSON(b []byte) error { - var v []any + var v []interface{} err := json.Unmarshal(b, &v) if err != nil { return err diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/named_uuid.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/named_uuid.go index f1b5956514..29034ee9d6 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/named_uuid.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/named_uuid.go @@ -82,7 +82,7 @@ func ExpandNamedUUIDs(ops []Operation, schema *DatabaseSchema) ([]Operation, err return ops, nil } -func expandColumnNamedUUIDs(tableSchema *TableSchema, tableName, columnName string, value any, uuidMap map[string]string) (any, error) { +func expandColumnNamedUUIDs(tableSchema *TableSchema, tableName, columnName string, value interface{}, uuidMap map[string]string) (interface{}, error) { column := tableSchema.Column(columnName) if column == nil { return nil, fmt.Errorf("column %q not found in table %q", columnName, tableName) @@ -90,7 +90,7 @@ func expandColumnNamedUUIDs(tableSchema *TableSchema, tableName, columnName stri return expandNamedUUID(column, value, uuidMap), nil } -func expandNamedUUID(column *ColumnSchema, value any, namedUUIDs map[string]string) any { +func expandNamedUUID(column *ColumnSchema, value interface{}, namedUUIDs map[string]string) interface{} { var keyType, valType ExtendedType switch column.Type { @@ -149,7 +149,7 @@ func expandNamedUUID(column *ColumnSchema, value any, namedUUIDs map[string]stri return value } -func expandNamedUUIDAtomic(valueType ExtendedType, value any, namedUUIDs map[string]string) (any, bool) { +func expandNamedUUIDAtomic(valueType ExtendedType, value interface{}, namedUUIDs map[string]string) (interface{}, bool) { if valueType == TypeUUID { if uuid, ok := value.(UUID); ok { if newUUID, ok := namedUUIDs[uuid.GoUUID]; ok { diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/notation.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/notation.go index c4beafaf16..afad87cdc4 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/notation.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/notation.go @@ -74,7 +74,7 @@ func (o Operation) MarshalJSON() ([]byte, error) { // MonitorRequests represents a group of monitor requests according to RFC7047 // We cannot use MonitorRequests by inlining the MonitorRequest Map structure till GoLang issue #6213 makes it. -// The only option is to go with raw map[string]any option :-( that sucks ! +// The only option is to go with raw map[string]interface{} option :-( that sucks ! // Refer to client.go : MonitorAll() function for more details type MonitorRequests struct { Requests map[string]MonitorRequest `json:"requests"` @@ -102,9 +102,9 @@ type OperationResult struct { Rows []Row `json:"rows,omitempty"` } -func ovsSliceToGoNotation(val any) (any, error) { +func ovsSliceToGoNotation(val interface{}) (interface{}, error) { switch sl := val.(type) { - case []any: + case []interface{}: bsliced, err := json.Marshal(sl) if err != nil { return nil, err diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/row.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/row.go index 809045ea09..9a253f74f1 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/row.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/row.go @@ -3,12 +3,12 @@ package ovsdb import "encoding/json" // Row is a table Row according to RFC7047 -type Row map[string]any +type Row map[string]interface{} // UnmarshalJSON unmarshalls a byte array to an OVSDB Row func (r *Row) UnmarshalJSON(b []byte) (err error) { - *r = make(map[string]any) - var raw map[string]any + *r = make(map[string]interface{}) + var raw map[string]interface{} err = json.Unmarshal(b, &raw) for key, val := range raw { val, err = ovsSliceToGoNotation(val) @@ -22,5 +22,5 @@ func (r *Row) UnmarshalJSON(b []byte) (err error) { // NewRow returns a new empty row func NewRow() Row { - return Row(make(map[string]any)) + return Row(make(map[string]interface{})) } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/rpc.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/rpc.go index e33480da41..f1e5980058 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/rpc.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/rpc.go @@ -10,21 +10,21 @@ const ( ) // NewEchoArgs creates a new set of arguments for an echo RPC -func NewEchoArgs() []any { - return []any{"libovsdb echo"} +func NewEchoArgs() []interface{} { + return []interface{}{"libovsdb echo"} } // NewGetSchemaArgs creates a new set of arguments for a get_schemas RPC -func NewGetSchemaArgs(schema string) []any { - return []any{schema} +func NewGetSchemaArgs(schema string) []interface{} { + return []interface{}{schema} } // NewTransactArgs creates a new set of arguments for a transact RPC -func NewTransactArgs(database string, operations ...Operation) []any { - dbSlice := make([]any, 1) +func NewTransactArgs(database string, operations ...Operation) []interface{} { + dbSlice := make([]interface{}, 1) dbSlice[0] = database - opsSlice := make([]any, len(operations)) + opsSlice := make([]interface{}, len(operations)) for i, d := range operations { opsSlice[i] = d } @@ -34,46 +34,46 @@ func NewTransactArgs(database string, operations ...Operation) []any { } // NewCancelArgs creates a new set of arguments for a cancel RPC -func NewCancelArgs(id any) []any { - return []any{id} +func NewCancelArgs(id interface{}) []interface{} { + return []interface{}{id} } // NewMonitorArgs creates a new set of arguments for a monitor RPC -func NewMonitorArgs(database string, value any, requests map[string]MonitorRequest) []any { - return []any{database, value, requests} +func NewMonitorArgs(database string, value interface{}, requests map[string]MonitorRequest) []interface{} { + return []interface{}{database, value, requests} } // NewMonitorCondSinceArgs creates a new set of arguments for a monitor_cond_since RPC -func NewMonitorCondSinceArgs(database string, value any, requests map[string]MonitorRequest, lastTransactionID string) []any { - return []any{database, value, requests, lastTransactionID} +func NewMonitorCondSinceArgs(database string, value interface{}, requests map[string]MonitorRequest, lastTransactionID string) []interface{} { + return []interface{}{database, value, requests, lastTransactionID} } // NewMonitorCancelArgs creates a new set of arguments for a monitor_cancel RPC -func NewMonitorCancelArgs(value any) []any { - return []any{value} +func NewMonitorCancelArgs(value interface{}) []interface{} { + return []interface{}{value} } // NewLockArgs creates a new set of arguments for a lock, steal or unlock RPC -func NewLockArgs(id any) []any { - return []any{id} +func NewLockArgs(id interface{}) []interface{} { + return []interface{}{id} } // NotificationHandler is the interface that must be implemented to receive notifications type NotificationHandler interface { // RFC 7047 section 4.1.6 Update Notification - Update(context any, tableUpdates TableUpdates) + Update(context interface{}, tableUpdates TableUpdates) // ovsdb-server.7 update2 notifications - Update2(context any, tableUpdates TableUpdates2) + Update2(context interface{}, tableUpdates TableUpdates2) // RFC 7047 section 4.1.9 Locked Notification - Locked([]any) + Locked([]interface{}) // RFC 7047 section 4.1.10 Stolen Notification - Stolen([]any) + Stolen([]interface{}) // RFC 7047 section 4.1.11 Echo Notification - Echo([]any) + Echo([]interface{}) Disconnected() } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/schema.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/schema.go index f59afa3581..285d1e02a0 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/schema.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/schema.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "math" "os" "strings" @@ -74,7 +75,7 @@ func (schema DatabaseSchema) Print(w io.Writer) { // SchemaFromFile returns a DatabaseSchema from a file func SchemaFromFile(f *os.File) (DatabaseSchema, error) { - data, err := io.ReadAll(f) + data, err := ioutil.ReadAll(f) if err != nil { return DatabaseSchema{}, err } @@ -196,7 +197,7 @@ const ( // BaseType is a base-type structure as per RFC7047 type BaseType struct { Type string - Enum []any + Enum []interface{} minReal *float64 maxReal *float64 minInteger *int @@ -324,16 +325,16 @@ func (b *BaseType) UnmarshalJSON(data []byte) error { } // temporary type to avoid recursive call to unmarshal var bt struct { - Type string `json:"type"` - Enum any `json:"enum,omitempty"` - MinReal *float64 `json:"minReal,omitempty"` - MaxReal *float64 `json:"maxReal,omitempty"` - MinInteger *int `json:"minInteger,omitempty"` - MaxInteger *int `json:"maxInteger,omitempty"` - MinLength *int `json:"minLength,omitempty"` - MaxLength *int `json:"maxLength,omitempty"` - RefTable *string `json:"refTable,omitempty"` - RefType *RefType `json:"refType,omitempty"` + Type string `json:"type"` + Enum interface{} `json:"enum,omitempty"` + MinReal *float64 `json:"minReal,omitempty"` + MaxReal *float64 `json:"maxReal,omitempty"` + MinInteger *int `json:"minInteger,omitempty"` + MaxInteger *int `json:"maxInteger,omitempty"` + MinLength *int `json:"minLength,omitempty"` + MaxLength *int `json:"maxLength,omitempty"` + RefTable *string `json:"refTable,omitempty"` + RefType *RefType `json:"refType,omitempty"` } err := json.Unmarshal(data, &bt) if err != nil { @@ -343,14 +344,14 @@ func (b *BaseType) UnmarshalJSON(data []byte) error { if bt.Enum != nil { // 'enum' is a list or a single element representing a list of exactly one element switch bt.Enum.(type) { - case []any: + case []interface{}: // it's an OvsSet - oSet := bt.Enum.([]any) - innerSet := oSet[1].([]any) - b.Enum = make([]any, len(innerSet)) + oSet := bt.Enum.([]interface{}) + innerSet := oSet[1].([]interface{}) + b.Enum = make([]interface{}, len(innerSet)) copy(b.Enum, innerSet) default: - b.Enum = []any{bt.Enum} + b.Enum = []interface{}{bt.Enum} } } b.Type = bt.Type @@ -439,10 +440,10 @@ func (c *ColumnType) UnmarshalJSON(data []byte) error { return nil } var colType struct { - Key *BaseType `json:"key"` - Value *BaseType `json:"value"` - Min *int `json:"min"` - Max any `json:"max"` + Key *BaseType `json:"key"` + Value *BaseType `json:"value"` + Min *int `json:"min"` + Max interface{} `json:"max"` } err := json.Unmarshal(data, &colType) if err != nil { diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/serverdb/database.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/serverdb/database.go index d3eb662898..a93ca0d86f 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/serverdb/database.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/serverdb/database.go @@ -24,7 +24,7 @@ type Database struct { Connected bool `ovsdb:"connected"` Index *int `ovsdb:"index"` Leader bool `ovsdb:"leader"` - Model DatabaseModel `ovsdb:"model" validate:"oneof='standalone' 'clustered' 'relay'"` + Model DatabaseModel `ovsdb:"model"` Name string `ovsdb:"name"` Schema *string `ovsdb:"schema"` Sid *string `ovsdb:"sid"` diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/set.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/set.go index 07dafaa6a6..ae1ec59ae2 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/set.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/set.go @@ -14,12 +14,12 @@ import ( // second element must be an array of zero or more s giving the // values in the set. All of the s must have the same type. type OvsSet struct { - GoSet []any + GoSet []interface{} } // NewOvsSet creates a new OVSDB style set from a Go interface (object) -func NewOvsSet(obj any) (OvsSet, error) { - ovsSet := make([]any, 0) +func NewOvsSet(obj interface{}) (OvsSet, error) { + ovsSet := make([]interface{}, 0) var v reflect.Value if reflect.TypeOf(obj).Kind() == reflect.Ptr { v = reflect.ValueOf(obj).Elem() @@ -59,7 +59,7 @@ func (o OvsSet) MarshalJSON() ([]byte, error) { case l == 1: return json.Marshal(o.GoSet[0]) case l > 0: - var oSet []any + var oSet []interface{} oSet = append(oSet, "set") oSet = append(oSet, o.GoSet) return json.Marshal(oSet) @@ -69,8 +69,8 @@ func (o OvsSet) MarshalJSON() ([]byte, error) { // UnmarshalJSON will unmarshal a JSON byte array to an OVSDB style Set func (o *OvsSet) UnmarshalJSON(b []byte) (err error) { - o.GoSet = make([]any, 0) - addToSet := func(o *OvsSet, v any) error { + o.GoSet = make([]interface{}, 0) + addToSet := func(o *OvsSet, v interface{}) error { goVal, err := ovsSliceToGoNotation(v) if err == nil { o.GoSet = append(o.GoSet, goVal) @@ -78,14 +78,14 @@ func (o *OvsSet) UnmarshalJSON(b []byte) (err error) { return err } - var inter any + var inter interface{} if err = json.Unmarshal(b, &inter); err != nil { return err } switch inter.(type) { - case []any: - var oSet []any - oSet = inter.([]any) + case []interface{}: + var oSet []interface{} + oSet = inter.([]interface{}) // it's a single uuid object if len(oSet) == 2 && (oSet[0] == "uuid" || oSet[0] == "named-uuid") { return addToSet(o, UUID{GoUUID: oSet[1].(string)}) @@ -94,7 +94,7 @@ func (o *OvsSet) UnmarshalJSON(b []byte) (err error) { // it is a slice, but is not a set return &json.UnmarshalTypeError{Value: reflect.ValueOf(inter).String(), Type: reflect.TypeOf(*o)} } - innerSet := oSet[1].([]any) + innerSet := oSet[1].([]interface{}) for _, val := range innerSet { err := addToSet(o, val) if err != nil { diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/update3.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/update3.go index 0766fda08c..a24ce64ad5 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/update3.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/ovsdb/update3.go @@ -12,7 +12,7 @@ type MonitorCondSinceReply struct { } func (m MonitorCondSinceReply) MarshalJSON() ([]byte, error) { - v := []any{m.Found, m.LastTransactionID, m.Updates} + v := []interface{}{m.Found, m.LastTransactionID, m.Updates} return json.Marshal(v) } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/server/monitor.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/server/monitor.go index 16c1737687..305769a212 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/server/monitor.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/server/monitor.go @@ -80,8 +80,8 @@ func (m *monitor) Send(update database.Update) { if len(tu) == 0 { return } - args := []any{json.RawMessage([]byte(m.id)), tu} - var reply any + args := []interface{}{json.RawMessage([]byte(m.id)), tu} + var reply interface{} err := m.client.Call("update2", args, &reply) if err != nil { log.Printf("client error handling update rpc: %v", err) @@ -97,8 +97,8 @@ func (m *monitor) Send2(update database.Update) { if len(tu) == 0 { return } - args := []any{json.RawMessage([]byte(m.id)), tu} - var reply any + args := []interface{}{json.RawMessage([]byte(m.id)), tu} + var reply interface{} err := m.client.Call("update2", args, &reply) if err != nil { log.Printf("client error handling update2 rpc: %v", err) @@ -114,8 +114,8 @@ func (m *monitor) Send3(id uuid.UUID, update database.Update) { if len(tu) == 0 { return } - args := []any{json.RawMessage([]byte(m.id)), id.String(), tu} - var reply any + args := []interface{}{json.RawMessage([]byte(m.id)), id.String(), tu} + var reply interface{} err := m.client.Call("update2", args, &reply) if err != nil { log.Printf("client error handling update3 rpc: %v", err) @@ -126,13 +126,13 @@ func filterColumns(row *ovsdb.Row, columns map[string]bool) *ovsdb.Row { if row == nil { return nil } - newRow := make(ovsdb.Row, len(*row)) + new := make(ovsdb.Row, len(*row)) for k, v := range *row { if _, ok := columns[k]; ok { - newRow[k] = v + new[k] = v } } - return &newRow + return &new } func (m *monitor) filter(update database.Update) ovsdb.TableUpdates { diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/server/server.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/server/server.go index 3496c149ef..830560fc36 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/server/server.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/server/server.go @@ -4,9 +4,10 @@ import ( "encoding/json" "errors" "fmt" + "log" "net" + "os" "sync" - "time" "github.com/cenkalti/rpc2" "github.com/cenkalti/rpc2/jsonrpc" @@ -31,11 +32,8 @@ type OvsdbServer struct { modelsMutex sync.RWMutex monitors map[*rpc2.Client]*connectionMonitors monitorMutex sync.RWMutex - logger *logr.Logger + logger logr.Logger txnMutex sync.Mutex - // Test-only fields for inducing delays - transactionDelay time.Duration - echoDelay time.Duration } func init() { @@ -43,14 +41,8 @@ func init() { } // NewOvsdbServer returns a new OvsdbServer -func NewOvsdbServer(db database.Database, logger *logr.Logger, models ...model.DatabaseModel) (*OvsdbServer, error) { - if logger == nil { - l := logr.Discard() - logger = &l - } else { - l := logger.WithName("ovsdb-server") - logger = &l - } +func NewOvsdbServer(db database.Database, models ...model.DatabaseModel) (*OvsdbServer, error) { + l := stdr.NewWithOptions(log.New(os.Stderr, "", log.LstdFlags), stdr.Options{LogCaller: stdr.All}).WithName("server") o := &OvsdbServer{ done: make(chan struct{}, 1), doEcho: true, @@ -59,7 +51,7 @@ func NewOvsdbServer(db database.Database, logger *logr.Logger, models ...model.D modelsMutex: sync.RWMutex{}, monitors: make(map[*rpc2.Client]*connectionMonitors), monitorMutex: sync.RWMutex{}, - logger: logger, + logger: l, } o.modelsMutex.Lock() for _, model := range models { @@ -102,20 +94,6 @@ func (o *OvsdbServer) DoEcho(ok bool) { o.readyMutex.Unlock() } -// SetTransactionDelay sets an artificial delay for transaction processing (test-only) -func (o *OvsdbServer) SetTransactionDelay(delay time.Duration) { - o.readyMutex.Lock() - o.transactionDelay = delay - o.readyMutex.Unlock() -} - -// SetEchoDelay sets an artificial delay for echo responses (test-only) -func (o *OvsdbServer) SetEchoDelay(delay time.Duration) { - o.readyMutex.Lock() - o.echoDelay = delay - o.readyMutex.Unlock() -} - // Serve starts the OVSDB server on the given path and protocol func (o *OvsdbServer) Serve(protocol string, path string) error { var err error @@ -174,7 +152,7 @@ func (o *OvsdbServer) Ready() bool { } // ListDatabases lists the databases in the current system -func (o *OvsdbServer) ListDatabases(_ *rpc2.Client, _ []any, reply *[]string) error { +func (o *OvsdbServer) ListDatabases(client *rpc2.Client, args []interface{}, reply *[]string) error { dbs := []string{} o.modelsMutex.RLock() for _, db := range o.models { @@ -185,7 +163,7 @@ func (o *OvsdbServer) ListDatabases(_ *rpc2.Client, _ []any, reply *[]string) er return nil } -func (o *OvsdbServer) GetSchema(_ *rpc2.Client, args []any, reply *ovsdb.DatabaseSchema, +func (o *OvsdbServer) GetSchema(client *rpc2.Client, args []interface{}, reply *ovsdb.DatabaseSchema, ) error { db, ok := args[0].(string) if !ok { @@ -202,20 +180,13 @@ func (o *OvsdbServer) GetSchema(_ *rpc2.Client, args []any, reply *ovsdb.Databas } // Transact issues a new database transaction and returns the results -func (o *OvsdbServer) Transact(_ *rpc2.Client, args []json.RawMessage, reply *[]*ovsdb.OperationResult) error { +func (o *OvsdbServer) Transact(client *rpc2.Client, args []json.RawMessage, reply *[]*ovsdb.OperationResult) error { // While allowing other rpc handlers to run in parallel, this ovsdb server expects transactions // to be serialized. The following mutex ensures that. // Ref: https://github.com/cenkalti/rpc2/blob/c1acbc6ec984b7ae6830b6a36b62f008d5aefc4c/client.go#L187 o.txnMutex.Lock() defer o.txnMutex.Unlock() - o.readyMutex.RLock() - delay := o.transactionDelay - o.readyMutex.RUnlock() - if delay > 0 { - time.Sleep(delay) - } - if len(args) < 2 { return fmt.Errorf("not enough args") } @@ -252,7 +223,7 @@ func (o *OvsdbServer) transact(name string, operations []ovsdb.Operation) ([]*ov } // Cancel cancels the last transaction -func (o *OvsdbServer) Cancel(_ *rpc2.Client, _ []any, _ *[]any) error { +func (o *OvsdbServer) Cancel(client *rpc2.Client, args []interface{}, reply *[]interface{}) error { return fmt.Errorf("not implemented") } @@ -395,41 +366,33 @@ func (o *OvsdbServer) MonitorCondSince(client *rpc2.Client, args []json.RawMessa } // MonitorCancel cancels a monitor on a given table -func (o *OvsdbServer) MonitorCancel(_ *rpc2.Client, _ []any, _ *[]any) error { +func (o *OvsdbServer) MonitorCancel(client *rpc2.Client, args []interface{}, reply *[]interface{}) error { return fmt.Errorf("not implemented") } // Lock acquires a lock on a table for a the client -func (o *OvsdbServer) Lock(_ *rpc2.Client, _ []any, _ *[]any) error { +func (o *OvsdbServer) Lock(client *rpc2.Client, args []interface{}, reply *[]interface{}) error { return fmt.Errorf("not implemented") } // Steal steals a lock for a client -func (o *OvsdbServer) Steal(_ *rpc2.Client, _ []any, _ *[]any) error { +func (o *OvsdbServer) Steal(client *rpc2.Client, args []interface{}, reply *[]interface{}) error { return fmt.Errorf("not implemented") } // Unlock releases a lock for a client -func (o *OvsdbServer) Unlock(_ *rpc2.Client, _ []any, _ *[]any) error { +func (o *OvsdbServer) Unlock(client *rpc2.Client, args []interface{}, reply *[]interface{}) error { return fmt.Errorf("not implemented") } // Echo tests the liveness of the connection -func (o *OvsdbServer) Echo(_ *rpc2.Client, args []any, reply *[]any) error { +func (o *OvsdbServer) Echo(client *rpc2.Client, args []interface{}, reply *[]interface{}) error { o.readyMutex.Lock() - doEcho := o.doEcho - echoDelay := o.echoDelay - o.readyMutex.Unlock() - - if !doEcho { + defer o.readyMutex.Unlock() + if !o.doEcho { return fmt.Errorf("no echo reply") } - - if echoDelay > 0 { - time.Sleep(echoDelay) - } - - echoReply := make([]any, len(args)) + echoReply := make([]interface{}, len(args)) copy(echoReply, args) *reply = echoReply return nil diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/difference.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/difference.go index f78a9ce628..7ebfe8bb51 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/difference.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/difference.go @@ -8,13 +8,13 @@ import "reflect" // The result is calculated in 'a' in-place and returned unless the // difference is 'b' in which case 'b' is returned unmodified. Also returns a // boolean indicating if there is an actual difference. -func difference(a, b any) (any, bool) { +func difference(a, b interface{}) (interface{}, bool) { return mergeDifference(nil, a, b) } // applyDifference returns the result of applying difference 'd' to value 'v' // along with a boolean indicating if 'v' was changed. -func applyDifference(v, d any) (any, bool) { +func applyDifference(v, d interface{}) (interface{}, bool) { if d == nil { return v, false } @@ -48,7 +48,7 @@ func applyDifference(v, d any) (any, bool) { // The result is calculated in 'a' in-place and returned unless the result is // 'b' in which case 'b' is returned unmodified. Also returns a boolean // indicating if there is an actual difference. -func mergeDifference(o, a, b any) (any, bool) { +func mergeDifference(o, a, b interface{}) (interface{}, bool) { kind := reflect.ValueOf(b).Kind() if kind == reflect.Invalid { kind = reflect.ValueOf(a).Kind() @@ -74,7 +74,7 @@ func mergeDifference(o, a, b any) (any, bool) { // The result is calculated in 'a' in-place and returned unless the difference // is 'b' in which case 'b' is returned unmodified. Also returns a boolean // indicating if there is an actual difference. -func setDifference(a, b any) (any, bool) { +func setDifference(a, b interface{}) (interface{}, bool) { av := reflect.ValueOf(a) bv := reflect.ValueOf(b) @@ -89,7 +89,7 @@ func setDifference(a, b any) (any, bool) { // From https://docs.openvswitch.org/en/latest/ref/ovsdb-server.7/#update2-notification // The difference between two sets are all elements that only belong to one // of the sets. - difference := make(map[any]struct{}, bv.Len()) + difference := make(map[interface{}]struct{}, bv.Len()) for i := 0; i < bv.Len(); i++ { // supossedly we are working with comparable atomic types with no // pointers so we can use the values as map key @@ -135,7 +135,7 @@ func setDifference(a, b any) (any, bool) { // The result is calculated in 'a' in-place and returned unless the result is // 'b' in which case 'b' is returned unmodified. // Returns a boolean indicating if there is an actual difference. -func mergeMapDifference(o, a, b any) (any, bool) { +func mergeMapDifference(o, a, b interface{}) (interface{}, bool) { av := reflect.ValueOf(a) bv := reflect.ValueOf(b) @@ -201,7 +201,7 @@ func mergeMapDifference(o, a, b any) (any, bool) { // This difference is calculated as described in // https://docs.openvswitch.org/en/latest/ref/ovsdb-server.7/#update2-notification // Returns a boolean indicating if there is an actual difference. -func mergeAtomicDifference(o, a, b any) (any, bool) { +func mergeAtomicDifference(o, a, b interface{}) (interface{}, bool) { if o != nil { return b, !reflect.DeepEqual(o, b) } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/merge.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/merge.go index a9eeb6d72e..82d78239f6 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/merge.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/merge.go @@ -89,7 +89,7 @@ func mergeModifyRow(ts *ovsdb.TableSchema, o, a, b *ovsdb.Row) *ovsdb.Row { continue } - var result any + var result interface{} var changed bool // handle maps or sets first @@ -106,7 +106,7 @@ func mergeModifyRow(ts *ovsdb.TableSchema, o, a, b *ovsdb.Row) *ovsdb.Row { // set difference is a fully transitive operation so we dont // need to do anything special to merge two differences result, changed = setDifference(aSet.GoSet, bSet.GoSet) - result = ovsdb.OvsSet{GoSet: result.([]any)} + result = ovsdb.OvsSet{GoSet: result.([]interface{})} } case ovsdb.OvsMap: aMap := aMod[k].(ovsdb.OvsMap) @@ -119,7 +119,7 @@ func mergeModifyRow(ts *ovsdb.TableSchema, o, a, b *ovsdb.Row) *ovsdb.Row { // value so we have to take the original value into account when // merging result, changed = mergeMapDifference(originalMap.GoMap, aMap.GoMap, bMap.GoMap) - result = ovsdb.OvsMap{GoMap: result.(map[any]any)} + result = ovsdb.OvsMap{GoMap: result.(map[interface{}]interface{})} } // was neither a map nor a set @@ -138,7 +138,7 @@ func mergeModifyRow(ts *ovsdb.TableSchema, o, a, b *ovsdb.Row) *ovsdb.Row { // instead of a nil set so that mergeAtomicDifference notices // that we are returning to the original value if set.GoSet == nil { - set.GoSet = []any{} + set.GoSet = []interface{}{} } o = set } diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/mutate.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/mutate.go index 57097f55c8..b91ef85341 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/mutate.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/mutate.go @@ -25,7 +25,7 @@ func insertToSlice(a, b reflect.Value) (reflect.Value, bool) { return reflect.Append(a, b), true } -func mutate(current any, mutator ovsdb.Mutator, value any) (any, any) { +func mutate(current interface{}, mutator ovsdb.Mutator, value interface{}) (interface{}, interface{}) { switch current.(type) { case bool, string: return current, value @@ -38,26 +38,26 @@ func mutate(current any, mutator ovsdb.Mutator, value any) (any, any) { return mutateDelete(current, value) case ovsdb.MutateOperationAdd: // for add, the delta is the new value - newValue := mutateAdd(current, value) - return newValue, newValue + new := mutateAdd(current, value) + return new, new case ovsdb.MutateOperationSubtract: // for subtract, the delta is the new value - newValue := mutateSubtract(current, value) - return newValue, newValue + new := mutateSubtract(current, value) + return new, new case ovsdb.MutateOperationMultiply: - newValue := mutateMultiply(current, value) - return newValue, newValue + new := mutateMultiply(current, value) + return new, new case ovsdb.MutateOperationDivide: - newValue := mutateDivide(current, value) - return newValue, newValue + new := mutateDivide(current, value) + return new, new case ovsdb.MutateOperationModulo: - newValue := mutateModulo(current, value) - return newValue, newValue + new := mutateModulo(current, value) + return new, new } return current, value } -func mutateInsert(current, value any) (any, any) { +func mutateInsert(current, value interface{}) (interface{}, interface{}) { switch current.(type) { case int, float64: return current, current @@ -66,7 +66,7 @@ func mutateInsert(current, value any) (any, any) { vv := reflect.ValueOf(value) if vc.Kind() == reflect.Slice && vc.Type() == reflect.SliceOf(vv.Type()) { v, ok := insertToSlice(vc, vv) - var diff any + var diff interface{} if ok { diff = value } @@ -114,7 +114,7 @@ func mutateInsert(current, value any) (any, any) { return current, nil } -func mutateDelete(current, value any) (any, any) { +func mutateDelete(current, value interface{}) (interface{}, interface{}) { switch current.(type) { case int, float64: return current, nil @@ -177,7 +177,7 @@ func mutateDelete(current, value any) (any, any) { return current, nil } -func mutateAdd(current, value any) any { +func mutateAdd(current, value interface{}) interface{} { if i, ok := current.(int); ok { v := value.(int) return i + v @@ -203,7 +203,7 @@ func mutateAdd(current, value any) any { return current } -func mutateSubtract(current, value any) any { +func mutateSubtract(current, value interface{}) interface{} { if i, ok := current.(int); ok { v := value.(int) return i - v @@ -229,7 +229,7 @@ func mutateSubtract(current, value any) any { return current } -func mutateMultiply(current, value any) any { +func mutateMultiply(current, value interface{}) interface{} { if i, ok := current.(int); ok { v := value.(int) return i * v @@ -255,7 +255,7 @@ func mutateMultiply(current, value any) any { return current } -func mutateDivide(current, value any) any { +func mutateDivide(current, value interface{}) interface{} { if i, ok := current.(int); ok { v := value.(int) return i / v @@ -281,7 +281,7 @@ func mutateDivide(current, value any) any { return current } -func mutateModulo(current, value any) any { +func mutateModulo(current, value interface{}) interface{} { if i, ok := current.(int); ok { v := value.(int) return i % v diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/references.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/references.go index cc648e1023..4d998e0511 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/references.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/references.go @@ -351,10 +351,10 @@ func (rt *referenceTracker) processWeakReferences() (ModelUpdates, error) { // a map referencing the row // generate the mutation to remove the entry form the map originalMap := originalRows[uuid][spec.FromColumn].(ovsdb.OvsMap).GoMap - var mutationMap map[any]any + var mutationMap map[interface{}]interface{} value, ok := updatedRows[uuid][spec.FromColumn] if !ok { - mutationMap = map[any]any{} + mutationMap = map[interface{}]interface{}{} } else { mutationMap = value.(ovsdb.OvsMap).GoMap } @@ -371,10 +371,10 @@ func (rt *referenceTracker) processWeakReferences() (ModelUpdates, error) { case ovsdb.TypeSet: // a set referencing the row // generate the mutation to remove the entry form the set - var mutationSet []any + var mutationSet []interface{} value, ok := updatedRows[uuid][spec.FromColumn] if !ok { - mutationSet = []any{} + mutationSet = []interface{}{} } else { mutationSet = value.(ovsdb.OvsSet).GoSet } @@ -423,7 +423,7 @@ func (rt *referenceTracker) processWeakReferences() (ModelUpdates, error) { return updates, nil } -func copyMapKeyValues(from, to map[any]any, isKey bool, keyValue ovsdb.UUID) map[any]any { +func copyMapKeyValues(from, to map[interface{}]interface{}, isKey bool, keyValue ovsdb.UUID) map[interface{}]interface{} { if isKey { to[keyValue] = from[keyValue] return to @@ -501,7 +501,7 @@ func (rt *referenceTracker) updateRow(table, uuid string, row ovsdb.Row) (ModelU mutations = append(mutations, *ovsdb.NewMutation(column, ovsdb.MutateOperationDelete, value)) continue } - update[column] = ovsdb.OvsSet{GoSet: []any{}} + update[column] = ovsdb.OvsSet{GoSet: []interface{}{}} } updates := ModelUpdates{} @@ -588,7 +588,7 @@ func (rt *referenceTracker) rowExists(table, uuid string) (bool, error) { func getReferenceModificationsFromRow(dbModel *model.DatabaseModel, table, uuid string, modify, old *ovsdb.Row) database.References { refs := database.References{} for column, value := range *modify { - var oldValue any + var oldValue interface{} if old != nil { oldValue = (*old)[column] } @@ -598,7 +598,7 @@ func getReferenceModificationsFromRow(dbModel *model.DatabaseModel, table, uuid return refs } -func getReferenceModificationsFromColumn(dbModel *model.DatabaseModel, table, uuid, column string, modify, old any) database.References { +func getReferenceModificationsFromColumn(dbModel *model.DatabaseModel, table, uuid, column string, modify, old interface{}) database.References { switch v := modify.(type) { case ovsdb.UUID: var oldUUID ovsdb.UUID diff --git a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/updates.go b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/updates.go index 89a9a6cb6f..00fbcccffa 100644 --- a/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/updates.go +++ b/go-controller/vendor/github.com/ovn-kubernetes/libovsdb/updates/updates.go @@ -41,7 +41,7 @@ func (u ModelUpdates) GetUpdatedTables() []string { // ForEachModelUpdate processes each row update of a given table in model // notation -func (u ModelUpdates) ForEachModelUpdate(table string, do func(uuid string, old, newModel model.Model) error) error { +func (u ModelUpdates) ForEachModelUpdate(table string, do func(uuid string, old, new model.Model) error) error { models := u.updates[table] for uuid, model := range models { err := do(uuid, model.old, model.new) @@ -94,8 +94,8 @@ func (u ModelUpdates) GetRow(table, uuid string) *ovsdb.Row { } // Merge a set of updates with an earlier set of updates -func (u *ModelUpdates) Merge(dbModel model.DatabaseModel, newModel ModelUpdates) error { - for table, models := range newModel.updates { +func (u *ModelUpdates) Merge(dbModel model.DatabaseModel, new ModelUpdates) error { + for table, models := range new.updates { for uuid, update := range models { err := u.addUpdate(dbModel, table, uuid, update) if err != nil { @@ -132,18 +132,18 @@ func (u *ModelUpdates) AddOperation(dbModel model.DatabaseModel, table, uuid str func (u *ModelUpdates) AddRowUpdate(dbModel model.DatabaseModel, table, uuid string, current model.Model, ru ovsdb.RowUpdate) error { switch { case ru.Old == nil && ru.New != nil: - newModel, err := model.CreateModel(dbModel, table, ru.New, uuid) + new, err := model.CreateModel(dbModel, table, ru.New, uuid) if err != nil { return err } - err = u.addUpdate(dbModel, table, uuid, modelUpdate{new: newModel, rowUpdate2: &rowUpdate2{New: ru.New}}) + err = u.addUpdate(dbModel, table, uuid, modelUpdate{new: new, rowUpdate2: &rowUpdate2{New: ru.New}}) if err != nil { return err } case ru.Old != nil && ru.New != nil: old := current - newModel := model.Clone(current) - info, err := dbModel.NewModelInfo(newModel) + new := model.Clone(current) + info, err := dbModel.NewModelInfo(new) if err != nil { return err } @@ -151,7 +151,7 @@ func (u *ModelUpdates) AddRowUpdate(dbModel model.DatabaseModel, table, uuid str if !changed || err != nil { return err } - err = u.addUpdate(dbModel, table, uuid, modelUpdate{old: old, new: newModel, rowUpdate2: &rowUpdate2{Old: ru.Old, New: ru.New}}) + err = u.addUpdate(dbModel, table, uuid, modelUpdate{old: old, new: new, rowUpdate2: &rowUpdate2{Old: ru.Old, New: ru.New}}) if err != nil { return err } @@ -175,18 +175,18 @@ func (u *ModelUpdates) AddRowUpdate2(dbModel model.DatabaseModel, table, uuid st ru2.Insert = ru2.Initial fallthrough case ru2.Insert != nil: - newModel, err := model.CreateModel(dbModel, table, ru2.Insert, uuid) + new, err := model.CreateModel(dbModel, table, ru2.Insert, uuid) if err != nil { return err } - err = u.addUpdate(dbModel, table, uuid, modelUpdate{new: newModel, rowUpdate2: &ru2}) + err = u.addUpdate(dbModel, table, uuid, modelUpdate{new: new, rowUpdate2: &ru2}) if err != nil { return err } case ru2.Modify != nil: old := current - newModel := model.Clone(current) - info, err := dbModel.NewModelInfo(newModel) + new := model.Clone(current) + info, err := dbModel.NewModelInfo(new) if err != nil { return err } @@ -194,7 +194,7 @@ func (u *ModelUpdates) AddRowUpdate2(dbModel model.DatabaseModel, table, uuid st if !changed || err != nil { return err } - err = u.addUpdate(dbModel, table, uuid, modelUpdate{old: old, new: newModel, rowUpdate2: &ru2}) + err = u.addUpdate(dbModel, table, uuid, modelUpdate{old: old, new: new, rowUpdate2: &ru2}) if err != nil { return err } @@ -296,8 +296,8 @@ func (u *ModelUpdates) addUpdateOperation(dbModel model.DatabaseModel, table, uu return err } - newModel := model.Clone(old) - newInfo, err := dbModel.NewModelInfo(newModel) + new := model.Clone(old) + newInfo, err := dbModel.NewModelInfo(new) if err != nil { return err } @@ -319,7 +319,7 @@ func (u *ModelUpdates) addUpdateOperation(dbModel model.DatabaseModel, table, uu err = u.addUpdate(dbModel, table, uuid, modelUpdate{ old: old, - new: newModel, + new: new, rowUpdate2: &rowUpdate2{ Modify: &delta, Old: &oldRow, @@ -345,20 +345,20 @@ func (u *ModelUpdates) addMutateOperation(dbModel model.DatabaseModel, table, uu return err } - newModel := model.Clone(old) - newInfo, err := dbModel.NewModelInfo(newModel) + new := model.Clone(old) + newInfo, err := dbModel.NewModelInfo(new) if err != nil { return err } - differences := make(map[string]any) + differences := make(map[string]interface{}) for _, mutation := range op.Mutations { column := schema.Column(mutation.Column) if column == nil { continue } - var nativeValue any + var nativeValue interface{} // Usually a mutation value is of the same type of the value being mutated // except for delete mutation of maps where it can also be a list of same type of // keys (rfc7047 5.1). Handle this special case here. @@ -422,7 +422,7 @@ func (u *ModelUpdates) addMutateOperation(dbModel model.DatabaseModel, table, uu err = u.addUpdate(dbModel, table, uuid, modelUpdate{ old: old, - new: newModel, + new: new, rowUpdate2: &rowUpdate2{ Modify: &delta, Old: &oldRow, @@ -434,7 +434,7 @@ func (u *ModelUpdates) addMutateOperation(dbModel model.DatabaseModel, table, uu return err } -func (u *ModelUpdates) addDeleteOperation(dbModel model.DatabaseModel, table, uuid string, old model.Model, _ *ovsdb.Operation) error { +func (u *ModelUpdates) addDeleteOperation(dbModel model.DatabaseModel, table, uuid string, old model.Model, op *ovsdb.Operation) error { m := dbModel.Mapper info, err := dbModel.NewModelInfo(old) diff --git a/go-controller/vendor/github.com/prometheus/client_golang/NOTICE b/go-controller/vendor/github.com/prometheus/client_golang/NOTICE index b9cc55abbb..dd878a30ee 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/NOTICE +++ b/go-controller/vendor/github.com/prometheus/client_golang/NOTICE @@ -16,3 +16,8 @@ Go support for Protocol Buffers - Google's data interchange format http://github.com/golang/protobuf/ Copyright 2010 The Go Authors See source code for license details. + +Support for streaming Protocol Buffer messages for the Go language (golang). +https://github.com/matttproud/golang_protobuf_extensions +Copyright 2013 Matt T. Proud +Licensed under the Apache License, Version 2.0 diff --git a/go-controller/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header/header.go b/go-controller/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header/header.go deleted file mode 100644 index 8547c8dfd1..0000000000 --- a/go-controller/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header/header.go +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2013 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 or at -// https://developers.google.com/open-source/licenses/bsd. - -// Package header provides functions for parsing HTTP headers. -package header - -import ( - "net/http" - "strings" -) - -// Octet types from RFC 2616. -var octetTypes [256]octetType - -type octetType byte - -const ( - isToken octetType = 1 << iota - isSpace -) - -func init() { - // OCTET = - // CHAR = - // CTL = - // CR = - // LF = - // SP = - // HT = - // <"> = - // CRLF = CR LF - // LWS = [CRLF] 1*( SP | HT ) - // TEXT = - // separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> - // | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT - // token = 1* - // qdtext = > - - for c := 0; c < 256; c++ { - var t octetType - isCtl := c <= 31 || c == 127 - isChar := 0 <= c && c <= 127 - isSeparator := strings.ContainsRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) - if strings.ContainsRune(" \t\r\n", rune(c)) { - t |= isSpace - } - if isChar && !isCtl && !isSeparator { - t |= isToken - } - octetTypes[c] = t - } -} - -// AcceptSpec describes an Accept* header. -type AcceptSpec struct { - Value string - Q float64 -} - -// ParseAccept parses Accept* headers. -func ParseAccept(header http.Header, key string) (specs []AcceptSpec) { -loop: - for _, s := range header[key] { - for { - var spec AcceptSpec - spec.Value, s = expectTokenSlash(s) - if spec.Value == "" { - continue loop - } - spec.Q = 1.0 - s = skipSpace(s) - if strings.HasPrefix(s, ";") { - s = skipSpace(s[1:]) - if !strings.HasPrefix(s, "q=") { - continue loop - } - spec.Q, s = expectQuality(s[2:]) - if spec.Q < 0.0 { - continue loop - } - } - specs = append(specs, spec) - s = skipSpace(s) - if !strings.HasPrefix(s, ",") { - continue loop - } - s = skipSpace(s[1:]) - } - } - return -} - -func skipSpace(s string) (rest string) { - i := 0 - for ; i < len(s); i++ { - if octetTypes[s[i]]&isSpace == 0 { - break - } - } - return s[i:] -} - -func expectTokenSlash(s string) (token, rest string) { - i := 0 - for ; i < len(s); i++ { - b := s[i] - if (octetTypes[b]&isToken == 0) && b != '/' { - break - } - } - return s[:i], s[i:] -} - -func expectQuality(s string) (q float64, rest string) { - switch { - case len(s) == 0: - return -1, "" - case s[0] == '0': - q = 0 - case s[0] == '1': - q = 1 - default: - return -1, "" - } - s = s[1:] - if !strings.HasPrefix(s, ".") { - return q, s - } - s = s[1:] - i := 0 - n := 0 - d := 1 - for ; i < len(s); i++ { - b := s[i] - if b < '0' || b > '9' { - break - } - n = n*10 + int(b) - '0' - d *= 10 - } - return q + float64(n)/float64(d), s[i:] -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/negotiate.go b/go-controller/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/negotiate.go deleted file mode 100644 index 2e45780b74..0000000000 --- a/go-controller/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/negotiate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2013 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 or at -// https://developers.google.com/open-source/licenses/bsd. - -package httputil - -import ( - "net/http" - - "github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header" -) - -// NegotiateContentEncoding returns the best offered content encoding for the -// request's Accept-Encoding header. If two offers match with equal weight and -// then the offer earlier in the list is preferred. If no offers are -// acceptable, then "" is returned. -func NegotiateContentEncoding(r *http.Request, offers []string) string { - bestOffer := "identity" - bestQ := -1.0 - specs := header.ParseAccept(r.Header, "Accept-Encoding") - for _, offer := range offers { - for _, spec := range specs { - if spec.Q > bestQ && - (spec.Value == "*" || spec.Value == offer) { - bestQ = spec.Q - bestOffer = offer - } - } - } - if bestQ == 0 { - bestOffer = "" - } - return bestOffer -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/collectorfunc.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/collectorfunc.go deleted file mode 100644 index 9a71a15db1..0000000000 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/collectorfunc.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2025 The Prometheus 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 prometheus - -// CollectorFunc is a convenient way to implement a Prometheus Collector -// without interface boilerplate. -// This implementation is based on DescribeByCollect method. -// familiarize yourself to it before using. -type CollectorFunc func(chan<- Metric) - -// Collect calls the defined CollectorFunc function with the provided Metrics channel -func (f CollectorFunc) Collect(ch chan<- Metric) { - f(ch) -} - -// Describe sends the descriptor information using DescribeByCollect -func (f CollectorFunc) Describe(ch chan<- *Desc) { - DescribeByCollect(f, ch) -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_latest.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_latest.go index cc4ef1077e..bcfa4fa10e 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_latest.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_latest.go @@ -37,9 +37,6 @@ var ( // MetricsScheduler allows only scheduler metrics to be collected from Go runtime. // e.g. go_sched_goroutines_goroutines MetricsScheduler = GoRuntimeMetricsRule{regexp.MustCompile(`^/sched/.*`)} - // MetricsDebug allows only debug metrics to be collected from Go runtime. - // e.g. go_godebug_non_default_behavior_gocachetest_events_total - MetricsDebug = GoRuntimeMetricsRule{regexp.MustCompile(`^/godebug/.*`)} ) // WithGoCollectorMemStatsMetricsDisabled disables metrics that is gathered in runtime.MemStats structure such as: @@ -47,6 +44,7 @@ var ( // go_memstats_alloc_bytes // go_memstats_alloc_bytes_total // go_memstats_sys_bytes +// go_memstats_lookups_total // go_memstats_mallocs_total // go_memstats_frees_total // go_memstats_heap_alloc_bytes diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/desc.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/desc.go index ad347113c0..68ffe3c248 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/desc.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/desc.go @@ -189,15 +189,12 @@ func (d *Desc) String() string { fmt.Sprintf("%s=%q", lp.GetName(), lp.GetValue()), ) } - vlStrings := []string{} - if d.variableLabels != nil { - vlStrings = make([]string, 0, len(d.variableLabels.names)) - for _, vl := range d.variableLabels.names { - if fn, ok := d.variableLabels.labelConstraints[vl]; ok && fn != nil { - vlStrings = append(vlStrings, fmt.Sprintf("c(%s)", vl)) - } else { - vlStrings = append(vlStrings, vl) - } + vlStrings := make([]string, 0, len(d.variableLabels.names)) + for _, vl := range d.variableLabels.names { + if fn, ok := d.variableLabels.labelConstraints[vl]; ok && fn != nil { + vlStrings = append(vlStrings, fmt.Sprintf("c(%s)", vl)) + } else { + vlStrings = append(vlStrings, vl) } } return fmt.Sprintf( diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go index 520cbd7d41..ad9a71a5e0 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go @@ -22,13 +22,13 @@ import ( // goRuntimeMemStats provides the metrics initially provided by runtime.ReadMemStats. // From Go 1.17 those similar (and better) statistics are provided by runtime/metrics, so // while eval closure works on runtime.MemStats, the struct from Go 1.17+ is -// populated using runtime/metrics. Those are the defaults we can't alter. +// populated using runtime/metrics. func goRuntimeMemStats() memStatsMetrics { return memStatsMetrics{ { desc: NewDesc( memstatNamespace("alloc_bytes"), - "Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.", + "Number of bytes allocated and still in use.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.Alloc) }, @@ -36,7 +36,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("alloc_bytes_total"), - "Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.", + "Total number of bytes allocated, even if freed.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.TotalAlloc) }, @@ -44,16 +44,23 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("sys_bytes"), - "Number of bytes obtained from system. Equals to /memory/classes/total:byte.", + "Number of bytes obtained from system.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.Sys) }, valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("lookups_total"), + "Total number of pointer lookups.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.Lookups) }, + valType: CounterValue, }, { desc: NewDesc( memstatNamespace("mallocs_total"), - // TODO(bwplotka): We could add go_memstats_heap_objects, probably useful for discovery. Let's gather more feedback, kind of a waste of bytes for everybody for compatibility reasons to keep both, and we can't really rename/remove useful metric. - "Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.", + "Total number of mallocs.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.Mallocs) }, @@ -61,7 +68,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("frees_total"), - "Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.", + "Total number of frees.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.Frees) }, @@ -69,7 +76,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("heap_alloc_bytes"), - "Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.", + "Number of heap bytes allocated and still in use.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapAlloc) }, @@ -77,7 +84,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("heap_sys_bytes"), - "Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.", + "Number of heap bytes obtained from system.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapSys) }, @@ -85,7 +92,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("heap_idle_bytes"), - "Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.", + "Number of heap bytes waiting to be used.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapIdle) }, @@ -93,7 +100,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("heap_inuse_bytes"), - "Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes", + "Number of heap bytes that are in use.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapInuse) }, @@ -101,7 +108,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("heap_released_bytes"), - "Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.", + "Number of heap bytes released to OS.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapReleased) }, @@ -109,7 +116,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("heap_objects"), - "Number of currently allocated objects. Equals to /gc/heap/objects:objects.", + "Number of allocated objects.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapObjects) }, @@ -117,7 +124,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("stack_inuse_bytes"), - "Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.", + "Number of bytes in use by the stack allocator.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.StackInuse) }, @@ -125,7 +132,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("stack_sys_bytes"), - "Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.", + "Number of bytes obtained from system for stack allocator.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.StackSys) }, @@ -133,7 +140,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("mspan_inuse_bytes"), - "Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.", + "Number of bytes in use by mspan structures.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanInuse) }, @@ -141,7 +148,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("mspan_sys_bytes"), - "Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.", + "Number of bytes used for mspan structures obtained from system.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanSys) }, @@ -149,7 +156,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("mcache_inuse_bytes"), - "Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.", + "Number of bytes in use by mcache structures.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheInuse) }, @@ -157,7 +164,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("mcache_sys_bytes"), - "Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.", + "Number of bytes used for mcache structures obtained from system.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheSys) }, @@ -165,7 +172,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("buck_hash_sys_bytes"), - "Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.", + "Number of bytes used by the profiling bucket hash table.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.BuckHashSys) }, @@ -173,7 +180,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("gc_sys_bytes"), - "Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.", + "Number of bytes used for garbage collection system metadata.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.GCSys) }, @@ -181,7 +188,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("other_sys_bytes"), - "Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.", + "Number of bytes used for other system allocations.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.OtherSys) }, @@ -189,7 +196,7 @@ func goRuntimeMemStats() memStatsMetrics { }, { desc: NewDesc( memstatNamespace("next_gc_bytes"), - "Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.", + "Number of heap bytes when next garbage collection will take place.", nil, nil, ), eval: func(ms *runtime.MemStats) float64 { return float64(ms.NextGC) }, @@ -218,7 +225,7 @@ func newBaseGoCollector() baseGoCollector { nil, nil), gcDesc: NewDesc( "go_gc_duration_seconds", - "A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.", + "A summary of the pause duration of garbage collection cycles.", nil, nil), gcLastTimeDesc: NewDesc( "go_memstats_last_gc_time_seconds", diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/go_collector_latest.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/go_collector_latest.go index 6b8684731c..2d8d9f64f4 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/go_collector_latest.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/go_collector_latest.go @@ -17,7 +17,6 @@ package prometheus import ( - "fmt" "math" "runtime" "runtime/metrics" @@ -154,8 +153,7 @@ func defaultGoCollectorOptions() internal.GoCollectorOptions { "/gc/heap/frees-by-size:bytes": goGCHeapFreesBytes, }, RuntimeMetricRules: []internal.GoCollectorRule{ - // Recommended metrics we want by default from runtime/metrics. - {Matcher: internal.GoCollectorDefaultRuntimeMetrics}, + //{Matcher: regexp.MustCompile("")}, }, } } @@ -205,7 +203,6 @@ func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector { // to fail here. This condition is tested in TestExpectedRuntimeMetrics. continue } - help := attachOriginalName(d.Description.Description, d.Name) sampleBuf = append(sampleBuf, metrics.Sample{Name: d.Name}) sampleMap[d.Name] = &sampleBuf[len(sampleBuf)-1] @@ -217,7 +214,7 @@ func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector { m = newBatchHistogram( NewDesc( BuildFQName(namespace, subsystem, name), - help, + d.Description.Description, nil, nil, ), @@ -229,7 +226,7 @@ func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector { Namespace: namespace, Subsystem: subsystem, Name: name, - Help: help, + Help: d.Description.Description, }, ) } else { @@ -237,7 +234,7 @@ func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector { Namespace: namespace, Subsystem: subsystem, Name: name, - Help: help, + Help: d.Description.Description, }) } metricSet = append(metricSet, m) @@ -287,10 +284,6 @@ func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector { } } -func attachOriginalName(desc, origName string) string { - return fmt.Sprintf("%s Sourced from %s.", desc, origName) -} - // Describe returns all descriptions of the collector. func (c *goCollector) Describe(ch chan<- *Desc) { c.base.Describe(ch) @@ -383,13 +376,13 @@ func unwrapScalarRMValue(v metrics.Value) float64 { // // This should never happen because we always populate our metric // set from the runtime/metrics package. - panic("unexpected bad kind metric") + panic("unexpected unsupported metric") default: // Unsupported metric kind. // // This should never happen because we check for this during initialization // and flag and filter metrics whose kinds we don't understand. - panic(fmt.Sprintf("unexpected unsupported metric: %v", v.Kind())) + panic("unexpected unsupported metric kind") } } diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/histogram.go index c453b754a7..b5c8bcb395 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/histogram.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/histogram.go @@ -14,7 +14,6 @@ package prometheus import ( - "errors" "fmt" "math" "runtime" @@ -29,11 +28,6 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" ) -const ( - nativeHistogramSchemaMaximum = 8 - nativeHistogramSchemaMinimum = -4 -) - // nativeHistogramBounds for the frac of observed values. Only relevant for // schema > 0. The position in the slice is the schema. (0 is never used, just // here for convenience of using the schema directly as the index.) @@ -336,11 +330,11 @@ func ExponentialBuckets(start, factor float64, count int) []float64 { // used for the Buckets field of HistogramOpts. // // The function panics if 'count' is 0 or negative, if 'min' is 0 or negative. -func ExponentialBucketsRange(minBucket, maxBucket float64, count int) []float64 { +func ExponentialBucketsRange(min, max float64, count int) []float64 { if count < 1 { panic("ExponentialBucketsRange count needs a positive count") } - if minBucket <= 0 { + if min <= 0 { panic("ExponentialBucketsRange min needs to be greater than 0") } @@ -348,12 +342,12 @@ func ExponentialBucketsRange(minBucket, maxBucket float64, count int) []float64 // max = min*growthFactor^(bucketCount-1) // We know max/min and highest bucket. Solve for growthFactor. - growthFactor := math.Pow(maxBucket/minBucket, 1.0/float64(count-1)) + growthFactor := math.Pow(max/min, 1.0/float64(count-1)) // Now that we know growthFactor, solve for each bucket. buckets := make([]float64, count) for i := 1; i <= count; i++ { - buckets[i-1] = minBucket * math.Pow(growthFactor, float64(i-1)) + buckets[i-1] = min * math.Pow(growthFactor, float64(i-1)) } return buckets } @@ -446,7 +440,7 @@ type HistogramOpts struct { // constant (or any negative float value). NativeHistogramZeroThreshold float64 - // The next three fields define a strategy to limit the number of + // The remaining fields define a strategy to limit the number of // populated sparse buckets. If NativeHistogramMaxBucketNumber is left // at zero, the number of buckets is not limited. (Note that this might // lead to unbounded memory consumption if the values observed by the @@ -479,22 +473,6 @@ type HistogramOpts struct { NativeHistogramMinResetDuration time.Duration NativeHistogramMaxZeroThreshold float64 - // NativeHistogramMaxExemplars limits the number of exemplars - // that are kept in memory for each native histogram. If you leave it at - // zero, a default value of 10 is used. If no exemplars should be kept specifically - // for native histograms, set it to a negative value. (Scrapers can - // still use the exemplars exposed for classic buckets, which are managed - // independently.) - NativeHistogramMaxExemplars int - // NativeHistogramExemplarTTL is only checked once - // NativeHistogramMaxExemplars is exceeded. In that case, the - // oldest exemplar is removed if it is older than NativeHistogramExemplarTTL. - // Otherwise, the older exemplar in the pair of exemplars that are closest - // together (on an exponential scale) is removed. - // If NativeHistogramExemplarTTL is left at its zero value, a default value of - // 5m is used. To always delete the oldest exemplar, set it to a negative value. - NativeHistogramExemplarTTL time.Duration - // now is for testing purposes, by default it's time.Now. now func() time.Time @@ -554,7 +532,6 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr if opts.afterFunc == nil { opts.afterFunc = time.AfterFunc } - h := &histogram{ desc: desc, upperBounds: opts.Buckets, @@ -579,7 +556,6 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr h.nativeHistogramZeroThreshold = DefNativeHistogramZeroThreshold } // Leave h.nativeHistogramZeroThreshold at 0 otherwise. h.nativeHistogramSchema = pickSchema(opts.NativeHistogramBucketFactor) - h.nativeExemplars = makeNativeExemplars(opts.NativeHistogramExemplarTTL, opts.NativeHistogramMaxExemplars) } for i, upperBound := range h.upperBounds { if i < len(h.upperBounds)-1 { @@ -749,8 +725,7 @@ type histogram struct { // resetScheduled is protected by mtx. It is true if a reset is // scheduled for a later time (when nativeHistogramMinResetDuration has // passed). - resetScheduled bool - nativeExemplars nativeExemplars + resetScheduled bool // now is for testing purposes, by default it's time.Now. now func() time.Time @@ -767,9 +742,6 @@ func (h *histogram) Observe(v float64) { h.observe(v, h.findBucket(v)) } -// ObserveWithExemplar should not be called in a high-frequency setting -// for a native histogram with configured exemplars. For this case, -// the implementation isn't lock-free and might suffer from lock contention. func (h *histogram) ObserveWithExemplar(v float64, e Labels) { i := h.findBucket(v) h.observe(v, i) @@ -849,13 +821,6 @@ func (h *histogram) Write(out *dto.Metric) error { Length: proto.Uint32(0), }} } - - if h.nativeExemplars.isEnabled() { - h.nativeExemplars.Lock() - his.Exemplars = append(his.Exemplars, h.nativeExemplars.exemplars...) - h.nativeExemplars.Unlock() - } - } addAndResetCounts(hotCounts, coldCounts) return nil @@ -864,35 +829,15 @@ func (h *histogram) Write(out *dto.Metric) error { // findBucket returns the index of the bucket for the provided value, or // len(h.upperBounds) for the +Inf bucket. func (h *histogram) findBucket(v float64) int { - n := len(h.upperBounds) - if n == 0 { - return 0 - } - - // Early exit: if v is less than or equal to the first upper bound, return 0 - if v <= h.upperBounds[0] { - return 0 - } - - // Early exit: if v is greater than the last upper bound, return len(h.upperBounds) - if v > h.upperBounds[n-1] { - return n - } - - // For small arrays, use simple linear search - // "magic number" 35 is result of tests on couple different (AWS and baremetal) servers - // see more details here: https://github.com/prometheus/client_golang/pull/1662 - if n < 35 { - for i, bound := range h.upperBounds { - if v <= bound { - return i - } - } - // If v is greater than all upper bounds, return len(h.upperBounds) - return n - } - - // For larger arrays, use stdlib's binary search + // TODO(beorn7): For small numbers of buckets (<30), a linear search is + // slightly faster than the binary search. If we really care, we could + // switch from one search strategy to the other depending on the number + // of buckets. + // + // Microbenchmarks (BenchmarkHistogramNoLabels): + // 11 buckets: 38.3 ns/op linear - binary 48.7 ns/op + // 100 buckets: 78.1 ns/op linear - binary 54.9 ns/op + // 300 buckets: 154 ns/op linear - binary 61.6 ns/op return sort.SearchFloat64s(h.upperBounds, v) } @@ -1146,10 +1091,8 @@ func (h *histogram) resetCounts(counts *histogramCounts) { deleteSyncMap(&counts.nativeHistogramBucketsPositive) } -// updateExemplar replaces the exemplar for the provided classic bucket. -// With empty labels, it's a no-op. It panics if any of the labels is invalid. -// If histogram is native, the exemplar will be cached into nativeExemplars, -// which has a limit, and will remove one exemplar when limit is reached. +// updateExemplar replaces the exemplar for the provided bucket. With empty +// labels, it's a no-op. It panics if any of the labels is invalid. func (h *histogram) updateExemplar(v float64, bucket int, l Labels) { if l == nil { return @@ -1159,10 +1102,6 @@ func (h *histogram) updateExemplar(v float64, bucket int, l Labels) { panic(err) } h.exemplars[bucket].Store(e) - doSparse := h.nativeHistogramSchema > math.MinInt32 && !math.IsNaN(v) - if doSparse { - h.nativeExemplars.addExemplar(e) - } } // HistogramVec is a Collector that bundles a set of Histograms that all share the @@ -1397,48 +1336,6 @@ func MustNewConstHistogram( return m } -// NewConstHistogramWithCreatedTimestamp does the same thing as NewConstHistogram but sets the created timestamp. -func NewConstHistogramWithCreatedTimestamp( - desc *Desc, - count uint64, - sum float64, - buckets map[float64]uint64, - ct time.Time, - labelValues ...string, -) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - return &constHistogram{ - desc: desc, - count: count, - sum: sum, - buckets: buckets, - labelPairs: MakeLabelPairs(desc, labelValues), - createdTs: timestamppb.New(ct), - }, nil -} - -// MustNewConstHistogramWithCreatedTimestamp is a version of NewConstHistogramWithCreatedTimestamp that panics where -// NewConstHistogramWithCreatedTimestamp would have returned an error. -func MustNewConstHistogramWithCreatedTimestamp( - desc *Desc, - count uint64, - sum float64, - buckets map[float64]uint64, - ct time.Time, - labelValues ...string, -) Metric { - m, err := NewConstHistogramWithCreatedTimestamp(desc, count, sum, buckets, ct, labelValues...) - if err != nil { - panic(err) - } - return m -} - type buckSort []*dto.Bucket func (s buckSort) Len() int { @@ -1466,9 +1363,9 @@ func pickSchema(bucketFactor float64) int32 { floor := math.Floor(math.Log2(math.Log2(bucketFactor))) switch { case floor <= -8: - return nativeHistogramSchemaMaximum + return 8 case floor >= 4: - return nativeHistogramSchemaMinimum + return -4 default: return -int32(floor) } @@ -1678,379 +1575,3 @@ func addAndResetCounts(hot, cold *histogramCounts) { atomic.AddUint64(&hot.nativeHistogramZeroBucket, atomic.LoadUint64(&cold.nativeHistogramZeroBucket)) atomic.StoreUint64(&cold.nativeHistogramZeroBucket, 0) } - -type nativeExemplars struct { - sync.Mutex - - // Time-to-live for exemplars, it is set to -1 if exemplars are disabled, that is NativeHistogramMaxExemplars is below 0. - // The ttl is used on insertion to remove an exemplar that is older than ttl, if present. - ttl time.Duration - - exemplars []*dto.Exemplar -} - -func (n *nativeExemplars) isEnabled() bool { - return n.ttl != -1 -} - -func makeNativeExemplars(ttl time.Duration, maxCount int) nativeExemplars { - if ttl == 0 { - ttl = 5 * time.Minute - } - - if maxCount == 0 { - maxCount = 10 - } - - if maxCount < 0 { - maxCount = 0 - ttl = -1 - } - - return nativeExemplars{ - ttl: ttl, - exemplars: make([]*dto.Exemplar, 0, maxCount), - } -} - -func (n *nativeExemplars) addExemplar(e *dto.Exemplar) { - if !n.isEnabled() { - return - } - - n.Lock() - defer n.Unlock() - - // When the number of exemplars has not yet exceeded or - // is equal to cap(n.exemplars), then - // insert the new exemplar directly. - if len(n.exemplars) < cap(n.exemplars) { - var nIdx int - for nIdx = 0; nIdx < len(n.exemplars); nIdx++ { - if *e.Value < *n.exemplars[nIdx].Value { - break - } - } - n.exemplars = append(n.exemplars[:nIdx], append([]*dto.Exemplar{e}, n.exemplars[nIdx:]...)...) - return - } - - if len(n.exemplars) == 1 { - // When the number of exemplars is 1, then - // replace the existing exemplar with the new exemplar. - n.exemplars[0] = e - return - } - // From this point on, the number of exemplars is greater than 1. - - // When the number of exemplars exceeds the limit, remove one exemplar. - var ( - ot = time.Time{} // Oldest timestamp seen. Initial value doesn't matter as we replace it due to otIdx == -1 in the loop. - otIdx = -1 // Index of the exemplar with the oldest timestamp. - - md = -1.0 // Logarithm of the delta of the closest pair of exemplars. - - // The insertion point of the new exemplar in the exemplars slice after insertion. - // This is calculated purely based on the order of the exemplars by value. - // nIdx == len(n.exemplars) means the new exemplar is to be inserted after the end. - nIdx = -1 - - // rIdx is ultimately the index for the exemplar that we are replacing with the new exemplar. - // The aim is to keep a good spread of exemplars by value and not let them bunch up too much. - // It is calculated in 3 steps: - // 1. First we set rIdx to the index of the older exemplar within the closest pair by value. - // That is the following will be true (on log scale): - // either the exemplar pair on index (rIdx-1, rIdx) or (rIdx, rIdx+1) will have - // the closest values to each other from all pairs. - // For example, suppose the values are distributed like this: - // |-----------x-------------x----------------x----x-----| - // ^--rIdx as this is older. - // Or like this: - // |-----------x-------------x----------------x----x-----| - // ^--rIdx as this is older. - // 2. If there is an exemplar that expired, then we simple reset rIdx to that index. - // 3. We check if by inserting the new exemplar we would create a closer pair at - // (nIdx-1, nIdx) or (nIdx, nIdx+1) and set rIdx to nIdx-1 or nIdx accordingly to - // keep the spread of exemplars by value; otherwise we keep rIdx as it is. - rIdx = -1 - cLog float64 // Logarithm of the current exemplar. - pLog float64 // Logarithm of the previous exemplar. - ) - - for i, exemplar := range n.exemplars { - // Find the exemplar with the oldest timestamp. - if otIdx == -1 || exemplar.Timestamp.AsTime().Before(ot) { - ot = exemplar.Timestamp.AsTime() - otIdx = i - } - - // Find the index at which to insert new the exemplar. - if nIdx == -1 && *e.Value <= *exemplar.Value { - nIdx = i - } - - // Find the two closest exemplars and pick the one the with older timestamp. - pLog = cLog - cLog = math.Log(exemplar.GetValue()) - if i == 0 { - continue - } - diff := math.Abs(cLog - pLog) - if md == -1 || diff < md { - // The closest exemplar pair is at index: i-1, i. - // Choose the exemplar with the older timestamp for replacement. - md = diff - if n.exemplars[i].Timestamp.AsTime().Before(n.exemplars[i-1].Timestamp.AsTime()) { - rIdx = i - } else { - rIdx = i - 1 - } - } - - } - - // If all existing exemplar are smaller than new exemplar, - // then the exemplar should be inserted at the end. - if nIdx == -1 { - nIdx = len(n.exemplars) - } - // Here, we have the following relationships: - // n.exemplars[nIdx-1].Value < e.Value (if nIdx > 0) - // e.Value <= n.exemplars[nIdx].Value (if nIdx < len(n.exemplars)) - - if otIdx != -1 && e.Timestamp.AsTime().Sub(ot) > n.ttl { - // If the oldest exemplar has expired, then replace it with the new exemplar. - rIdx = otIdx - } else { - // In the previous for loop, when calculating the closest pair of exemplars, - // we did not take into account the newly inserted exemplar. - // So we need to calculate with the newly inserted exemplar again. - elog := math.Log(e.GetValue()) - if nIdx > 0 { - diff := math.Abs(elog - math.Log(n.exemplars[nIdx-1].GetValue())) - if diff < md { - // The value we are about to insert is closer to the previous exemplar at the insertion point than what we calculated before in rIdx. - // v--rIdx - // |-----------x-n-----------x----------------x----x-----| - // nIdx-1--^ ^--new exemplar value - // Do not make the spread worse, replace nIdx-1 and not rIdx. - md = diff - rIdx = nIdx - 1 - } - } - if nIdx < len(n.exemplars) { - diff := math.Abs(math.Log(n.exemplars[nIdx].GetValue()) - elog) - if diff < md { - // The value we are about to insert is closer to the next exemplar at the insertion point than what we calculated before in rIdx. - // v--rIdx - // |-----------x-----------n-x----------------x----x-----| - // new exemplar value--^ ^--nIdx - // Do not make the spread worse, replace nIdx-1 and not rIdx. - rIdx = nIdx - } - } - } - - // Adjust the slice according to rIdx and nIdx. - switch { - case rIdx == nIdx: - n.exemplars[nIdx] = e - case rIdx < nIdx: - n.exemplars = append(n.exemplars[:rIdx], append(n.exemplars[rIdx+1:nIdx], append([]*dto.Exemplar{e}, n.exemplars[nIdx:]...)...)...) - case rIdx > nIdx: - n.exemplars = append(n.exemplars[:nIdx], append([]*dto.Exemplar{e}, append(n.exemplars[nIdx:rIdx], n.exemplars[rIdx+1:]...)...)...) - } -} - -type constNativeHistogram struct { - desc *Desc - dto.Histogram - labelPairs []*dto.LabelPair -} - -func validateCount(sum float64, count uint64, negativeBuckets, positiveBuckets map[int]int64, zeroBucket uint64) error { - var bucketPopulationSum int64 - for _, v := range positiveBuckets { - bucketPopulationSum += v - } - for _, v := range negativeBuckets { - bucketPopulationSum += v - } - bucketPopulationSum += int64(zeroBucket) - - // If the sum of observations is NaN, the number of observations must be greater or equal to the sum of all bucket counts. - // Otherwise, the number of observations must be equal to the sum of all bucket counts . - - if math.IsNaN(sum) && bucketPopulationSum > int64(count) || - !math.IsNaN(sum) && bucketPopulationSum != int64(count) { - return errors.New("the sum of all bucket populations exceeds the count of observations") - } - return nil -} - -// NewConstNativeHistogram returns a metric representing a Prometheus native histogram with -// fixed values for the count, sum, and positive/negative/zero bucket counts. As those parameters -// cannot be changed, the returned value does not implement the Histogram -// interface (but only the Metric interface). Users of this package will not -// have much use for it in regular operations. However, when implementing custom -// OpenTelemetry Collectors, it is useful as a throw-away metric that is generated on the fly -// to send it to Prometheus in the Collect method. -// -// zeroBucket counts all (positive and negative) -// observations in the zero bucket (with an absolute value less or equal -// the current threshold). -// positiveBuckets and negativeBuckets are separate maps for negative and positive -// observations. The map's value is an int64, counting observations in -// that bucket. The map's key is the -// index of the bucket according to the used -// Schema. Index 0 is for an upper bound of 1 in positive buckets and for a lower bound of -1 in negative buckets. -// NewConstNativeHistogram returns an error if -// - the length of labelValues is not consistent with the variable labels in Desc or if Desc is invalid. -// - the schema passed is not between 8 and -4 -// - the sum of counts in all buckets including the zero bucket does not equal the count if sum is not NaN (or exceeds the count if sum is NaN) -// -// See https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#exponential-histograms for more details about the conversion from OTel to Prometheus. -func NewConstNativeHistogram( - desc *Desc, - count uint64, - sum float64, - positiveBuckets, negativeBuckets map[int]int64, - zeroBucket uint64, - schema int32, - zeroThreshold float64, - createdTimestamp time.Time, - labelValues ...string, -) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - if schema > nativeHistogramSchemaMaximum || schema < nativeHistogramSchemaMinimum { - return nil, errors.New("invalid native histogram schema") - } - if err := validateCount(sum, count, negativeBuckets, positiveBuckets, zeroBucket); err != nil { - return nil, err - } - - NegativeSpan, NegativeDelta := makeBucketsFromMap(negativeBuckets) - PositiveSpan, PositiveDelta := makeBucketsFromMap(positiveBuckets) - ret := &constNativeHistogram{ - desc: desc, - Histogram: dto.Histogram{ - CreatedTimestamp: timestamppb.New(createdTimestamp), - Schema: &schema, - ZeroThreshold: &zeroThreshold, - SampleCount: &count, - SampleSum: &sum, - - NegativeSpan: NegativeSpan, - NegativeDelta: NegativeDelta, - - PositiveSpan: PositiveSpan, - PositiveDelta: PositiveDelta, - - ZeroCount: proto.Uint64(zeroBucket), - }, - labelPairs: MakeLabelPairs(desc, labelValues), - } - if *ret.ZeroThreshold == 0 && *ret.ZeroCount == 0 && len(ret.PositiveSpan) == 0 && len(ret.NegativeSpan) == 0 { - ret.PositiveSpan = []*dto.BucketSpan{{ - Offset: proto.Int32(0), - Length: proto.Uint32(0), - }} - } - return ret, nil -} - -// MustNewConstNativeHistogram is a version of NewConstNativeHistogram that panics where -// NewConstNativeHistogram would have returned an error. -func MustNewConstNativeHistogram( - desc *Desc, - count uint64, - sum float64, - positiveBuckets, negativeBuckets map[int]int64, - zeroBucket uint64, - nativeHistogramSchema int32, - nativeHistogramZeroThreshold float64, - createdTimestamp time.Time, - labelValues ...string, -) Metric { - nativehistogram, err := NewConstNativeHistogram(desc, - count, - sum, - positiveBuckets, - negativeBuckets, - zeroBucket, - nativeHistogramSchema, - nativeHistogramZeroThreshold, - createdTimestamp, - labelValues...) - if err != nil { - panic(err) - } - return nativehistogram -} - -func (h *constNativeHistogram) Desc() *Desc { - return h.desc -} - -func (h *constNativeHistogram) Write(out *dto.Metric) error { - out.Histogram = &h.Histogram - out.Label = h.labelPairs - return nil -} - -func makeBucketsFromMap(buckets map[int]int64) ([]*dto.BucketSpan, []int64) { - if len(buckets) == 0 { - return nil, nil - } - var ii []int - for k := range buckets { - ii = append(ii, k) - } - sort.Ints(ii) - - var ( - spans []*dto.BucketSpan - deltas []int64 - prevCount int64 - nextI int - ) - - appendDelta := func(count int64) { - *spans[len(spans)-1].Length++ - deltas = append(deltas, count-prevCount) - prevCount = count - } - - for n, i := range ii { - count := buckets[i] - // Multiple spans with only small gaps in between are probably - // encoded more efficiently as one larger span with a few empty - // buckets. Needs some research to find the sweet spot. For now, - // we assume that gaps of one or two buckets should not create - // a new span. - iDelta := int32(i - nextI) - if n == 0 || iDelta > 2 { - // We have to create a new span, either because we are - // at the very beginning, or because we have found a gap - // of more than two buckets. - spans = append(spans, &dto.BucketSpan{ - Offset: proto.Int32(iDelta), - Length: proto.Uint32(0), - }) - } else { - // We have found a small gap (or no gap at all). - // Insert empty buckets as needed. - for j := int32(0); j < iDelta; j++ { - appendDelta(0) - } - } - appendDelta(count) - nextI = i + 1 - } - return spans, deltas -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/difflib.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/difflib.go index 8b016355ad..a595a20362 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/difflib.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/difflib.go @@ -22,18 +22,17 @@ import ( "bytes" "fmt" "io" - "strconv" "strings" ) -func minInt(a, b int) int { +func min(a, b int) int { if a < b { return a } return b } -func maxInt(a, b int) int { +func max(a, b int) int { if a > b { return a } @@ -428,12 +427,12 @@ func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { if codes[0].Tag == 'e' { c := codes[0] i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[0] = OpCode{c.Tag, maxInt(i1, i2-n), i2, maxInt(j1, j2-n), j2} + codes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2} } if codes[len(codes)-1].Tag == 'e' { c := codes[len(codes)-1] i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[len(codes)-1] = OpCode{c.Tag, i1, minInt(i2, i1+n), j1, minInt(j2, j1+n)} + codes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)} } nn := n + n groups := [][]OpCode{} @@ -444,12 +443,12 @@ func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { // there is a large range with no changes. if c.Tag == 'e' && i2-i1 > nn { group = append(group, OpCode{ - c.Tag, i1, minInt(i2, i1+n), - j1, minInt(j2, j1+n), + c.Tag, i1, min(i2, i1+n), + j1, min(j2, j1+n), }) groups = append(groups, group) group = []OpCode{} - i1, j1 = maxInt(i1, i2-n), maxInt(j1, j2-n) + i1, j1 = max(i1, i2-n), max(j1, j2-n) } group = append(group, OpCode{c.Tag, i1, i2, j1, j2}) } @@ -516,7 +515,7 @@ func (m *SequenceMatcher) QuickRatio() float64 { // is faster to compute than either .Ratio() or .QuickRatio(). func (m *SequenceMatcher) RealQuickRatio() float64 { la, lb := len(m.a), len(m.b) - return calculateRatio(minInt(la, lb), la+lb) + return calculateRatio(min(la, lb), la+lb) } // Convert range to the "ed" format @@ -525,7 +524,7 @@ func formatRangeUnified(start, stop int) string { beginning := start + 1 // lines start numbering with one length := stop - start if length == 1 { - return strconv.Itoa(beginning) + return fmt.Sprintf("%d", beginning) } if length == 0 { beginning-- // empty ranges begin at line just before the range diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/go_collector_options.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/go_collector_options.go index a4fa6eabd7..723b45d644 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/go_collector_options.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/go_collector_options.go @@ -30,5 +30,3 @@ type GoCollectorOptions struct { RuntimeMetricSumForHist map[string]string RuntimeMetricRules []GoCollectorRule } - -var GoCollectorDefaultRuntimeMetrics = regexp.MustCompile(`/gc/gogc:percent|/gc/gomemlimit:bytes|/sched/gomaxprocs:threads`) diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go index f7f97ef926..97d17d6cb6 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go @@ -66,8 +66,7 @@ func RuntimeMetricsToProm(d *metrics.Description) (string, string, string, bool) name += "_total" } - // Our current conversion moves to legacy naming, so use legacy validation. - valid := model.IsValidLegacyMetricName(namespace + "_" + subsystem + "_" + name) + valid := model.IsValidMetricName(model.LabelValue(namespace + "_" + subsystem + "_" + name)) switch d.Kind { case metrics.KindUint64: case metrics.KindFloat64: diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/metric.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/metric.go index 592eec3e24..f018e57237 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/metric.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/metric.go @@ -108,23 +108,15 @@ func BuildFQName(namespace, subsystem, name string) string { if name == "" { return "" } - - sb := strings.Builder{} - sb.Grow(len(namespace) + len(subsystem) + len(name) + 2) - - if namespace != "" { - sb.WriteString(namespace) - sb.WriteString("_") - } - - if subsystem != "" { - sb.WriteString(subsystem) - sb.WriteString("_") + switch { + case namespace != "" && subsystem != "": + return strings.Join([]string{namespace, subsystem, name}, "_") + case namespace != "": + return strings.Join([]string{namespace, name}, "_") + case subsystem != "": + return strings.Join([]string{subsystem, name}, "_") } - - sb.WriteString(name) - - return sb.String() + return name } type invalidMetric struct { @@ -242,7 +234,7 @@ func NewMetricWithExemplars(m Metric, exemplars ...Exemplar) (Metric, error) { ) for i, e := range exemplars { ts := e.Timestamp - if ts.IsZero() { + if ts == (time.Time{}) { ts = now } exs[i], err = newExemplar(e.Value, ts, e.Labels) diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go index e7bce8b58e..8548dd18ed 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go @@ -22,16 +22,14 @@ import ( ) type processCollector struct { - collectFn func(chan<- Metric) - describeFn func(chan<- *Desc) - pidFn func() (int, error) - reportErrors bool - cpuTotal *Desc - openFDs, maxFDs *Desc - vsize, maxVsize *Desc - rss *Desc - startTime *Desc - inBytes, outBytes *Desc + collectFn func(chan<- Metric) + pidFn func() (int, error) + reportErrors bool + cpuTotal *Desc + openFDs, maxFDs *Desc + vsize, maxVsize *Desc + rss *Desc + startTime *Desc } // ProcessCollectorOpts defines the behavior of a process metrics collector @@ -102,16 +100,6 @@ func NewProcessCollector(opts ProcessCollectorOpts) Collector { "Start time of the process since unix epoch in seconds.", nil, nil, ), - inBytes: NewDesc( - ns+"process_network_receive_bytes_total", - "Number of bytes received by the process over the network.", - nil, nil, - ), - outBytes: NewDesc( - ns+"process_network_transmit_bytes_total", - "Number of bytes sent by the process over the network.", - nil, nil, - ), } if opts.PidFn == nil { @@ -123,23 +111,24 @@ func NewProcessCollector(opts ProcessCollectorOpts) Collector { // Set up process metric collection if supported by the runtime. if canCollectProcess() { c.collectFn = c.processCollect - c.describeFn = c.describe } else { - c.collectFn = c.errorCollectFn - c.describeFn = c.errorDescribeFn + c.collectFn = func(ch chan<- Metric) { + c.reportError(ch, nil, errors.New("process metrics not supported on this platform")) + } } return c } -func (c *processCollector) errorCollectFn(ch chan<- Metric) { - c.reportError(ch, nil, errors.New("process metrics not supported on this platform")) -} - -func (c *processCollector) errorDescribeFn(ch chan<- *Desc) { - if c.reportErrors { - ch <- NewInvalidDesc(errors.New("process metrics not supported on this platform")) - } +// Describe returns all descriptions of the collector. +func (c *processCollector) Describe(ch chan<- *Desc) { + ch <- c.cpuTotal + ch <- c.openFDs + ch <- c.maxFDs + ch <- c.vsize + ch <- c.maxVsize + ch <- c.rss + ch <- c.startTime } // Collect returns the current state of all metrics of the collector. @@ -147,11 +136,6 @@ func (c *processCollector) Collect(ch chan<- Metric) { c.collectFn(ch) } -// Describe returns all descriptions of the collector. -func (c *processCollector) Describe(ch chan<- *Desc) { - c.describeFn(ch) -} - func (c *processCollector) reportError(ch chan<- Metric, desc *Desc, err error) { if !c.reportErrors { return diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_darwin.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_darwin.go deleted file mode 100644 index 0a61b98461..0000000000 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_darwin.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2024 The Prometheus 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. - -//go:build darwin && !ios - -package prometheus - -import ( - "errors" - "fmt" - "os" - "syscall" - "time" - - "golang.org/x/sys/unix" -) - -// notImplementedErr is returned by stub functions that replace cgo functions, when cgo -// isn't available. -var notImplementedErr = errors.New("not implemented") - -type memoryInfo struct { - vsize uint64 // Virtual memory size in bytes - rss uint64 // Resident memory size in bytes -} - -func canCollectProcess() bool { - return true -} - -func getSoftLimit(which int) (uint64, error) { - rlimit := syscall.Rlimit{} - - if err := syscall.Getrlimit(which, &rlimit); err != nil { - return 0, err - } - - return rlimit.Cur, nil -} - -func getOpenFileCount() (float64, error) { - // Alternately, the undocumented proc_pidinfo(PROC_PIDLISTFDS) can be used to - // return a list of open fds, but that requires a way to call C APIs. The - // benefits, however, include fewer system calls and not failing when at the - // open file soft limit. - - if dir, err := os.Open("/dev/fd"); err != nil { - return 0.0, err - } else { - defer dir.Close() - - // Avoid ReadDir(), as it calls stat(2) on each descriptor. Not only is - // that info not used, but KQUEUE descriptors fail stat(2), which causes - // the whole method to fail. - if names, err := dir.Readdirnames(0); err != nil { - return 0.0, err - } else { - // Subtract 1 to ignore the open /dev/fd descriptor above. - return float64(len(names) - 1), nil - } - } -} - -func (c *processCollector) processCollect(ch chan<- Metric) { - if procs, err := unix.SysctlKinfoProcSlice("kern.proc.pid", os.Getpid()); err == nil { - if len(procs) == 1 { - startTime := float64(procs[0].Proc.P_starttime.Nano() / 1e9) - ch <- MustNewConstMetric(c.startTime, GaugeValue, startTime) - } else { - err = fmt.Errorf("sysctl() returned %d proc structs (expected 1)", len(procs)) - c.reportError(ch, c.startTime, err) - } - } else { - c.reportError(ch, c.startTime, err) - } - - // The proc structure returned by kern.proc.pid above has an Rusage member, - // but it is not filled in, so it needs to be fetched by getrusage(2). For - // that call, the UTime, STime, and Maxrss members are filled out, but not - // Ixrss, Idrss, or Isrss for the memory usage. Memory stats will require - // access to the C API to call task_info(TASK_BASIC_INFO). - rusage := unix.Rusage{} - - if err := unix.Getrusage(syscall.RUSAGE_SELF, &rusage); err == nil { - cpuTime := time.Duration(rusage.Stime.Nano() + rusage.Utime.Nano()).Seconds() - ch <- MustNewConstMetric(c.cpuTotal, CounterValue, cpuTime) - } else { - c.reportError(ch, c.cpuTotal, err) - } - - if memInfo, err := getMemory(); err == nil { - ch <- MustNewConstMetric(c.rss, GaugeValue, float64(memInfo.rss)) - ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(memInfo.vsize)) - } else if !errors.Is(err, notImplementedErr) { - // Don't report an error when support is not compiled in. - c.reportError(ch, c.rss, err) - c.reportError(ch, c.vsize, err) - } - - if fds, err := getOpenFileCount(); err == nil { - ch <- MustNewConstMetric(c.openFDs, GaugeValue, fds) - } else { - c.reportError(ch, c.openFDs, err) - } - - if openFiles, err := getSoftLimit(syscall.RLIMIT_NOFILE); err == nil { - ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(openFiles)) - } else { - c.reportError(ch, c.maxFDs, err) - } - - if addressSpace, err := getSoftLimit(syscall.RLIMIT_AS); err == nil { - ch <- MustNewConstMetric(c.maxVsize, GaugeValue, float64(addressSpace)) - } else { - c.reportError(ch, c.maxVsize, err) - } - - // TODO: socket(PF_SYSTEM) to fetch "com.apple.network.statistics" might - // be able to get the per-process network send/receive counts. -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/internal/compression.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_js.go similarity index 70% rename from go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/internal/compression.go rename to go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_js.go index c5039590f7..b1e363d6cf 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/internal/compression.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_js.go @@ -1,4 +1,4 @@ -// Copyright 2025 The Prometheus Authors +// Copyright 2019 The Prometheus 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 @@ -11,11 +11,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -package internal +//go:build js +// +build js -import ( - "io" -) +package prometheus -// NewZstdWriter enables zstd write support if non-nil. -var NewZstdWriter func(rw io.Writer) (_ io.Writer, closeWriter func(), _ error) +func canCollectProcess() bool { + return false +} + +func (c *processCollector) processCollect(ch chan<- Metric) { + // noop on this platform + return +} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.c b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.c deleted file mode 100644 index d00a24315d..0000000000 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.c +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2024 The Prometheus 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. - -//go:build darwin && !ios && cgo - -#include -#include -#include - -// The compiler warns that mach/shared_memory_server.h is deprecated, and to use -// mach/shared_region.h instead. But that doesn't define -// SHARED_DATA_REGION_SIZE or SHARED_TEXT_REGION_SIZE, so redefine them here and -// avoid a warning message when running tests. -#define GLOBAL_SHARED_TEXT_SEGMENT 0x90000000U -#define SHARED_DATA_REGION_SIZE 0x10000000 -#define SHARED_TEXT_REGION_SIZE 0x10000000 - - -int get_memory_info(unsigned long long *rss, unsigned long long *vsize) -{ - // This is lightly adapted from how ps(1) obtains its memory info. - // https://github.com/apple-oss-distributions/adv_cmds/blob/8744084ea0ff41ca4bb96b0f9c22407d0e48e9b7/ps/tasks.c#L109 - - kern_return_t error; - task_t task = MACH_PORT_NULL; - mach_task_basic_info_data_t info; - mach_msg_type_number_t info_count = MACH_TASK_BASIC_INFO_COUNT; - - error = task_info( - mach_task_self(), - MACH_TASK_BASIC_INFO, - (task_info_t) &info, - &info_count ); - - if( error != KERN_SUCCESS ) - { - return error; - } - - *rss = info.resident_size; - *vsize = info.virtual_size; - - { - vm_region_basic_info_data_64_t b_info; - mach_vm_address_t address = GLOBAL_SHARED_TEXT_SEGMENT; - mach_vm_size_t size; - mach_port_t object_name; - - /* - * try to determine if this task has the split libraries - * mapped in... if so, adjust its virtual size down by - * the 2 segments that are used for split libraries - */ - info_count = VM_REGION_BASIC_INFO_COUNT_64; - - error = mach_vm_region( - mach_task_self(), - &address, - &size, - VM_REGION_BASIC_INFO_64, - (vm_region_info_t) &b_info, - &info_count, - &object_name); - - if (error == KERN_SUCCESS) { - if (b_info.reserved && size == (SHARED_TEXT_REGION_SIZE) && - *vsize > (SHARED_TEXT_REGION_SIZE + SHARED_DATA_REGION_SIZE)) { - *vsize -= (SHARED_TEXT_REGION_SIZE + SHARED_DATA_REGION_SIZE); - } - } - } - - return 0; -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.go deleted file mode 100644 index 9ac53f9992..0000000000 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2024 The Prometheus 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. - -//go:build darwin && !ios && cgo - -package prometheus - -/* -int get_memory_info(unsigned long long *rss, unsigned long long *vs); -*/ -import "C" -import "fmt" - -func getMemory() (*memoryInfo, error) { - var rss, vsize C.ulonglong - - if err := C.get_memory_info(&rss, &vsize); err != 0 { - return nil, fmt.Errorf("task_info() failed with 0x%x", int(err)) - } - - return &memoryInfo{vsize: uint64(vsize), rss: uint64(rss)}, nil -} - -// describe returns all descriptions of the collector for Darwin. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - ch <- c.cpuTotal - ch <- c.openFDs - ch <- c.maxFDs - ch <- c.maxVsize - ch <- c.startTime - ch <- c.rss - ch <- c.vsize - - /* the process could be collected but not implemented yet - ch <- c.inBytes - ch <- c.outBytes - */ -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_nocgo_darwin.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_nocgo_darwin.go deleted file mode 100644 index 8ddb0995d6..0000000000 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_nocgo_darwin.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2024 The Prometheus 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. - -//go:build darwin && !ios && !cgo - -package prometheus - -func getMemory() (*memoryInfo, error) { - return nil, notImplementedErr -} - -// describe returns all descriptions of the collector for Darwin. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - ch <- c.cpuTotal - ch <- c.openFDs - ch <- c.maxFDs - ch <- c.maxVsize - ch <- c.startTime - - /* the process could be collected but not implemented yet - ch <- c.rss - ch <- c.vsize - ch <- c.inBytes - ch <- c.outBytes - */ -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_not_supported.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_not_supported.go deleted file mode 100644 index 7732b7f376..0000000000 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_not_supported.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2023 The Prometheus 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. - -//go:build wasip1 || js || ios -// +build wasip1 js ios - -package prometheus - -func canCollectProcess() bool { - return false -} - -func (c *processCollector) processCollect(ch chan<- Metric) { - c.errorCollectFn(ch) -} - -// describe returns all descriptions of the collector for wasip1 and js. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - c.errorDescribeFn(ch) -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_procfsenabled.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go similarity index 63% rename from go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_procfsenabled.go rename to go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go index 9f4b130bef..8c1136ceea 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_procfsenabled.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go @@ -11,8 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build !windows && !js && !wasip1 && !darwin -// +build !windows,!js,!wasip1,!darwin +//go:build !windows && !js && !wasip1 +// +build !windows,!js,!wasip1 package prometheus @@ -63,34 +63,4 @@ func (c *processCollector) processCollect(ch chan<- Metric) { } else { c.reportError(ch, nil, err) } - - if netstat, err := p.Netstat(); err == nil { - var inOctets, outOctets float64 - if netstat.IpExt.InOctets != nil { - inOctets = *netstat.IpExt.InOctets - } - if netstat.IpExt.OutOctets != nil { - outOctets = *netstat.IpExt.OutOctets - } - ch <- MustNewConstMetric(c.inBytes, CounterValue, inOctets) - ch <- MustNewConstMetric(c.outBytes, CounterValue, outOctets) - } else { - c.reportError(ch, nil, err) - } -} - -// describe returns all descriptions of the collector for others than windows, js, wasip1 and darwin. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - ch <- c.cpuTotal - ch <- c.openFDs - ch <- c.maxFDs - ch <- c.vsize - ch <- c.maxVsize - ch <- c.rss - ch <- c.startTime - ch <- c.inBytes - ch <- c.outBytes } diff --git a/go-controller/vendor/github.com/containernetworking/cni/pkg/ns/ns_windows.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_wasip1.go similarity index 64% rename from go-controller/vendor/github.com/containernetworking/cni/pkg/ns/ns_windows.go rename to go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_wasip1.go index cffe136178..d8d9a6d7a2 100644 --- a/go-controller/vendor/github.com/containernetworking/cni/pkg/ns/ns_windows.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_wasip1.go @@ -1,10 +1,9 @@ -// Copyright 2022 CNI authors -// +// Copyright 2023 The Prometheus 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 +// 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, @@ -12,10 +11,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -package ns +//go:build wasip1 +// +build wasip1 + +package prometheus -import "github.com/containernetworking/cni/pkg/types" +func canCollectProcess() bool { + return false +} -func CheckNetNS(nsPath string) (bool, *types.Error) { - return false, nil +func (*processCollector) processCollect(chan<- Metric) { + // noop on this platform + return } diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go index fa474289ef..f973398df2 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go @@ -79,10 +79,14 @@ func getProcessHandleCount(handle windows.Handle) (uint32, error) { } func (c *processCollector) processCollect(ch chan<- Metric) { - h := windows.CurrentProcess() + h, err := windows.GetCurrentProcess() + if err != nil { + c.reportError(ch, nil, err) + return + } var startTime, exitTime, kernelTime, userTime windows.Filetime - err := windows.GetProcessTimes(h, &startTime, &exitTime, &kernelTime, &userTime) + err = windows.GetProcessTimes(h, &startTime, &exitTime, &kernelTime, &userTime) if err != nil { c.reportError(ch, nil, err) return @@ -107,19 +111,6 @@ func (c *processCollector) processCollect(ch chan<- Metric) { ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(16*1024*1024)) // Windows has a hard-coded max limit, not per-process. } -// describe returns all descriptions of the collector for windows. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - ch <- c.cpuTotal - ch <- c.openFDs - ch <- c.maxFDs - ch <- c.vsize - ch <- c.rss - ch <- c.startTime -} - func fileTimeToSeconds(ft windows.Filetime) float64 { return float64(uint64(ft.HighDateTime)<<32+uint64(ft.LowDateTime)) / 1e7 } diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go index 315eab5f17..9819917b83 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go @@ -76,12 +76,6 @@ func (r *responseWriterDelegator) Write(b []byte) (int, error) { return n, err } -// Unwrap lets http.ResponseController get the underlying http.ResponseWriter, -// by implementing the [rwUnwrapper](https://cs.opensource.google/go/go/+/refs/tags/go1.21.4:src/net/http/responsecontroller.go;l=42-44) interface. -func (r *responseWriterDelegator) Unwrap() http.ResponseWriter { - return r.ResponseWriter -} - type ( closeNotifierDelegator struct{ *responseWriterDelegator } flusherDelegator struct{ *responseWriterDelegator } diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go index 763d99e362..09b8d2fbea 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go @@ -38,14 +38,13 @@ import ( "io" "net/http" "strconv" + "strings" "sync" "time" "github.com/prometheus/common/expfmt" - "github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil" "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promhttp/internal" ) const ( @@ -55,24 +54,6 @@ const ( processStartTimeHeader = "Process-Start-Time-Unix" ) -// Compression represents the content encodings handlers support for the HTTP -// responses. -type Compression string - -const ( - Identity Compression = "identity" - Gzip Compression = "gzip" - Zstd Compression = "zstd" -) - -func defaultCompressionFormats() []Compression { - if internal.NewZstdWriter != nil { - return []Compression{Identity, Gzip, Zstd} - } else { - return []Compression{Identity, Gzip} - } -} - var gzipPool = sync.Pool{ New: func() interface{} { return gzip.NewWriter(nil) @@ -141,18 +122,6 @@ func HandlerForTransactional(reg prometheus.TransactionalGatherer, opts HandlerO } } - // Select compression formats to offer based on default or user choice. - var compressions []string - if !opts.DisableCompression { - offers := defaultCompressionFormats() - if len(opts.OfferedCompressions) > 0 { - offers = opts.OfferedCompressions - } - for _, comp := range offers { - compressions = append(compressions, string(comp)) - } - } - h := http.HandlerFunc(func(rsp http.ResponseWriter, req *http.Request) { if !opts.ProcessStartTime.IsZero() { rsp.Header().Set(processStartTimeHeader, strconv.FormatInt(opts.ProcessStartTime.Unix(), 10)) @@ -196,30 +165,22 @@ func HandlerForTransactional(reg prometheus.TransactionalGatherer, opts HandlerO } else { contentType = expfmt.Negotiate(req.Header) } - rsp.Header().Set(contentTypeHeader, string(contentType)) + header := rsp.Header() + header.Set(contentTypeHeader, string(contentType)) - w, encodingHeader, closeWriter, err := negotiateEncodingWriter(req, rsp, compressions) - if err != nil { - if opts.ErrorLog != nil { - opts.ErrorLog.Println("error getting writer", err) - } - w = io.Writer(rsp) - encodingHeader = string(Identity) - } + w := io.Writer(rsp) + if !opts.DisableCompression && gzipAccepted(req.Header) { + header.Set(contentEncodingHeader, "gzip") + gz := gzipPool.Get().(*gzip.Writer) + defer gzipPool.Put(gz) - defer closeWriter() + gz.Reset(w) + defer gz.Close() - // Set Content-Encoding only when data is compressed - if encodingHeader != string(Identity) { - rsp.Header().Set(contentEncodingHeader, encodingHeader) + w = gz } - var enc expfmt.Encoder - if opts.EnableOpenMetricsTextCreatedSamples { - enc = expfmt.NewEncoder(w, contentType, expfmt.WithCreatedLines()) - } else { - enc = expfmt.NewEncoder(w, contentType) - } + enc := expfmt.NewEncoder(w, contentType) // handleError handles the error according to opts.ErrorHandling // and returns true if we have to abort after the handling. @@ -382,19 +343,9 @@ type HandlerOpts struct { // no effect on the HTTP status code because ErrorHandling is set to // ContinueOnError. Registry prometheus.Registerer - // DisableCompression disables the response encoding (compression) and - // encoding negotiation. If true, the handler will - // never compress the response, even if requested - // by the client and the OfferedCompressions field is set. + // If DisableCompression is true, the handler will never compress the + // response, even if requested by the client. DisableCompression bool - // OfferedCompressions is a set of encodings (compressions) handler will - // try to offer when negotiating with the client. This defaults to identity, gzip - // and zstd. - // NOTE: If handler can't agree with the client on the encodings or - // unsupported or empty encodings are set in OfferedCompressions, - // handler always fallbacks to no compression (identity), for - // compatibility reasons. In such cases ErrorLog will be used if set. - OfferedCompressions []Compression // The number of concurrent HTTP requests is limited to // MaxRequestsInFlight. Additional requests are responded to with 503 // Service Unavailable and a suitable message in the body. If @@ -420,21 +371,6 @@ type HandlerOpts struct { // (which changes the identity of the resulting series on the Prometheus // server). EnableOpenMetrics bool - // EnableOpenMetricsTextCreatedSamples specifies if this handler should add, extra, synthetic - // Created Timestamps for counters, histograms and summaries, which for the current - // version of OpenMetrics are defined as extra series with the same name and "_created" - // suffix. See also the OpenMetrics specification for more details - // https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#counter-1 - // - // Created timestamps are used to improve the accuracy of reset detection, - // but the way it's designed in OpenMetrics 1.0 it also dramatically increases cardinality - // if the scraper does not handle those metrics correctly (converting to created timestamp - // instead of leaving those series as-is). New OpenMetrics versions might improve - // this situation. - // - // Prometheus introduced the feature flag 'created-timestamp-zero-ingestion' - // in version 2.50.0 to handle this situation. - EnableOpenMetricsTextCreatedSamples bool // ProcessStartTime allows setting process start timevalue that will be exposed // with "Process-Start-Time-Unix" response header along with the metrics // payload. This allow callers to have efficient transformations to cumulative @@ -445,6 +381,19 @@ type HandlerOpts struct { ProcessStartTime time.Time } +// gzipAccepted returns whether the client will accept gzip-encoded content. +func gzipAccepted(header http.Header) bool { + a := header.Get(acceptEncodingHeader) + parts := strings.Split(a, ",") + for _, part := range parts { + part = strings.TrimSpace(part) + if part == "gzip" || strings.HasPrefix(part, "gzip;") { + return true + } + } + return false +} + // httpError removes any content-encoding header and then calls http.Error with // the provided error and http.StatusInternalServerError. Error contents is // supposed to be uncompressed plain text. Same as with a plain http.Error, this @@ -457,36 +406,3 @@ func httpError(rsp http.ResponseWriter, err error) { http.StatusInternalServerError, ) } - -// negotiateEncodingWriter reads the Accept-Encoding header from a request and -// selects the right compression based on an allow-list of supported -// compressions. It returns a writer implementing the compression and an the -// correct value that the caller can set in the response header. -func negotiateEncodingWriter(r *http.Request, rw io.Writer, compressions []string) (_ io.Writer, encodingHeaderValue string, closeWriter func(), _ error) { - if len(compressions) == 0 { - return rw, string(Identity), func() {}, nil - } - - // TODO(mrueg): Replace internal/github.com/gddo once https://github.com/golang/go/issues/19307 is implemented. - selected := httputil.NegotiateContentEncoding(r, compressions) - - switch selected { - case "zstd": - if internal.NewZstdWriter == nil { - // The content encoding was not implemented yet. - return nil, "", func() {}, fmt.Errorf("content compression format not recognized: %s. Valid formats are: %s", selected, defaultCompressionFormats()) - } - writer, closeWriter, err := internal.NewZstdWriter(rw) - return writer, selected, closeWriter, err - case "gzip": - gz := gzipPool.Get().(*gzip.Writer) - gz.Reset(rw) - return gz, selected, func() { _ = gz.Close(); gzipPool.Put(gz) }, nil - case "identity": - // This means the content is not compressed. - return rw, selected, func() {}, nil - default: - // The content encoding was not implemented yet. - return nil, "", func() {}, fmt.Errorf("content compression format not recognized: %s. Valid formats are: %s", selected, defaultCompressionFormats()) - } -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/registry.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/registry.go index c6fd2f58b7..5e2ced25a0 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/registry.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/registry.go @@ -314,17 +314,16 @@ func (r *Registry) Register(c Collector) error { if dimHash != desc.dimHash { return fmt.Errorf("a previously registered descriptor with the same fully-qualified name as %s has different label names or a different help string", desc) } - continue - } - - // ...then check the new descriptors already seen. - if dimHash, exists := newDimHashesByName[desc.fqName]; exists { - if dimHash != desc.dimHash { - return fmt.Errorf("descriptors reported by collector have inconsistent label names or help strings for the same fully-qualified name, offender is %s", desc) + } else { + // ...then check the new descriptors already seen. + if dimHash, exists := newDimHashesByName[desc.fqName]; exists { + if dimHash != desc.dimHash { + return fmt.Errorf("descriptors reported by collector have inconsistent label names or help strings for the same fully-qualified name, offender is %s", desc) + } + } else { + newDimHashesByName[desc.fqName] = desc.dimHash } - continue } - newDimHashesByName[desc.fqName] = desc.dimHash } // A Collector yielding no Desc at all is considered unchecked. if len(newDescIDs) == 0 { diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/summary.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/summary.go index ac5203c6fa..1462704446 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/summary.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/summary.go @@ -243,7 +243,6 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { s := &summary{ desc: desc, - now: opts.now, objectives: opts.Objectives, sortedObjectives: make([]float64, 0, len(opts.Objectives)), @@ -281,8 +280,6 @@ type summary struct { desc *Desc - now func() time.Time - objectives map[float64]float64 sortedObjectives []float64 @@ -310,7 +307,7 @@ func (s *summary) Observe(v float64) { s.bufMtx.Lock() defer s.bufMtx.Unlock() - now := s.now() + now := time.Now() if now.After(s.hotBufExpTime) { s.asyncFlush(now) } @@ -329,7 +326,7 @@ func (s *summary) Write(out *dto.Metric) error { s.bufMtx.Lock() s.mtx.Lock() // Swap bufs even if hotBuf is empty to set new hotBufExpTime. - s.swapBufs(s.now()) + s.swapBufs(time.Now()) s.bufMtx.Unlock() s.flushColdBuf() @@ -786,45 +783,3 @@ func MustNewConstSummary( } return m } - -// NewConstSummaryWithCreatedTimestamp does the same thing as NewConstSummary but sets the created timestamp. -func NewConstSummaryWithCreatedTimestamp( - desc *Desc, - count uint64, - sum float64, - quantiles map[float64]float64, - ct time.Time, - labelValues ...string, -) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - return &constSummary{ - desc: desc, - count: count, - sum: sum, - quantiles: quantiles, - labelPairs: MakeLabelPairs(desc, labelValues), - createdTs: timestamppb.New(ct), - }, nil -} - -// MustNewConstSummaryWithCreatedTimestamp is a version of NewConstSummaryWithCreatedTimestamp that panics where -// NewConstSummaryWithCreatedTimestamp would have returned an error. -func MustNewConstSummaryWithCreatedTimestamp( - desc *Desc, - count uint64, - sum float64, - quantiles map[float64]float64, - ct time.Time, - labelValues ...string, -) Metric { - m, err := NewConstSummaryWithCreatedTimestamp(desc, count, sum, quantiles, ct, labelValues...) - if err != nil { - panic(err) - } - return m -} diff --git a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/vec.go b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/vec.go index 2c808eece0..955cfd59f8 100644 --- a/go-controller/vendor/github.com/prometheus/client_golang/prometheus/vec.go +++ b/go-controller/vendor/github.com/prometheus/client_golang/prometheus/vec.go @@ -507,7 +507,7 @@ func (m *metricMap) getOrCreateMetricWithLabelValues( return metric } -// getOrCreateMetricWithLabels retrieves the metric by hash and label value +// getOrCreateMetricWithLabelValues retrieves the metric by hash and label value // or creates it and returns the new one. // // This function holds the mutex. diff --git a/go-controller/vendor/github.com/prometheus/common/expfmt/decode.go b/go-controller/vendor/github.com/prometheus/common/expfmt/decode.go index 1448439b7f..25cfaa2164 100644 --- a/go-controller/vendor/github.com/prometheus/common/expfmt/decode.go +++ b/go-controller/vendor/github.com/prometheus/common/expfmt/decode.go @@ -45,7 +45,7 @@ func ResponseFormat(h http.Header) Format { mediatype, params, err := mime.ParseMediaType(ct) if err != nil { - return FmtUnknown + return fmtUnknown } const textType = "text/plain" @@ -53,21 +53,21 @@ func ResponseFormat(h http.Header) Format { switch mediatype { case ProtoType: if p, ok := params["proto"]; ok && p != ProtoProtocol { - return FmtUnknown + return fmtUnknown } if e, ok := params["encoding"]; ok && e != "delimited" { - return FmtUnknown + return fmtUnknown } - return FmtProtoDelim + return fmtProtoDelim case textType: if v, ok := params["version"]; ok && v != TextVersion { - return FmtUnknown + return fmtUnknown } - return FmtText + return fmtText } - return FmtUnknown + return fmtUnknown } // NewDecoder returns a new decoder based on the given input format. diff --git a/go-controller/vendor/github.com/prometheus/common/expfmt/encode.go b/go-controller/vendor/github.com/prometheus/common/expfmt/encode.go index d7f3d76f55..ff5ef7a9d9 100644 --- a/go-controller/vendor/github.com/prometheus/common/expfmt/encode.go +++ b/go-controller/vendor/github.com/prometheus/common/expfmt/encode.go @@ -68,7 +68,7 @@ func Negotiate(h http.Header) Format { if escapeParam := ac.Params[model.EscapingKey]; escapeParam != "" { switch Format(escapeParam) { case model.AllowUTF8, model.EscapeUnderscores, model.EscapeDots, model.EscapeValues: - escapingScheme = Format("; escaping=" + escapeParam) + escapingScheme = Format(fmt.Sprintf("; escaping=%s", escapeParam)) default: // If the escaping parameter is unknown, ignore it. } @@ -77,18 +77,18 @@ func Negotiate(h http.Header) Format { if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol { switch ac.Params["encoding"] { case "delimited": - return FmtProtoDelim + escapingScheme + return fmtProtoDelim + escapingScheme case "text": - return FmtProtoText + escapingScheme + return fmtProtoText + escapingScheme case "compact-text": - return FmtProtoCompact + escapingScheme + return fmtProtoCompact + escapingScheme } } if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { - return FmtText + escapingScheme + return fmtText + escapingScheme } } - return FmtText + escapingScheme + return fmtText + escapingScheme } // NegotiateIncludingOpenMetrics works like Negotiate but includes @@ -101,7 +101,7 @@ func NegotiateIncludingOpenMetrics(h http.Header) Format { if escapeParam := ac.Params[model.EscapingKey]; escapeParam != "" { switch Format(escapeParam) { case model.AllowUTF8, model.EscapeUnderscores, model.EscapeDots, model.EscapeValues: - escapingScheme = Format("; escaping=" + escapeParam) + escapingScheme = Format(fmt.Sprintf("; escaping=%s", escapeParam)) default: // If the escaping parameter is unknown, ignore it. } @@ -110,26 +110,26 @@ func NegotiateIncludingOpenMetrics(h http.Header) Format { if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol { switch ac.Params["encoding"] { case "delimited": - return FmtProtoDelim + escapingScheme + return fmtProtoDelim + escapingScheme case "text": - return FmtProtoText + escapingScheme + return fmtProtoText + escapingScheme case "compact-text": - return FmtProtoCompact + escapingScheme + return fmtProtoCompact + escapingScheme } } if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { - return FmtText + escapingScheme + return fmtText + escapingScheme } if ac.Type+"/"+ac.SubType == OpenMetricsType && (ver == OpenMetricsVersion_0_0_1 || ver == OpenMetricsVersion_1_0_0 || ver == "") { switch ver { case OpenMetricsVersion_1_0_0: - return FmtOpenMetrics_1_0_0 + escapingScheme + return fmtOpenMetrics_1_0_0 + escapingScheme default: - return FmtOpenMetrics_0_0_1 + escapingScheme + return fmtOpenMetrics_0_0_1 + escapingScheme } } } - return FmtText + escapingScheme + return fmtText + escapingScheme } // NewEncoder returns a new encoder based on content type negotiation. All diff --git a/go-controller/vendor/github.com/prometheus/common/expfmt/expfmt.go b/go-controller/vendor/github.com/prometheus/common/expfmt/expfmt.go index b26886560d..051b38cd17 100644 --- a/go-controller/vendor/github.com/prometheus/common/expfmt/expfmt.go +++ b/go-controller/vendor/github.com/prometheus/common/expfmt/expfmt.go @@ -15,7 +15,7 @@ package expfmt import ( - "errors" + "fmt" "strings" "github.com/prometheus/common/model" @@ -32,31 +32,24 @@ type Format string // it on the wire, new content-type strings will have to be agreed upon and // added here. const ( - TextVersion = "0.0.4" - ProtoType = `application/vnd.google.protobuf` - ProtoProtocol = `io.prometheus.client.MetricFamily` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoCompact) instead. - ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";" + TextVersion = "0.0.4" + ProtoType = `application/vnd.google.protobuf` + ProtoProtocol = `io.prometheus.client.MetricFamily` + protoFmt = ProtoType + "; proto=" + ProtoProtocol + ";" OpenMetricsType = `application/openmetrics-text` OpenMetricsVersion_0_0_1 = "0.0.1" OpenMetricsVersion_1_0_0 = "1.0.0" - // The Content-Type values for the different wire protocols. Do not do direct - // comparisons to these constants, instead use the comparison functions. - // Deprecated: Use expfmt.NewFormat(expfmt.TypeUnknown) instead. - FmtUnknown Format = `` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeTextPlain) instead. - FmtText Format = `text/plain; version=` + TextVersion + `; charset=utf-8` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoDelim) instead. - FmtProtoDelim Format = ProtoFmt + ` encoding=delimited` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoText) instead. - FmtProtoText Format = ProtoFmt + ` encoding=text` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoCompact) instead. - FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeOpenMetrics) instead. - FmtOpenMetrics_1_0_0 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_1_0_0 + `; charset=utf-8` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeOpenMetrics) instead. - FmtOpenMetrics_0_0_1 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_0_0_1 + `; charset=utf-8` + // The Content-Type values for the different wire protocols. Note that these + // values are now unexported. If code was relying on comparisons to these + // constants, instead use FormatType(). + fmtUnknown Format = `` + fmtText Format = `text/plain; version=` + TextVersion + `; charset=utf-8` + fmtProtoDelim Format = protoFmt + ` encoding=delimited` + fmtProtoText Format = protoFmt + ` encoding=text` + fmtProtoCompact Format = protoFmt + ` encoding=compact-text` + fmtOpenMetrics_1_0_0 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_1_0_0 + `; charset=utf-8` + fmtOpenMetrics_0_0_1 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_0_0_1 + `; charset=utf-8` ) const ( @@ -86,17 +79,17 @@ const ( func NewFormat(t FormatType) Format { switch t { case TypeProtoCompact: - return FmtProtoCompact + return fmtProtoCompact case TypeProtoDelim: - return FmtProtoDelim + return fmtProtoDelim case TypeProtoText: - return FmtProtoText + return fmtProtoText case TypeTextPlain: - return FmtText + return fmtText case TypeOpenMetrics: - return FmtOpenMetrics_1_0_0 + return fmtOpenMetrics_1_0_0 default: - return FmtUnknown + return fmtUnknown } } @@ -104,35 +97,12 @@ func NewFormat(t FormatType) Format { // specified version number. func NewOpenMetricsFormat(version string) (Format, error) { if version == OpenMetricsVersion_0_0_1 { - return FmtOpenMetrics_0_0_1, nil + return fmtOpenMetrics_0_0_1, nil } if version == OpenMetricsVersion_1_0_0 { - return FmtOpenMetrics_1_0_0, nil + return fmtOpenMetrics_1_0_0, nil } - return FmtUnknown, errors.New("unknown open metrics version string") -} - -// WithEscapingScheme returns a copy of Format with the specified escaping -// scheme appended to the end. If an escaping scheme already exists it is -// removed. -func (f Format) WithEscapingScheme(s model.EscapingScheme) Format { - var terms []string - for _, p := range strings.Split(string(f), ";") { - toks := strings.Split(p, "=") - if len(toks) != 2 { - trimmed := strings.TrimSpace(p) - if len(trimmed) > 0 { - terms = append(terms, trimmed) - } - continue - } - key := strings.TrimSpace(toks[0]) - if key != model.EscapingKey { - terms = append(terms, strings.TrimSpace(p)) - } - } - terms = append(terms, model.EscapingKey+"="+s.String()) - return Format(strings.Join(terms, "; ")) + return fmtUnknown, fmt.Errorf("unknown open metrics version string") } // FormatType deduces an overall FormatType for the given format. diff --git a/go-controller/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go b/go-controller/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go index a21ed4ec1f..353c5e93f9 100644 --- a/go-controller/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go +++ b/go-controller/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go @@ -38,7 +38,7 @@ type EncoderOption func(*encoderOption) // WithCreatedLines is an EncoderOption that configures the OpenMetrics encoder // to include _created lines (See -// https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#counter-1). +// https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#counter-1). // Created timestamps can improve the accuracy of series reset detection, but // come with a bandwidth cost. // @@ -102,7 +102,7 @@ func WithUnit() EncoderOption { // // - According to the OM specs, the `# UNIT` line is optional, but if populated, // the unit has to be present in the metric name as its suffix: -// (see https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#unit). +// (see https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#unit). // However, in order to accommodate any potential scenario where such a change in the // metric name is not desirable, the users are here given the choice of either explicitly // opt in, in case they wish for the unit to be included in the output AND in the metric name @@ -152,8 +152,8 @@ func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...E if metricType == dto.MetricType_COUNTER && strings.HasSuffix(compliantName, "_total") { compliantName = name[:len(name)-6] } - if toOM.withUnit && in.Unit != nil && !strings.HasSuffix(compliantName, "_"+*in.Unit) { - compliantName = compliantName + "_" + *in.Unit + if toOM.withUnit && in.Unit != nil && !strings.HasSuffix(compliantName, fmt.Sprintf("_%s", *in.Unit)) { + compliantName = compliantName + fmt.Sprintf("_%s", *in.Unit) } // Comments, first HELP, then TYPE. @@ -477,7 +477,7 @@ func writeOpenMetricsNameAndLabelPairs( if name != "" { // If the name does not pass the legacy validity check, we must put the // metric name inside the braces, quoted. - if !model.IsValidLegacyMetricName(name) { + if !model.IsValidLegacyMetricName(model.LabelValue(name)) { metricInsideBraces = true err := w.WriteByte(separator) written++ diff --git a/go-controller/vendor/github.com/prometheus/common/expfmt/text_create.go b/go-controller/vendor/github.com/prometheus/common/expfmt/text_create.go index 4b86434b33..f9b8265a9e 100644 --- a/go-controller/vendor/github.com/prometheus/common/expfmt/text_create.go +++ b/go-controller/vendor/github.com/prometheus/common/expfmt/text_create.go @@ -354,7 +354,7 @@ func writeNameAndLabelPairs( if name != "" { // If the name does not pass the legacy validity check, we must put the // metric name inside the braces. - if !model.IsValidLegacyMetricName(name) { + if !model.IsValidLegacyMetricName(model.LabelValue(name)) { metricInsideBraces = true err := w.WriteByte(separator) written++ @@ -498,7 +498,7 @@ func writeInt(w enhancedWriter, i int64) (int, error) { // writeName writes a string as-is if it complies with the legacy naming // scheme, or escapes it in double quotes if not. func writeName(w enhancedWriter, name string) (int, error) { - if model.IsValidLegacyMetricName(name) { + if model.IsValidLegacyMetricName(model.LabelValue(name)) { return w.WriteString(name) } var written int diff --git a/go-controller/vendor/github.com/prometheus/common/expfmt/text_parse.go b/go-controller/vendor/github.com/prometheus/common/expfmt/text_parse.go index b4607fe4d2..26490211af 100644 --- a/go-controller/vendor/github.com/prometheus/common/expfmt/text_parse.go +++ b/go-controller/vendor/github.com/prometheus/common/expfmt/text_parse.go @@ -22,9 +22,9 @@ import ( "math" "strconv" "strings" - "unicode/utf8" dto "github.com/prometheus/client_model/go" + "google.golang.org/protobuf/proto" "github.com/prometheus/common/model" @@ -60,7 +60,6 @@ type TextParser struct { currentMF *dto.MetricFamily currentMetric *dto.Metric currentLabelPair *dto.LabelPair - currentLabelPairs []*dto.LabelPair // Temporarily stores label pairs while parsing a metric line. // The remaining member variables are only used for summaries/histograms. currentLabels map[string]string // All labels including '__name__' but excluding 'quantile'/'le' @@ -75,9 +74,6 @@ type TextParser struct { // count and sum of that summary/histogram. currentIsSummaryCount, currentIsSummarySum bool currentIsHistogramCount, currentIsHistogramSum bool - // These indicate if the metric name from the current line being parsed is inside - // braces and if that metric name was found respectively. - currentMetricIsInsideBraces, currentMetricInsideBracesIsPresent bool } // TextToMetricFamilies reads 'in' as the simple and flat text-based exchange @@ -141,15 +137,12 @@ func (p *TextParser) reset(in io.Reader) { } p.currentQuantile = math.NaN() p.currentBucket = math.NaN() - p.currentMF = nil } // startOfLine represents the state where the next byte read from p.buf is the // start of a line (or whitespace leading up to it). func (p *TextParser) startOfLine() stateFn { p.lineCount++ - p.currentMetricIsInsideBraces = false - p.currentMetricInsideBracesIsPresent = false if p.skipBlankTab(); p.err != nil { // This is the only place that we expect to see io.EOF, // which is not an error but the signal that we are done. @@ -165,9 +158,6 @@ func (p *TextParser) startOfLine() stateFn { return p.startComment case '\n': return p.startOfLine // Empty line, start the next one. - case '{': - p.currentMetricIsInsideBraces = true - return p.readingLabels } return p.readingMetricName } @@ -285,8 +275,6 @@ func (p *TextParser) startLabelName() stateFn { return nil // Unexpected end of input. } if p.currentByte == '}' { - p.currentMetric.Label = append(p.currentMetric.Label, p.currentLabelPairs...) - p.currentLabelPairs = nil if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } @@ -299,45 +287,6 @@ func (p *TextParser) startLabelName() stateFn { p.parseError(fmt.Sprintf("invalid label name for metric %q", p.currentMF.GetName())) return nil } - if p.skipBlankTabIfCurrentBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - if p.currentByte != '=' { - if p.currentMetricIsInsideBraces { - if p.currentMetricInsideBracesIsPresent { - p.parseError(fmt.Sprintf("multiple metric names for metric %q", p.currentMF.GetName())) - return nil - } - switch p.currentByte { - case ',': - p.setOrCreateCurrentMF() - if p.currentMF.Type == nil { - p.currentMF.Type = dto.MetricType_UNTYPED.Enum() - } - p.currentMetric = &dto.Metric{} - p.currentMetricInsideBracesIsPresent = true - return p.startLabelName - case '}': - p.setOrCreateCurrentMF() - if p.currentMF.Type == nil { - p.currentMF.Type = dto.MetricType_UNTYPED.Enum() - } - p.currentMetric = &dto.Metric{} - p.currentMetric.Label = append(p.currentMetric.Label, p.currentLabelPairs...) - p.currentLabelPairs = nil - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - return p.readingValue - default: - p.parseError(fmt.Sprintf("unexpected end of metric name %q", p.currentByte)) - return nil - } - } - p.parseError(fmt.Sprintf("expected '=' after label name, found %q", p.currentByte)) - p.currentLabelPairs = nil - return nil - } p.currentLabelPair = &dto.LabelPair{Name: proto.String(p.currentToken.String())} if p.currentLabelPair.GetName() == string(model.MetricNameLabel) { p.parseError(fmt.Sprintf("label name %q is reserved", model.MetricNameLabel)) @@ -347,17 +296,23 @@ func (p *TextParser) startLabelName() stateFn { // labels to 'real' labels. if !(p.currentMF.GetType() == dto.MetricType_SUMMARY && p.currentLabelPair.GetName() == model.QuantileLabel) && !(p.currentMF.GetType() == dto.MetricType_HISTOGRAM && p.currentLabelPair.GetName() == model.BucketLabel) { - p.currentLabelPairs = append(p.currentLabelPairs, p.currentLabelPair) + p.currentMetric.Label = append(p.currentMetric.Label, p.currentLabelPair) + } + if p.skipBlankTabIfCurrentBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + if p.currentByte != '=' { + p.parseError(fmt.Sprintf("expected '=' after label name, found %q", p.currentByte)) + return nil } // Check for duplicate label names. labels := make(map[string]struct{}) - for _, l := range p.currentLabelPairs { + for _, l := range p.currentMetric.Label { lName := l.GetName() if _, exists := labels[lName]; !exists { labels[lName] = struct{}{} } else { p.parseError(fmt.Sprintf("duplicate label names for metric %q", p.currentMF.GetName())) - p.currentLabelPairs = nil return nil } } @@ -390,7 +345,6 @@ func (p *TextParser) startLabelValue() stateFn { if p.currentQuantile, p.err = parseFloat(p.currentLabelPair.GetValue()); p.err != nil { // Create a more helpful error message. p.parseError(fmt.Sprintf("expected float as value for 'quantile' label, got %q", p.currentLabelPair.GetValue())) - p.currentLabelPairs = nil return nil } } else { @@ -417,19 +371,12 @@ func (p *TextParser) startLabelValue() stateFn { return p.startLabelName case '}': - if p.currentMF == nil { - p.parseError("invalid metric name") - return nil - } - p.currentMetric.Label = append(p.currentMetric.Label, p.currentLabelPairs...) - p.currentLabelPairs = nil if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } return p.readingValue default: p.parseError(fmt.Sprintf("unexpected end of label value %q", p.currentLabelPair.GetValue())) - p.currentLabelPairs = nil return nil } } @@ -638,8 +585,6 @@ func (p *TextParser) readTokenUntilNewline(recognizeEscapeSequence bool) { p.currentToken.WriteByte(p.currentByte) case 'n': p.currentToken.WriteByte('\n') - case '"': - p.currentToken.WriteByte('"') default: p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) return @@ -665,45 +610,13 @@ func (p *TextParser) readTokenUntilNewline(recognizeEscapeSequence bool) { // but not into p.currentToken. func (p *TextParser) readTokenAsMetricName() { p.currentToken.Reset() - // A UTF-8 metric name must be quoted and may have escaped characters. - quoted := false - escaped := false if !isValidMetricNameStart(p.currentByte) { return } - for p.err == nil { - if escaped { - switch p.currentByte { - case '\\': - p.currentToken.WriteByte(p.currentByte) - case 'n': - p.currentToken.WriteByte('\n') - case '"': - p.currentToken.WriteByte('"') - default: - p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) - return - } - escaped = false - } else { - switch p.currentByte { - case '"': - quoted = !quoted - if !quoted { - p.currentByte, p.err = p.buf.ReadByte() - return - } - case '\n': - p.parseError(fmt.Sprintf("metric name %q contains unescaped new-line", p.currentToken.String())) - return - case '\\': - escaped = true - default: - p.currentToken.WriteByte(p.currentByte) - } - } + for { + p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() - if !isValidMetricNameContinuation(p.currentByte, quoted) || (!quoted && p.currentByte == ' ') { + if p.err != nil || !isValidMetricNameContinuation(p.currentByte) { return } } @@ -715,45 +628,13 @@ func (p *TextParser) readTokenAsMetricName() { // but not into p.currentToken. func (p *TextParser) readTokenAsLabelName() { p.currentToken.Reset() - // A UTF-8 label name must be quoted and may have escaped characters. - quoted := false - escaped := false if !isValidLabelNameStart(p.currentByte) { return } - for p.err == nil { - if escaped { - switch p.currentByte { - case '\\': - p.currentToken.WriteByte(p.currentByte) - case 'n': - p.currentToken.WriteByte('\n') - case '"': - p.currentToken.WriteByte('"') - default: - p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) - return - } - escaped = false - } else { - switch p.currentByte { - case '"': - quoted = !quoted - if !quoted { - p.currentByte, p.err = p.buf.ReadByte() - return - } - case '\n': - p.parseError(fmt.Sprintf("label name %q contains unescaped new-line", p.currentToken.String())) - return - case '\\': - escaped = true - default: - p.currentToken.WriteByte(p.currentByte) - } - } + for { + p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() - if !isValidLabelNameContinuation(p.currentByte, quoted) || (!quoted && p.currentByte == '=') { + if p.err != nil || !isValidLabelNameContinuation(p.currentByte) { return } } @@ -779,7 +660,6 @@ func (p *TextParser) readTokenAsLabelValue() { p.currentToken.WriteByte('\n') default: p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) - p.currentLabelPairs = nil return } escaped = false @@ -838,19 +718,19 @@ func (p *TextParser) setOrCreateCurrentMF() { } func isValidLabelNameStart(b byte) bool { - return (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || b == '"' + return (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' } -func isValidLabelNameContinuation(b byte, quoted bool) bool { - return isValidLabelNameStart(b) || (b >= '0' && b <= '9') || (quoted && utf8.ValidString(string(b))) +func isValidLabelNameContinuation(b byte) bool { + return isValidLabelNameStart(b) || (b >= '0' && b <= '9') } func isValidMetricNameStart(b byte) bool { return isValidLabelNameStart(b) || b == ':' } -func isValidMetricNameContinuation(b byte, quoted bool) bool { - return isValidLabelNameContinuation(b, quoted) || b == ':' +func isValidMetricNameContinuation(b byte) bool { + return isValidLabelNameContinuation(b) || b == ':' } func isBlankOrTab(b byte) bool { @@ -895,7 +775,7 @@ func histogramMetricName(name string) string { func parseFloat(s string) (float64, error) { if strings.ContainsAny(s, "pP_") { - return 0, errors.New("unsupported character in float") + return 0, fmt.Errorf("unsupported character in float") } return strconv.ParseFloat(s, 64) } diff --git a/go-controller/vendor/github.com/prometheus/common/model/alert.go b/go-controller/vendor/github.com/prometheus/common/model/alert.go index bd3a39e3e1..80d1fe944e 100644 --- a/go-controller/vendor/github.com/prometheus/common/model/alert.go +++ b/go-controller/vendor/github.com/prometheus/common/model/alert.go @@ -14,7 +14,6 @@ package model import ( - "errors" "fmt" "time" ) @@ -90,16 +89,16 @@ func (a *Alert) StatusAt(ts time.Time) AlertStatus { // Validate checks whether the alert data is inconsistent. func (a *Alert) Validate() error { if a.StartsAt.IsZero() { - return errors.New("start time missing") + return fmt.Errorf("start time missing") } if !a.EndsAt.IsZero() && a.EndsAt.Before(a.StartsAt) { - return errors.New("start time must be before end time") + return fmt.Errorf("start time must be before end time") } if err := a.Labels.Validate(); err != nil { return fmt.Errorf("invalid label set: %w", err) } if len(a.Labels) == 0 { - return errors.New("at least one label pair required") + return fmt.Errorf("at least one label pair required") } if err := a.Annotations.Validate(); err != nil { return fmt.Errorf("invalid annotations: %w", err) diff --git a/go-controller/vendor/github.com/prometheus/common/model/labels.go b/go-controller/vendor/github.com/prometheus/common/model/labels.go index 73b7aa3e60..3317ce22ff 100644 --- a/go-controller/vendor/github.com/prometheus/common/model/labels.go +++ b/go-controller/vendor/github.com/prometheus/common/model/labels.go @@ -97,35 +97,26 @@ var LabelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$") // therewith. type LabelName string -// IsValid returns true iff the name matches the pattern of LabelNameRE when -// NameValidationScheme is set to LegacyValidation, or valid UTF-8 if -// NameValidationScheme is set to UTF8Validation. +// IsValid returns true iff name matches the pattern of LabelNameRE for legacy +// names, and iff it's valid UTF-8 if NameValidationScheme is set to +// UTF8Validation. For the legacy matching, it does not use LabelNameRE for the +// check but a much faster hardcoded implementation. func (ln LabelName) IsValid() bool { if len(ln) == 0 { return false } switch NameValidationScheme { case LegacyValidation: - return ln.IsValidLegacy() + for i, b := range ln { + if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || (b >= '0' && b <= '9' && i > 0)) { + return false + } + } case UTF8Validation: return utf8.ValidString(string(ln)) default: panic(fmt.Sprintf("Invalid name validation scheme requested: %d", NameValidationScheme)) } -} - -// IsValidLegacy returns true iff name matches the pattern of LabelNameRE for -// legacy names. It does not use LabelNameRE for the check but a much faster -// hardcoded implementation. -func (ln LabelName) IsValidLegacy() bool { - if len(ln) == 0 { - return false - } - for i, b := range ln { - if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || (b >= '0' && b <= '9' && i > 0)) { - return false - } - } return true } diff --git a/go-controller/vendor/github.com/prometheus/common/model/labelset_string.go b/go-controller/vendor/github.com/prometheus/common/model/labelset_string.go index abb2c90018..481c47b46e 100644 --- a/go-controller/vendor/github.com/prometheus/common/model/labelset_string.go +++ b/go-controller/vendor/github.com/prometheus/common/model/labelset_string.go @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build go1.21 + package model import ( diff --git a/go-controller/vendor/github.com/prometheus/common/model/labelset_string_go120.go b/go-controller/vendor/github.com/prometheus/common/model/labelset_string_go120.go new file mode 100644 index 0000000000..c4212685e7 --- /dev/null +++ b/go-controller/vendor/github.com/prometheus/common/model/labelset_string_go120.go @@ -0,0 +1,39 @@ +// Copyright 2024 The Prometheus 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. + +//go:build !go1.21 + +package model + +import ( + "fmt" + "sort" + "strings" +) + +// String was optimized using functions not available for go 1.20 +// or lower. We keep the old implementation for compatibility with client_golang. +// Once client golang drops support for go 1.20 (scheduled for August 2024), this +// file can be removed. +func (l LabelSet) String() string { + labelNames := make([]string, 0, len(l)) + for name := range l { + labelNames = append(labelNames, string(name)) + } + sort.Strings(labelNames) + lstrs := make([]string, 0, len(l)) + for _, name := range labelNames { + lstrs = append(lstrs, fmt.Sprintf("%s=%q", name, l[LabelName(name)])) + } + return fmt.Sprintf("{%s}", strings.Join(lstrs, ", ")) +} diff --git a/go-controller/vendor/github.com/prometheus/common/model/metric.go b/go-controller/vendor/github.com/prometheus/common/model/metric.go index 5766107cf9..eb865e5a59 100644 --- a/go-controller/vendor/github.com/prometheus/common/model/metric.go +++ b/go-controller/vendor/github.com/prometheus/common/model/metric.go @@ -14,11 +14,9 @@ package model import ( - "errors" "fmt" "regexp" "sort" - "strconv" "strings" "unicode/utf8" @@ -28,21 +26,18 @@ import ( var ( // NameValidationScheme determines the method of name validation to be used by - // all calls to IsValidMetricName() and LabelName IsValid(). Setting UTF-8 - // mode in isolation from other components that don't support UTF-8 may result - // in bugs or other undefined behavior. This value can be set to - // LegacyValidation during startup if a binary is not UTF-8-aware binaries. To - // avoid need for locking, this value should be set once, ideally in an - // init(), before multiple goroutines are started. - NameValidationScheme = UTF8Validation - - // NameEscapingScheme defines the default way that names will be escaped when - // presented to systems that do not support UTF-8 names. If the Content-Type - // "escaping" term is specified, that will override this value. - // NameEscapingScheme should not be set to the NoEscaping value. That string - // is used in content negotiation to indicate that a system supports UTF-8 and - // has that feature enabled. - NameEscapingScheme = UnderscoreEscaping + // all calls to IsValidMetricName() and LabelName IsValid(). Setting UTF-8 mode + // in isolation from other components that don't support UTF-8 may result in + // bugs or other undefined behavior. This value is intended to be set by + // UTF-8-aware binaries as part of their startup. To avoid need for locking, + // this value should be set once, ideally in an init(), before multiple + // goroutines are started. + NameValidationScheme = LegacyValidation + + // NameEscapingScheme defines the default way that names will be + // escaped when presented to systems that do not support UTF-8 names. If the + // Content-Type "escaping" term is specified, that will override this value. + NameEscapingScheme = ValueEncodingEscaping ) // ValidationScheme is a Go enum for determining how metric and label names will @@ -166,7 +161,7 @@ func (m Metric) FastFingerprint() Fingerprint { func IsValidMetricName(n LabelValue) bool { switch NameValidationScheme { case LegacyValidation: - return IsValidLegacyMetricName(string(n)) + return IsValidLegacyMetricName(n) case UTF8Validation: if len(n) == 0 { return false @@ -181,7 +176,7 @@ func IsValidMetricName(n LabelValue) bool { // legacy validation scheme regardless of the value of NameValidationScheme. // This function, however, does not use MetricNameRE for the check but a much // faster hardcoded implementation. -func IsValidLegacyMetricName(n string) bool { +func IsValidLegacyMetricName(n LabelValue) bool { if len(n) == 0 { return false } @@ -213,7 +208,7 @@ func EscapeMetricFamily(v *dto.MetricFamily, scheme EscapingScheme) *dto.MetricF } // If the name is nil, copy as-is, don't try to escape. - if v.Name == nil || IsValidLegacyMetricName(v.GetName()) { + if v.Name == nil || IsValidLegacyMetricName(LabelValue(v.GetName())) { out.Name = v.Name } else { out.Name = proto.String(EscapeName(v.GetName(), scheme)) @@ -235,7 +230,7 @@ func EscapeMetricFamily(v *dto.MetricFamily, scheme EscapingScheme) *dto.MetricF for _, l := range m.Label { if l.GetName() == MetricNameLabel { - if l.Value == nil || IsValidLegacyMetricName(l.GetValue()) { + if l.Value == nil || IsValidLegacyMetricName(LabelValue(l.GetValue())) { escaped.Label = append(escaped.Label, l) continue } @@ -245,7 +240,7 @@ func EscapeMetricFamily(v *dto.MetricFamily, scheme EscapingScheme) *dto.MetricF }) continue } - if l.Name == nil || IsValidLegacyMetricName(l.GetName()) { + if l.Name == nil || IsValidLegacyMetricName(LabelValue(l.GetName())) { escaped.Label = append(escaped.Label, l) continue } @@ -261,16 +256,20 @@ func EscapeMetricFamily(v *dto.MetricFamily, scheme EscapingScheme) *dto.MetricF func metricNeedsEscaping(m *dto.Metric) bool { for _, l := range m.Label { - if l.GetName() == MetricNameLabel && !IsValidLegacyMetricName(l.GetValue()) { + if l.GetName() == MetricNameLabel && !IsValidLegacyMetricName(LabelValue(l.GetValue())) { return true } - if !IsValidLegacyMetricName(l.GetName()) { + if !IsValidLegacyMetricName(LabelValue(l.GetName())) { return true } } return false } +const ( + lowerhex = "0123456789abcdef" +) + // EscapeName escapes the incoming name according to the provided escaping // scheme. Depending on the rules of escaping, this may cause no change in the // string that is returned. (Especially NoEscaping, which by definition is a @@ -284,7 +283,7 @@ func EscapeName(name string, scheme EscapingScheme) string { case NoEscaping: return name case UnderscoreEscaping: - if IsValidLegacyMetricName(name) { + if IsValidLegacyMetricName(LabelValue(name)) { return name } for i, b := range name { @@ -305,25 +304,31 @@ func EscapeName(name string, scheme EscapingScheme) string { } else if isValidLegacyRune(b, i) { escaped.WriteRune(b) } else { - escaped.WriteString("__") + escaped.WriteRune('_') } } return escaped.String() case ValueEncodingEscaping: - if IsValidLegacyMetricName(name) { + if IsValidLegacyMetricName(LabelValue(name)) { return name } escaped.WriteString("U__") for i, b := range name { - if b == '_' { - escaped.WriteString("__") - } else if isValidLegacyRune(b, i) { + if isValidLegacyRune(b, i) { escaped.WriteRune(b) } else if !utf8.ValidRune(b) { escaped.WriteString("_FFFD_") - } else { + } else if b < 0x100 { escaped.WriteRune('_') - escaped.WriteString(strconv.FormatInt(int64(b), 16)) + for s := 4; s >= 0; s -= 4 { + escaped.WriteByte(lowerhex[b>>uint(s)&0xF]) + } + escaped.WriteRune('_') + } else if b < 0x10000 { + escaped.WriteRune('_') + for s := 12; s >= 0; s -= 4 { + escaped.WriteByte(lowerhex[b>>uint(s)&0xF]) + } escaped.WriteRune('_') } } @@ -381,9 +386,8 @@ func UnescapeName(name string, scheme EscapingScheme) string { // We think we are in a UTF-8 code, process it. var utf8Val uint for j := 0; i < len(escapedName); j++ { - // This is too many characters for a utf8 value based on the MaxRune - // value of '\U0010FFFF'. - if j >= 6 { + // This is too many characters for a utf8 value. + if j > 4 { return name } // Found a closing underscore, convert to a rune, check validity, and append. @@ -436,7 +440,7 @@ func (e EscapingScheme) String() string { func ToEscapingScheme(s string) (EscapingScheme, error) { if s == "" { - return NoEscaping, errors.New("got empty string instead of escaping scheme") + return NoEscaping, fmt.Errorf("got empty string instead of escaping scheme") } switch s { case AllowUTF8: @@ -448,6 +452,6 @@ func ToEscapingScheme(s string) (EscapingScheme, error) { case EscapeValues: return ValueEncodingEscaping, nil default: - return NoEscaping, fmt.Errorf("unknown format scheme %s", s) + return NoEscaping, fmt.Errorf("unknown format scheme " + s) } } diff --git a/go-controller/vendor/github.com/prometheus/common/model/silence.go b/go-controller/vendor/github.com/prometheus/common/model/silence.go index 8f91a9702e..910b0b71fc 100644 --- a/go-controller/vendor/github.com/prometheus/common/model/silence.go +++ b/go-controller/vendor/github.com/prometheus/common/model/silence.go @@ -15,7 +15,6 @@ package model import ( "encoding/json" - "errors" "fmt" "regexp" "time" @@ -35,7 +34,7 @@ func (m *Matcher) UnmarshalJSON(b []byte) error { } if len(m.Name) == 0 { - return errors.New("label name in matcher must not be empty") + return fmt.Errorf("label name in matcher must not be empty") } if m.IsRegex { if _, err := regexp.Compile(m.Value); err != nil { @@ -78,7 +77,7 @@ type Silence struct { // Validate returns true iff all fields of the silence have valid values. func (s *Silence) Validate() error { if len(s.Matchers) == 0 { - return errors.New("at least one matcher required") + return fmt.Errorf("at least one matcher required") } for _, m := range s.Matchers { if err := m.Validate(); err != nil { @@ -86,22 +85,22 @@ func (s *Silence) Validate() error { } } if s.StartsAt.IsZero() { - return errors.New("start time missing") + return fmt.Errorf("start time missing") } if s.EndsAt.IsZero() { - return errors.New("end time missing") + return fmt.Errorf("end time missing") } if s.EndsAt.Before(s.StartsAt) { - return errors.New("start time must be before end time") + return fmt.Errorf("start time must be before end time") } if s.CreatedBy == "" { - return errors.New("creator information missing") + return fmt.Errorf("creator information missing") } if s.Comment == "" { - return errors.New("comment missing") + return fmt.Errorf("comment missing") } if s.CreatedAt.IsZero() { - return errors.New("creation timestamp missing") + return fmt.Errorf("creation timestamp missing") } return nil } diff --git a/go-controller/vendor/github.com/prometheus/common/model/value_float.go b/go-controller/vendor/github.com/prometheus/common/model/value_float.go index 6bfc757d18..ae35cc2ab4 100644 --- a/go-controller/vendor/github.com/prometheus/common/model/value_float.go +++ b/go-controller/vendor/github.com/prometheus/common/model/value_float.go @@ -15,7 +15,6 @@ package model import ( "encoding/json" - "errors" "fmt" "math" "strconv" @@ -40,7 +39,7 @@ func (v SampleValue) MarshalJSON() ([]byte, error) { // UnmarshalJSON implements json.Unmarshaler. func (v *SampleValue) UnmarshalJSON(b []byte) error { if len(b) < 2 || b[0] != '"' || b[len(b)-1] != '"' { - return errors.New("sample value must be a quoted string") + return fmt.Errorf("sample value must be a quoted string") } f, err := strconv.ParseFloat(string(b[1:len(b)-1]), 64) if err != nil { diff --git a/go-controller/vendor/github.com/prometheus/common/model/value_histogram.go b/go-controller/vendor/github.com/prometheus/common/model/value_histogram.go index 895e6a3e83..54bb038cff 100644 --- a/go-controller/vendor/github.com/prometheus/common/model/value_histogram.go +++ b/go-controller/vendor/github.com/prometheus/common/model/value_histogram.go @@ -15,7 +15,6 @@ package model import ( "encoding/json" - "errors" "fmt" "strconv" "strings" @@ -33,7 +32,7 @@ func (v FloatString) MarshalJSON() ([]byte, error) { func (v *FloatString) UnmarshalJSON(b []byte) error { if len(b) < 2 || b[0] != '"' || b[len(b)-1] != '"' { - return errors.New("float value must be a quoted string") + return fmt.Errorf("float value must be a quoted string") } f, err := strconv.ParseFloat(string(b[1:len(b)-1]), 64) if err != nil { @@ -142,7 +141,7 @@ type SampleHistogramPair struct { func (s SampleHistogramPair) MarshalJSON() ([]byte, error) { if s.Histogram == nil { - return nil, errors.New("histogram is nil") + return nil, fmt.Errorf("histogram is nil") } t, err := json.Marshal(s.Timestamp) if err != nil { @@ -165,7 +164,7 @@ func (s *SampleHistogramPair) UnmarshalJSON(buf []byte) error { return fmt.Errorf("wrong number of fields: %d != %d", gotLen, wantLen) } if s.Histogram == nil { - return errors.New("histogram is null") + return fmt.Errorf("histogram is null") } return nil } diff --git a/go-controller/vendor/github.com/stretchr/testify/assert/assertion_compare.go b/go-controller/vendor/github.com/stretchr/testify/assert/assertion_compare.go index 7e19eba090..4d4b4aad6f 100644 --- a/go-controller/vendor/github.com/stretchr/testify/assert/assertion_compare.go +++ b/go-controller/vendor/github.com/stretchr/testify/assert/assertion_compare.go @@ -7,13 +7,10 @@ import ( "time" ) -// Deprecated: CompareType has only ever been for internal use and has accidentally been published since v1.6.0. Do not use it. -type CompareType = compareResult - -type compareResult int +type CompareType int const ( - compareLess compareResult = iota - 1 + compareLess CompareType = iota - 1 compareEqual compareGreater ) @@ -42,7 +39,7 @@ var ( bytesType = reflect.TypeOf([]byte{}) ) -func compare(obj1, obj2 interface{}, kind reflect.Kind) (compareResult, bool) { +func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { obj1Value := reflect.ValueOf(obj1) obj2Value := reflect.ValueOf(obj2) @@ -328,13 +325,7 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (compareResult, bool) { timeObj2 = obj2Value.Convert(timeType).Interface().(time.Time) } - if timeObj1.Before(timeObj2) { - return compareLess, true - } - if timeObj1.Equal(timeObj2) { - return compareEqual, true - } - return compareGreater, true + return compare(timeObj1.UnixNano(), timeObj2.UnixNano(), reflect.Int64) } case reflect.Slice: { @@ -354,7 +345,7 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (compareResult, bool) { bytesObj2 = obj2Value.Convert(bytesType).Interface().([]byte) } - return compareResult(bytes.Compare(bytesObj1, bytesObj2)), true + return CompareType(bytes.Compare(bytesObj1, bytesObj2)), true } case reflect.Uintptr: { @@ -390,7 +381,7 @@ func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface if h, ok := t.(tHelper); ok { h.Helper() } - return compareTwoValues(t, e1, e2, []compareResult{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) + return compareTwoValues(t, e1, e2, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) } // GreaterOrEqual asserts that the first element is greater than or equal to the second @@ -403,7 +394,7 @@ func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...in if h, ok := t.(tHelper); ok { h.Helper() } - return compareTwoValues(t, e1, e2, []compareResult{compareGreater, compareEqual}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) + return compareTwoValues(t, e1, e2, []CompareType{compareGreater, compareEqual}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) } // Less asserts that the first element is less than the second @@ -415,7 +406,7 @@ func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) if h, ok := t.(tHelper); ok { h.Helper() } - return compareTwoValues(t, e1, e2, []compareResult{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) + return compareTwoValues(t, e1, e2, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) } // LessOrEqual asserts that the first element is less than or equal to the second @@ -428,7 +419,7 @@ func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...inter if h, ok := t.(tHelper); ok { h.Helper() } - return compareTwoValues(t, e1, e2, []compareResult{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) + return compareTwoValues(t, e1, e2, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) } // Positive asserts that the specified element is positive @@ -440,7 +431,7 @@ func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { h.Helper() } zero := reflect.Zero(reflect.TypeOf(e)) - return compareTwoValues(t, e, zero.Interface(), []compareResult{compareGreater}, "\"%v\" is not positive", msgAndArgs...) + return compareTwoValues(t, e, zero.Interface(), []CompareType{compareGreater}, "\"%v\" is not positive", msgAndArgs...) } // Negative asserts that the specified element is negative @@ -452,10 +443,10 @@ func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { h.Helper() } zero := reflect.Zero(reflect.TypeOf(e)) - return compareTwoValues(t, e, zero.Interface(), []compareResult{compareLess}, "\"%v\" is not negative", msgAndArgs...) + return compareTwoValues(t, e, zero.Interface(), []CompareType{compareLess}, "\"%v\" is not negative", msgAndArgs...) } -func compareTwoValues(t TestingT, e1 interface{}, e2 interface{}, allowedComparesResults []compareResult, failMessage string, msgAndArgs ...interface{}) bool { +func compareTwoValues(t TestingT, e1 interface{}, e2 interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } @@ -478,7 +469,7 @@ func compareTwoValues(t TestingT, e1 interface{}, e2 interface{}, allowedCompare return true } -func containsValue(values []compareResult, value compareResult) bool { +func containsValue(values []CompareType, value CompareType) bool { for _, v := range values { if v == value { return true diff --git a/go-controller/vendor/github.com/stretchr/testify/assert/assertion_format.go b/go-controller/vendor/github.com/stretchr/testify/assert/assertion_format.go index 1906341657..3ddab109ad 100644 --- a/go-controller/vendor/github.com/stretchr/testify/assert/assertion_format.go +++ b/go-controller/vendor/github.com/stretchr/testify/assert/assertion_format.go @@ -104,8 +104,8 @@ func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, return EqualExportedValues(t, expected, actual, append([]interface{}{msg}, args...)...) } -// EqualValuesf asserts that two objects are equal or convertible to the larger -// type and equal. +// EqualValuesf asserts that two objects are equal or convertible to the same types +// and equal. // // assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { @@ -186,7 +186,7 @@ func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick // assert.EventuallyWithTf(t, func(c *assert.CollectT, "error message %s", "formatted") { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func EventuallyWithTf(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() @@ -568,23 +568,6 @@ func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, a return NotContains(t, s, contains, append([]interface{}{msg}, args...)...) } -// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// assert.NotElementsMatchf(t, [1, 1, 2, 3], [1, 1, 2, 3], "error message %s", "formatted") -> false -// -// assert.NotElementsMatchf(t, [1, 1, 2, 3], [1, 2, 3], "error message %s", "formatted") -> true -// -// assert.NotElementsMatchf(t, [1, 2, 3], [1, 2, 4], "error message %s", "formatted") -> true -func NotElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...) -} - // NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // @@ -621,16 +604,7 @@ func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg s return NotEqualValues(t, expected, actual, append([]interface{}{msg}, args...)...) } -// NotErrorAsf asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotErrorAs(t, err, target, append([]interface{}{msg}, args...)...) -} - -// NotErrorIsf asserts that none of the errors in err's chain matches target. +// NotErrorIsf asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { diff --git a/go-controller/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/go-controller/vendor/github.com/stretchr/testify/assert/assertion_forward.go index 21629087ba..a84e09bd40 100644 --- a/go-controller/vendor/github.com/stretchr/testify/assert/assertion_forward.go +++ b/go-controller/vendor/github.com/stretchr/testify/assert/assertion_forward.go @@ -186,8 +186,8 @@ func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface return EqualExportedValuesf(a.t, expected, actual, msg, args...) } -// EqualValues asserts that two objects are equal or convertible to the larger -// type and equal. +// EqualValues asserts that two objects are equal or convertible to the same types +// and equal. // // a.EqualValues(uint32(123), int32(123)) func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { @@ -197,8 +197,8 @@ func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAn return EqualValues(a.t, expected, actual, msgAndArgs...) } -// EqualValuesf asserts that two objects are equal or convertible to the larger -// type and equal. +// EqualValuesf asserts that two objects are equal or convertible to the same types +// and equal. // // a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted") func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { @@ -336,7 +336,7 @@ func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, ti // a.EventuallyWithT(func(c *assert.CollectT) { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func (a *Assertions) EventuallyWithT(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -361,7 +361,7 @@ func (a *Assertions) EventuallyWithT(condition func(collect *CollectT), waitFor // a.EventuallyWithTf(func(c *assert.CollectT, "error message %s", "formatted") { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func (a *Assertions) EventuallyWithTf(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1128,40 +1128,6 @@ func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg strin return NotContainsf(a.t, s, contains, msg, args...) } -// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// a.NotElementsMatch([1, 1, 2, 3], [1, 1, 2, 3]) -> false -// -// a.NotElementsMatch([1, 1, 2, 3], [1, 2, 3]) -> true -// -// a.NotElementsMatch([1, 2, 3], [1, 2, 4]) -> true -func (a *Assertions) NotElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// a.NotElementsMatchf([1, 1, 2, 3], [1, 1, 2, 3], "error message %s", "formatted") -> false -// -// a.NotElementsMatchf([1, 1, 2, 3], [1, 2, 3], "error message %s", "formatted") -> true -// -// a.NotElementsMatchf([1, 2, 3], [1, 2, 4], "error message %s", "formatted") -> true -func (a *Assertions) NotElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotElementsMatchf(a.t, listA, listB, msg, args...) -} - // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // @@ -1234,25 +1200,7 @@ func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg str return NotEqualf(a.t, expected, actual, msg, args...) } -// NotErrorAs asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func (a *Assertions) NotErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotErrorAs(a.t, err, target, msgAndArgs...) -} - -// NotErrorAsf asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func (a *Assertions) NotErrorAsf(err error, target interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotErrorAsf(a.t, err, target, msg, args...) -} - -// NotErrorIs asserts that none of the errors in err's chain matches target. +// NotErrorIs asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { @@ -1261,7 +1209,7 @@ func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface return NotErrorIs(a.t, err, target, msgAndArgs...) } -// NotErrorIsf asserts that none of the errors in err's chain matches target. +// NotErrorIsf asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { diff --git a/go-controller/vendor/github.com/stretchr/testify/assert/assertion_order.go b/go-controller/vendor/github.com/stretchr/testify/assert/assertion_order.go index 1d2f71824a..00df62a059 100644 --- a/go-controller/vendor/github.com/stretchr/testify/assert/assertion_order.go +++ b/go-controller/vendor/github.com/stretchr/testify/assert/assertion_order.go @@ -6,7 +6,7 @@ import ( ) // isOrdered checks that collection contains orderable elements. -func isOrdered(t TestingT, object interface{}, allowedComparesResults []compareResult, failMessage string, msgAndArgs ...interface{}) bool { +func isOrdered(t TestingT, object interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool { objKind := reflect.TypeOf(object).Kind() if objKind != reflect.Slice && objKind != reflect.Array { return false @@ -50,7 +50,7 @@ func isOrdered(t TestingT, object interface{}, allowedComparesResults []compareR // assert.IsIncreasing(t, []float{1, 2}) // assert.IsIncreasing(t, []string{"a", "b"}) func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []compareResult{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) + return isOrdered(t, object, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) } // IsNonIncreasing asserts that the collection is not increasing @@ -59,7 +59,7 @@ func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) boo // assert.IsNonIncreasing(t, []float{2, 1}) // assert.IsNonIncreasing(t, []string{"b", "a"}) func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []compareResult{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) + return isOrdered(t, object, []CompareType{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) } // IsDecreasing asserts that the collection is decreasing @@ -68,7 +68,7 @@ func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) // assert.IsDecreasing(t, []float{2, 1}) // assert.IsDecreasing(t, []string{"b", "a"}) func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []compareResult{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) + return isOrdered(t, object, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) } // IsNonDecreasing asserts that the collection is not decreasing @@ -77,5 +77,5 @@ func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) boo // assert.IsNonDecreasing(t, []float{1, 2}) // assert.IsNonDecreasing(t, []string{"a", "b"}) func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []compareResult{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) + return isOrdered(t, object, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) } diff --git a/go-controller/vendor/github.com/stretchr/testify/assert/assertions.go b/go-controller/vendor/github.com/stretchr/testify/assert/assertions.go index 4e91332bb5..0b7570f21c 100644 --- a/go-controller/vendor/github.com/stretchr/testify/assert/assertions.go +++ b/go-controller/vendor/github.com/stretchr/testify/assert/assertions.go @@ -19,9 +19,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/pmezard/go-difflib/difflib" - - // Wrapper around gopkg.in/yaml.v3 - "github.com/stretchr/testify/assert/yaml" + "gopkg.in/yaml.v3" ) //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl" @@ -47,10 +45,6 @@ type BoolAssertionFunc func(TestingT, bool, ...interface{}) bool // for table driven tests. type ErrorAssertionFunc func(TestingT, error, ...interface{}) bool -// PanicAssertionFunc is a common function prototype when validating a panic value. Can be useful -// for table driven tests. -type PanicAssertionFunc = func(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool - // Comparison is a custom function that returns true on success and false on failure type Comparison func() (success bool) @@ -502,13 +496,7 @@ func Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) b h.Helper() } - same, ok := samePointers(expected, actual) - if !ok { - return Fail(t, "Both arguments must be pointers", msgAndArgs...) - } - - if !same { - // both are pointers but not the same type & pointing to the same address + if !samePointers(expected, actual) { return Fail(t, fmt.Sprintf("Not same: \n"+ "expected: %p %#v\n"+ "actual : %p %#v", expected, expected, actual, actual), msgAndArgs...) @@ -528,13 +516,7 @@ func NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{} h.Helper() } - same, ok := samePointers(expected, actual) - if !ok { - //fails when the arguments are not pointers - return !(Fail(t, "Both arguments must be pointers", msgAndArgs...)) - } - - if same { + if samePointers(expected, actual) { return Fail(t, fmt.Sprintf( "Expected and actual point to the same object: %p %#v", expected, expected), msgAndArgs...) @@ -542,23 +524,21 @@ func NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{} return true } -// samePointers checks if two generic interface objects are pointers of the same -// type pointing to the same object. It returns two values: same indicating if -// they are the same type and point to the same object, and ok indicating that -// both inputs are pointers. -func samePointers(first, second interface{}) (same bool, ok bool) { +// samePointers compares two generic interface objects and returns whether +// they point to the same object +func samePointers(first, second interface{}) bool { firstPtr, secondPtr := reflect.ValueOf(first), reflect.ValueOf(second) if firstPtr.Kind() != reflect.Ptr || secondPtr.Kind() != reflect.Ptr { - return false, false //not both are pointers + return false } firstType, secondType := reflect.TypeOf(first), reflect.TypeOf(second) if firstType != secondType { - return false, true // both are pointers, but of different types + return false } // compare pointer addresses - return first == second, true + return first == second } // formatUnequalValues takes two values of arbitrary types and returns string @@ -592,8 +572,8 @@ func truncatingFormat(data interface{}) string { return value } -// EqualValues asserts that two objects are equal or convertible to the larger -// type and equal. +// EqualValues asserts that two objects are equal or convertible to the same types +// and equal. // // assert.EqualValues(t, uint32(123), int32(123)) func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { @@ -635,6 +615,21 @@ func EqualExportedValues(t TestingT, expected, actual interface{}, msgAndArgs .. return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) } + if aType.Kind() == reflect.Ptr { + aType = aType.Elem() + } + if bType.Kind() == reflect.Ptr { + bType = bType.Elem() + } + + if aType.Kind() != reflect.Struct { + return Fail(t, fmt.Sprintf("Types expected to both be struct or pointer to struct \n\t%v != %v", aType.Kind(), reflect.Struct), msgAndArgs...) + } + + if bType.Kind() != reflect.Struct { + return Fail(t, fmt.Sprintf("Types expected to both be struct or pointer to struct \n\t%v != %v", bType.Kind(), reflect.Struct), msgAndArgs...) + } + expected = copyExportedFields(expected) actual = copyExportedFields(actual) @@ -1175,39 +1170,6 @@ func formatListDiff(listA, listB interface{}, extraA, extraB []interface{}) stri return msg.String() } -// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// assert.NotElementsMatch(t, [1, 1, 2, 3], [1, 1, 2, 3]) -> false -// -// assert.NotElementsMatch(t, [1, 1, 2, 3], [1, 2, 3]) -> true -// -// assert.NotElementsMatch(t, [1, 2, 3], [1, 2, 4]) -> true -func NotElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if isEmpty(listA) && isEmpty(listB) { - return Fail(t, "listA and listB contain the same elements", msgAndArgs) - } - - if !isList(t, listA, msgAndArgs...) { - return Fail(t, "listA is not a list type", msgAndArgs...) - } - if !isList(t, listB, msgAndArgs...) { - return Fail(t, "listB is not a list type", msgAndArgs...) - } - - extraA, extraB := diffLists(listA, listB) - if len(extraA) == 0 && len(extraB) == 0 { - return Fail(t, "listA and listB contain the same elements", msgAndArgs) - } - - return true -} - // Condition uses a Comparison to assert a complex condition. func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { @@ -1526,9 +1488,6 @@ func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAnd if err != nil { return Fail(t, err.Error(), msgAndArgs...) } - if math.IsNaN(actualEpsilon) { - return Fail(t, "relative error is NaN", msgAndArgs...) - } if actualEpsilon > epsilon { return Fail(t, fmt.Sprintf("Relative error is too high: %#v (expected)\n"+ " < %#v (actual)", epsilon, actualEpsilon), msgAndArgs...) @@ -1652,6 +1611,7 @@ func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...in // matchRegexp return true if a specified regexp matches a string. func matchRegexp(rx interface{}, str interface{}) bool { + var r *regexp.Regexp if rr, ok := rx.(*regexp.Regexp); ok { r = rr @@ -1659,14 +1619,7 @@ func matchRegexp(rx interface{}, str interface{}) bool { r = regexp.MustCompile(fmt.Sprint(rx)) } - switch v := str.(type) { - case []byte: - return r.Match(v) - case string: - return r.MatchString(v) - default: - return r.MatchString(fmt.Sprint(v)) - } + return (r.FindStringIndex(fmt.Sprint(str)) != nil) } @@ -1919,7 +1872,7 @@ var spewConfigStringerEnabled = spew.ConfigState{ MaxDepth: 10, } -type tHelper = interface { +type tHelper interface { Helper() } @@ -1958,9 +1911,6 @@ func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick t // CollectT implements the TestingT interface and collects all errors. type CollectT struct { - // A slice of errors. Non-nil slice denotes a failure. - // If it's non-nil but len(c.errors) == 0, this is also a failure - // obtained by direct c.FailNow() call. errors []error } @@ -1969,10 +1919,9 @@ func (c *CollectT) Errorf(format string, args ...interface{}) { c.errors = append(c.errors, fmt.Errorf(format, args...)) } -// FailNow stops execution by calling runtime.Goexit. -func (c *CollectT) FailNow() { - c.fail() - runtime.Goexit() +// FailNow panics. +func (*CollectT) FailNow() { + panic("Assertion failed") } // Deprecated: That was a method for internal usage that should not have been published. Now just panics. @@ -1985,16 +1934,6 @@ func (*CollectT) Copy(TestingT) { panic("Copy() is deprecated") } -func (c *CollectT) fail() { - if !c.failed() { - c.errors = []error{} // Make it non-nil to mark a failure. - } -} - -func (c *CollectT) failed() bool { - return c.errors != nil -} - // EventuallyWithT asserts that given condition will be met in waitFor time, // periodically checking target function each tick. In contrast to Eventually, // it supplies a CollectT to the condition function, so that the condition @@ -2012,14 +1951,14 @@ func (c *CollectT) failed() bool { // assert.EventuallyWithT(t, func(c *assert.CollectT) { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } var lastFinishedTickErrs []error - ch := make(chan *CollectT, 1) + ch := make(chan []error, 1) timer := time.NewTimer(waitFor) defer timer.Stop() @@ -2039,16 +1978,16 @@ func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time go func() { collect := new(CollectT) defer func() { - ch <- collect + ch <- collect.errors }() condition(collect) }() - case collect := <-ch: - if !collect.failed() { + case errs := <-ch: + if len(errs) == 0 { return true } // Keep the errors from the last ended condition, so that they can be copied to t if timeout is reached. - lastFinishedTickErrs = collect.errors + lastFinishedTickErrs = errs tick = ticker.C } } @@ -2110,7 +2049,7 @@ func ErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool { ), msgAndArgs...) } -// NotErrorIs asserts that none of the errors in err's chain matches target. +// NotErrorIs asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func NotErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { @@ -2151,24 +2090,6 @@ func ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{ ), msgAndArgs...) } -// NotErrorAs asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func NotErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if !errors.As(err, target) { - return true - } - - chain := buildErrorChainString(err) - - return Fail(t, fmt.Sprintf("Target error should not be in err chain:\n"+ - "found: %q\n"+ - "in chain: %s", target, chain, - ), msgAndArgs...) -} - func buildErrorChainString(err error) string { if err == nil { return "" diff --git a/go-controller/vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go b/go-controller/vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go deleted file mode 100644 index baa0cc7d7f..0000000000 --- a/go-controller/vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build testify_yaml_custom && !testify_yaml_fail && !testify_yaml_default -// +build testify_yaml_custom,!testify_yaml_fail,!testify_yaml_default - -// Package yaml is an implementation of YAML functions that calls a pluggable implementation. -// -// This implementation is selected with the testify_yaml_custom build tag. -// -// go test -tags testify_yaml_custom -// -// This implementation can be used at build time to replace the default implementation -// to avoid linking with [gopkg.in/yaml.v3]. -// -// In your test package: -// -// import assertYaml "github.com/stretchr/testify/assert/yaml" -// -// func init() { -// assertYaml.Unmarshal = func (in []byte, out interface{}) error { -// // ... -// return nil -// } -// } -package yaml - -var Unmarshal func(in []byte, out interface{}) error diff --git a/go-controller/vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go b/go-controller/vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go deleted file mode 100644 index b83c6cf64c..0000000000 --- a/go-controller/vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go +++ /dev/null @@ -1,37 +0,0 @@ -//go:build !testify_yaml_fail && !testify_yaml_custom -// +build !testify_yaml_fail,!testify_yaml_custom - -// Package yaml is just an indirection to handle YAML deserialization. -// -// This package is just an indirection that allows the builder to override the -// indirection with an alternative implementation of this package that uses -// another implementation of YAML deserialization. This allows to not either not -// use YAML deserialization at all, or to use another implementation than -// [gopkg.in/yaml.v3] (for example for license compatibility reasons, see [PR #1120]). -// -// Alternative implementations are selected using build tags: -// -// - testify_yaml_fail: [Unmarshal] always fails with an error -// - testify_yaml_custom: [Unmarshal] is a variable. Caller must initialize it -// before calling any of [github.com/stretchr/testify/assert.YAMLEq] or -// [github.com/stretchr/testify/assert.YAMLEqf]. -// -// Usage: -// -// go test -tags testify_yaml_fail -// -// You can check with "go list" which implementation is linked: -// -// go list -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml -// go list -tags testify_yaml_fail -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml -// go list -tags testify_yaml_custom -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml -// -// [PR #1120]: https://github.com/stretchr/testify/pull/1120 -package yaml - -import goyaml "gopkg.in/yaml.v3" - -// Unmarshal is just a wrapper of [gopkg.in/yaml.v3.Unmarshal]. -func Unmarshal(in []byte, out interface{}) error { - return goyaml.Unmarshal(in, out) -} diff --git a/go-controller/vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go b/go-controller/vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go deleted file mode 100644 index e78f7dfe69..0000000000 --- a/go-controller/vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go +++ /dev/null @@ -1,18 +0,0 @@ -//go:build testify_yaml_fail && !testify_yaml_custom && !testify_yaml_default -// +build testify_yaml_fail,!testify_yaml_custom,!testify_yaml_default - -// Package yaml is an implementation of YAML functions that always fail. -// -// This implementation can be used at build time to replace the default implementation -// to avoid linking with [gopkg.in/yaml.v3]: -// -// go test -tags testify_yaml_fail -package yaml - -import "errors" - -var errNotImplemented = errors.New("YAML functions are not available (see https://pkg.go.dev/github.com/stretchr/testify/assert/yaml)") - -func Unmarshal([]byte, interface{}) error { - return errNotImplemented -} diff --git a/go-controller/vendor/github.com/stretchr/testify/mock/mock.go b/go-controller/vendor/github.com/stretchr/testify/mock/mock.go index eb5682df97..213bde2ea6 100644 --- a/go-controller/vendor/github.com/stretchr/testify/mock/mock.go +++ b/go-controller/vendor/github.com/stretchr/testify/mock/mock.go @@ -80,12 +80,12 @@ type Call struct { requires []*Call } -func newCall(parent *Mock, methodName string, callerInfo []string, methodArguments Arguments, returnArguments Arguments) *Call { +func newCall(parent *Mock, methodName string, callerInfo []string, methodArguments ...interface{}) *Call { return &Call{ Parent: parent, Method: methodName, Arguments: methodArguments, - ReturnArguments: returnArguments, + ReturnArguments: make([]interface{}, 0), callerInfo: callerInfo, Repeatability: 0, WaitFor: nil, @@ -256,7 +256,7 @@ func (c *Call) Unset() *Call { // calls have been called as expected. The referenced calls may be from the // same mock instance and/or other mock instances. // -// Mock.On("Do").Return(nil).NotBefore( +// Mock.On("Do").Return(nil).Notbefore( // Mock.On("Init").Return(nil) // ) func (c *Call) NotBefore(calls ...*Call) *Call { @@ -273,20 +273,6 @@ func (c *Call) NotBefore(calls ...*Call) *Call { return c } -// InOrder defines the order in which the calls should be made -// -// For example: -// -// InOrder( -// Mock.On("init").Return(nil), -// Mock.On("Do").Return(nil), -// ) -func InOrder(calls ...*Call) { - for i := 1; i < len(calls); i++ { - calls[i].NotBefore(calls[i-1]) - } -} - // Mock is the workhorse used to track activity on another object. // For an example of its usage, refer to the "Example Usage" section at the top // of this document. @@ -365,8 +351,7 @@ func (m *Mock) On(methodName string, arguments ...interface{}) *Call { m.mutex.Lock() defer m.mutex.Unlock() - - c := newCall(m, methodName, assert.CallerInfo(), arguments, make([]interface{}, 0)) + c := newCall(m, methodName, assert.CallerInfo(), arguments...) m.ExpectedCalls = append(m.ExpectedCalls, c) return c } @@ -506,12 +491,11 @@ func (m *Mock) MethodCalled(methodName string, arguments ...interface{}) Argumen m.mutex.Unlock() if closestCall != nil { - m.fail("\n\nmock: Unexpected Method Call\n-----------------------------\n\n%s\n\nThe closest call I have is: \n\n%s\n\n%s\nDiff: %s\nat: %s\n", + m.fail("\n\nmock: Unexpected Method Call\n-----------------------------\n\n%s\n\nThe closest call I have is: \n\n%s\n\n%s\nDiff: %s", callString(methodName, arguments, true), callString(methodName, closestCall.Arguments, true), diffArguments(closestCall.Arguments, arguments), strings.TrimSpace(mismatch), - assert.CallerInfo(), ) } else { m.fail("\nassert: mock: I don't know what to return because the method call was unexpected.\n\tEither do Mock.On(\"%s\").Return(...) first, or remove the %s() call.\n\tThis method was unexpected:\n\t\t%s\n\tat: %s", methodName, methodName, callString(methodName, arguments, true), assert.CallerInfo()) @@ -545,7 +529,7 @@ func (m *Mock) MethodCalled(methodName string, arguments ...interface{}) Argumen call.totalCalls++ // add the call - m.Calls = append(m.Calls, *newCall(m, methodName, assert.CallerInfo(), arguments, call.ReturnArguments)) + m.Calls = append(m.Calls, *newCall(m, methodName, assert.CallerInfo(), arguments...)) m.mutex.Unlock() // block if specified @@ -780,17 +764,9 @@ const ( ) // AnythingOfTypeArgument contains the type of an argument -// for use when type checking. Used in [Arguments.Diff] and [Arguments.Assert]. -// -// Deprecated: this is an implementation detail that must not be used. Use the [AnythingOfType] constructor instead, example: -// -// m.On("Do", mock.AnythingOfType("string")) -// -// All explicit type declarations can be replaced with interface{} as is expected by [Mock.On], example: +// for use when type checking. Used in Diff and Assert. // -// func anyString interface{} { -// return mock.AnythingOfType("string") -// } +// Deprecated: this is an implementation detail that must not be used. Use [AnythingOfType] instead. type AnythingOfTypeArgument = anythingOfTypeArgument // anythingOfTypeArgument is a string that contains the type of an argument @@ -804,54 +780,53 @@ type anythingOfTypeArgument string // // For example: // -// args.Assert(t, AnythingOfType("string"), AnythingOfType("int")) +// Assert(t, AnythingOfType("string"), AnythingOfType("int")) func AnythingOfType(t string) AnythingOfTypeArgument { return anythingOfTypeArgument(t) } // IsTypeArgument is a struct that contains the type of an argument -// for use when type checking. This is an alternative to [AnythingOfType]. -// Used in [Arguments.Diff] and [Arguments.Assert]. +// for use when type checking. This is an alternative to AnythingOfType. +// Used in Diff and Assert. type IsTypeArgument struct { t reflect.Type } // IsType returns an IsTypeArgument object containing the type to check for. // You can provide a zero-value of the type to check. This is an -// alternative to [AnythingOfType]. Used in [Arguments.Diff] and [Arguments.Assert]. +// alternative to AnythingOfType. Used in Diff and Assert. // // For example: -// -// args.Assert(t, IsType(""), IsType(0)) +// Assert(t, IsType(""), IsType(0)) func IsType(t interface{}) *IsTypeArgument { return &IsTypeArgument{t: reflect.TypeOf(t)} } -// FunctionalOptionsArgument contains a list of functional options arguments -// expected for use when matching a list of arguments. +// FunctionalOptionsArgument is a struct that contains the type and value of an functional option argument +// for use when type checking. type FunctionalOptionsArgument struct { - values []interface{} + value interface{} } // String returns the string representation of FunctionalOptionsArgument func (f *FunctionalOptionsArgument) String() string { var name string - if len(f.values) > 0 { - name = "[]" + reflect.TypeOf(f.values[0]).String() + tValue := reflect.ValueOf(f.value) + if tValue.Len() > 0 { + name = "[]" + reflect.TypeOf(tValue.Index(0).Interface()).String() } - return strings.Replace(fmt.Sprintf("%#v", f.values), "[]interface {}", name, 1) + return strings.Replace(fmt.Sprintf("%#v", f.value), "[]interface {}", name, 1) } -// FunctionalOptions returns an [FunctionalOptionsArgument] object containing -// the expected functional-options to check for. +// FunctionalOptions returns an FunctionalOptionsArgument object containing the functional option type +// and the values to check of // // For example: -// -// args.Assert(t, FunctionalOptions(foo.Opt1("strValue"), foo.Opt2(613))) -func FunctionalOptions(values ...interface{}) *FunctionalOptionsArgument { +// Assert(t, FunctionalOptions("[]foo.FunctionalOption", foo.Opt1(), foo.Opt2())) +func FunctionalOptions(value ...interface{}) *FunctionalOptionsArgument { return &FunctionalOptionsArgument{ - values: values, + value: value, } } @@ -898,11 +873,10 @@ func (f argumentMatcher) String() string { // and false otherwise. // // Example: +// m.On("Do", MatchedBy(func(req *http.Request) bool { return req.Host == "example.com" })) // -// m.On("Do", MatchedBy(func(req *http.Request) bool { return req.Host == "example.com" })) -// -// fn must be a function accepting a single argument (of the expected type) -// which returns a bool. If fn doesn't match the required signature, +// |fn|, must be a function accepting a single argument (of the expected type) +// which returns a bool. If |fn| doesn't match the required signature, // MatchedBy() panics. func MatchedBy(fn interface{}) argumentMatcher { fnType := reflect.TypeOf(fn) @@ -1005,17 +979,20 @@ func (args Arguments) Diff(objects []interface{}) (string, int) { output = fmt.Sprintf("%s\t%d: FAIL: type %s != type %s - %s\n", output, i, expected.t.Name(), actualT.Name(), actualFmt) } case *FunctionalOptionsArgument: + t := expected.value + var name string - if len(expected.values) > 0 { - name = "[]" + reflect.TypeOf(expected.values[0]).String() + tValue := reflect.ValueOf(t) + if tValue.Len() > 0 { + name = "[]" + reflect.TypeOf(tValue.Index(0).Interface()).String() } - const tName = "[]interface{}" - if name != reflect.TypeOf(actual).String() && len(expected.values) != 0 { + tName := reflect.TypeOf(t).Name() + if name != reflect.TypeOf(actual).String() && tValue.Len() != 0 { differences++ output = fmt.Sprintf("%s\t%d: FAIL: type %s != type %s - %s\n", output, i, tName, reflect.TypeOf(actual).Name(), actualFmt) } else { - if ef, af := assertOpts(expected.values, actual); ef == "" && af == "" { + if ef, af := assertOpts(t, actual); ef == "" && af == "" { // match output = fmt.Sprintf("%s\t%d: PASS: %s == %s\n", output, i, tName, tName) } else { @@ -1115,7 +1092,7 @@ func (args Arguments) Error(index int) error { return nil } if s, ok = obj.(error); !ok { - panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, obj)) + panic(fmt.Sprintf("assert: arguments: Error(%d) failed because object wasn't correct type: %v", index, args.Get(index))) } return s } @@ -1204,38 +1181,32 @@ type tHelper interface { func assertOpts(expected, actual interface{}) (expectedFmt, actualFmt string) { expectedOpts := reflect.ValueOf(expected) actualOpts := reflect.ValueOf(actual) - - var expectedFuncs []*runtime.Func var expectedNames []string for i := 0; i < expectedOpts.Len(); i++ { - f := runtimeFunc(expectedOpts.Index(i).Interface()) - expectedFuncs = append(expectedFuncs, f) - expectedNames = append(expectedNames, funcName(f)) + expectedNames = append(expectedNames, funcName(expectedOpts.Index(i).Interface())) } - var actualFuncs []*runtime.Func var actualNames []string for i := 0; i < actualOpts.Len(); i++ { - f := runtimeFunc(actualOpts.Index(i).Interface()) - actualFuncs = append(actualFuncs, f) - actualNames = append(actualNames, funcName(f)) + actualNames = append(actualNames, funcName(actualOpts.Index(i).Interface())) } - - if expectedOpts.Len() != actualOpts.Len() { + if !assert.ObjectsAreEqual(expectedNames, actualNames) { expectedFmt = fmt.Sprintf("%v", expectedNames) actualFmt = fmt.Sprintf("%v", actualNames) return } for i := 0; i < expectedOpts.Len(); i++ { - if !isFuncSame(expectedFuncs[i], actualFuncs[i]) { - expectedFmt = expectedNames[i] - actualFmt = actualNames[i] - return - } - expectedOpt := expectedOpts.Index(i).Interface() actualOpt := actualOpts.Index(i).Interface() + expectedFunc := expectedNames[i] + actualFunc := actualNames[i] + if expectedFunc != actualFunc { + expectedFmt = expectedFunc + actualFmt = actualFunc + return + } + ot := reflect.TypeOf(expectedOpt) var expectedValues []reflect.Value var actualValues []reflect.Value @@ -1253,9 +1224,9 @@ func assertOpts(expected, actual interface{}) (expectedFmt, actualFmt string) { reflect.ValueOf(actualOpt).Call(actualValues) for i := 0; i < ot.NumIn(); i++ { - if expectedArg, actualArg := expectedValues[i].Interface(), actualValues[i].Interface(); !assert.ObjectsAreEqual(expectedArg, actualArg) { - expectedFmt = fmt.Sprintf("%s(%T) -> %#v", expectedNames[i], expectedArg, expectedArg) - actualFmt = fmt.Sprintf("%s(%T) -> %#v", expectedNames[i], actualArg, actualArg) + if !assert.ObjectsAreEqual(expectedValues[i].Interface(), actualValues[i].Interface()) { + expectedFmt = fmt.Sprintf("%s %+v", expectedNames[i], expectedValues[i].Interface()) + actualFmt = fmt.Sprintf("%s %+v", expectedNames[i], actualValues[i].Interface()) return } } @@ -1264,25 +1235,7 @@ func assertOpts(expected, actual interface{}) (expectedFmt, actualFmt string) { return "", "" } -func runtimeFunc(opt interface{}) *runtime.Func { - return runtime.FuncForPC(reflect.ValueOf(opt).Pointer()) -} - -func funcName(f *runtime.Func) string { - name := f.Name() - trimmed := strings.TrimSuffix(path.Base(name), path.Ext(name)) - splitted := strings.Split(trimmed, ".") - - if len(splitted) == 0 { - return trimmed - } - - return splitted[len(splitted)-1] -} - -func isFuncSame(f1, f2 *runtime.Func) bool { - f1File, f1Loc := f1.FileLine(f1.Entry()) - f2File, f2Loc := f2.FileLine(f2.Entry()) - - return f1File == f2File && f1Loc == f2Loc +func funcName(opt interface{}) string { + n := runtime.FuncForPC(reflect.ValueOf(opt).Pointer()).Name() + return strings.TrimSuffix(path.Base(n), path.Ext(n)) } diff --git a/go-controller/vendor/github.com/stretchr/testify/require/require.go b/go-controller/vendor/github.com/stretchr/testify/require/require.go index d8921950d7..506a82f807 100644 --- a/go-controller/vendor/github.com/stretchr/testify/require/require.go +++ b/go-controller/vendor/github.com/stretchr/testify/require/require.go @@ -34,9 +34,9 @@ func Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interfac // Contains asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // -// require.Contains(t, "Hello World", "World") -// require.Contains(t, ["Hello", "World"], "World") -// require.Contains(t, {"Hello": "World"}, "Hello") +// assert.Contains(t, "Hello World", "World") +// assert.Contains(t, ["Hello", "World"], "World") +// assert.Contains(t, {"Hello": "World"}, "Hello") func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -50,9 +50,9 @@ func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...int // Containsf asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // -// require.Containsf(t, "Hello World", "World", "error message %s", "formatted") -// require.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") -// require.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") +// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted") +// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") +// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -91,7 +91,7 @@ func DirExistsf(t TestingT, path string, msg string, args ...interface{}) { // listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, // the number of appearances of each of them in both lists should match. // -// require.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]) +// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]) func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -106,7 +106,7 @@ func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs // listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, // the number of appearances of each of them in both lists should match. // -// require.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") +// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -120,7 +120,7 @@ func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // -// require.Empty(t, obj) +// assert.Empty(t, obj) func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -134,7 +134,7 @@ func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) { // Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // -// require.Emptyf(t, obj, "error message %s", "formatted") +// assert.Emptyf(t, obj, "error message %s", "formatted") func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -147,7 +147,7 @@ func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) { // Equal asserts that two objects are equal. // -// require.Equal(t, 123, 123) +// assert.Equal(t, 123, 123) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality @@ -166,7 +166,7 @@ func Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...i // and that it is equal to the provided error. // // actualObj, err := SomeFunction() -// require.EqualError(t, err, expectedErrorString) +// assert.EqualError(t, err, expectedErrorString) func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -181,7 +181,7 @@ func EqualError(t TestingT, theError error, errString string, msgAndArgs ...inte // and that it is equal to the provided error. // // actualObj, err := SomeFunction() -// require.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") +// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -200,8 +200,8 @@ func EqualErrorf(t TestingT, theError error, errString string, msg string, args // Exported int // notExported int // } -// require.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true -// require.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false +// assert.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true +// assert.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false func EqualExportedValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -220,8 +220,8 @@ func EqualExportedValues(t TestingT, expected interface{}, actual interface{}, m // Exported int // notExported int // } -// require.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, "error message %s", "formatted") => true -// require.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, "error message %s", "formatted") => false +// assert.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, "error message %s", "formatted") => true +// assert.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, "error message %s", "formatted") => false func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -232,10 +232,10 @@ func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, t.FailNow() } -// EqualValues asserts that two objects are equal or convertible to the larger -// type and equal. +// EqualValues asserts that two objects are equal or convertible to the same types +// and equal. // -// require.EqualValues(t, uint32(123), int32(123)) +// assert.EqualValues(t, uint32(123), int32(123)) func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -246,10 +246,10 @@ func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArg t.FailNow() } -// EqualValuesf asserts that two objects are equal or convertible to the larger -// type and equal. +// EqualValuesf asserts that two objects are equal or convertible to the same types +// and equal. // -// require.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") +// assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -262,7 +262,7 @@ func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg stri // Equalf asserts that two objects are equal. // -// require.Equalf(t, 123, 123, "error message %s", "formatted") +// assert.Equalf(t, 123, 123, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality @@ -280,8 +280,8 @@ func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, ar // Error asserts that a function returned an error (i.e. not `nil`). // // actualObj, err := SomeFunction() -// if require.Error(t, err) { -// require.Equal(t, expectedError, err) +// if assert.Error(t, err) { +// assert.Equal(t, expectedError, err) // } func Error(t TestingT, err error, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { @@ -321,7 +321,7 @@ func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...int // and that the error contains the specified substring. // // actualObj, err := SomeFunction() -// require.ErrorContains(t, err, expectedErrorSubString) +// assert.ErrorContains(t, err, expectedErrorSubString) func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -336,7 +336,7 @@ func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...in // and that the error contains the specified substring. // // actualObj, err := SomeFunction() -// require.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") +// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -374,8 +374,8 @@ func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface // Errorf asserts that a function returned an error (i.e. not `nil`). // // actualObj, err := SomeFunction() -// if require.Errorf(t, err, "error message %s", "formatted") { -// require.Equal(t, expectedErrorf, err) +// if assert.Errorf(t, err, "error message %s", "formatted") { +// assert.Equal(t, expectedErrorf, err) // } func Errorf(t TestingT, err error, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { @@ -390,7 +390,7 @@ func Errorf(t TestingT, err error, msg string, args ...interface{}) { // Eventually asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // -// require.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond) +// assert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond) func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -415,10 +415,10 @@ func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick t // time.Sleep(8*time.Second) // externalValue = true // }() -// require.EventuallyWithT(t, func(c *require.CollectT) { +// assert.EventuallyWithT(t, func(c *assert.CollectT) { // // add assertions as needed; any assertion failure will fail the current tick -// require.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") +// assert.True(c, externalValue, "expected 'externalValue' to be true") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func EventuallyWithT(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -443,10 +443,10 @@ func EventuallyWithT(t TestingT, condition func(collect *assert.CollectT), waitF // time.Sleep(8*time.Second) // externalValue = true // }() -// require.EventuallyWithTf(t, func(c *require.CollectT, "error message %s", "formatted") { +// assert.EventuallyWithTf(t, func(c *assert.CollectT, "error message %s", "formatted") { // // add assertions as needed; any assertion failure will fail the current tick -// require.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") +// assert.True(c, externalValue, "expected 'externalValue' to be true") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func EventuallyWithTf(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -460,7 +460,7 @@ func EventuallyWithTf(t TestingT, condition func(collect *assert.CollectT), wait // Eventuallyf asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // -// require.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") +// assert.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -473,7 +473,7 @@ func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick // Exactly asserts that two objects are equal in value and type. // -// require.Exactly(t, int32(123), int64(123)) +// assert.Exactly(t, int32(123), int64(123)) func Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -486,7 +486,7 @@ func Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs .. // Exactlyf asserts that two objects are equal in value and type. // -// require.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted") +// assert.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted") func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -543,7 +543,7 @@ func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) { // False asserts that the specified value is false. // -// require.False(t, myBool) +// assert.False(t, myBool) func False(t TestingT, value bool, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -556,7 +556,7 @@ func False(t TestingT, value bool, msgAndArgs ...interface{}) { // Falsef asserts that the specified value is false. // -// require.Falsef(t, myBool, "error message %s", "formatted") +// assert.Falsef(t, myBool, "error message %s", "formatted") func Falsef(t TestingT, value bool, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -593,9 +593,9 @@ func FileExistsf(t TestingT, path string, msg string, args ...interface{}) { // Greater asserts that the first element is greater than the second // -// require.Greater(t, 2, 1) -// require.Greater(t, float64(2), float64(1)) -// require.Greater(t, "b", "a") +// assert.Greater(t, 2, 1) +// assert.Greater(t, float64(2), float64(1)) +// assert.Greater(t, "b", "a") func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -608,10 +608,10 @@ func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface // GreaterOrEqual asserts that the first element is greater than or equal to the second // -// require.GreaterOrEqual(t, 2, 1) -// require.GreaterOrEqual(t, 2, 2) -// require.GreaterOrEqual(t, "b", "a") -// require.GreaterOrEqual(t, "b", "b") +// assert.GreaterOrEqual(t, 2, 1) +// assert.GreaterOrEqual(t, 2, 2) +// assert.GreaterOrEqual(t, "b", "a") +// assert.GreaterOrEqual(t, "b", "b") func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -624,10 +624,10 @@ func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...in // GreaterOrEqualf asserts that the first element is greater than or equal to the second // -// require.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") -// require.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") -// require.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") -// require.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted") +// assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") +// assert.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") +// assert.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") +// assert.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted") func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -640,9 +640,9 @@ func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, arg // Greaterf asserts that the first element is greater than the second // -// require.Greaterf(t, 2, 1, "error message %s", "formatted") -// require.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") -// require.Greaterf(t, "b", "a", "error message %s", "formatted") +// assert.Greaterf(t, 2, 1, "error message %s", "formatted") +// assert.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") +// assert.Greaterf(t, "b", "a", "error message %s", "formatted") func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -656,7 +656,7 @@ func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...in // HTTPBodyContains asserts that a specified handler returns a // body that contains a string. // -// require.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") +// assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { @@ -672,7 +672,7 @@ func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url s // HTTPBodyContainsf asserts that a specified handler returns a // body that contains a string. // -// require.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { @@ -688,7 +688,7 @@ func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url // HTTPBodyNotContains asserts that a specified handler returns a // body that does not contain a string. // -// require.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") +// assert.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { @@ -704,7 +704,7 @@ func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, ur // HTTPBodyNotContainsf asserts that a specified handler returns a // body that does not contain a string. // -// require.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") +// assert.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { @@ -719,7 +719,7 @@ func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, u // HTTPError asserts that a specified handler returns an error status code. // -// require.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { @@ -734,7 +734,7 @@ func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, // HTTPErrorf asserts that a specified handler returns an error status code. // -// require.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { @@ -749,7 +749,7 @@ func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, // HTTPRedirect asserts that a specified handler returns a redirect status code. // -// require.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { @@ -764,7 +764,7 @@ func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url strin // HTTPRedirectf asserts that a specified handler returns a redirect status code. // -// require.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} +// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { @@ -779,7 +779,7 @@ func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url stri // HTTPStatusCode asserts that a specified handler returns a specified status code. // -// require.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501) +// assert.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501) // // Returns whether the assertion was successful (true) or not (false). func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) { @@ -794,7 +794,7 @@ func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method string, url str // HTTPStatusCodef asserts that a specified handler returns a specified status code. // -// require.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") +// assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) { @@ -809,7 +809,7 @@ func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url st // HTTPSuccess asserts that a specified handler returns a success status code. // -// require.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) +// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) // // Returns whether the assertion was successful (true) or not (false). func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { @@ -824,7 +824,7 @@ func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string // HTTPSuccessf asserts that a specified handler returns a success status code. // -// require.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") +// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { @@ -839,7 +839,7 @@ func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url strin // Implements asserts that an object is implemented by the specified interface. // -// require.Implements(t, (*MyInterface)(nil), new(MyObject)) +// assert.Implements(t, (*MyInterface)(nil), new(MyObject)) func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -852,7 +852,7 @@ func Implements(t TestingT, interfaceObject interface{}, object interface{}, msg // Implementsf asserts that an object is implemented by the specified interface. // -// require.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") +// assert.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -865,7 +865,7 @@ func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, ms // InDelta asserts that the two numerals are within delta of each other. // -// require.InDelta(t, math.Pi, 22/7.0, 0.01) +// assert.InDelta(t, math.Pi, 22/7.0, 0.01) func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -922,7 +922,7 @@ func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta f // InDeltaf asserts that the two numerals are within delta of each other. // -// require.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") +// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -979,9 +979,9 @@ func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon fl // IsDecreasing asserts that the collection is decreasing // -// require.IsDecreasing(t, []int{2, 1, 0}) -// require.IsDecreasing(t, []float{2, 1}) -// require.IsDecreasing(t, []string{"b", "a"}) +// assert.IsDecreasing(t, []int{2, 1, 0}) +// assert.IsDecreasing(t, []float{2, 1}) +// assert.IsDecreasing(t, []string{"b", "a"}) func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -994,9 +994,9 @@ func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { // IsDecreasingf asserts that the collection is decreasing // -// require.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") -// require.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted") -// require.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted") +// assert.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") +// assert.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted") +// assert.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted") func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1009,9 +1009,9 @@ func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface // IsIncreasing asserts that the collection is increasing // -// require.IsIncreasing(t, []int{1, 2, 3}) -// require.IsIncreasing(t, []float{1, 2}) -// require.IsIncreasing(t, []string{"a", "b"}) +// assert.IsIncreasing(t, []int{1, 2, 3}) +// assert.IsIncreasing(t, []float{1, 2}) +// assert.IsIncreasing(t, []string{"a", "b"}) func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1024,9 +1024,9 @@ func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { // IsIncreasingf asserts that the collection is increasing // -// require.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") -// require.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted") -// require.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted") +// assert.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") +// assert.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted") +// assert.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted") func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1039,9 +1039,9 @@ func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface // IsNonDecreasing asserts that the collection is not decreasing // -// require.IsNonDecreasing(t, []int{1, 1, 2}) -// require.IsNonDecreasing(t, []float{1, 2}) -// require.IsNonDecreasing(t, []string{"a", "b"}) +// assert.IsNonDecreasing(t, []int{1, 1, 2}) +// assert.IsNonDecreasing(t, []float{1, 2}) +// assert.IsNonDecreasing(t, []string{"a", "b"}) func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1054,9 +1054,9 @@ func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) // IsNonDecreasingf asserts that the collection is not decreasing // -// require.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") -// require.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted") -// require.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted") +// assert.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") +// assert.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted") +// assert.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted") func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1069,9 +1069,9 @@ func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interf // IsNonIncreasing asserts that the collection is not increasing // -// require.IsNonIncreasing(t, []int{2, 1, 1}) -// require.IsNonIncreasing(t, []float{2, 1}) -// require.IsNonIncreasing(t, []string{"b", "a"}) +// assert.IsNonIncreasing(t, []int{2, 1, 1}) +// assert.IsNonIncreasing(t, []float{2, 1}) +// assert.IsNonIncreasing(t, []string{"b", "a"}) func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1084,9 +1084,9 @@ func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) // IsNonIncreasingf asserts that the collection is not increasing // -// require.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") -// require.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted") -// require.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted") +// assert.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") +// assert.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted") +// assert.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted") func IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1121,7 +1121,7 @@ func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg strin // JSONEq asserts that two JSON strings are equivalent. // -// require.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) +// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1134,7 +1134,7 @@ func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{ // JSONEqf asserts that two JSON strings are equivalent. // -// require.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") +// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1148,7 +1148,7 @@ func JSONEqf(t TestingT, expected string, actual string, msg string, args ...int // Len asserts that the specified object has specific length. // Len also fails if the object has a type that len() not accept. // -// require.Len(t, mySlice, 3) +// assert.Len(t, mySlice, 3) func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1162,7 +1162,7 @@ func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) // Lenf asserts that the specified object has specific length. // Lenf also fails if the object has a type that len() not accept. // -// require.Lenf(t, mySlice, 3, "error message %s", "formatted") +// assert.Lenf(t, mySlice, 3, "error message %s", "formatted") func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1175,9 +1175,9 @@ func Lenf(t TestingT, object interface{}, length int, msg string, args ...interf // Less asserts that the first element is less than the second // -// require.Less(t, 1, 2) -// require.Less(t, float64(1), float64(2)) -// require.Less(t, "a", "b") +// assert.Less(t, 1, 2) +// assert.Less(t, float64(1), float64(2)) +// assert.Less(t, "a", "b") func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1190,10 +1190,10 @@ func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) // LessOrEqual asserts that the first element is less than or equal to the second // -// require.LessOrEqual(t, 1, 2) -// require.LessOrEqual(t, 2, 2) -// require.LessOrEqual(t, "a", "b") -// require.LessOrEqual(t, "b", "b") +// assert.LessOrEqual(t, 1, 2) +// assert.LessOrEqual(t, 2, 2) +// assert.LessOrEqual(t, "a", "b") +// assert.LessOrEqual(t, "b", "b") func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1206,10 +1206,10 @@ func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...inter // LessOrEqualf asserts that the first element is less than or equal to the second // -// require.LessOrEqualf(t, 1, 2, "error message %s", "formatted") -// require.LessOrEqualf(t, 2, 2, "error message %s", "formatted") -// require.LessOrEqualf(t, "a", "b", "error message %s", "formatted") -// require.LessOrEqualf(t, "b", "b", "error message %s", "formatted") +// assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted") +// assert.LessOrEqualf(t, 2, 2, "error message %s", "formatted") +// assert.LessOrEqualf(t, "a", "b", "error message %s", "formatted") +// assert.LessOrEqualf(t, "b", "b", "error message %s", "formatted") func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1222,9 +1222,9 @@ func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args . // Lessf asserts that the first element is less than the second // -// require.Lessf(t, 1, 2, "error message %s", "formatted") -// require.Lessf(t, float64(1), float64(2), "error message %s", "formatted") -// require.Lessf(t, "a", "b", "error message %s", "formatted") +// assert.Lessf(t, 1, 2, "error message %s", "formatted") +// assert.Lessf(t, float64(1), float64(2), "error message %s", "formatted") +// assert.Lessf(t, "a", "b", "error message %s", "formatted") func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1237,8 +1237,8 @@ func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...inter // Negative asserts that the specified element is negative // -// require.Negative(t, -1) -// require.Negative(t, -1.23) +// assert.Negative(t, -1) +// assert.Negative(t, -1.23) func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1251,8 +1251,8 @@ func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) { // Negativef asserts that the specified element is negative // -// require.Negativef(t, -1, "error message %s", "formatted") -// require.Negativef(t, -1.23, "error message %s", "formatted") +// assert.Negativef(t, -1, "error message %s", "formatted") +// assert.Negativef(t, -1.23, "error message %s", "formatted") func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1266,7 +1266,7 @@ func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) { // Never asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // -// require.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) +// assert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1280,7 +1280,7 @@ func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.D // Neverf asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // -// require.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") +// assert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1293,7 +1293,7 @@ func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time. // Nil asserts that the specified object is nil. // -// require.Nil(t, err) +// assert.Nil(t, err) func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1306,7 +1306,7 @@ func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) { // Nilf asserts that the specified object is nil. // -// require.Nilf(t, err, "error message %s", "formatted") +// assert.Nilf(t, err, "error message %s", "formatted") func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1344,8 +1344,8 @@ func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) { // NoError asserts that a function returned no error (i.e. `nil`). // // actualObj, err := SomeFunction() -// if require.NoError(t, err) { -// require.Equal(t, expectedObj, actualObj) +// if assert.NoError(t, err) { +// assert.Equal(t, expectedObj, actualObj) // } func NoError(t TestingT, err error, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { @@ -1360,8 +1360,8 @@ func NoError(t TestingT, err error, msgAndArgs ...interface{}) { // NoErrorf asserts that a function returned no error (i.e. `nil`). // // actualObj, err := SomeFunction() -// if require.NoErrorf(t, err, "error message %s", "formatted") { -// require.Equal(t, expectedObj, actualObj) +// if assert.NoErrorf(t, err, "error message %s", "formatted") { +// assert.Equal(t, expectedObj, actualObj) // } func NoErrorf(t TestingT, err error, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { @@ -1400,9 +1400,9 @@ func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) { // NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // -// require.NotContains(t, "Hello World", "Earth") -// require.NotContains(t, ["Hello", "World"], "Earth") -// require.NotContains(t, {"Hello": "World"}, "Earth") +// assert.NotContains(t, "Hello World", "Earth") +// assert.NotContains(t, ["Hello", "World"], "Earth") +// assert.NotContains(t, {"Hello": "World"}, "Earth") func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1416,9 +1416,9 @@ func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ... // NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // -// require.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") -// require.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") -// require.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") +// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") +// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") +// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1429,51 +1429,11 @@ func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, a t.FailNow() } -// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// require.NotElementsMatch(t, [1, 1, 2, 3], [1, 1, 2, 3]) -> false -// -// require.NotElementsMatch(t, [1, 1, 2, 3], [1, 2, 3]) -> true -// -// require.NotElementsMatch(t, [1, 2, 3], [1, 2, 4]) -> true -func NotElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotElementsMatch(t, listA, listB, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// require.NotElementsMatchf(t, [1, 1, 2, 3], [1, 1, 2, 3], "error message %s", "formatted") -> false -// -// require.NotElementsMatchf(t, [1, 1, 2, 3], [1, 2, 3], "error message %s", "formatted") -> true -// -// require.NotElementsMatchf(t, [1, 2, 3], [1, 2, 4], "error message %s", "formatted") -> true -func NotElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotElementsMatchf(t, listA, listB, msg, args...) { - return - } - t.FailNow() -} - // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // -// if require.NotEmpty(t, obj) { -// require.Equal(t, "two", obj[1]) +// if assert.NotEmpty(t, obj) { +// assert.Equal(t, "two", obj[1]) // } func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { @@ -1488,8 +1448,8 @@ func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) { // NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // -// if require.NotEmptyf(t, obj, "error message %s", "formatted") { -// require.Equal(t, "two", obj[1]) +// if assert.NotEmptyf(t, obj, "error message %s", "formatted") { +// assert.Equal(t, "two", obj[1]) // } func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { @@ -1503,7 +1463,7 @@ func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) // NotEqual asserts that the specified values are NOT equal. // -// require.NotEqual(t, obj1, obj2) +// assert.NotEqual(t, obj1, obj2) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). @@ -1519,7 +1479,7 @@ func NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs . // NotEqualValues asserts that two objects are not equal even when converted to the same type // -// require.NotEqualValues(t, obj1, obj2) +// assert.NotEqualValues(t, obj1, obj2) func NotEqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1532,7 +1492,7 @@ func NotEqualValues(t TestingT, expected interface{}, actual interface{}, msgAnd // NotEqualValuesf asserts that two objects are not equal even when converted to the same type // -// require.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted") +// assert.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted") func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1545,7 +1505,7 @@ func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg s // NotEqualf asserts that the specified values are NOT equal. // -// require.NotEqualf(t, obj1, obj2, "error message %s", "formatted") +// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). @@ -1559,31 +1519,7 @@ func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, t.FailNow() } -// NotErrorAs asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func NotErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotErrorAs(t, err, target, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotErrorAsf asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotErrorAsf(t, err, target, msg, args...) { - return - } - t.FailNow() -} - -// NotErrorIs asserts that none of the errors in err's chain matches target. +// NotErrorIs asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func NotErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { @@ -1595,7 +1531,7 @@ func NotErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) t.FailNow() } -// NotErrorIsf asserts that none of the errors in err's chain matches target. +// NotErrorIsf asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { @@ -1609,7 +1545,7 @@ func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interf // NotImplements asserts that an object does not implement the specified interface. // -// require.NotImplements(t, (*MyInterface)(nil), new(MyObject)) +// assert.NotImplements(t, (*MyInterface)(nil), new(MyObject)) func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1622,7 +1558,7 @@ func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, // NotImplementsf asserts that an object does not implement the specified interface. // -// require.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") +// assert.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1635,7 +1571,7 @@ func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, // NotNil asserts that the specified object is not nil. // -// require.NotNil(t, err) +// assert.NotNil(t, err) func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1648,7 +1584,7 @@ func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) { // NotNilf asserts that the specified object is not nil. // -// require.NotNilf(t, err, "error message %s", "formatted") +// assert.NotNilf(t, err, "error message %s", "formatted") func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1661,7 +1597,7 @@ func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) { // NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. // -// require.NotPanics(t, func(){ RemainCalm() }) +// assert.NotPanics(t, func(){ RemainCalm() }) func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1674,7 +1610,7 @@ func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { // NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. // -// require.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") +// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1687,8 +1623,8 @@ func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interfac // NotRegexp asserts that a specified regexp does not match a string. // -// require.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") -// require.NotRegexp(t, "^start", "it's not starting") +// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") +// assert.NotRegexp(t, "^start", "it's not starting") func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1701,8 +1637,8 @@ func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interf // NotRegexpf asserts that a specified regexp does not match a string. // -// require.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// require.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") +// assert.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") +// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1715,7 +1651,7 @@ func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args .. // NotSame asserts that two pointers do not reference the same object. // -// require.NotSame(t, ptr1, ptr2) +// assert.NotSame(t, ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -1731,7 +1667,7 @@ func NotSame(t TestingT, expected interface{}, actual interface{}, msgAndArgs .. // NotSamef asserts that two pointers do not reference the same object. // -// require.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") +// assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -1749,8 +1685,8 @@ func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, // contain all elements given in the specified subset list(array, slice...) or // map. // -// require.NotSubset(t, [1, 3, 4], [1, 2]) -// require.NotSubset(t, {"x": 1, "y": 2}, {"z": 3}) +// assert.NotSubset(t, [1, 3, 4], [1, 2]) +// assert.NotSubset(t, {"x": 1, "y": 2}, {"z": 3}) func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1765,8 +1701,8 @@ func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...i // contain all elements given in the specified subset list(array, slice...) or // map. // -// require.NotSubsetf(t, [1, 3, 4], [1, 2], "error message %s", "formatted") -// require.NotSubsetf(t, {"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") +// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "error message %s", "formatted") +// assert.NotSubsetf(t, {"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1801,7 +1737,7 @@ func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) { // Panics asserts that the code inside the specified PanicTestFunc panics. // -// require.Panics(t, func(){ GoCrazy() }) +// assert.Panics(t, func(){ GoCrazy() }) func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1816,7 +1752,7 @@ func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // -// require.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) +// assert.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) func PanicsWithError(t TestingT, errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1831,7 +1767,7 @@ func PanicsWithError(t TestingT, errString string, f assert.PanicTestFunc, msgAn // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // -// require.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") +// assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func PanicsWithErrorf(t TestingT, errString string, f assert.PanicTestFunc, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1845,7 +1781,7 @@ func PanicsWithErrorf(t TestingT, errString string, f assert.PanicTestFunc, msg // PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // -// require.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) +// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1859,7 +1795,7 @@ func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, m // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // -// require.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") +// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1872,7 +1808,7 @@ func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, // Panicsf asserts that the code inside the specified PanicTestFunc panics. // -// require.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") +// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") func Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1885,8 +1821,8 @@ func Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{} // Positive asserts that the specified element is positive // -// require.Positive(t, 1) -// require.Positive(t, 1.23) +// assert.Positive(t, 1) +// assert.Positive(t, 1.23) func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1899,8 +1835,8 @@ func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) { // Positivef asserts that the specified element is positive // -// require.Positivef(t, 1, "error message %s", "formatted") -// require.Positivef(t, 1.23, "error message %s", "formatted") +// assert.Positivef(t, 1, "error message %s", "formatted") +// assert.Positivef(t, 1.23, "error message %s", "formatted") func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1913,8 +1849,8 @@ func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) { // Regexp asserts that a specified regexp matches a string. // -// require.Regexp(t, regexp.MustCompile("start"), "it's starting") -// require.Regexp(t, "start...$", "it's not starting") +// assert.Regexp(t, regexp.MustCompile("start"), "it's starting") +// assert.Regexp(t, "start...$", "it's not starting") func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1927,8 +1863,8 @@ func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface // Regexpf asserts that a specified regexp matches a string. // -// require.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// require.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") +// assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") +// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1941,7 +1877,7 @@ func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...in // Same asserts that two pointers reference the same object. // -// require.Same(t, ptr1, ptr2) +// assert.Same(t, ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -1957,7 +1893,7 @@ func Same(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...in // Samef asserts that two pointers reference the same object. // -// require.Samef(t, ptr1, ptr2, "error message %s", "formatted") +// assert.Samef(t, ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. @@ -1974,8 +1910,8 @@ func Samef(t TestingT, expected interface{}, actual interface{}, msg string, arg // Subset asserts that the specified list(array, slice...) or map contains all // elements given in the specified subset list(array, slice...) or map. // -// require.Subset(t, [1, 2, 3], [1, 2]) -// require.Subset(t, {"x": 1, "y": 2}, {"x": 1}) +// assert.Subset(t, [1, 2, 3], [1, 2]) +// assert.Subset(t, {"x": 1, "y": 2}, {"x": 1}) func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -1989,8 +1925,8 @@ func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...inte // Subsetf asserts that the specified list(array, slice...) or map contains all // elements given in the specified subset list(array, slice...) or map. // -// require.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted") -// require.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") +// assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted") +// assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -2003,7 +1939,7 @@ func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args // True asserts that the specified value is true. // -// require.True(t, myBool) +// assert.True(t, myBool) func True(t TestingT, value bool, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -2016,7 +1952,7 @@ func True(t TestingT, value bool, msgAndArgs ...interface{}) { // Truef asserts that the specified value is true. // -// require.Truef(t, myBool, "error message %s", "formatted") +// assert.Truef(t, myBool, "error message %s", "formatted") func Truef(t TestingT, value bool, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -2029,7 +1965,7 @@ func Truef(t TestingT, value bool, msg string, args ...interface{}) { // WithinDuration asserts that the two times are within duration delta of each other. // -// require.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) +// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -2042,7 +1978,7 @@ func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time // WithinDurationf asserts that the two times are within duration delta of each other. // -// require.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") +// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -2055,7 +1991,7 @@ func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta tim // WithinRange asserts that a time is within a time range (inclusive). // -// require.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) +// assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) func WithinRange(t TestingT, actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() @@ -2068,7 +2004,7 @@ func WithinRange(t TestingT, actual time.Time, start time.Time, end time.Time, m // WithinRangef asserts that a time is within a time range (inclusive). // -// require.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") +// assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) { if h, ok := t.(tHelper); ok { h.Helper() diff --git a/go-controller/vendor/github.com/stretchr/testify/require/require.go.tmpl b/go-controller/vendor/github.com/stretchr/testify/require/require.go.tmpl index 8b32836850..55e42ddebd 100644 --- a/go-controller/vendor/github.com/stretchr/testify/require/require.go.tmpl +++ b/go-controller/vendor/github.com/stretchr/testify/require/require.go.tmpl @@ -1,4 +1,4 @@ -{{ replace .Comment "assert." "require."}} +{{.Comment}} func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { if h, ok := t.(tHelper); ok { h.Helper() } if assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { return } diff --git a/go-controller/vendor/github.com/stretchr/testify/require/require_forward.go b/go-controller/vendor/github.com/stretchr/testify/require/require_forward.go index 1bd87304f4..eee8310a5f 100644 --- a/go-controller/vendor/github.com/stretchr/testify/require/require_forward.go +++ b/go-controller/vendor/github.com/stretchr/testify/require/require_forward.go @@ -187,8 +187,8 @@ func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface EqualExportedValuesf(a.t, expected, actual, msg, args...) } -// EqualValues asserts that two objects are equal or convertible to the larger -// type and equal. +// EqualValues asserts that two objects are equal or convertible to the same types +// and equal. // // a.EqualValues(uint32(123), int32(123)) func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { @@ -198,8 +198,8 @@ func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAn EqualValues(a.t, expected, actual, msgAndArgs...) } -// EqualValuesf asserts that two objects are equal or convertible to the larger -// type and equal. +// EqualValuesf asserts that two objects are equal or convertible to the same types +// and equal. // // a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted") func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) { @@ -337,7 +337,7 @@ func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, ti // a.EventuallyWithT(func(c *assert.CollectT) { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func (a *Assertions) EventuallyWithT(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -362,7 +362,7 @@ func (a *Assertions) EventuallyWithT(condition func(collect *assert.CollectT), w // a.EventuallyWithTf(func(c *assert.CollectT, "error message %s", "formatted") { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") +// }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func (a *Assertions) EventuallyWithTf(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { if h, ok := a.t.(tHelper); ok { h.Helper() @@ -1129,40 +1129,6 @@ func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg strin NotContainsf(a.t, s, contains, msg, args...) } -// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// a.NotElementsMatch([1, 1, 2, 3], [1, 1, 2, 3]) -> false -// -// a.NotElementsMatch([1, 1, 2, 3], [1, 2, 3]) -> true -// -// a.NotElementsMatch([1, 2, 3], [1, 2, 4]) -> true -func (a *Assertions) NotElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// a.NotElementsMatchf([1, 1, 2, 3], [1, 1, 2, 3], "error message %s", "formatted") -> false -// -// a.NotElementsMatchf([1, 1, 2, 3], [1, 2, 3], "error message %s", "formatted") -> true -// -// a.NotElementsMatchf([1, 2, 3], [1, 2, 4], "error message %s", "formatted") -> true -func (a *Assertions) NotElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotElementsMatchf(a.t, listA, listB, msg, args...) -} - // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // @@ -1235,25 +1201,7 @@ func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg str NotEqualf(a.t, expected, actual, msg, args...) } -// NotErrorAs asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func (a *Assertions) NotErrorAs(err error, target interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotErrorAs(a.t, err, target, msgAndArgs...) -} - -// NotErrorAsf asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func (a *Assertions) NotErrorAsf(err error, target interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotErrorAsf(a.t, err, target, msg, args...) -} - -// NotErrorIs asserts that none of the errors in err's chain matches target. +// NotErrorIs asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) { if h, ok := a.t.(tHelper); ok { @@ -1262,7 +1210,7 @@ func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface NotErrorIs(a.t, err, target, msgAndArgs...) } -// NotErrorIsf asserts that none of the errors in err's chain matches target. +// NotErrorIsf asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) { if h, ok := a.t.(tHelper); ok { diff --git a/go-controller/vendor/github.com/stretchr/testify/require/requirements.go b/go-controller/vendor/github.com/stretchr/testify/require/requirements.go index 6b7ce929eb..91772dfeb9 100644 --- a/go-controller/vendor/github.com/stretchr/testify/require/requirements.go +++ b/go-controller/vendor/github.com/stretchr/testify/require/requirements.go @@ -6,7 +6,7 @@ type TestingT interface { FailNow() } -type tHelper = interface { +type tHelper interface { Helper() } diff --git a/go-controller/vendor/go.opentelemetry.io/otel/LICENSE b/go-controller/vendor/go.opentelemetry.io/otel/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/README.md b/go-controller/vendor/go.opentelemetry.io/otel/attribute/README.md deleted file mode 100644 index 5b3da8f14c..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Attribute - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/attribute)](https://pkg.go.dev/go.opentelemetry.io/otel/attribute) diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/doc.go b/go-controller/vendor/go.opentelemetry.io/otel/attribute/doc.go deleted file mode 100644 index eef51ebc2a..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package attribute provides key and value attributes. -package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/encoder.go b/go-controller/vendor/go.opentelemetry.io/otel/attribute/encoder.go deleted file mode 100644 index 318e42fcab..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/encoder.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "bytes" - "sync" - "sync/atomic" -) - -type ( - // Encoder is a mechanism for serializing an attribute set into a specific - // string representation that supports caching, to avoid repeated - // serialization. An example could be an exporter encoding the attribute - // set into a wire representation. - Encoder interface { - // Encode returns the serialized encoding of the attribute set using - // its Iterator. This result may be cached by a attribute.Set. - Encode(iterator Iterator) string - - // ID returns a value that is unique for each class of attribute - // encoder. Attribute encoders allocate these using `NewEncoderID`. - ID() EncoderID - } - - // EncoderID is used to identify distinct Encoder - // implementations, for caching encoded results. - EncoderID struct { - value uint64 - } - - // defaultAttrEncoder uses a sync.Pool of buffers to reduce the number of - // allocations used in encoding attributes. This implementation encodes a - // comma-separated list of key=value, with '/'-escaping of '=', ',', and - // '\'. - defaultAttrEncoder struct { - // pool is a pool of attribute set builders. The buffers in this pool - // grow to a size that most attribute encodings will not allocate new - // memory. - pool sync.Pool // *bytes.Buffer - } -) - -// escapeChar is used to ensure uniqueness of the attribute encoding where -// keys or values contain either '=' or ','. Since there is no parser needed -// for this encoding and its only requirement is to be unique, this choice is -// arbitrary. Users will see these in some exporters (e.g., stdout), so the -// backslash ('\') is used as a conventional choice. -const escapeChar = '\\' - -var ( - _ Encoder = &defaultAttrEncoder{} - - // encoderIDCounter is for generating IDs for other attribute encoders. - encoderIDCounter uint64 - - defaultEncoderOnce sync.Once - defaultEncoderID = NewEncoderID() - defaultEncoderInstance *defaultAttrEncoder -) - -// NewEncoderID returns a unique attribute encoder ID. It should be called -// once per each type of attribute encoder. Preferably in init() or in var -// definition. -func NewEncoderID() EncoderID { - return EncoderID{value: atomic.AddUint64(&encoderIDCounter, 1)} -} - -// DefaultEncoder returns an attribute encoder that encodes attributes in such -// a way that each escaped attribute's key is followed by an equal sign and -// then by an escaped attribute's value. All key-value pairs are separated by -// a comma. -// -// Escaping is done by prepending a backslash before either a backslash, equal -// sign or a comma. -func DefaultEncoder() Encoder { - defaultEncoderOnce.Do(func() { - defaultEncoderInstance = &defaultAttrEncoder{ - pool: sync.Pool{ - New: func() interface{} { - return &bytes.Buffer{} - }, - }, - } - }) - return defaultEncoderInstance -} - -// Encode is a part of an implementation of the AttributeEncoder interface. -func (d *defaultAttrEncoder) Encode(iter Iterator) string { - buf := d.pool.Get().(*bytes.Buffer) - defer d.pool.Put(buf) - buf.Reset() - - for iter.Next() { - i, keyValue := iter.IndexedAttribute() - if i > 0 { - _, _ = buf.WriteRune(',') - } - copyAndEscape(buf, string(keyValue.Key)) - - _, _ = buf.WriteRune('=') - - if keyValue.Value.Type() == STRING { - copyAndEscape(buf, keyValue.Value.AsString()) - } else { - _, _ = buf.WriteString(keyValue.Value.Emit()) - } - } - return buf.String() -} - -// ID is a part of an implementation of the AttributeEncoder interface. -func (*defaultAttrEncoder) ID() EncoderID { - return defaultEncoderID -} - -// copyAndEscape escapes `=`, `,` and its own escape character (`\`), -// making the default encoding unique. -func copyAndEscape(buf *bytes.Buffer, val string) { - for _, ch := range val { - switch ch { - case '=', ',', escapeChar: - _, _ = buf.WriteRune(escapeChar) - } - _, _ = buf.WriteRune(ch) - } -} - -// Valid returns true if this encoder ID was allocated by -// `NewEncoderID`. Invalid encoder IDs will not be cached. -func (id EncoderID) Valid() bool { - return id.value != 0 -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/filter.go b/go-controller/vendor/go.opentelemetry.io/otel/attribute/filter.go deleted file mode 100644 index be9cd922d8..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/filter.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -// Filter supports removing certain attributes from attribute sets. When -// the filter returns true, the attribute will be kept in the filtered -// attribute set. When the filter returns false, the attribute is excluded -// from the filtered attribute set, and the attribute instead appears in -// the removed list of excluded attributes. -type Filter func(KeyValue) bool - -// NewAllowKeysFilter returns a Filter that only allows attributes with one of -// the provided keys. -// -// If keys is empty a deny-all filter is returned. -func NewAllowKeysFilter(keys ...Key) Filter { - if len(keys) <= 0 { - return func(kv KeyValue) bool { return false } - } - - allowed := make(map[Key]struct{}) - for _, k := range keys { - allowed[k] = struct{}{} - } - return func(kv KeyValue) bool { - _, ok := allowed[kv.Key] - return ok - } -} - -// NewDenyKeysFilter returns a Filter that only allows attributes -// that do not have one of the provided keys. -// -// If keys is empty an allow-all filter is returned. -func NewDenyKeysFilter(keys ...Key) Filter { - if len(keys) <= 0 { - return func(kv KeyValue) bool { return true } - } - - forbid := make(map[Key]struct{}) - for _, k := range keys { - forbid[k] = struct{}{} - } - return func(kv KeyValue) bool { - _, ok := forbid[kv.Key] - return !ok - } -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/iterator.go b/go-controller/vendor/go.opentelemetry.io/otel/attribute/iterator.go deleted file mode 100644 index f2ba89ce4b..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/iterator.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -// Iterator allows iterating over the set of attributes in order, sorted by -// key. -type Iterator struct { - storage *Set - idx int -} - -// MergeIterator supports iterating over two sets of attributes while -// eliminating duplicate values from the combined set. The first iterator -// value takes precedence. -type MergeIterator struct { - one oneIterator - two oneIterator - current KeyValue -} - -type oneIterator struct { - iter Iterator - done bool - attr KeyValue -} - -// Next moves the iterator to the next position. Returns false if there are no -// more attributes. -func (i *Iterator) Next() bool { - i.idx++ - return i.idx < i.Len() -} - -// Label returns current KeyValue. Must be called only after Next returns -// true. -// -// Deprecated: Use Attribute instead. -func (i *Iterator) Label() KeyValue { - return i.Attribute() -} - -// Attribute returns the current KeyValue of the Iterator. It must be called -// only after Next returns true. -func (i *Iterator) Attribute() KeyValue { - kv, _ := i.storage.Get(i.idx) - return kv -} - -// IndexedLabel returns current index and attribute. Must be called only -// after Next returns true. -// -// Deprecated: Use IndexedAttribute instead. -func (i *Iterator) IndexedLabel() (int, KeyValue) { - return i.idx, i.Attribute() -} - -// IndexedAttribute returns current index and attribute. Must be called only -// after Next returns true. -func (i *Iterator) IndexedAttribute() (int, KeyValue) { - return i.idx, i.Attribute() -} - -// Len returns a number of attributes in the iterated set. -func (i *Iterator) Len() int { - return i.storage.Len() -} - -// ToSlice is a convenience function that creates a slice of attributes from -// the passed iterator. The iterator is set up to start from the beginning -// before creating the slice. -func (i *Iterator) ToSlice() []KeyValue { - l := i.Len() - if l == 0 { - return nil - } - i.idx = -1 - slice := make([]KeyValue, 0, l) - for i.Next() { - slice = append(slice, i.Attribute()) - } - return slice -} - -// NewMergeIterator returns a MergeIterator for merging two attribute sets. -// Duplicates are resolved by taking the value from the first set. -func NewMergeIterator(s1, s2 *Set) MergeIterator { - mi := MergeIterator{ - one: makeOne(s1.Iter()), - two: makeOne(s2.Iter()), - } - return mi -} - -func makeOne(iter Iterator) oneIterator { - oi := oneIterator{ - iter: iter, - } - oi.advance() - return oi -} - -func (oi *oneIterator) advance() { - if oi.done = !oi.iter.Next(); !oi.done { - oi.attr = oi.iter.Attribute() - } -} - -// Next returns true if there is another attribute available. -func (m *MergeIterator) Next() bool { - if m.one.done && m.two.done { - return false - } - if m.one.done { - m.current = m.two.attr - m.two.advance() - return true - } - if m.two.done { - m.current = m.one.attr - m.one.advance() - return true - } - if m.one.attr.Key == m.two.attr.Key { - m.current = m.one.attr // first iterator attribute value wins - m.one.advance() - m.two.advance() - return true - } - if m.one.attr.Key < m.two.attr.Key { - m.current = m.one.attr - m.one.advance() - return true - } - m.current = m.two.attr - m.two.advance() - return true -} - -// Label returns the current value after Next() returns true. -// -// Deprecated: Use Attribute instead. -func (m *MergeIterator) Label() KeyValue { - return m.current -} - -// Attribute returns the current value after Next() returns true. -func (m *MergeIterator) Attribute() KeyValue { - return m.current -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/key.go b/go-controller/vendor/go.opentelemetry.io/otel/attribute/key.go deleted file mode 100644 index d9a22c6502..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/key.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -// Key represents the key part in key-value pairs. It's a string. The -// allowed character set in the key depends on the use of the key. -type Key string - -// Bool creates a KeyValue instance with a BOOL Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Bool(name, value). -func (k Key) Bool(v bool) KeyValue { - return KeyValue{ - Key: k, - Value: BoolValue(v), - } -} - -// BoolSlice creates a KeyValue instance with a BOOLSLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- BoolSlice(name, value). -func (k Key) BoolSlice(v []bool) KeyValue { - return KeyValue{ - Key: k, - Value: BoolSliceValue(v), - } -} - -// Int creates a KeyValue instance with an INT64 Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Int(name, value). -func (k Key) Int(v int) KeyValue { - return KeyValue{ - Key: k, - Value: IntValue(v), - } -} - -// IntSlice creates a KeyValue instance with an INT64SLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- IntSlice(name, value). -func (k Key) IntSlice(v []int) KeyValue { - return KeyValue{ - Key: k, - Value: IntSliceValue(v), - } -} - -// Int64 creates a KeyValue instance with an INT64 Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Int64(name, value). -func (k Key) Int64(v int64) KeyValue { - return KeyValue{ - Key: k, - Value: Int64Value(v), - } -} - -// Int64Slice creates a KeyValue instance with an INT64SLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Int64Slice(name, value). -func (k Key) Int64Slice(v []int64) KeyValue { - return KeyValue{ - Key: k, - Value: Int64SliceValue(v), - } -} - -// Float64 creates a KeyValue instance with a FLOAT64 Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Float64(name, value). -func (k Key) Float64(v float64) KeyValue { - return KeyValue{ - Key: k, - Value: Float64Value(v), - } -} - -// Float64Slice creates a KeyValue instance with a FLOAT64SLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Float64(name, value). -func (k Key) Float64Slice(v []float64) KeyValue { - return KeyValue{ - Key: k, - Value: Float64SliceValue(v), - } -} - -// String creates a KeyValue instance with a STRING Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- String(name, value). -func (k Key) String(v string) KeyValue { - return KeyValue{ - Key: k, - Value: StringValue(v), - } -} - -// StringSlice creates a KeyValue instance with a STRINGSLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- StringSlice(name, value). -func (k Key) StringSlice(v []string) KeyValue { - return KeyValue{ - Key: k, - Value: StringSliceValue(v), - } -} - -// Defined returns true for non-empty keys. -func (k Key) Defined() bool { - return len(k) != 0 -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/kv.go b/go-controller/vendor/go.opentelemetry.io/otel/attribute/kv.go deleted file mode 100644 index 3028f9a40f..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/kv.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "fmt" -) - -// KeyValue holds a key and value pair. -type KeyValue struct { - Key Key - Value Value -} - -// Valid returns if kv is a valid OpenTelemetry attribute. -func (kv KeyValue) Valid() bool { - return kv.Key.Defined() && kv.Value.Type() != INVALID -} - -// Bool creates a KeyValue with a BOOL Value type. -func Bool(k string, v bool) KeyValue { - return Key(k).Bool(v) -} - -// BoolSlice creates a KeyValue with a BOOLSLICE Value type. -func BoolSlice(k string, v []bool) KeyValue { - return Key(k).BoolSlice(v) -} - -// Int creates a KeyValue with an INT64 Value type. -func Int(k string, v int) KeyValue { - return Key(k).Int(v) -} - -// IntSlice creates a KeyValue with an INT64SLICE Value type. -func IntSlice(k string, v []int) KeyValue { - return Key(k).IntSlice(v) -} - -// Int64 creates a KeyValue with an INT64 Value type. -func Int64(k string, v int64) KeyValue { - return Key(k).Int64(v) -} - -// Int64Slice creates a KeyValue with an INT64SLICE Value type. -func Int64Slice(k string, v []int64) KeyValue { - return Key(k).Int64Slice(v) -} - -// Float64 creates a KeyValue with a FLOAT64 Value type. -func Float64(k string, v float64) KeyValue { - return Key(k).Float64(v) -} - -// Float64Slice creates a KeyValue with a FLOAT64SLICE Value type. -func Float64Slice(k string, v []float64) KeyValue { - return Key(k).Float64Slice(v) -} - -// String creates a KeyValue with a STRING Value type. -func String(k, v string) KeyValue { - return Key(k).String(v) -} - -// StringSlice creates a KeyValue with a STRINGSLICE Value type. -func StringSlice(k string, v []string) KeyValue { - return Key(k).StringSlice(v) -} - -// Stringer creates a new key-value pair with a passed name and a string -// value generated by the passed Stringer interface. -func Stringer(k string, v fmt.Stringer) KeyValue { - return Key(k).String(v.String()) -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/set.go b/go-controller/vendor/go.opentelemetry.io/otel/attribute/set.go deleted file mode 100644 index 6cbefceadf..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/set.go +++ /dev/null @@ -1,411 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "cmp" - "encoding/json" - "reflect" - "slices" - "sort" -) - -type ( - // Set is the representation for a distinct attribute set. It manages an - // immutable set of attributes, with an internal cache for storing - // attribute encodings. - // - // This type will remain comparable for backwards compatibility. The - // equivalence of Sets across versions is not guaranteed to be stable. - // Prior versions may find two Sets to be equal or not when compared - // directly (i.e. ==), but subsequent versions may not. Users should use - // the Equals method to ensure stable equivalence checking. - // - // Users should also use the Distinct returned from Equivalent as a map key - // instead of a Set directly. In addition to that type providing guarantees - // on stable equivalence, it may also provide performance improvements. - Set struct { - equivalent Distinct - } - - // Distinct is a unique identifier of a Set. - // - // Distinct is designed to be ensures equivalence stability: comparisons - // will return the save value across versions. For this reason, Distinct - // should always be used as a map key instead of a Set. - Distinct struct { - iface interface{} - } - - // Sortable implements sort.Interface, used for sorting KeyValue. - // - // Deprecated: This type is no longer used. It was added as a performance - // optimization for Go < 1.21 that is no longer needed (Go < 1.21 is no - // longer supported by the module). - Sortable []KeyValue -) - -var ( - // keyValueType is used in computeDistinctReflect. - keyValueType = reflect.TypeOf(KeyValue{}) - - // emptySet is returned for empty attribute sets. - emptySet = &Set{ - equivalent: Distinct{ - iface: [0]KeyValue{}, - }, - } -) - -// EmptySet returns a reference to a Set with no elements. -// -// This is a convenience provided for optimized calling utility. -func EmptySet() *Set { - return emptySet -} - -// reflectValue abbreviates reflect.ValueOf(d). -func (d Distinct) reflectValue() reflect.Value { - return reflect.ValueOf(d.iface) -} - -// Valid returns true if this value refers to a valid Set. -func (d Distinct) Valid() bool { - return d.iface != nil -} - -// Len returns the number of attributes in this set. -func (l *Set) Len() int { - if l == nil || !l.equivalent.Valid() { - return 0 - } - return l.equivalent.reflectValue().Len() -} - -// Get returns the KeyValue at ordered position idx in this set. -func (l *Set) Get(idx int) (KeyValue, bool) { - if l == nil || !l.equivalent.Valid() { - return KeyValue{}, false - } - value := l.equivalent.reflectValue() - - if idx >= 0 && idx < value.Len() { - // Note: The Go compiler successfully avoids an allocation for - // the interface{} conversion here: - return value.Index(idx).Interface().(KeyValue), true - } - - return KeyValue{}, false -} - -// Value returns the value of a specified key in this set. -func (l *Set) Value(k Key) (Value, bool) { - if l == nil || !l.equivalent.Valid() { - return Value{}, false - } - rValue := l.equivalent.reflectValue() - vlen := rValue.Len() - - idx := sort.Search(vlen, func(idx int) bool { - return rValue.Index(idx).Interface().(KeyValue).Key >= k - }) - if idx >= vlen { - return Value{}, false - } - keyValue := rValue.Index(idx).Interface().(KeyValue) - if k == keyValue.Key { - return keyValue.Value, true - } - return Value{}, false -} - -// HasValue tests whether a key is defined in this set. -func (l *Set) HasValue(k Key) bool { - if l == nil { - return false - } - _, ok := l.Value(k) - return ok -} - -// Iter returns an iterator for visiting the attributes in this set. -func (l *Set) Iter() Iterator { - return Iterator{ - storage: l, - idx: -1, - } -} - -// ToSlice returns the set of attributes belonging to this set, sorted, where -// keys appear no more than once. -func (l *Set) ToSlice() []KeyValue { - iter := l.Iter() - return iter.ToSlice() -} - -// Equivalent returns a value that may be used as a map key. The Distinct type -// guarantees that the result will equal the equivalent. Distinct value of any -// attribute set with the same elements as this, where sets are made unique by -// choosing the last value in the input for any given key. -func (l *Set) Equivalent() Distinct { - if l == nil || !l.equivalent.Valid() { - return emptySet.equivalent - } - return l.equivalent -} - -// Equals returns true if the argument set is equivalent to this set. -func (l *Set) Equals(o *Set) bool { - return l.Equivalent() == o.Equivalent() -} - -// Encoded returns the encoded form of this set, according to encoder. -func (l *Set) Encoded(encoder Encoder) string { - if l == nil || encoder == nil { - return "" - } - - return encoder.Encode(l.Iter()) -} - -func empty() Set { - return Set{ - equivalent: emptySet.equivalent, - } -} - -// NewSet returns a new Set. See the documentation for -// NewSetWithSortableFiltered for more details. -// -// Except for empty sets, this method adds an additional allocation compared -// with calls that include a Sortable. -func NewSet(kvs ...KeyValue) Set { - s, _ := NewSetWithFiltered(kvs, nil) - return s -} - -// NewSetWithSortable returns a new Set. See the documentation for -// NewSetWithSortableFiltered for more details. -// -// This call includes a Sortable option as a memory optimization. -// -// Deprecated: Use [NewSet] instead. -func NewSetWithSortable(kvs []KeyValue, _ *Sortable) Set { - s, _ := NewSetWithFiltered(kvs, nil) - return s -} - -// NewSetWithFiltered returns a new Set. See the documentation for -// NewSetWithSortableFiltered for more details. -// -// This call includes a Filter to include/exclude attribute keys from the -// return value. Excluded keys are returned as a slice of attribute values. -func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) { - // Check for empty set. - if len(kvs) == 0 { - return empty(), nil - } - - // Stable sort so the following de-duplication can implement - // last-value-wins semantics. - slices.SortStableFunc(kvs, func(a, b KeyValue) int { - return cmp.Compare(a.Key, b.Key) - }) - - position := len(kvs) - 1 - offset := position - 1 - - // The requirements stated above require that the stable - // result be placed in the end of the input slice, while - // overwritten values are swapped to the beginning. - // - // De-duplicate with last-value-wins semantics. Preserve - // duplicate values at the beginning of the input slice. - for ; offset >= 0; offset-- { - if kvs[offset].Key == kvs[position].Key { - continue - } - position-- - kvs[offset], kvs[position] = kvs[position], kvs[offset] - } - kvs = kvs[position:] - - if filter != nil { - if div := filteredToFront(kvs, filter); div != 0 { - return Set{equivalent: computeDistinct(kvs[div:])}, kvs[:div] - } - } - return Set{equivalent: computeDistinct(kvs)}, nil -} - -// NewSetWithSortableFiltered returns a new Set. -// -// Duplicate keys are eliminated by taking the last value. This -// re-orders the input slice so that unique last-values are contiguous -// at the end of the slice. -// -// This ensures the following: -// -// - Last-value-wins semantics -// - Caller sees the reordering, but doesn't lose values -// - Repeated call preserve last-value wins. -// -// Note that methods are defined on Set, although this returns Set. Callers -// can avoid memory allocations by: -// -// - allocating a Sortable for use as a temporary in this method -// - allocating a Set for storing the return value of this constructor. -// -// The result maintains a cache of encoded attributes, by attribute.EncoderID. -// This value should not be copied after its first use. -// -// The second []KeyValue return value is a list of attributes that were -// excluded by the Filter (if non-nil). -// -// Deprecated: Use [NewSetWithFiltered] instead. -func NewSetWithSortableFiltered(kvs []KeyValue, _ *Sortable, filter Filter) (Set, []KeyValue) { - return NewSetWithFiltered(kvs, filter) -} - -// filteredToFront filters slice in-place using keep function. All KeyValues that need to -// be removed are moved to the front. All KeyValues that need to be kept are -// moved (in-order) to the back. The index for the first KeyValue to be kept is -// returned. -func filteredToFront(slice []KeyValue, keep Filter) int { - n := len(slice) - j := n - for i := n - 1; i >= 0; i-- { - if keep(slice[i]) { - j-- - slice[i], slice[j] = slice[j], slice[i] - } - } - return j -} - -// Filter returns a filtered copy of this Set. See the documentation for -// NewSetWithSortableFiltered for more details. -func (l *Set) Filter(re Filter) (Set, []KeyValue) { - if re == nil { - return *l, nil - } - - // Iterate in reverse to the first attribute that will be filtered out. - n := l.Len() - first := n - 1 - for ; first >= 0; first-- { - kv, _ := l.Get(first) - if !re(kv) { - break - } - } - - // No attributes will be dropped, return the immutable Set l and nil. - if first < 0 { - return *l, nil - } - - // Copy now that we know we need to return a modified set. - // - // Do not do this in-place on the underlying storage of *Set l. Sets are - // immutable and filtering should not change this. - slice := l.ToSlice() - - // Don't re-iterate the slice if only slice[0] is filtered. - if first == 0 { - // It is safe to assume len(slice) >= 1 given we found at least one - // attribute above that needs to be filtered out. - return Set{equivalent: computeDistinct(slice[1:])}, slice[:1] - } - - // Move the filtered slice[first] to the front (preserving order). - kv := slice[first] - copy(slice[1:first+1], slice[:first]) - slice[0] = kv - - // Do not re-evaluate re(slice[first+1:]). - div := filteredToFront(slice[1:first+1], re) + 1 - return Set{equivalent: computeDistinct(slice[div:])}, slice[:div] -} - -// computeDistinct returns a Distinct using either the fixed- or -// reflect-oriented code path, depending on the size of the input. The input -// slice is assumed to already be sorted and de-duplicated. -func computeDistinct(kvs []KeyValue) Distinct { - iface := computeDistinctFixed(kvs) - if iface == nil { - iface = computeDistinctReflect(kvs) - } - return Distinct{ - iface: iface, - } -} - -// computeDistinctFixed computes a Distinct for small slices. It returns nil -// if the input is too large for this code path. -func computeDistinctFixed(kvs []KeyValue) interface{} { - switch len(kvs) { - case 1: - return [1]KeyValue(kvs) - case 2: - return [2]KeyValue(kvs) - case 3: - return [3]KeyValue(kvs) - case 4: - return [4]KeyValue(kvs) - case 5: - return [5]KeyValue(kvs) - case 6: - return [6]KeyValue(kvs) - case 7: - return [7]KeyValue(kvs) - case 8: - return [8]KeyValue(kvs) - case 9: - return [9]KeyValue(kvs) - case 10: - return [10]KeyValue(kvs) - default: - return nil - } -} - -// computeDistinctReflect computes a Distinct using reflection, works for any -// size input. -func computeDistinctReflect(kvs []KeyValue) interface{} { - at := reflect.New(reflect.ArrayOf(len(kvs), keyValueType)).Elem() - for i, keyValue := range kvs { - *(at.Index(i).Addr().Interface().(*KeyValue)) = keyValue - } - return at.Interface() -} - -// MarshalJSON returns the JSON encoding of the Set. -func (l *Set) MarshalJSON() ([]byte, error) { - return json.Marshal(l.equivalent.iface) -} - -// MarshalLog is the marshaling function used by the logging system to represent this Set. -func (l Set) MarshalLog() interface{} { - kvs := make(map[string]string) - for _, kv := range l.ToSlice() { - kvs[string(kv.Key)] = kv.Value.Emit() - } - return kvs -} - -// Len implements sort.Interface. -func (l *Sortable) Len() int { - return len(*l) -} - -// Swap implements sort.Interface. -func (l *Sortable) Swap(i, j int) { - (*l)[i], (*l)[j] = (*l)[j], (*l)[i] -} - -// Less implements sort.Interface. -func (l *Sortable) Less(i, j int) bool { - return (*l)[i].Key < (*l)[j].Key -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/type_string.go b/go-controller/vendor/go.opentelemetry.io/otel/attribute/type_string.go deleted file mode 100644 index e584b24776..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/type_string.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by "stringer -type=Type"; DO NOT EDIT. - -package attribute - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[INVALID-0] - _ = x[BOOL-1] - _ = x[INT64-2] - _ = x[FLOAT64-3] - _ = x[STRING-4] - _ = x[BOOLSLICE-5] - _ = x[INT64SLICE-6] - _ = x[FLOAT64SLICE-7] - _ = x[STRINGSLICE-8] -} - -const _Type_name = "INVALIDBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE" - -var _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 38, 48, 60, 71} - -func (i Type) String() string { - if i < 0 || i >= Type(len(_Type_index)-1) { - return "Type(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _Type_name[_Type_index[i]:_Type_index[i+1]] -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/attribute/value.go b/go-controller/vendor/go.opentelemetry.io/otel/attribute/value.go deleted file mode 100644 index 9ea0ecbbd2..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/attribute/value.go +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "encoding/json" - "fmt" - "reflect" - "strconv" - - "go.opentelemetry.io/otel/internal" - "go.opentelemetry.io/otel/internal/attribute" -) - -//go:generate stringer -type=Type - -// Type describes the type of the data Value holds. -type Type int // nolint: revive // redefines builtin Type. - -// Value represents the value part in key-value pairs. -type Value struct { - vtype Type - numeric uint64 - stringly string - slice interface{} -} - -const ( - // INVALID is used for a Value with no value set. - INVALID Type = iota - // BOOL is a boolean Type Value. - BOOL - // INT64 is a 64-bit signed integral Type Value. - INT64 - // FLOAT64 is a 64-bit floating point Type Value. - FLOAT64 - // STRING is a string Type Value. - STRING - // BOOLSLICE is a slice of booleans Type Value. - BOOLSLICE - // INT64SLICE is a slice of 64-bit signed integral numbers Type Value. - INT64SLICE - // FLOAT64SLICE is a slice of 64-bit floating point numbers Type Value. - FLOAT64SLICE - // STRINGSLICE is a slice of strings Type Value. - STRINGSLICE -) - -// BoolValue creates a BOOL Value. -func BoolValue(v bool) Value { - return Value{ - vtype: BOOL, - numeric: internal.BoolToRaw(v), - } -} - -// BoolSliceValue creates a BOOLSLICE Value. -func BoolSliceValue(v []bool) Value { - return Value{vtype: BOOLSLICE, slice: attribute.BoolSliceValue(v)} -} - -// IntValue creates an INT64 Value. -func IntValue(v int) Value { - return Int64Value(int64(v)) -} - -// IntSliceValue creates an INTSLICE Value. -func IntSliceValue(v []int) Value { - var int64Val int64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(int64Val))) - for i, val := range v { - cp.Elem().Index(i).SetInt(int64(val)) - } - return Value{ - vtype: INT64SLICE, - slice: cp.Elem().Interface(), - } -} - -// Int64Value creates an INT64 Value. -func Int64Value(v int64) Value { - return Value{ - vtype: INT64, - numeric: internal.Int64ToRaw(v), - } -} - -// Int64SliceValue creates an INT64SLICE Value. -func Int64SliceValue(v []int64) Value { - return Value{vtype: INT64SLICE, slice: attribute.Int64SliceValue(v)} -} - -// Float64Value creates a FLOAT64 Value. -func Float64Value(v float64) Value { - return Value{ - vtype: FLOAT64, - numeric: internal.Float64ToRaw(v), - } -} - -// Float64SliceValue creates a FLOAT64SLICE Value. -func Float64SliceValue(v []float64) Value { - return Value{vtype: FLOAT64SLICE, slice: attribute.Float64SliceValue(v)} -} - -// StringValue creates a STRING Value. -func StringValue(v string) Value { - return Value{ - vtype: STRING, - stringly: v, - } -} - -// StringSliceValue creates a STRINGSLICE Value. -func StringSliceValue(v []string) Value { - return Value{vtype: STRINGSLICE, slice: attribute.StringSliceValue(v)} -} - -// Type returns a type of the Value. -func (v Value) Type() Type { - return v.vtype -} - -// AsBool returns the bool value. Make sure that the Value's type is -// BOOL. -func (v Value) AsBool() bool { - return internal.RawToBool(v.numeric) -} - -// AsBoolSlice returns the []bool value. Make sure that the Value's type is -// BOOLSLICE. -func (v Value) AsBoolSlice() []bool { - if v.vtype != BOOLSLICE { - return nil - } - return v.asBoolSlice() -} - -func (v Value) asBoolSlice() []bool { - return attribute.AsBoolSlice(v.slice) -} - -// AsInt64 returns the int64 value. Make sure that the Value's type is -// INT64. -func (v Value) AsInt64() int64 { - return internal.RawToInt64(v.numeric) -} - -// AsInt64Slice returns the []int64 value. Make sure that the Value's type is -// INT64SLICE. -func (v Value) AsInt64Slice() []int64 { - if v.vtype != INT64SLICE { - return nil - } - return v.asInt64Slice() -} - -func (v Value) asInt64Slice() []int64 { - return attribute.AsInt64Slice(v.slice) -} - -// AsFloat64 returns the float64 value. Make sure that the Value's -// type is FLOAT64. -func (v Value) AsFloat64() float64 { - return internal.RawToFloat64(v.numeric) -} - -// AsFloat64Slice returns the []float64 value. Make sure that the Value's type is -// FLOAT64SLICE. -func (v Value) AsFloat64Slice() []float64 { - if v.vtype != FLOAT64SLICE { - return nil - } - return v.asFloat64Slice() -} - -func (v Value) asFloat64Slice() []float64 { - return attribute.AsFloat64Slice(v.slice) -} - -// AsString returns the string value. Make sure that the Value's type -// is STRING. -func (v Value) AsString() string { - return v.stringly -} - -// AsStringSlice returns the []string value. Make sure that the Value's type is -// STRINGSLICE. -func (v Value) AsStringSlice() []string { - if v.vtype != STRINGSLICE { - return nil - } - return v.asStringSlice() -} - -func (v Value) asStringSlice() []string { - return attribute.AsStringSlice(v.slice) -} - -type unknownValueType struct{} - -// AsInterface returns Value's data as interface{}. -func (v Value) AsInterface() interface{} { - switch v.Type() { - case BOOL: - return v.AsBool() - case BOOLSLICE: - return v.asBoolSlice() - case INT64: - return v.AsInt64() - case INT64SLICE: - return v.asInt64Slice() - case FLOAT64: - return v.AsFloat64() - case FLOAT64SLICE: - return v.asFloat64Slice() - case STRING: - return v.stringly - case STRINGSLICE: - return v.asStringSlice() - } - return unknownValueType{} -} - -// Emit returns a string representation of Value's data. -func (v Value) Emit() string { - switch v.Type() { - case BOOLSLICE: - return fmt.Sprint(v.asBoolSlice()) - case BOOL: - return strconv.FormatBool(v.AsBool()) - case INT64SLICE: - j, err := json.Marshal(v.asInt64Slice()) - if err != nil { - return fmt.Sprintf("invalid: %v", v.asInt64Slice()) - } - return string(j) - case INT64: - return strconv.FormatInt(v.AsInt64(), 10) - case FLOAT64SLICE: - j, err := json.Marshal(v.asFloat64Slice()) - if err != nil { - return fmt.Sprintf("invalid: %v", v.asFloat64Slice()) - } - return string(j) - case FLOAT64: - return fmt.Sprint(v.AsFloat64()) - case STRINGSLICE: - j, err := json.Marshal(v.asStringSlice()) - if err != nil { - return fmt.Sprintf("invalid: %v", v.asStringSlice()) - } - return string(j) - case STRING: - return v.stringly - default: - return "unknown" - } -} - -// MarshalJSON returns the JSON encoding of the Value. -func (v Value) MarshalJSON() ([]byte, error) { - var jsonVal struct { - Type string - Value interface{} - } - jsonVal.Type = v.Type().String() - jsonVal.Value = v.AsInterface() - return json.Marshal(jsonVal) -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/codes/README.md b/go-controller/vendor/go.opentelemetry.io/otel/codes/README.md deleted file mode 100644 index 24c52b387d..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/codes/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Codes - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/codes)](https://pkg.go.dev/go.opentelemetry.io/otel/codes) diff --git a/go-controller/vendor/go.opentelemetry.io/otel/codes/codes.go b/go-controller/vendor/go.opentelemetry.io/otel/codes/codes.go deleted file mode 100644 index 49a35b1225..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/codes/codes.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package codes // import "go.opentelemetry.io/otel/codes" - -import ( - "encoding/json" - "errors" - "fmt" - "strconv" -) - -const ( - // Unset is the default status code. - Unset Code = 0 - - // Error indicates the operation contains an error. - // - // NOTE: The error code in OTLP is 2. - // The value of this enum is only relevant to the internals - // of the Go SDK. - Error Code = 1 - - // Ok indicates operation has been validated by an Application developers - // or Operator to have completed successfully, or contain no error. - // - // NOTE: The Ok code in OTLP is 1. - // The value of this enum is only relevant to the internals - // of the Go SDK. - Ok Code = 2 - - maxCode = 3 -) - -// Code is an 32-bit representation of a status state. -type Code uint32 - -var codeToStr = map[Code]string{ - Unset: "Unset", - Error: "Error", - Ok: "Ok", -} - -var strToCode = map[string]Code{ - `"Unset"`: Unset, - `"Error"`: Error, - `"Ok"`: Ok, -} - -// String returns the Code as a string. -func (c Code) String() string { - return codeToStr[c] -} - -// UnmarshalJSON unmarshals b into the Code. -// -// This is based on the functionality in the gRPC codes package: -// https://github.com/grpc/grpc-go/blob/bb64fee312b46ebee26be43364a7a966033521b1/codes/codes.go#L218-L244 -func (c *Code) UnmarshalJSON(b []byte) error { - // From json.Unmarshaler: By convention, to approximate the behavior of - // Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as - // a no-op. - if string(b) == "null" { - return nil - } - if c == nil { - return errors.New("nil receiver passed to UnmarshalJSON") - } - - var x interface{} - if err := json.Unmarshal(b, &x); err != nil { - return err - } - switch x.(type) { - case string: - if jc, ok := strToCode[string(b)]; ok { - *c = jc - return nil - } - return fmt.Errorf("invalid code: %q", string(b)) - case float64: - if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil { - if ci >= maxCode { - return fmt.Errorf("invalid code: %q", ci) - } - - *c = Code(ci) // nolint: gosec // Bit size of 32 check above. - return nil - } - return fmt.Errorf("invalid code: %q", string(b)) - default: - return fmt.Errorf("invalid code: %q", string(b)) - } -} - -// MarshalJSON returns c as the JSON encoding of c. -func (c *Code) MarshalJSON() ([]byte, error) { - if c == nil { - return []byte("null"), nil - } - str, ok := codeToStr[*c] - if !ok { - return nil, fmt.Errorf("invalid code: %d", *c) - } - return []byte(fmt.Sprintf("%q", str)), nil -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/codes/doc.go b/go-controller/vendor/go.opentelemetry.io/otel/codes/doc.go deleted file mode 100644 index ee8db448b8..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/codes/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package codes defines the canonical error codes used by OpenTelemetry. - -It conforms to [the OpenTelemetry -specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/api.md#set-status). -*/ -package codes // import "go.opentelemetry.io/otel/codes" diff --git a/go-controller/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go b/go-controller/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go deleted file mode 100644 index 691d96c755..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package attribute provide several helper functions for some commonly used -logic of processing attributes. -*/ -package attribute // import "go.opentelemetry.io/otel/internal/attribute" - -import ( - "reflect" -) - -// BoolSliceValue converts a bool slice into an array with same elements as slice. -func BoolSliceValue(v []bool) interface{} { - var zero bool - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() - reflect.Copy(cp, reflect.ValueOf(v)) - return cp.Interface() -} - -// Int64SliceValue converts an int64 slice into an array with same elements as slice. -func Int64SliceValue(v []int64) interface{} { - var zero int64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() - reflect.Copy(cp, reflect.ValueOf(v)) - return cp.Interface() -} - -// Float64SliceValue converts a float64 slice into an array with same elements as slice. -func Float64SliceValue(v []float64) interface{} { - var zero float64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() - reflect.Copy(cp, reflect.ValueOf(v)) - return cp.Interface() -} - -// StringSliceValue converts a string slice into an array with same elements as slice. -func StringSliceValue(v []string) interface{} { - var zero string - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() - reflect.Copy(cp, reflect.ValueOf(v)) - return cp.Interface() -} - -// AsBoolSlice converts a bool array into a slice into with same elements as array. -func AsBoolSlice(v interface{}) []bool { - rv := reflect.ValueOf(v) - if rv.Type().Kind() != reflect.Array { - return nil - } - cpy := make([]bool, rv.Len()) - if len(cpy) > 0 { - _ = reflect.Copy(reflect.ValueOf(cpy), rv) - } - return cpy -} - -// AsInt64Slice converts an int64 array into a slice into with same elements as array. -func AsInt64Slice(v interface{}) []int64 { - rv := reflect.ValueOf(v) - if rv.Type().Kind() != reflect.Array { - return nil - } - cpy := make([]int64, rv.Len()) - if len(cpy) > 0 { - _ = reflect.Copy(reflect.ValueOf(cpy), rv) - } - return cpy -} - -// AsFloat64Slice converts a float64 array into a slice into with same elements as array. -func AsFloat64Slice(v interface{}) []float64 { - rv := reflect.ValueOf(v) - if rv.Type().Kind() != reflect.Array { - return nil - } - cpy := make([]float64, rv.Len()) - if len(cpy) > 0 { - _ = reflect.Copy(reflect.ValueOf(cpy), rv) - } - return cpy -} - -// AsStringSlice converts a string array into a slice into with same elements as array. -func AsStringSlice(v interface{}) []string { - rv := reflect.ValueOf(v) - if rv.Type().Kind() != reflect.Array { - return nil - } - cpy := make([]string, rv.Len()) - if len(cpy) > 0 { - _ = reflect.Copy(reflect.ValueOf(cpy), rv) - } - return cpy -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/internal/gen.go b/go-controller/vendor/go.opentelemetry.io/otel/internal/gen.go deleted file mode 100644 index 4259f0320d..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/internal/gen.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/otel/internal" - -//go:generate gotmpl --body=./shared/matchers/expectation.go.tmpl "--data={}" --out=matchers/expectation.go -//go:generate gotmpl --body=./shared/matchers/expecter.go.tmpl "--data={}" --out=matchers/expecter.go -//go:generate gotmpl --body=./shared/matchers/temporal_matcher.go.tmpl "--data={}" --out=matchers/temporal_matcher.go - -//go:generate gotmpl --body=./shared/internaltest/alignment.go.tmpl "--data={}" --out=internaltest/alignment.go -//go:generate gotmpl --body=./shared/internaltest/env.go.tmpl "--data={}" --out=internaltest/env.go -//go:generate gotmpl --body=./shared/internaltest/env_test.go.tmpl "--data={}" --out=internaltest/env_test.go -//go:generate gotmpl --body=./shared/internaltest/errors.go.tmpl "--data={}" --out=internaltest/errors.go -//go:generate gotmpl --body=./shared/internaltest/harness.go.tmpl "--data={\"matchersImportPath\": \"go.opentelemetry.io/otel/internal/matchers\"}" --out=internaltest/harness.go -//go:generate gotmpl --body=./shared/internaltest/text_map_carrier.go.tmpl "--data={}" --out=internaltest/text_map_carrier.go -//go:generate gotmpl --body=./shared/internaltest/text_map_carrier_test.go.tmpl "--data={}" --out=internaltest/text_map_carrier_test.go -//go:generate gotmpl --body=./shared/internaltest/text_map_propagator.go.tmpl "--data={}" --out=internaltest/text_map_propagator.go -//go:generate gotmpl --body=./shared/internaltest/text_map_propagator_test.go.tmpl "--data={}" --out=internaltest/text_map_propagator_test.go diff --git a/go-controller/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go b/go-controller/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go deleted file mode 100644 index b2fe3e41d3..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/otel/internal" - -import ( - "math" - "unsafe" -) - -func BoolToRaw(b bool) uint64 { // nolint:revive // b is not a control flag. - if b { - return 1 - } - return 0 -} - -func RawToBool(r uint64) bool { - return r != 0 -} - -func Int64ToRaw(i int64) uint64 { - // Assumes original was a valid int64 (overflow not checked). - return uint64(i) // nolint: gosec -} - -func RawToInt64(r uint64) int64 { - // Assumes original was a valid int64 (overflow not checked). - return int64(r) // nolint: gosec -} - -func Float64ToRaw(f float64) uint64 { - return math.Float64bits(f) -} - -func RawToFloat64(r uint64) float64 { - return math.Float64frombits(r) -} - -func RawPtrToFloat64Ptr(r *uint64) *float64 { - // Assumes original was a valid *float64 (overflow not checked). - return (*float64)(unsafe.Pointer(r)) // nolint: gosec -} - -func RawPtrToInt64Ptr(r *uint64) *int64 { - // Assumes original was a valid *int64 (overflow not checked). - return (*int64)(unsafe.Pointer(r)) // nolint: gosec -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/LICENSE b/go-controller/vendor/go.opentelemetry.io/otel/trace/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/README.md b/go-controller/vendor/go.opentelemetry.io/otel/trace/README.md deleted file mode 100644 index 58ccaba69b..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Trace API - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace)](https://pkg.go.dev/go.opentelemetry.io/otel/trace) diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/config.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/config.go deleted file mode 100644 index 9c0b720a4d..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/config.go +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "time" - - "go.opentelemetry.io/otel/attribute" -) - -// TracerConfig is a group of options for a Tracer. -type TracerConfig struct { - instrumentationVersion string - // Schema URL of the telemetry emitted by the Tracer. - schemaURL string - attrs attribute.Set -} - -// InstrumentationVersion returns the version of the library providing instrumentation. -func (t *TracerConfig) InstrumentationVersion() string { - return t.instrumentationVersion -} - -// InstrumentationAttributes returns the attributes associated with the library -// providing instrumentation. -func (t *TracerConfig) InstrumentationAttributes() attribute.Set { - return t.attrs -} - -// SchemaURL returns the Schema URL of the telemetry emitted by the Tracer. -func (t *TracerConfig) SchemaURL() string { - return t.schemaURL -} - -// NewTracerConfig applies all the options to a returned TracerConfig. -func NewTracerConfig(options ...TracerOption) TracerConfig { - var config TracerConfig - for _, option := range options { - config = option.apply(config) - } - return config -} - -// TracerOption applies an option to a TracerConfig. -type TracerOption interface { - apply(TracerConfig) TracerConfig -} - -type tracerOptionFunc func(TracerConfig) TracerConfig - -func (fn tracerOptionFunc) apply(cfg TracerConfig) TracerConfig { - return fn(cfg) -} - -// SpanConfig is a group of options for a Span. -type SpanConfig struct { - attributes []attribute.KeyValue - timestamp time.Time - links []Link - newRoot bool - spanKind SpanKind - stackTrace bool -} - -// Attributes describe the associated qualities of a Span. -func (cfg *SpanConfig) Attributes() []attribute.KeyValue { - return cfg.attributes -} - -// Timestamp is a time in a Span life-cycle. -func (cfg *SpanConfig) Timestamp() time.Time { - return cfg.timestamp -} - -// StackTrace checks whether stack trace capturing is enabled. -func (cfg *SpanConfig) StackTrace() bool { - return cfg.stackTrace -} - -// Links are the associations a Span has with other Spans. -func (cfg *SpanConfig) Links() []Link { - return cfg.links -} - -// NewRoot identifies a Span as the root Span for a new trace. This is -// commonly used when an existing trace crosses trust boundaries and the -// remote parent span context should be ignored for security. -func (cfg *SpanConfig) NewRoot() bool { - return cfg.newRoot -} - -// SpanKind is the role a Span has in a trace. -func (cfg *SpanConfig) SpanKind() SpanKind { - return cfg.spanKind -} - -// NewSpanStartConfig applies all the options to a returned SpanConfig. -// No validation is performed on the returned SpanConfig (e.g. no uniqueness -// checking or bounding of data), it is left to the SDK to perform this -// action. -func NewSpanStartConfig(options ...SpanStartOption) SpanConfig { - var c SpanConfig - for _, option := range options { - c = option.applySpanStart(c) - } - return c -} - -// NewSpanEndConfig applies all the options to a returned SpanConfig. -// No validation is performed on the returned SpanConfig (e.g. no uniqueness -// checking or bounding of data), it is left to the SDK to perform this -// action. -func NewSpanEndConfig(options ...SpanEndOption) SpanConfig { - var c SpanConfig - for _, option := range options { - c = option.applySpanEnd(c) - } - return c -} - -// SpanStartOption applies an option to a SpanConfig. These options are applicable -// only when the span is created. -type SpanStartOption interface { - applySpanStart(SpanConfig) SpanConfig -} - -type spanOptionFunc func(SpanConfig) SpanConfig - -func (fn spanOptionFunc) applySpanStart(cfg SpanConfig) SpanConfig { - return fn(cfg) -} - -// SpanEndOption applies an option to a SpanConfig. These options are -// applicable only when the span is ended. -type SpanEndOption interface { - applySpanEnd(SpanConfig) SpanConfig -} - -// EventConfig is a group of options for an Event. -type EventConfig struct { - attributes []attribute.KeyValue - timestamp time.Time - stackTrace bool -} - -// Attributes describe the associated qualities of an Event. -func (cfg *EventConfig) Attributes() []attribute.KeyValue { - return cfg.attributes -} - -// Timestamp is a time in an Event life-cycle. -func (cfg *EventConfig) Timestamp() time.Time { - return cfg.timestamp -} - -// StackTrace checks whether stack trace capturing is enabled. -func (cfg *EventConfig) StackTrace() bool { - return cfg.stackTrace -} - -// NewEventConfig applies all the EventOptions to a returned EventConfig. If no -// timestamp option is passed, the returned EventConfig will have a Timestamp -// set to the call time, otherwise no validation is performed on the returned -// EventConfig. -func NewEventConfig(options ...EventOption) EventConfig { - var c EventConfig - for _, option := range options { - c = option.applyEvent(c) - } - if c.timestamp.IsZero() { - c.timestamp = time.Now() - } - return c -} - -// EventOption applies span event options to an EventConfig. -type EventOption interface { - applyEvent(EventConfig) EventConfig -} - -// SpanOption are options that can be used at both the beginning and end of a span. -type SpanOption interface { - SpanStartOption - SpanEndOption -} - -// SpanStartEventOption are options that can be used at the start of a span, or with an event. -type SpanStartEventOption interface { - SpanStartOption - EventOption -} - -// SpanEndEventOption are options that can be used at the end of a span, or with an event. -type SpanEndEventOption interface { - SpanEndOption - EventOption -} - -type attributeOption []attribute.KeyValue - -func (o attributeOption) applySpan(c SpanConfig) SpanConfig { - c.attributes = append(c.attributes, []attribute.KeyValue(o)...) - return c -} -func (o attributeOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } -func (o attributeOption) applyEvent(c EventConfig) EventConfig { - c.attributes = append(c.attributes, []attribute.KeyValue(o)...) - return c -} - -var _ SpanStartEventOption = attributeOption{} - -// WithAttributes adds the attributes related to a span life-cycle event. -// These attributes are used to describe the work a Span represents when this -// option is provided to a Span's start event. Otherwise, these -// attributes provide additional information about the event being recorded -// (e.g. error, state change, processing progress, system event). -// -// If multiple of these options are passed the attributes of each successive -// option will extend the attributes instead of overwriting. There is no -// guarantee of uniqueness in the resulting attributes. -func WithAttributes(attributes ...attribute.KeyValue) SpanStartEventOption { - return attributeOption(attributes) -} - -// SpanEventOption are options that can be used with an event or a span. -type SpanEventOption interface { - SpanOption - EventOption -} - -type timestampOption time.Time - -func (o timestampOption) applySpan(c SpanConfig) SpanConfig { - c.timestamp = time.Time(o) - return c -} -func (o timestampOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } -func (o timestampOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } -func (o timestampOption) applyEvent(c EventConfig) EventConfig { - c.timestamp = time.Time(o) - return c -} - -var _ SpanEventOption = timestampOption{} - -// WithTimestamp sets the time of a Span or Event life-cycle moment (e.g. -// started, stopped, errored). -func WithTimestamp(t time.Time) SpanEventOption { - return timestampOption(t) -} - -type stackTraceOption bool - -func (o stackTraceOption) applyEvent(c EventConfig) EventConfig { - c.stackTrace = bool(o) - return c -} - -func (o stackTraceOption) applySpan(c SpanConfig) SpanConfig { - c.stackTrace = bool(o) - return c -} -func (o stackTraceOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } - -// WithStackTrace sets the flag to capture the error with stack trace (e.g. true, false). -func WithStackTrace(b bool) SpanEndEventOption { - return stackTraceOption(b) -} - -// WithLinks adds links to a Span. The links are added to the existing Span -// links, i.e. this does not overwrite. Links with invalid span context are ignored. -func WithLinks(links ...Link) SpanStartOption { - return spanOptionFunc(func(cfg SpanConfig) SpanConfig { - cfg.links = append(cfg.links, links...) - return cfg - }) -} - -// WithNewRoot specifies that the Span should be treated as a root Span. Any -// existing parent span context will be ignored when defining the Span's trace -// identifiers. -func WithNewRoot() SpanStartOption { - return spanOptionFunc(func(cfg SpanConfig) SpanConfig { - cfg.newRoot = true - return cfg - }) -} - -// WithSpanKind sets the SpanKind of a Span. -func WithSpanKind(kind SpanKind) SpanStartOption { - return spanOptionFunc(func(cfg SpanConfig) SpanConfig { - cfg.spanKind = kind - return cfg - }) -} - -// WithInstrumentationVersion sets the instrumentation version. -func WithInstrumentationVersion(version string) TracerOption { - return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { - cfg.instrumentationVersion = version - return cfg - }) -} - -// WithInstrumentationAttributes sets the instrumentation attributes. -// -// The passed attributes will be de-duplicated. -func WithInstrumentationAttributes(attr ...attribute.KeyValue) TracerOption { - return tracerOptionFunc(func(config TracerConfig) TracerConfig { - config.attrs = attribute.NewSet(attr...) - return config - }) -} - -// WithSchemaURL sets the schema URL for the Tracer. -func WithSchemaURL(schemaURL string) TracerOption { - return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { - cfg.schemaURL = schemaURL - return cfg - }) -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/context.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/context.go deleted file mode 100644 index 8c45a7107f..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/context.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import "context" - -type traceContextKeyType int - -const currentSpanKey traceContextKeyType = iota - -// ContextWithSpan returns a copy of parent with span set as the current Span. -func ContextWithSpan(parent context.Context, span Span) context.Context { - return context.WithValue(parent, currentSpanKey, span) -} - -// ContextWithSpanContext returns a copy of parent with sc as the current -// Span. The Span implementation that wraps sc is non-recording and performs -// no operations other than to return sc as the SpanContext from the -// SpanContext method. -func ContextWithSpanContext(parent context.Context, sc SpanContext) context.Context { - return ContextWithSpan(parent, nonRecordingSpan{sc: sc}) -} - -// ContextWithRemoteSpanContext returns a copy of parent with rsc set explicitly -// as a remote SpanContext and as the current Span. The Span implementation -// that wraps rsc is non-recording and performs no operations other than to -// return rsc as the SpanContext from the SpanContext method. -func ContextWithRemoteSpanContext(parent context.Context, rsc SpanContext) context.Context { - return ContextWithSpanContext(parent, rsc.WithRemote(true)) -} - -// SpanFromContext returns the current Span from ctx. -// -// If no Span is currently set in ctx an implementation of a Span that -// performs no operations is returned. -func SpanFromContext(ctx context.Context) Span { - if ctx == nil { - return noopSpanInstance - } - if span, ok := ctx.Value(currentSpanKey).(Span); ok { - return span - } - return noopSpanInstance -} - -// SpanContextFromContext returns the current Span's SpanContext. -func SpanContextFromContext(ctx context.Context) SpanContext { - return SpanFromContext(ctx).SpanContext() -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/doc.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/doc.go deleted file mode 100644 index cdbf41d6d7..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/doc.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package trace provides an implementation of the tracing part of the -OpenTelemetry API. - -To participate in distributed traces a Span needs to be created for the -operation being performed as part of a traced workflow. In its simplest form: - - var tracer trace.Tracer - - func init() { - tracer = otel.Tracer("instrumentation/package/name") - } - - func operation(ctx context.Context) { - var span trace.Span - ctx, span = tracer.Start(ctx, "operation") - defer span.End() - // ... - } - -A Tracer is unique to the instrumentation and is used to create Spans. -Instrumentation should be designed to accept a TracerProvider from which it -can create its own unique Tracer. Alternatively, the registered global -TracerProvider from the go.opentelemetry.io/otel package can be used as -a default. - - const ( - name = "instrumentation/package/name" - version = "0.1.0" - ) - - type Instrumentation struct { - tracer trace.Tracer - } - - func NewInstrumentation(tp trace.TracerProvider) *Instrumentation { - if tp == nil { - tp = otel.TracerProvider() - } - return &Instrumentation{ - tracer: tp.Tracer(name, trace.WithInstrumentationVersion(version)), - } - } - - func operation(ctx context.Context, inst *Instrumentation) { - var span trace.Span - ctx, span = inst.tracer.Start(ctx, "operation") - defer span.End() - // ... - } - -# API Implementations - -This package does not conform to the standard Go versioning policy; all of its -interfaces may have methods added to them without a package major version bump. -This non-standard API evolution could surprise an uninformed implementation -author. They could unknowingly build their implementation in a way that would -result in a runtime panic for their users that update to the new API. - -The API is designed to help inform an instrumentation author about this -non-standard API evolution. It requires them to choose a default behavior for -unimplemented interface methods. There are three behavior choices they can -make: - - - Compilation failure - - Panic - - Default to another implementation - -All interfaces in this API embed a corresponding interface from -[go.opentelemetry.io/otel/trace/embedded]. If an author wants the default -behavior of their implementations to be a compilation failure, signaling to -their users they need to update to the latest version of that implementation, -they need to embed the corresponding interface from -[go.opentelemetry.io/otel/trace/embedded] in their implementation. For -example, - - import "go.opentelemetry.io/otel/trace/embedded" - - type TracerProvider struct { - embedded.TracerProvider - // ... - } - -If an author wants the default behavior of their implementations to panic, they -can embed the API interface directly. - - import "go.opentelemetry.io/otel/trace" - - type TracerProvider struct { - trace.TracerProvider - // ... - } - -This option is not recommended. It will lead to publishing packages that -contain runtime panics when users update to newer versions of -[go.opentelemetry.io/otel/trace], which may be done with a transitive -dependency. - -Finally, an author can embed another implementation in theirs. The embedded -implementation will be used for methods not defined by the author. For example, -an author who wants to default to silently dropping the call can use -[go.opentelemetry.io/otel/trace/noop]: - - import "go.opentelemetry.io/otel/trace/noop" - - type TracerProvider struct { - noop.TracerProvider - // ... - } - -It is strongly recommended that authors only embed -[go.opentelemetry.io/otel/trace/noop] if they choose this default behavior. -That implementation is the only one OpenTelemetry authors can guarantee will -fully implement all the API interfaces when a user updates their API. -*/ -package trace // import "go.opentelemetry.io/otel/trace" diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/embedded/README.md b/go-controller/vendor/go.opentelemetry.io/otel/trace/embedded/README.md deleted file mode 100644 index 7754a239ee..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/embedded/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Trace Embedded - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/trace/embedded) diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go deleted file mode 100644 index 3e359a00bf..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package embedded provides interfaces embedded within the [OpenTelemetry -// trace API]. -// -// Implementers of the [OpenTelemetry trace API] can embed the relevant type -// from this package into their implementation directly. Doing so will result -// in a compilation error for users when the [OpenTelemetry trace API] is -// extended (which is something that can happen without a major version bump of -// the API package). -// -// [OpenTelemetry trace API]: https://pkg.go.dev/go.opentelemetry.io/otel/trace -package embedded // import "go.opentelemetry.io/otel/trace/embedded" - -// TracerProvider is embedded in -// [go.opentelemetry.io/otel/trace.TracerProvider]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/trace.TracerProvider] if you want users to -// experience a compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/trace.TracerProvider] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type TracerProvider interface{ tracerProvider() } - -// Tracer is embedded in [go.opentelemetry.io/otel/trace.Tracer]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/trace.Tracer] if you want users to experience a -// compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/trace.Tracer] interface -// is extended (which is something that can happen without a major version bump -// of the API package). -type Tracer interface{ tracer() } - -// Span is embedded in [go.opentelemetry.io/otel/trace.Span]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/trace.Span] if you want users to experience a -// compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/trace.Span] interface is -// extended (which is something that can happen without a major version bump of -// the API package). -type Span interface{ span() } diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/nonrecording.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/nonrecording.go deleted file mode 100644 index c00221e7be..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/nonrecording.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -// nonRecordingSpan is a minimal implementation of a Span that wraps a -// SpanContext. It performs no operations other than to return the wrapped -// SpanContext. -type nonRecordingSpan struct { - noopSpan - - sc SpanContext -} - -// SpanContext returns the wrapped SpanContext. -func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc } diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/noop.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/noop.go deleted file mode 100644 index ca20e9997a..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/noop.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/trace/embedded" -) - -// NewNoopTracerProvider returns an implementation of TracerProvider that -// performs no operations. The Tracer and Spans created from the returned -// TracerProvider also perform no operations. -// -// Deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider] -// instead. -func NewNoopTracerProvider() TracerProvider { - return noopTracerProvider{} -} - -type noopTracerProvider struct{ embedded.TracerProvider } - -var _ TracerProvider = noopTracerProvider{} - -// Tracer returns noop implementation of Tracer. -func (p noopTracerProvider) Tracer(string, ...TracerOption) Tracer { - return noopTracer{} -} - -// noopTracer is an implementation of Tracer that performs no operations. -type noopTracer struct{ embedded.Tracer } - -var _ Tracer = noopTracer{} - -// Start carries forward a non-recording Span, if one is present in the context, otherwise it -// creates a no-op Span. -func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption) (context.Context, Span) { - span := SpanFromContext(ctx) - if _, ok := span.(nonRecordingSpan); !ok { - // span is likely already a noopSpan, but let's be sure - span = noopSpanInstance - } - return ContextWithSpan(ctx, span), span -} - -// noopSpan is an implementation of Span that performs no operations. -type noopSpan struct{ embedded.Span } - -var noopSpanInstance Span = noopSpan{} - -// SpanContext returns an empty span context. -func (noopSpan) SpanContext() SpanContext { return SpanContext{} } - -// IsRecording always returns false. -func (noopSpan) IsRecording() bool { return false } - -// SetStatus does nothing. -func (noopSpan) SetStatus(codes.Code, string) {} - -// SetError does nothing. -func (noopSpan) SetError(bool) {} - -// SetAttributes does nothing. -func (noopSpan) SetAttributes(...attribute.KeyValue) {} - -// End does nothing. -func (noopSpan) End(...SpanEndOption) {} - -// RecordError does nothing. -func (noopSpan) RecordError(error, ...EventOption) {} - -// AddEvent does nothing. -func (noopSpan) AddEvent(string, ...EventOption) {} - -// AddLink does nothing. -func (noopSpan) AddLink(Link) {} - -// SetName does nothing. -func (noopSpan) SetName(string) {} - -// TracerProvider returns a no-op TracerProvider. -func (noopSpan) TracerProvider() TracerProvider { return noopTracerProvider{} } diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/provider.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/provider.go deleted file mode 100644 index ef85cb70c6..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/provider.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import "go.opentelemetry.io/otel/trace/embedded" - -// TracerProvider provides Tracers that are used by instrumentation code to -// trace computational workflows. -// -// A TracerProvider is the collection destination of all Spans from Tracers it -// provides, it represents a unique telemetry collection pipeline. How that -// pipeline is defined, meaning how those Spans are collected, processed, and -// where they are exported, depends on its implementation. Instrumentation -// authors do not need to define this implementation, rather just use the -// provided Tracers to instrument code. -// -// Commonly, instrumentation code will accept a TracerProvider implementation -// at runtime from its users or it can simply use the globally registered one -// (see https://pkg.go.dev/go.opentelemetry.io/otel#GetTracerProvider). -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type TracerProvider interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.TracerProvider - - // Tracer returns a unique Tracer scoped to be used by instrumentation code - // to trace computational workflows. The scope and identity of that - // instrumentation code is uniquely defined by the name and options passed. - // - // The passed name needs to uniquely identify instrumentation code. - // Therefore, it is recommended that name is the Go package name of the - // library providing instrumentation (note: not the code being - // instrumented). Instrumentation libraries can have multiple versions, - // therefore, the WithInstrumentationVersion option should be used to - // distinguish these different codebases. Additionally, instrumentation - // libraries may sometimes use traces to communicate different domains of - // workflow data (i.e. using spans to communicate workflow events only). If - // this is the case, the WithScopeAttributes option should be used to - // uniquely identify Tracers that handle the different domains of workflow - // data. - // - // If the same name and options are passed multiple times, the same Tracer - // will be returned (it is up to the implementation if this will be the - // same underlying instance of that Tracer or not). It is not necessary to - // call this multiple times with the same name and options to get an - // up-to-date Tracer. All implementations will ensure any TracerProvider - // configuration changes are propagated to all provided Tracers. - // - // If name is empty, then an implementation defined default name will be - // used instead. - // - // This method is safe to call concurrently. - Tracer(name string, options ...TracerOption) Tracer -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/span.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/span.go deleted file mode 100644 index d3aa476ee1..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/span.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/trace/embedded" -) - -// Span is the individual component of a trace. It represents a single named -// and timed operation of a workflow that is traced. A Tracer is used to -// create a Span and it is then up to the operation the Span represents to -// properly end the Span when the operation itself ends. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Span interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Span - - // End completes the Span. The Span is considered complete and ready to be - // delivered through the rest of the telemetry pipeline after this method - // is called. Therefore, updates to the Span are not allowed after this - // method has been called. - End(options ...SpanEndOption) - - // AddEvent adds an event with the provided name and options. - AddEvent(name string, options ...EventOption) - - // AddLink adds a link. - // Adding links at span creation using WithLinks is preferred to calling AddLink - // later, for contexts that are available during span creation, because head - // sampling decisions can only consider information present during span creation. - AddLink(link Link) - - // IsRecording returns the recording state of the Span. It will return - // true if the Span is active and events can be recorded. - IsRecording() bool - - // RecordError will record err as an exception span event for this span. An - // additional call to SetStatus is required if the Status of the Span should - // be set to Error, as this method does not change the Span status. If this - // span is not being recorded or err is nil then this method does nothing. - RecordError(err error, options ...EventOption) - - // SpanContext returns the SpanContext of the Span. The returned SpanContext - // is usable even after the End method has been called for the Span. - SpanContext() SpanContext - - // SetStatus sets the status of the Span in the form of a code and a - // description, provided the status hasn't already been set to a higher - // value before (OK > Error > Unset). The description is only included in a - // status when the code is for an error. - SetStatus(code codes.Code, description string) - - // SetName sets the Span name. - SetName(name string) - - // SetAttributes sets kv as attributes of the Span. If a key from kv - // already exists for an attribute of the Span it will be overwritten with - // the value contained in kv. - SetAttributes(kv ...attribute.KeyValue) - - // TracerProvider returns a TracerProvider that can be used to generate - // additional Spans on the same telemetry pipeline as the current Span. - TracerProvider() TracerProvider -} - -// Link is the relationship between two Spans. The relationship can be within -// the same Trace or across different Traces. -// -// For example, a Link is used in the following situations: -// -// 1. Batch Processing: A batch of operations may contain operations -// associated with one or more traces/spans. Since there can only be one -// parent SpanContext, a Link is used to keep reference to the -// SpanContext of all operations in the batch. -// 2. Public Endpoint: A SpanContext for an in incoming client request on a -// public endpoint should be considered untrusted. In such a case, a new -// trace with its own identity and sampling decision needs to be created, -// but this new trace needs to be related to the original trace in some -// form. A Link is used to keep reference to the original SpanContext and -// track the relationship. -type Link struct { - // SpanContext of the linked Span. - SpanContext SpanContext - - // Attributes describe the aspects of the link. - Attributes []attribute.KeyValue -} - -// LinkFromContext returns a link encapsulating the SpanContext in the provided -// ctx. -func LinkFromContext(ctx context.Context, attrs ...attribute.KeyValue) Link { - return Link{ - SpanContext: SpanContextFromContext(ctx), - Attributes: attrs, - } -} - -// SpanKind is the role a Span plays in a Trace. -type SpanKind int - -// As a convenience, these match the proto definition, see -// https://github.com/open-telemetry/opentelemetry-proto/blob/30d237e1ff3ab7aa50e0922b5bebdd93505090af/opentelemetry/proto/trace/v1/trace.proto#L101-L129 -// -// The unspecified value is not a valid `SpanKind`. Use `ValidateSpanKind()` -// to coerce a span kind to a valid value. -const ( - // SpanKindUnspecified is an unspecified SpanKind and is not a valid - // SpanKind. SpanKindUnspecified should be replaced with SpanKindInternal - // if it is received. - SpanKindUnspecified SpanKind = 0 - // SpanKindInternal is a SpanKind for a Span that represents an internal - // operation within an application. - SpanKindInternal SpanKind = 1 - // SpanKindServer is a SpanKind for a Span that represents the operation - // of handling a request from a client. - SpanKindServer SpanKind = 2 - // SpanKindClient is a SpanKind for a Span that represents the operation - // of client making a request to a server. - SpanKindClient SpanKind = 3 - // SpanKindProducer is a SpanKind for a Span that represents the operation - // of a producer sending a message to a message broker. Unlike - // SpanKindClient and SpanKindServer, there is often no direct - // relationship between this kind of Span and a SpanKindConsumer kind. A - // SpanKindProducer Span will end once the message is accepted by the - // message broker which might not overlap with the processing of that - // message. - SpanKindProducer SpanKind = 4 - // SpanKindConsumer is a SpanKind for a Span that represents the operation - // of a consumer receiving a message from a message broker. Like - // SpanKindProducer Spans, there is often no direct relationship between - // this Span and the Span that produced the message. - SpanKindConsumer SpanKind = 5 -) - -// ValidateSpanKind returns a valid span kind value. This will coerce -// invalid values into the default value, SpanKindInternal. -func ValidateSpanKind(spanKind SpanKind) SpanKind { - switch spanKind { - case SpanKindInternal, - SpanKindServer, - SpanKindClient, - SpanKindProducer, - SpanKindConsumer: - // valid - return spanKind - default: - return SpanKindInternal - } -} - -// String returns the specified name of the SpanKind in lower-case. -func (sk SpanKind) String() string { - switch sk { - case SpanKindInternal: - return "internal" - case SpanKindServer: - return "server" - case SpanKindClient: - return "client" - case SpanKindProducer: - return "producer" - case SpanKindConsumer: - return "consumer" - default: - return "unspecified" - } -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/trace.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/trace.go deleted file mode 100644 index d49adf671b..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/trace.go +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "bytes" - "encoding/hex" - "encoding/json" -) - -const ( - // FlagsSampled is a bitmask with the sampled bit set. A SpanContext - // with the sampling bit set means the span is sampled. - FlagsSampled = TraceFlags(0x01) - - errInvalidHexID errorConst = "trace-id and span-id can only contain [0-9a-f] characters, all lowercase" - - errInvalidTraceIDLength errorConst = "hex encoded trace-id must have length equals to 32" - errNilTraceID errorConst = "trace-id can't be all zero" - - errInvalidSpanIDLength errorConst = "hex encoded span-id must have length equals to 16" - errNilSpanID errorConst = "span-id can't be all zero" -) - -type errorConst string - -func (e errorConst) Error() string { - return string(e) -} - -// TraceID is a unique identity of a trace. -// nolint:revive // revive complains about stutter of `trace.TraceID`. -type TraceID [16]byte - -var ( - nilTraceID TraceID - _ json.Marshaler = nilTraceID -) - -// IsValid checks whether the trace TraceID is valid. A valid trace ID does -// not consist of zeros only. -func (t TraceID) IsValid() bool { - return !bytes.Equal(t[:], nilTraceID[:]) -} - -// MarshalJSON implements a custom marshal function to encode TraceID -// as a hex string. -func (t TraceID) MarshalJSON() ([]byte, error) { - return json.Marshal(t.String()) -} - -// String returns the hex string representation form of a TraceID. -func (t TraceID) String() string { - return hex.EncodeToString(t[:]) -} - -// SpanID is a unique identity of a span in a trace. -type SpanID [8]byte - -var ( - nilSpanID SpanID - _ json.Marshaler = nilSpanID -) - -// IsValid checks whether the SpanID is valid. A valid SpanID does not consist -// of zeros only. -func (s SpanID) IsValid() bool { - return !bytes.Equal(s[:], nilSpanID[:]) -} - -// MarshalJSON implements a custom marshal function to encode SpanID -// as a hex string. -func (s SpanID) MarshalJSON() ([]byte, error) { - return json.Marshal(s.String()) -} - -// String returns the hex string representation form of a SpanID. -func (s SpanID) String() string { - return hex.EncodeToString(s[:]) -} - -// TraceIDFromHex returns a TraceID from a hex string if it is compliant with -// the W3C trace-context specification. See more at -// https://www.w3.org/TR/trace-context/#trace-id -// nolint:revive // revive complains about stutter of `trace.TraceIDFromHex`. -func TraceIDFromHex(h string) (TraceID, error) { - t := TraceID{} - if len(h) != 32 { - return t, errInvalidTraceIDLength - } - - if err := decodeHex(h, t[:]); err != nil { - return t, err - } - - if !t.IsValid() { - return t, errNilTraceID - } - return t, nil -} - -// SpanIDFromHex returns a SpanID from a hex string if it is compliant -// with the w3c trace-context specification. -// See more at https://www.w3.org/TR/trace-context/#parent-id -func SpanIDFromHex(h string) (SpanID, error) { - s := SpanID{} - if len(h) != 16 { - return s, errInvalidSpanIDLength - } - - if err := decodeHex(h, s[:]); err != nil { - return s, err - } - - if !s.IsValid() { - return s, errNilSpanID - } - return s, nil -} - -func decodeHex(h string, b []byte) error { - for _, r := range h { - switch { - case 'a' <= r && r <= 'f': - continue - case '0' <= r && r <= '9': - continue - default: - return errInvalidHexID - } - } - - decoded, err := hex.DecodeString(h) - if err != nil { - return err - } - - copy(b, decoded) - return nil -} - -// TraceFlags contains flags that can be set on a SpanContext. -type TraceFlags byte //nolint:revive // revive complains about stutter of `trace.TraceFlags`. - -// IsSampled returns if the sampling bit is set in the TraceFlags. -func (tf TraceFlags) IsSampled() bool { - return tf&FlagsSampled == FlagsSampled -} - -// WithSampled sets the sampling bit in a new copy of the TraceFlags. -func (tf TraceFlags) WithSampled(sampled bool) TraceFlags { // nolint:revive // sampled is not a control flag. - if sampled { - return tf | FlagsSampled - } - - return tf &^ FlagsSampled -} - -// MarshalJSON implements a custom marshal function to encode TraceFlags -// as a hex string. -func (tf TraceFlags) MarshalJSON() ([]byte, error) { - return json.Marshal(tf.String()) -} - -// String returns the hex string representation form of TraceFlags. -func (tf TraceFlags) String() string { - return hex.EncodeToString([]byte{byte(tf)}[:]) -} - -// SpanContextConfig contains mutable fields usable for constructing -// an immutable SpanContext. -type SpanContextConfig struct { - TraceID TraceID - SpanID SpanID - TraceFlags TraceFlags - TraceState TraceState - Remote bool -} - -// NewSpanContext constructs a SpanContext using values from the provided -// SpanContextConfig. -func NewSpanContext(config SpanContextConfig) SpanContext { - return SpanContext{ - traceID: config.TraceID, - spanID: config.SpanID, - traceFlags: config.TraceFlags, - traceState: config.TraceState, - remote: config.Remote, - } -} - -// SpanContext contains identifying trace information about a Span. -type SpanContext struct { - traceID TraceID - spanID SpanID - traceFlags TraceFlags - traceState TraceState - remote bool -} - -var _ json.Marshaler = SpanContext{} - -// IsValid returns if the SpanContext is valid. A valid span context has a -// valid TraceID and SpanID. -func (sc SpanContext) IsValid() bool { - return sc.HasTraceID() && sc.HasSpanID() -} - -// IsRemote indicates whether the SpanContext represents a remotely-created Span. -func (sc SpanContext) IsRemote() bool { - return sc.remote -} - -// WithRemote returns a copy of sc with the Remote property set to remote. -func (sc SpanContext) WithRemote(remote bool) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: sc.spanID, - traceFlags: sc.traceFlags, - traceState: sc.traceState, - remote: remote, - } -} - -// TraceID returns the TraceID from the SpanContext. -func (sc SpanContext) TraceID() TraceID { - return sc.traceID -} - -// HasTraceID checks if the SpanContext has a valid TraceID. -func (sc SpanContext) HasTraceID() bool { - return sc.traceID.IsValid() -} - -// WithTraceID returns a new SpanContext with the TraceID replaced. -func (sc SpanContext) WithTraceID(traceID TraceID) SpanContext { - return SpanContext{ - traceID: traceID, - spanID: sc.spanID, - traceFlags: sc.traceFlags, - traceState: sc.traceState, - remote: sc.remote, - } -} - -// SpanID returns the SpanID from the SpanContext. -func (sc SpanContext) SpanID() SpanID { - return sc.spanID -} - -// HasSpanID checks if the SpanContext has a valid SpanID. -func (sc SpanContext) HasSpanID() bool { - return sc.spanID.IsValid() -} - -// WithSpanID returns a new SpanContext with the SpanID replaced. -func (sc SpanContext) WithSpanID(spanID SpanID) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: spanID, - traceFlags: sc.traceFlags, - traceState: sc.traceState, - remote: sc.remote, - } -} - -// TraceFlags returns the flags from the SpanContext. -func (sc SpanContext) TraceFlags() TraceFlags { - return sc.traceFlags -} - -// IsSampled returns if the sampling bit is set in the SpanContext's TraceFlags. -func (sc SpanContext) IsSampled() bool { - return sc.traceFlags.IsSampled() -} - -// WithTraceFlags returns a new SpanContext with the TraceFlags replaced. -func (sc SpanContext) WithTraceFlags(flags TraceFlags) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: sc.spanID, - traceFlags: flags, - traceState: sc.traceState, - remote: sc.remote, - } -} - -// TraceState returns the TraceState from the SpanContext. -func (sc SpanContext) TraceState() TraceState { - return sc.traceState -} - -// WithTraceState returns a new SpanContext with the TraceState replaced. -func (sc SpanContext) WithTraceState(state TraceState) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: sc.spanID, - traceFlags: sc.traceFlags, - traceState: state, - remote: sc.remote, - } -} - -// Equal is a predicate that determines whether two SpanContext values are equal. -func (sc SpanContext) Equal(other SpanContext) bool { - return sc.traceID == other.traceID && - sc.spanID == other.spanID && - sc.traceFlags == other.traceFlags && - sc.traceState.String() == other.traceState.String() && - sc.remote == other.remote -} - -// MarshalJSON implements a custom marshal function to encode a SpanContext. -func (sc SpanContext) MarshalJSON() ([]byte, error) { - return json.Marshal(SpanContextConfig{ - TraceID: sc.traceID, - SpanID: sc.spanID, - TraceFlags: sc.traceFlags, - TraceState: sc.traceState, - Remote: sc.remote, - }) -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/tracer.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/tracer.go deleted file mode 100644 index 77952d2a0b..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/tracer.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "context" - - "go.opentelemetry.io/otel/trace/embedded" -) - -// Tracer is the creator of Spans. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Tracer interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Tracer - - // Start creates a span and a context.Context containing the newly-created span. - // - // If the context.Context provided in `ctx` contains a Span then the newly-created - // Span will be a child of that span, otherwise it will be a root span. This behavior - // can be overridden by providing `WithNewRoot()` as a SpanOption, causing the - // newly-created Span to be a root span even if `ctx` contains a Span. - // - // When creating a Span it is recommended to provide all known span attributes using - // the `WithAttributes()` SpanOption as samplers will only have access to the - // attributes provided when a Span is created. - // - // Any Span that is created MUST also be ended. This is the responsibility of the user. - // Implementations of this API may leak memory or other resources if Spans are not ended. - Start(ctx context.Context, spanName string, opts ...SpanStartOption) (context.Context, Span) -} diff --git a/go-controller/vendor/go.opentelemetry.io/otel/trace/tracestate.go b/go-controller/vendor/go.opentelemetry.io/otel/trace/tracestate.go deleted file mode 100644 index dc5e34cad0..0000000000 --- a/go-controller/vendor/go.opentelemetry.io/otel/trace/tracestate.go +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "encoding/json" - "fmt" - "strings" -) - -const ( - maxListMembers = 32 - - listDelimiters = "," - memberDelimiter = "=" - - errInvalidKey errorConst = "invalid tracestate key" - errInvalidValue errorConst = "invalid tracestate value" - errInvalidMember errorConst = "invalid tracestate list-member" - errMemberNumber errorConst = "too many list-members in tracestate" - errDuplicate errorConst = "duplicate list-member in tracestate" -) - -type member struct { - Key string - Value string -} - -// according to (chr = %x20 / (nblk-char = %x21-2B / %x2D-3C / %x3E-7E) ) -// means (chr = %x20-2B / %x2D-3C / %x3E-7E) . -func checkValueChar(v byte) bool { - return v >= '\x20' && v <= '\x7e' && v != '\x2c' && v != '\x3d' -} - -// according to (nblk-chr = %x21-2B / %x2D-3C / %x3E-7E) . -func checkValueLast(v byte) bool { - return v >= '\x21' && v <= '\x7e' && v != '\x2c' && v != '\x3d' -} - -// based on the W3C Trace Context specification -// -// value = (0*255(chr)) nblk-chr -// nblk-chr = %x21-2B / %x2D-3C / %x3E-7E -// chr = %x20 / nblk-chr -// -// see https://www.w3.org/TR/trace-context-1/#value -func checkValue(val string) bool { - n := len(val) - if n == 0 || n > 256 { - return false - } - for i := 0; i < n-1; i++ { - if !checkValueChar(val[i]) { - return false - } - } - return checkValueLast(val[n-1]) -} - -func checkKeyRemain(key string) bool { - // ( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) - for _, v := range key { - if isAlphaNum(byte(v)) { - continue - } - switch v { - case '_', '-', '*', '/': - continue - } - return false - } - return true -} - -// according to -// -// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// -// param n is remain part length, should be 255 in simple-key or 13 in system-id. -func checkKeyPart(key string, n int) bool { - if len(key) == 0 { - return false - } - first := key[0] // key's first char - ret := len(key[1:]) <= n - ret = ret && first >= 'a' && first <= 'z' - return ret && checkKeyRemain(key[1:]) -} - -func isAlphaNum(c byte) bool { - if c >= 'a' && c <= 'z' { - return true - } - return c >= '0' && c <= '9' -} - -// according to -// -// tenant-id = ( lcalpha / DIGIT ) 0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) -// -// param n is remain part length, should be 240 exactly. -func checkKeyTenant(key string, n int) bool { - if len(key) == 0 { - return false - } - return isAlphaNum(key[0]) && len(key[1:]) <= n && checkKeyRemain(key[1:]) -} - -// based on the W3C Trace Context specification -// -// key = simple-key / multi-tenant-key -// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// multi-tenant-key = tenant-id "@" system-id -// tenant-id = ( lcalpha / DIGIT ) (0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// lcalpha = %x61-7A ; a-z -// -// see https://www.w3.org/TR/trace-context-1/#tracestate-header. -func checkKey(key string) bool { - tenant, system, ok := strings.Cut(key, "@") - if !ok { - return checkKeyPart(key, 255) - } - return checkKeyTenant(tenant, 240) && checkKeyPart(system, 13) -} - -func newMember(key, value string) (member, error) { - if !checkKey(key) { - return member{}, errInvalidKey - } - if !checkValue(value) { - return member{}, errInvalidValue - } - return member{Key: key, Value: value}, nil -} - -func parseMember(m string) (member, error) { - key, val, ok := strings.Cut(m, memberDelimiter) - if !ok { - return member{}, fmt.Errorf("%w: %s", errInvalidMember, m) - } - key = strings.TrimLeft(key, " \t") - val = strings.TrimRight(val, " \t") - result, e := newMember(key, val) - if e != nil { - return member{}, fmt.Errorf("%w: %s", errInvalidMember, m) - } - return result, nil -} - -// String encodes member into a string compliant with the W3C Trace Context -// specification. -func (m member) String() string { - return m.Key + "=" + m.Value -} - -// TraceState provides additional vendor-specific trace identification -// information across different distributed tracing systems. It represents an -// immutable list consisting of key/value pairs, each pair is referred to as a -// list-member. -// -// TraceState conforms to the W3C Trace Context specification -// (https://www.w3.org/TR/trace-context-1). All operations that create or copy -// a TraceState do so by validating all input and will only produce TraceState -// that conform to the specification. Specifically, this means that all -// list-member's key/value pairs are valid, no duplicate list-members exist, -// and the maximum number of list-members (32) is not exceeded. -type TraceState struct { //nolint:revive // revive complains about stutter of `trace.TraceState` - // list is the members in order. - list []member -} - -var _ json.Marshaler = TraceState{} - -// ParseTraceState attempts to decode a TraceState from the passed -// string. It returns an error if the input is invalid according to the W3C -// Trace Context specification. -func ParseTraceState(ts string) (TraceState, error) { - if ts == "" { - return TraceState{}, nil - } - - wrapErr := func(err error) error { - return fmt.Errorf("failed to parse tracestate: %w", err) - } - - var members []member - found := make(map[string]struct{}) - for ts != "" { - var memberStr string - memberStr, ts, _ = strings.Cut(ts, listDelimiters) - if len(memberStr) == 0 { - continue - } - - m, err := parseMember(memberStr) - if err != nil { - return TraceState{}, wrapErr(err) - } - - if _, ok := found[m.Key]; ok { - return TraceState{}, wrapErr(errDuplicate) - } - found[m.Key] = struct{}{} - - members = append(members, m) - if n := len(members); n > maxListMembers { - return TraceState{}, wrapErr(errMemberNumber) - } - } - - return TraceState{list: members}, nil -} - -// MarshalJSON marshals the TraceState into JSON. -func (ts TraceState) MarshalJSON() ([]byte, error) { - return json.Marshal(ts.String()) -} - -// String encodes the TraceState into a string compliant with the W3C -// Trace Context specification. The returned string will be invalid if the -// TraceState contains any invalid members. -func (ts TraceState) String() string { - if len(ts.list) == 0 { - return "" - } - var n int - n += len(ts.list) // member delimiters: '=' - n += len(ts.list) - 1 // list delimiters: ',' - for _, mem := range ts.list { - n += len(mem.Key) - n += len(mem.Value) - } - - var sb strings.Builder - sb.Grow(n) - _, _ = sb.WriteString(ts.list[0].Key) - _ = sb.WriteByte('=') - _, _ = sb.WriteString(ts.list[0].Value) - for i := 1; i < len(ts.list); i++ { - _ = sb.WriteByte(listDelimiters[0]) - _, _ = sb.WriteString(ts.list[i].Key) - _ = sb.WriteByte('=') - _, _ = sb.WriteString(ts.list[i].Value) - } - return sb.String() -} - -// Get returns the value paired with key from the corresponding TraceState -// list-member if it exists, otherwise an empty string is returned. -func (ts TraceState) Get(key string) string { - for _, member := range ts.list { - if member.Key == key { - return member.Value - } - } - - return "" -} - -// Walk walks all key value pairs in the TraceState by calling f -// Iteration stops if f returns false. -func (ts TraceState) Walk(f func(key, value string) bool) { - for _, m := range ts.list { - if !f(m.Key, m.Value) { - break - } - } -} - -// Insert adds a new list-member defined by the key/value pair to the -// TraceState. If a list-member already exists for the given key, that -// list-member's value is updated. The new or updated list-member is always -// moved to the beginning of the TraceState as specified by the W3C Trace -// Context specification. -// -// If key or value are invalid according to the W3C Trace Context -// specification an error is returned with the original TraceState. -// -// If adding a new list-member means the TraceState would have more members -// then is allowed, the new list-member will be inserted and the right-most -// list-member will be dropped in the returned TraceState. -func (ts TraceState) Insert(key, value string) (TraceState, error) { - m, err := newMember(key, value) - if err != nil { - return ts, err - } - n := len(ts.list) - found := n - for i := range ts.list { - if ts.list[i].Key == key { - found = i - } - } - cTS := TraceState{} - if found == n && n < maxListMembers { - cTS.list = make([]member, n+1) - } else { - cTS.list = make([]member, n) - } - cTS.list[0] = m - // When the number of members exceeds capacity, drop the "right-most". - copy(cTS.list[1:], ts.list[0:found]) - if found < n { - copy(cTS.list[1+found:], ts.list[found+1:]) - } - return cTS, nil -} - -// Delete returns a copy of the TraceState with the list-member identified by -// key removed. -func (ts TraceState) Delete(key string) TraceState { - members := make([]member, ts.Len()) - copy(members, ts.list) - for i, member := range ts.list { - if member.Key == key { - members = append(members[:i], members[i+1:]...) - // TraceState should contain no duplicate members. - break - } - } - return TraceState{list: members} -} - -// Len returns the number of list-members in the TraceState. -func (ts TraceState) Len() int { - return len(ts.list) -} diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/doc.go b/go-controller/vendor/golang.org/x/crypto/sha3/doc.go deleted file mode 100644 index bbf391fe6e..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/doc.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2014 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 sha3 implements the SHA-3 fixed-output-length hash functions and -// the SHAKE variable-output-length hash functions defined by FIPS-202. -// -// All types in this package also implement [encoding.BinaryMarshaler], -// [encoding.BinaryAppender] and [encoding.BinaryUnmarshaler] to marshal and -// unmarshal the internal state of the hash. -// -// Both types of hash function use the "sponge" construction and the Keccak -// permutation. For a detailed specification see http://keccak.noekeon.org/ -// -// # Guidance -// -// If you aren't sure what function you need, use SHAKE256 with at least 64 -// bytes of output. The SHAKE instances are faster than the SHA3 instances; -// the latter have to allocate memory to conform to the hash.Hash interface. -// -// If you need a secret-key MAC (message authentication code), prepend the -// secret key to the input, hash with SHAKE256 and read at least 32 bytes of -// output. -// -// # Security strengths -// -// The SHA3-x (x equals 224, 256, 384, or 512) functions have a security -// strength against preimage attacks of x bits. Since they only produce "x" -// bits of output, their collision-resistance is only "x/2" bits. -// -// The SHAKE-256 and -128 functions have a generic security strength of 256 and -// 128 bits against all attacks, provided that at least 2x bits of their output -// is used. Requesting more than 64 or 32 bytes of output, respectively, does -// not increase the collision-resistance of the SHAKE functions. -// -// # The sponge construction -// -// A sponge builds a pseudo-random function from a public pseudo-random -// permutation, by applying the permutation to a state of "rate + capacity" -// bytes, but hiding "capacity" of the bytes. -// -// A sponge starts out with a zero state. To hash an input using a sponge, up -// to "rate" bytes of the input are XORed into the sponge's state. The sponge -// is then "full" and the permutation is applied to "empty" it. This process is -// repeated until all the input has been "absorbed". The input is then padded. -// The digest is "squeezed" from the sponge in the same way, except that output -// is copied out instead of input being XORed in. -// -// A sponge is parameterized by its generic security strength, which is equal -// to half its capacity; capacity + rate is equal to the permutation's width. -// Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means -// that the security strength of a sponge instance is equal to (1600 - bitrate) / 2. -// -// # Recommendations -// -// The SHAKE functions are recommended for most new uses. They can produce -// output of arbitrary length. SHAKE256, with an output length of at least -// 64 bytes, provides 256-bit security against all attacks. The Keccak team -// recommends it for most applications upgrading from SHA2-512. (NIST chose a -// much stronger, but much slower, sponge instance for SHA3-512.) -// -// The SHA-3 functions are "drop-in" replacements for the SHA-2 functions. -// They produce output of the same length, with the same security strengths -// against all attacks. This means, in particular, that SHA3-256 only has -// 128-bit collision resistance, because its output length is 32 bytes. -package sha3 diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/hashes.go b/go-controller/vendor/golang.org/x/crypto/sha3/hashes.go deleted file mode 100644 index 31fffbe044..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/hashes.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2014 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 sha3 - -// This file provides functions for creating instances of the SHA-3 -// and SHAKE hash functions, as well as utility functions for hashing -// bytes. - -import ( - "crypto" - "hash" -) - -// New224 creates a new SHA3-224 hash. -// Its generic security strength is 224 bits against preimage attacks, -// and 112 bits against collision attacks. -func New224() hash.Hash { - return new224() -} - -// New256 creates a new SHA3-256 hash. -// Its generic security strength is 256 bits against preimage attacks, -// and 128 bits against collision attacks. -func New256() hash.Hash { - return new256() -} - -// New384 creates a new SHA3-384 hash. -// Its generic security strength is 384 bits against preimage attacks, -// and 192 bits against collision attacks. -func New384() hash.Hash { - return new384() -} - -// New512 creates a new SHA3-512 hash. -// Its generic security strength is 512 bits against preimage attacks, -// and 256 bits against collision attacks. -func New512() hash.Hash { - return new512() -} - -func init() { - crypto.RegisterHash(crypto.SHA3_224, New224) - crypto.RegisterHash(crypto.SHA3_256, New256) - crypto.RegisterHash(crypto.SHA3_384, New384) - crypto.RegisterHash(crypto.SHA3_512, New512) -} - -const ( - dsbyteSHA3 = 0b00000110 - dsbyteKeccak = 0b00000001 - dsbyteShake = 0b00011111 - dsbyteCShake = 0b00000100 - - // rateK[c] is the rate in bytes for Keccak[c] where c is the capacity in - // bits. Given the sponge size is 1600 bits, the rate is 1600 - c bits. - rateK256 = (1600 - 256) / 8 - rateK448 = (1600 - 448) / 8 - rateK512 = (1600 - 512) / 8 - rateK768 = (1600 - 768) / 8 - rateK1024 = (1600 - 1024) / 8 -) - -func new224Generic() *state { - return &state{rate: rateK448, outputLen: 28, dsbyte: dsbyteSHA3} -} - -func new256Generic() *state { - return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteSHA3} -} - -func new384Generic() *state { - return &state{rate: rateK768, outputLen: 48, dsbyte: dsbyteSHA3} -} - -func new512Generic() *state { - return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteSHA3} -} - -// NewLegacyKeccak256 creates a new Keccak-256 hash. -// -// Only use this function if you require compatibility with an existing cryptosystem -// that uses non-standard padding. All other users should use New256 instead. -func NewLegacyKeccak256() hash.Hash { - return &state{rate: rateK512, outputLen: 32, dsbyte: dsbyteKeccak} -} - -// NewLegacyKeccak512 creates a new Keccak-512 hash. -// -// Only use this function if you require compatibility with an existing cryptosystem -// that uses non-standard padding. All other users should use New512 instead. -func NewLegacyKeccak512() hash.Hash { - return &state{rate: rateK1024, outputLen: 64, dsbyte: dsbyteKeccak} -} - -// Sum224 returns the SHA3-224 digest of the data. -func Sum224(data []byte) (digest [28]byte) { - h := New224() - h.Write(data) - h.Sum(digest[:0]) - return -} - -// Sum256 returns the SHA3-256 digest of the data. -func Sum256(data []byte) (digest [32]byte) { - h := New256() - h.Write(data) - h.Sum(digest[:0]) - return -} - -// Sum384 returns the SHA3-384 digest of the data. -func Sum384(data []byte) (digest [48]byte) { - h := New384() - h.Write(data) - h.Sum(digest[:0]) - return -} - -// Sum512 returns the SHA3-512 digest of the data. -func Sum512(data []byte) (digest [64]byte) { - h := New512() - h.Write(data) - h.Sum(digest[:0]) - return -} diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/hashes_noasm.go b/go-controller/vendor/golang.org/x/crypto/sha3/hashes_noasm.go deleted file mode 100644 index 9d85fb6214..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/hashes_noasm.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2023 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 !gc || purego || !s390x - -package sha3 - -func new224() *state { - return new224Generic() -} - -func new256() *state { - return new256Generic() -} - -func new384() *state { - return new384Generic() -} - -func new512() *state { - return new512Generic() -} diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/keccakf.go b/go-controller/vendor/golang.org/x/crypto/sha3/keccakf.go deleted file mode 100644 index ce48b1dd3e..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/keccakf.go +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright 2014 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 !amd64 || purego || !gc - -package sha3 - -import "math/bits" - -// rc stores the round constants for use in the ι step. -var rc = [24]uint64{ - 0x0000000000000001, - 0x0000000000008082, - 0x800000000000808A, - 0x8000000080008000, - 0x000000000000808B, - 0x0000000080000001, - 0x8000000080008081, - 0x8000000000008009, - 0x000000000000008A, - 0x0000000000000088, - 0x0000000080008009, - 0x000000008000000A, - 0x000000008000808B, - 0x800000000000008B, - 0x8000000000008089, - 0x8000000000008003, - 0x8000000000008002, - 0x8000000000000080, - 0x000000000000800A, - 0x800000008000000A, - 0x8000000080008081, - 0x8000000000008080, - 0x0000000080000001, - 0x8000000080008008, -} - -// keccakF1600 applies the Keccak permutation to a 1600b-wide -// state represented as a slice of 25 uint64s. -func keccakF1600(a *[25]uint64) { - // Implementation translated from Keccak-inplace.c - // in the keccak reference code. - var t, bc0, bc1, bc2, bc3, bc4, d0, d1, d2, d3, d4 uint64 - - for i := 0; i < 24; i += 4 { - // Combines the 5 steps in each round into 2 steps. - // Unrolls 4 rounds per loop and spreads some steps across rounds. - - // Round 1 - bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20] - bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21] - bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22] - bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23] - bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24] - d0 = bc4 ^ (bc1<<1 | bc1>>63) - d1 = bc0 ^ (bc2<<1 | bc2>>63) - d2 = bc1 ^ (bc3<<1 | bc3>>63) - d3 = bc2 ^ (bc4<<1 | bc4>>63) - d4 = bc3 ^ (bc0<<1 | bc0>>63) - - bc0 = a[0] ^ d0 - t = a[6] ^ d1 - bc1 = bits.RotateLeft64(t, 44) - t = a[12] ^ d2 - bc2 = bits.RotateLeft64(t, 43) - t = a[18] ^ d3 - bc3 = bits.RotateLeft64(t, 21) - t = a[24] ^ d4 - bc4 = bits.RotateLeft64(t, 14) - a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i] - a[6] = bc1 ^ (bc3 &^ bc2) - a[12] = bc2 ^ (bc4 &^ bc3) - a[18] = bc3 ^ (bc0 &^ bc4) - a[24] = bc4 ^ (bc1 &^ bc0) - - t = a[10] ^ d0 - bc2 = bits.RotateLeft64(t, 3) - t = a[16] ^ d1 - bc3 = bits.RotateLeft64(t, 45) - t = a[22] ^ d2 - bc4 = bits.RotateLeft64(t, 61) - t = a[3] ^ d3 - bc0 = bits.RotateLeft64(t, 28) - t = a[9] ^ d4 - bc1 = bits.RotateLeft64(t, 20) - a[10] = bc0 ^ (bc2 &^ bc1) - a[16] = bc1 ^ (bc3 &^ bc2) - a[22] = bc2 ^ (bc4 &^ bc3) - a[3] = bc3 ^ (bc0 &^ bc4) - a[9] = bc4 ^ (bc1 &^ bc0) - - t = a[20] ^ d0 - bc4 = bits.RotateLeft64(t, 18) - t = a[1] ^ d1 - bc0 = bits.RotateLeft64(t, 1) - t = a[7] ^ d2 - bc1 = bits.RotateLeft64(t, 6) - t = a[13] ^ d3 - bc2 = bits.RotateLeft64(t, 25) - t = a[19] ^ d4 - bc3 = bits.RotateLeft64(t, 8) - a[20] = bc0 ^ (bc2 &^ bc1) - a[1] = bc1 ^ (bc3 &^ bc2) - a[7] = bc2 ^ (bc4 &^ bc3) - a[13] = bc3 ^ (bc0 &^ bc4) - a[19] = bc4 ^ (bc1 &^ bc0) - - t = a[5] ^ d0 - bc1 = bits.RotateLeft64(t, 36) - t = a[11] ^ d1 - bc2 = bits.RotateLeft64(t, 10) - t = a[17] ^ d2 - bc3 = bits.RotateLeft64(t, 15) - t = a[23] ^ d3 - bc4 = bits.RotateLeft64(t, 56) - t = a[4] ^ d4 - bc0 = bits.RotateLeft64(t, 27) - a[5] = bc0 ^ (bc2 &^ bc1) - a[11] = bc1 ^ (bc3 &^ bc2) - a[17] = bc2 ^ (bc4 &^ bc3) - a[23] = bc3 ^ (bc0 &^ bc4) - a[4] = bc4 ^ (bc1 &^ bc0) - - t = a[15] ^ d0 - bc3 = bits.RotateLeft64(t, 41) - t = a[21] ^ d1 - bc4 = bits.RotateLeft64(t, 2) - t = a[2] ^ d2 - bc0 = bits.RotateLeft64(t, 62) - t = a[8] ^ d3 - bc1 = bits.RotateLeft64(t, 55) - t = a[14] ^ d4 - bc2 = bits.RotateLeft64(t, 39) - a[15] = bc0 ^ (bc2 &^ bc1) - a[21] = bc1 ^ (bc3 &^ bc2) - a[2] = bc2 ^ (bc4 &^ bc3) - a[8] = bc3 ^ (bc0 &^ bc4) - a[14] = bc4 ^ (bc1 &^ bc0) - - // Round 2 - bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20] - bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21] - bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22] - bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23] - bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24] - d0 = bc4 ^ (bc1<<1 | bc1>>63) - d1 = bc0 ^ (bc2<<1 | bc2>>63) - d2 = bc1 ^ (bc3<<1 | bc3>>63) - d3 = bc2 ^ (bc4<<1 | bc4>>63) - d4 = bc3 ^ (bc0<<1 | bc0>>63) - - bc0 = a[0] ^ d0 - t = a[16] ^ d1 - bc1 = bits.RotateLeft64(t, 44) - t = a[7] ^ d2 - bc2 = bits.RotateLeft64(t, 43) - t = a[23] ^ d3 - bc3 = bits.RotateLeft64(t, 21) - t = a[14] ^ d4 - bc4 = bits.RotateLeft64(t, 14) - a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+1] - a[16] = bc1 ^ (bc3 &^ bc2) - a[7] = bc2 ^ (bc4 &^ bc3) - a[23] = bc3 ^ (bc0 &^ bc4) - a[14] = bc4 ^ (bc1 &^ bc0) - - t = a[20] ^ d0 - bc2 = bits.RotateLeft64(t, 3) - t = a[11] ^ d1 - bc3 = bits.RotateLeft64(t, 45) - t = a[2] ^ d2 - bc4 = bits.RotateLeft64(t, 61) - t = a[18] ^ d3 - bc0 = bits.RotateLeft64(t, 28) - t = a[9] ^ d4 - bc1 = bits.RotateLeft64(t, 20) - a[20] = bc0 ^ (bc2 &^ bc1) - a[11] = bc1 ^ (bc3 &^ bc2) - a[2] = bc2 ^ (bc4 &^ bc3) - a[18] = bc3 ^ (bc0 &^ bc4) - a[9] = bc4 ^ (bc1 &^ bc0) - - t = a[15] ^ d0 - bc4 = bits.RotateLeft64(t, 18) - t = a[6] ^ d1 - bc0 = bits.RotateLeft64(t, 1) - t = a[22] ^ d2 - bc1 = bits.RotateLeft64(t, 6) - t = a[13] ^ d3 - bc2 = bits.RotateLeft64(t, 25) - t = a[4] ^ d4 - bc3 = bits.RotateLeft64(t, 8) - a[15] = bc0 ^ (bc2 &^ bc1) - a[6] = bc1 ^ (bc3 &^ bc2) - a[22] = bc2 ^ (bc4 &^ bc3) - a[13] = bc3 ^ (bc0 &^ bc4) - a[4] = bc4 ^ (bc1 &^ bc0) - - t = a[10] ^ d0 - bc1 = bits.RotateLeft64(t, 36) - t = a[1] ^ d1 - bc2 = bits.RotateLeft64(t, 10) - t = a[17] ^ d2 - bc3 = bits.RotateLeft64(t, 15) - t = a[8] ^ d3 - bc4 = bits.RotateLeft64(t, 56) - t = a[24] ^ d4 - bc0 = bits.RotateLeft64(t, 27) - a[10] = bc0 ^ (bc2 &^ bc1) - a[1] = bc1 ^ (bc3 &^ bc2) - a[17] = bc2 ^ (bc4 &^ bc3) - a[8] = bc3 ^ (bc0 &^ bc4) - a[24] = bc4 ^ (bc1 &^ bc0) - - t = a[5] ^ d0 - bc3 = bits.RotateLeft64(t, 41) - t = a[21] ^ d1 - bc4 = bits.RotateLeft64(t, 2) - t = a[12] ^ d2 - bc0 = bits.RotateLeft64(t, 62) - t = a[3] ^ d3 - bc1 = bits.RotateLeft64(t, 55) - t = a[19] ^ d4 - bc2 = bits.RotateLeft64(t, 39) - a[5] = bc0 ^ (bc2 &^ bc1) - a[21] = bc1 ^ (bc3 &^ bc2) - a[12] = bc2 ^ (bc4 &^ bc3) - a[3] = bc3 ^ (bc0 &^ bc4) - a[19] = bc4 ^ (bc1 &^ bc0) - - // Round 3 - bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20] - bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21] - bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22] - bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23] - bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24] - d0 = bc4 ^ (bc1<<1 | bc1>>63) - d1 = bc0 ^ (bc2<<1 | bc2>>63) - d2 = bc1 ^ (bc3<<1 | bc3>>63) - d3 = bc2 ^ (bc4<<1 | bc4>>63) - d4 = bc3 ^ (bc0<<1 | bc0>>63) - - bc0 = a[0] ^ d0 - t = a[11] ^ d1 - bc1 = bits.RotateLeft64(t, 44) - t = a[22] ^ d2 - bc2 = bits.RotateLeft64(t, 43) - t = a[8] ^ d3 - bc3 = bits.RotateLeft64(t, 21) - t = a[19] ^ d4 - bc4 = bits.RotateLeft64(t, 14) - a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+2] - a[11] = bc1 ^ (bc3 &^ bc2) - a[22] = bc2 ^ (bc4 &^ bc3) - a[8] = bc3 ^ (bc0 &^ bc4) - a[19] = bc4 ^ (bc1 &^ bc0) - - t = a[15] ^ d0 - bc2 = bits.RotateLeft64(t, 3) - t = a[1] ^ d1 - bc3 = bits.RotateLeft64(t, 45) - t = a[12] ^ d2 - bc4 = bits.RotateLeft64(t, 61) - t = a[23] ^ d3 - bc0 = bits.RotateLeft64(t, 28) - t = a[9] ^ d4 - bc1 = bits.RotateLeft64(t, 20) - a[15] = bc0 ^ (bc2 &^ bc1) - a[1] = bc1 ^ (bc3 &^ bc2) - a[12] = bc2 ^ (bc4 &^ bc3) - a[23] = bc3 ^ (bc0 &^ bc4) - a[9] = bc4 ^ (bc1 &^ bc0) - - t = a[5] ^ d0 - bc4 = bits.RotateLeft64(t, 18) - t = a[16] ^ d1 - bc0 = bits.RotateLeft64(t, 1) - t = a[2] ^ d2 - bc1 = bits.RotateLeft64(t, 6) - t = a[13] ^ d3 - bc2 = bits.RotateLeft64(t, 25) - t = a[24] ^ d4 - bc3 = bits.RotateLeft64(t, 8) - a[5] = bc0 ^ (bc2 &^ bc1) - a[16] = bc1 ^ (bc3 &^ bc2) - a[2] = bc2 ^ (bc4 &^ bc3) - a[13] = bc3 ^ (bc0 &^ bc4) - a[24] = bc4 ^ (bc1 &^ bc0) - - t = a[20] ^ d0 - bc1 = bits.RotateLeft64(t, 36) - t = a[6] ^ d1 - bc2 = bits.RotateLeft64(t, 10) - t = a[17] ^ d2 - bc3 = bits.RotateLeft64(t, 15) - t = a[3] ^ d3 - bc4 = bits.RotateLeft64(t, 56) - t = a[14] ^ d4 - bc0 = bits.RotateLeft64(t, 27) - a[20] = bc0 ^ (bc2 &^ bc1) - a[6] = bc1 ^ (bc3 &^ bc2) - a[17] = bc2 ^ (bc4 &^ bc3) - a[3] = bc3 ^ (bc0 &^ bc4) - a[14] = bc4 ^ (bc1 &^ bc0) - - t = a[10] ^ d0 - bc3 = bits.RotateLeft64(t, 41) - t = a[21] ^ d1 - bc4 = bits.RotateLeft64(t, 2) - t = a[7] ^ d2 - bc0 = bits.RotateLeft64(t, 62) - t = a[18] ^ d3 - bc1 = bits.RotateLeft64(t, 55) - t = a[4] ^ d4 - bc2 = bits.RotateLeft64(t, 39) - a[10] = bc0 ^ (bc2 &^ bc1) - a[21] = bc1 ^ (bc3 &^ bc2) - a[7] = bc2 ^ (bc4 &^ bc3) - a[18] = bc3 ^ (bc0 &^ bc4) - a[4] = bc4 ^ (bc1 &^ bc0) - - // Round 4 - bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20] - bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21] - bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22] - bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23] - bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24] - d0 = bc4 ^ (bc1<<1 | bc1>>63) - d1 = bc0 ^ (bc2<<1 | bc2>>63) - d2 = bc1 ^ (bc3<<1 | bc3>>63) - d3 = bc2 ^ (bc4<<1 | bc4>>63) - d4 = bc3 ^ (bc0<<1 | bc0>>63) - - bc0 = a[0] ^ d0 - t = a[1] ^ d1 - bc1 = bits.RotateLeft64(t, 44) - t = a[2] ^ d2 - bc2 = bits.RotateLeft64(t, 43) - t = a[3] ^ d3 - bc3 = bits.RotateLeft64(t, 21) - t = a[4] ^ d4 - bc4 = bits.RotateLeft64(t, 14) - a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+3] - a[1] = bc1 ^ (bc3 &^ bc2) - a[2] = bc2 ^ (bc4 &^ bc3) - a[3] = bc3 ^ (bc0 &^ bc4) - a[4] = bc4 ^ (bc1 &^ bc0) - - t = a[5] ^ d0 - bc2 = bits.RotateLeft64(t, 3) - t = a[6] ^ d1 - bc3 = bits.RotateLeft64(t, 45) - t = a[7] ^ d2 - bc4 = bits.RotateLeft64(t, 61) - t = a[8] ^ d3 - bc0 = bits.RotateLeft64(t, 28) - t = a[9] ^ d4 - bc1 = bits.RotateLeft64(t, 20) - a[5] = bc0 ^ (bc2 &^ bc1) - a[6] = bc1 ^ (bc3 &^ bc2) - a[7] = bc2 ^ (bc4 &^ bc3) - a[8] = bc3 ^ (bc0 &^ bc4) - a[9] = bc4 ^ (bc1 &^ bc0) - - t = a[10] ^ d0 - bc4 = bits.RotateLeft64(t, 18) - t = a[11] ^ d1 - bc0 = bits.RotateLeft64(t, 1) - t = a[12] ^ d2 - bc1 = bits.RotateLeft64(t, 6) - t = a[13] ^ d3 - bc2 = bits.RotateLeft64(t, 25) - t = a[14] ^ d4 - bc3 = bits.RotateLeft64(t, 8) - a[10] = bc0 ^ (bc2 &^ bc1) - a[11] = bc1 ^ (bc3 &^ bc2) - a[12] = bc2 ^ (bc4 &^ bc3) - a[13] = bc3 ^ (bc0 &^ bc4) - a[14] = bc4 ^ (bc1 &^ bc0) - - t = a[15] ^ d0 - bc1 = bits.RotateLeft64(t, 36) - t = a[16] ^ d1 - bc2 = bits.RotateLeft64(t, 10) - t = a[17] ^ d2 - bc3 = bits.RotateLeft64(t, 15) - t = a[18] ^ d3 - bc4 = bits.RotateLeft64(t, 56) - t = a[19] ^ d4 - bc0 = bits.RotateLeft64(t, 27) - a[15] = bc0 ^ (bc2 &^ bc1) - a[16] = bc1 ^ (bc3 &^ bc2) - a[17] = bc2 ^ (bc4 &^ bc3) - a[18] = bc3 ^ (bc0 &^ bc4) - a[19] = bc4 ^ (bc1 &^ bc0) - - t = a[20] ^ d0 - bc3 = bits.RotateLeft64(t, 41) - t = a[21] ^ d1 - bc4 = bits.RotateLeft64(t, 2) - t = a[22] ^ d2 - bc0 = bits.RotateLeft64(t, 62) - t = a[23] ^ d3 - bc1 = bits.RotateLeft64(t, 55) - t = a[24] ^ d4 - bc2 = bits.RotateLeft64(t, 39) - a[20] = bc0 ^ (bc2 &^ bc1) - a[21] = bc1 ^ (bc3 &^ bc2) - a[22] = bc2 ^ (bc4 &^ bc3) - a[23] = bc3 ^ (bc0 &^ bc4) - a[24] = bc4 ^ (bc1 &^ bc0) - } -} diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go b/go-controller/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go deleted file mode 100644 index b908696be5..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2015 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 amd64 && !purego && gc - -package sha3 - -// This function is implemented in keccakf_amd64.s. - -//go:noescape - -func keccakF1600(a *[25]uint64) diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s b/go-controller/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s deleted file mode 100644 index 99e2f16e97..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s +++ /dev/null @@ -1,5419 +0,0 @@ -// Code generated by command: go run keccakf_amd64_asm.go -out ../keccakf_amd64.s -pkg sha3. DO NOT EDIT. - -//go:build amd64 && !purego && gc - -// func keccakF1600(a *[25]uint64) -TEXT ·keccakF1600(SB), $200-8 - MOVQ a+0(FP), DI - - // Convert the user state into an internal state - NOTQ 8(DI) - NOTQ 16(DI) - NOTQ 64(DI) - NOTQ 96(DI) - NOTQ 136(DI) - NOTQ 160(DI) - - // Execute the KeccakF permutation - MOVQ (DI), SI - MOVQ 8(DI), BP - MOVQ 32(DI), R15 - XORQ 40(DI), SI - XORQ 48(DI), BP - XORQ 72(DI), R15 - XORQ 80(DI), SI - XORQ 88(DI), BP - XORQ 112(DI), R15 - XORQ 120(DI), SI - XORQ 128(DI), BP - XORQ 152(DI), R15 - XORQ 160(DI), SI - XORQ 168(DI), BP - MOVQ 176(DI), DX - MOVQ 184(DI), R8 - XORQ 192(DI), R15 - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x0000000000000001, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x0000000000008082, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x800000000000808a, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000080008000, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x000000000000808b, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x0000000080000001, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000080008081, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000000008009, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x000000000000008a, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x0000000000000088, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x0000000080008009, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x000000008000000a, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x000000008000808b, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x800000000000008b, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000000008089, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000000008003, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000000008002, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000000000080, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x000000000000800a, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x800000008000000a, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000080008081, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000000008080, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - MOVQ R12, BP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - XORQ R10, R15 - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - XORQ R11, R15 - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(DI), R12 - XORQ 56(DI), DX - XORQ R15, BX - XORQ 96(DI), R12 - XORQ 136(DI), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(DI), R13 - XORQ 64(DI), R8 - XORQ SI, CX - XORQ 104(DI), R13 - XORQ 144(DI), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (DI), R10 - MOVQ 48(DI), R11 - XORQ R13, R9 - MOVQ 96(DI), R12 - MOVQ 144(DI), R13 - MOVQ 192(DI), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x0000000080000001, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (SP) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(SP) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(SP) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(SP) - MOVQ R12, 8(SP) - MOVQ R12, BP - - // Result g - MOVQ 72(DI), R11 - XORQ R9, R11 - MOVQ 80(DI), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(DI), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(DI), R13 - MOVQ 176(DI), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(SP) - XORQ AX, SI - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(SP) - XORQ AX, BP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(SP) - NOTQ R14 - XORQ R10, R15 - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(SP) - - // Result k - MOVQ 8(DI), R10 - MOVQ 56(DI), R11 - MOVQ 104(DI), R12 - MOVQ 152(DI), R13 - MOVQ 160(DI), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(SP) - XORQ AX, SI - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(SP) - XORQ AX, BP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(SP) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(SP) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(SP) - XORQ R10, R15 - - // Result m - MOVQ 40(DI), R11 - XORQ BX, R11 - MOVQ 88(DI), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(DI), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(DI), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(DI), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(SP) - XORQ AX, SI - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(SP) - XORQ AX, BP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(SP) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(SP) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(SP) - XORQ R11, R15 - - // Result s - MOVQ 16(DI), R10 - MOVQ 64(DI), R11 - MOVQ 112(DI), R12 - XORQ DX, R10 - MOVQ 120(DI), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(DI), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(SP) - ROLQ $0x27, R12 - XORQ R9, R15 - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(SP) - XORQ BX, SI - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(SP) - XORQ CX, BP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(SP) - MOVQ R8, 184(SP) - - // Prepare round - MOVQ BP, BX - ROLQ $0x01, BX - MOVQ 16(SP), R12 - XORQ 56(SP), DX - XORQ R15, BX - XORQ 96(SP), R12 - XORQ 136(SP), DX - XORQ DX, R12 - MOVQ R12, CX - ROLQ $0x01, CX - MOVQ 24(SP), R13 - XORQ 64(SP), R8 - XORQ SI, CX - XORQ 104(SP), R13 - XORQ 144(SP), R8 - XORQ R8, R13 - MOVQ R13, DX - ROLQ $0x01, DX - MOVQ R15, R8 - XORQ BP, DX - ROLQ $0x01, R8 - MOVQ SI, R9 - XORQ R12, R8 - ROLQ $0x01, R9 - - // Result b - MOVQ (SP), R10 - MOVQ 48(SP), R11 - XORQ R13, R9 - MOVQ 96(SP), R12 - MOVQ 144(SP), R13 - MOVQ 192(SP), R14 - XORQ CX, R11 - ROLQ $0x2c, R11 - XORQ DX, R12 - XORQ BX, R10 - ROLQ $0x2b, R12 - MOVQ R11, SI - MOVQ $0x8000000080008008, AX - ORQ R12, SI - XORQ R10, AX - XORQ AX, SI - MOVQ SI, (DI) - XORQ R9, R14 - ROLQ $0x0e, R14 - MOVQ R10, R15 - ANDQ R11, R15 - XORQ R14, R15 - MOVQ R15, 32(DI) - XORQ R8, R13 - ROLQ $0x15, R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 16(DI) - NOTQ R12 - ORQ R10, R14 - ORQ R13, R12 - XORQ R13, R14 - XORQ R11, R12 - MOVQ R14, 24(DI) - MOVQ R12, 8(DI) - NOP - - // Result g - MOVQ 72(SP), R11 - XORQ R9, R11 - MOVQ 80(SP), R12 - ROLQ $0x14, R11 - XORQ BX, R12 - ROLQ $0x03, R12 - MOVQ 24(SP), R10 - MOVQ R11, AX - ORQ R12, AX - XORQ R8, R10 - MOVQ 128(SP), R13 - MOVQ 176(SP), R14 - ROLQ $0x1c, R10 - XORQ R10, AX - MOVQ AX, 40(DI) - NOP - XORQ CX, R13 - ROLQ $0x2d, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 48(DI) - NOP - XORQ DX, R14 - ROLQ $0x3d, R14 - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 64(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 72(DI) - NOTQ R14 - NOP - ORQ R14, R13 - XORQ R12, R13 - MOVQ R13, 56(DI) - - // Result k - MOVQ 8(SP), R10 - MOVQ 56(SP), R11 - MOVQ 104(SP), R12 - MOVQ 152(SP), R13 - MOVQ 160(SP), R14 - XORQ DX, R11 - ROLQ $0x06, R11 - XORQ R8, R12 - ROLQ $0x19, R12 - MOVQ R11, AX - ORQ R12, AX - XORQ CX, R10 - ROLQ $0x01, R10 - XORQ R10, AX - MOVQ AX, 80(DI) - NOP - XORQ R9, R13 - ROLQ $0x08, R13 - MOVQ R12, AX - ANDQ R13, AX - XORQ R11, AX - MOVQ AX, 88(DI) - NOP - XORQ BX, R14 - ROLQ $0x12, R14 - NOTQ R13 - MOVQ R13, AX - ANDQ R14, AX - XORQ R12, AX - MOVQ AX, 96(DI) - MOVQ R14, AX - ORQ R10, AX - XORQ R13, AX - MOVQ AX, 104(DI) - ANDQ R11, R10 - XORQ R14, R10 - MOVQ R10, 112(DI) - NOP - - // Result m - MOVQ 40(SP), R11 - XORQ BX, R11 - MOVQ 88(SP), R12 - ROLQ $0x24, R11 - XORQ CX, R12 - MOVQ 32(SP), R10 - ROLQ $0x0a, R12 - MOVQ R11, AX - MOVQ 136(SP), R13 - ANDQ R12, AX - XORQ R9, R10 - MOVQ 184(SP), R14 - ROLQ $0x1b, R10 - XORQ R10, AX - MOVQ AX, 120(DI) - NOP - XORQ DX, R13 - ROLQ $0x0f, R13 - MOVQ R12, AX - ORQ R13, AX - XORQ R11, AX - MOVQ AX, 128(DI) - NOP - XORQ R8, R14 - ROLQ $0x38, R14 - NOTQ R13 - MOVQ R13, AX - ORQ R14, AX - XORQ R12, AX - MOVQ AX, 136(DI) - ORQ R10, R11 - XORQ R14, R11 - MOVQ R11, 152(DI) - ANDQ R10, R14 - XORQ R13, R14 - MOVQ R14, 144(DI) - NOP - - // Result s - MOVQ 16(SP), R10 - MOVQ 64(SP), R11 - MOVQ 112(SP), R12 - XORQ DX, R10 - MOVQ 120(SP), R13 - ROLQ $0x3e, R10 - XORQ R8, R11 - MOVQ 168(SP), R14 - ROLQ $0x37, R11 - XORQ R9, R12 - MOVQ R10, R9 - XORQ CX, R14 - ROLQ $0x02, R14 - ANDQ R11, R9 - XORQ R14, R9 - MOVQ R9, 192(DI) - ROLQ $0x27, R12 - NOP - NOTQ R11 - XORQ BX, R13 - MOVQ R11, BX - ANDQ R12, BX - XORQ R10, BX - MOVQ BX, 160(DI) - NOP - ROLQ $0x29, R13 - MOVQ R12, CX - ORQ R13, CX - XORQ R11, CX - MOVQ CX, 168(DI) - NOP - MOVQ R13, DX - MOVQ R14, R8 - ANDQ R14, DX - ORQ R10, R8 - XORQ R12, DX - XORQ R13, R8 - MOVQ DX, 176(DI) - MOVQ R8, 184(DI) - - // Revert the internal state to the user state - NOTQ 8(DI) - NOTQ 16(DI) - NOTQ 64(DI) - NOTQ 96(DI) - NOTQ 136(DI) - NOTQ 160(DI) - RET diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/sha3.go b/go-controller/vendor/golang.org/x/crypto/sha3/sha3.go deleted file mode 100644 index 6658c44479..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/sha3.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2014 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 sha3 - -import ( - "crypto/subtle" - "encoding/binary" - "errors" - "unsafe" - - "golang.org/x/sys/cpu" -) - -// spongeDirection indicates the direction bytes are flowing through the sponge. -type spongeDirection int - -const ( - // spongeAbsorbing indicates that the sponge is absorbing input. - spongeAbsorbing spongeDirection = iota - // spongeSqueezing indicates that the sponge is being squeezed. - spongeSqueezing -) - -type state struct { - a [1600 / 8]byte // main state of the hash - - // a[n:rate] is the buffer. If absorbing, it's the remaining space to XOR - // into before running the permutation. If squeezing, it's the remaining - // output to produce before running the permutation. - n, rate int - - // dsbyte contains the "domain separation" bits and the first bit of - // the padding. Sections 6.1 and 6.2 of [1] separate the outputs of the - // SHA-3 and SHAKE functions by appending bitstrings to the message. - // Using a little-endian bit-ordering convention, these are "01" for SHA-3 - // and "1111" for SHAKE, or 00000010b and 00001111b, respectively. Then the - // padding rule from section 5.1 is applied to pad the message to a multiple - // of the rate, which involves adding a "1" bit, zero or more "0" bits, and - // a final "1" bit. We merge the first "1" bit from the padding into dsbyte, - // giving 00000110b (0x06) and 00011111b (0x1f). - // [1] http://csrc.nist.gov/publications/drafts/fips-202/fips_202_draft.pdf - // "Draft FIPS 202: SHA-3 Standard: Permutation-Based Hash and - // Extendable-Output Functions (May 2014)" - dsbyte byte - - outputLen int // the default output size in bytes - state spongeDirection // whether the sponge is absorbing or squeezing -} - -// BlockSize returns the rate of sponge underlying this hash function. -func (d *state) BlockSize() int { return d.rate } - -// Size returns the output size of the hash function in bytes. -func (d *state) Size() int { return d.outputLen } - -// Reset clears the internal state by zeroing the sponge state and -// the buffer indexes, and setting Sponge.state to absorbing. -func (d *state) Reset() { - // Zero the permutation's state. - for i := range d.a { - d.a[i] = 0 - } - d.state = spongeAbsorbing - d.n = 0 -} - -func (d *state) clone() *state { - ret := *d - return &ret -} - -// permute applies the KeccakF-1600 permutation. -func (d *state) permute() { - var a *[25]uint64 - if cpu.IsBigEndian { - a = new([25]uint64) - for i := range a { - a[i] = binary.LittleEndian.Uint64(d.a[i*8:]) - } - } else { - a = (*[25]uint64)(unsafe.Pointer(&d.a)) - } - - keccakF1600(a) - d.n = 0 - - if cpu.IsBigEndian { - for i := range a { - binary.LittleEndian.PutUint64(d.a[i*8:], a[i]) - } - } -} - -// pads appends the domain separation bits in dsbyte, applies -// the multi-bitrate 10..1 padding rule, and permutes the state. -func (d *state) padAndPermute() { - // Pad with this instance's domain-separator bits. We know that there's - // at least one byte of space in the sponge because, if it were full, - // permute would have been called to empty it. dsbyte also contains the - // first one bit for the padding. See the comment in the state struct. - d.a[d.n] ^= d.dsbyte - // This adds the final one bit for the padding. Because of the way that - // bits are numbered from the LSB upwards, the final bit is the MSB of - // the last byte. - d.a[d.rate-1] ^= 0x80 - // Apply the permutation - d.permute() - d.state = spongeSqueezing -} - -// Write absorbs more data into the hash's state. It panics if any -// output has already been read. -func (d *state) Write(p []byte) (n int, err error) { - if d.state != spongeAbsorbing { - panic("sha3: Write after Read") - } - - n = len(p) - - for len(p) > 0 { - x := subtle.XORBytes(d.a[d.n:d.rate], d.a[d.n:d.rate], p) - d.n += x - p = p[x:] - - // If the sponge is full, apply the permutation. - if d.n == d.rate { - d.permute() - } - } - - return -} - -// Read squeezes an arbitrary number of bytes from the sponge. -func (d *state) Read(out []byte) (n int, err error) { - // If we're still absorbing, pad and apply the permutation. - if d.state == spongeAbsorbing { - d.padAndPermute() - } - - n = len(out) - - // Now, do the squeezing. - for len(out) > 0 { - // Apply the permutation if we've squeezed the sponge dry. - if d.n == d.rate { - d.permute() - } - - x := copy(out, d.a[d.n:d.rate]) - d.n += x - out = out[x:] - } - - return -} - -// Sum applies padding to the hash state and then squeezes out the desired -// number of output bytes. It panics if any output has already been read. -func (d *state) Sum(in []byte) []byte { - if d.state != spongeAbsorbing { - panic("sha3: Sum after Read") - } - - // Make a copy of the original hash so that caller can keep writing - // and summing. - dup := d.clone() - hash := make([]byte, dup.outputLen, 64) // explicit cap to allow stack allocation - dup.Read(hash) - return append(in, hash...) -} - -const ( - magicSHA3 = "sha\x08" - magicShake = "sha\x09" - magicCShake = "sha\x0a" - magicKeccak = "sha\x0b" - // magic || rate || main state || n || sponge direction - marshaledSize = len(magicSHA3) + 1 + 200 + 1 + 1 -) - -func (d *state) MarshalBinary() ([]byte, error) { - return d.AppendBinary(make([]byte, 0, marshaledSize)) -} - -func (d *state) AppendBinary(b []byte) ([]byte, error) { - switch d.dsbyte { - case dsbyteSHA3: - b = append(b, magicSHA3...) - case dsbyteShake: - b = append(b, magicShake...) - case dsbyteCShake: - b = append(b, magicCShake...) - case dsbyteKeccak: - b = append(b, magicKeccak...) - default: - panic("unknown dsbyte") - } - // rate is at most 168, and n is at most rate. - b = append(b, byte(d.rate)) - b = append(b, d.a[:]...) - b = append(b, byte(d.n), byte(d.state)) - return b, nil -} - -func (d *state) UnmarshalBinary(b []byte) error { - if len(b) != marshaledSize { - return errors.New("sha3: invalid hash state") - } - - magic := string(b[:len(magicSHA3)]) - b = b[len(magicSHA3):] - switch { - case magic == magicSHA3 && d.dsbyte == dsbyteSHA3: - case magic == magicShake && d.dsbyte == dsbyteShake: - case magic == magicCShake && d.dsbyte == dsbyteCShake: - case magic == magicKeccak && d.dsbyte == dsbyteKeccak: - default: - return errors.New("sha3: invalid hash state identifier") - } - - rate := int(b[0]) - b = b[1:] - if rate != d.rate { - return errors.New("sha3: invalid hash state function") - } - - copy(d.a[:], b) - b = b[len(d.a):] - - n, state := int(b[0]), spongeDirection(b[1]) - if n > d.rate { - return errors.New("sha3: invalid hash state") - } - d.n = n - if state != spongeAbsorbing && state != spongeSqueezing { - return errors.New("sha3: invalid hash state") - } - d.state = state - - return nil -} diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/sha3_s390x.go b/go-controller/vendor/golang.org/x/crypto/sha3/sha3_s390x.go deleted file mode 100644 index 00d8034ae6..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/sha3_s390x.go +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright 2017 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 gc && !purego - -package sha3 - -// This file contains code for using the 'compute intermediate -// message digest' (KIMD) and 'compute last message digest' (KLMD) -// instructions to compute SHA-3 and SHAKE hashes on IBM Z. - -import ( - "hash" - - "golang.org/x/sys/cpu" -) - -// codes represent 7-bit KIMD/KLMD function codes as defined in -// the Principles of Operation. -type code uint64 - -const ( - // function codes for KIMD/KLMD - sha3_224 code = 32 - sha3_256 = 33 - sha3_384 = 34 - sha3_512 = 35 - shake_128 = 36 - shake_256 = 37 - nopad = 0x100 -) - -// kimd is a wrapper for the 'compute intermediate message digest' instruction. -// src must be a multiple of the rate for the given function code. -// -//go:noescape -func kimd(function code, chain *[200]byte, src []byte) - -// klmd is a wrapper for the 'compute last message digest' instruction. -// src padding is handled by the instruction. -// -//go:noescape -func klmd(function code, chain *[200]byte, dst, src []byte) - -type asmState struct { - a [200]byte // 1600 bit state - buf []byte // care must be taken to ensure cap(buf) is a multiple of rate - rate int // equivalent to block size - storage [3072]byte // underlying storage for buf - outputLen int // output length for full security - function code // KIMD/KLMD function code - state spongeDirection // whether the sponge is absorbing or squeezing -} - -func newAsmState(function code) *asmState { - var s asmState - s.function = function - switch function { - case sha3_224: - s.rate = 144 - s.outputLen = 28 - case sha3_256: - s.rate = 136 - s.outputLen = 32 - case sha3_384: - s.rate = 104 - s.outputLen = 48 - case sha3_512: - s.rate = 72 - s.outputLen = 64 - case shake_128: - s.rate = 168 - s.outputLen = 32 - case shake_256: - s.rate = 136 - s.outputLen = 64 - default: - panic("sha3: unrecognized function code") - } - - // limit s.buf size to a multiple of s.rate - s.resetBuf() - return &s -} - -func (s *asmState) clone() *asmState { - c := *s - c.buf = c.storage[:len(s.buf):cap(s.buf)] - return &c -} - -// copyIntoBuf copies b into buf. It will panic if there is not enough space to -// store all of b. -func (s *asmState) copyIntoBuf(b []byte) { - bufLen := len(s.buf) - s.buf = s.buf[:len(s.buf)+len(b)] - copy(s.buf[bufLen:], b) -} - -// resetBuf points buf at storage, sets the length to 0 and sets cap to be a -// multiple of the rate. -func (s *asmState) resetBuf() { - max := (cap(s.storage) / s.rate) * s.rate - s.buf = s.storage[:0:max] -} - -// Write (via the embedded io.Writer interface) adds more data to the running hash. -// It never returns an error. -func (s *asmState) Write(b []byte) (int, error) { - if s.state != spongeAbsorbing { - panic("sha3: Write after Read") - } - length := len(b) - for len(b) > 0 { - if len(s.buf) == 0 && len(b) >= cap(s.buf) { - // Hash the data directly and push any remaining bytes - // into the buffer. - remainder := len(b) % s.rate - kimd(s.function, &s.a, b[:len(b)-remainder]) - if remainder != 0 { - s.copyIntoBuf(b[len(b)-remainder:]) - } - return length, nil - } - - if len(s.buf) == cap(s.buf) { - // flush the buffer - kimd(s.function, &s.a, s.buf) - s.buf = s.buf[:0] - } - - // copy as much as we can into the buffer - n := len(b) - if len(b) > cap(s.buf)-len(s.buf) { - n = cap(s.buf) - len(s.buf) - } - s.copyIntoBuf(b[:n]) - b = b[n:] - } - return length, nil -} - -// Read squeezes an arbitrary number of bytes from the sponge. -func (s *asmState) Read(out []byte) (n int, err error) { - // The 'compute last message digest' instruction only stores the digest - // at the first operand (dst) for SHAKE functions. - if s.function != shake_128 && s.function != shake_256 { - panic("sha3: can only call Read for SHAKE functions") - } - - n = len(out) - - // need to pad if we were absorbing - if s.state == spongeAbsorbing { - s.state = spongeSqueezing - - // write hash directly into out if possible - if len(out)%s.rate == 0 { - klmd(s.function, &s.a, out, s.buf) // len(out) may be 0 - s.buf = s.buf[:0] - return - } - - // write hash into buffer - max := cap(s.buf) - if max > len(out) { - max = (len(out)/s.rate)*s.rate + s.rate - } - klmd(s.function, &s.a, s.buf[:max], s.buf) - s.buf = s.buf[:max] - } - - for len(out) > 0 { - // flush the buffer - if len(s.buf) != 0 { - c := copy(out, s.buf) - out = out[c:] - s.buf = s.buf[c:] - continue - } - - // write hash directly into out if possible - if len(out)%s.rate == 0 { - klmd(s.function|nopad, &s.a, out, nil) - return - } - - // write hash into buffer - s.resetBuf() - if cap(s.buf) > len(out) { - s.buf = s.buf[:(len(out)/s.rate)*s.rate+s.rate] - } - klmd(s.function|nopad, &s.a, s.buf, nil) - } - return -} - -// Sum appends the current hash to b and returns the resulting slice. -// It does not change the underlying hash state. -func (s *asmState) Sum(b []byte) []byte { - if s.state != spongeAbsorbing { - panic("sha3: Sum after Read") - } - - // Copy the state to preserve the original. - a := s.a - - // Hash the buffer. Note that we don't clear it because we - // aren't updating the state. - switch s.function { - case sha3_224, sha3_256, sha3_384, sha3_512: - klmd(s.function, &a, nil, s.buf) - return append(b, a[:s.outputLen]...) - case shake_128, shake_256: - d := make([]byte, s.outputLen, 64) - klmd(s.function, &a, d, s.buf) - return append(b, d[:s.outputLen]...) - default: - panic("sha3: unknown function") - } -} - -// Reset resets the Hash to its initial state. -func (s *asmState) Reset() { - for i := range s.a { - s.a[i] = 0 - } - s.resetBuf() - s.state = spongeAbsorbing -} - -// Size returns the number of bytes Sum will return. -func (s *asmState) Size() int { - return s.outputLen -} - -// BlockSize returns the hash's underlying block size. -// The Write method must be able to accept any amount -// of data, but it may operate more efficiently if all writes -// are a multiple of the block size. -func (s *asmState) BlockSize() int { - return s.rate -} - -// Clone returns a copy of the ShakeHash in its current state. -func (s *asmState) Clone() ShakeHash { - return s.clone() -} - -// new224 returns an assembly implementation of SHA3-224 if available, -// otherwise it returns a generic implementation. -func new224() hash.Hash { - if cpu.S390X.HasSHA3 { - return newAsmState(sha3_224) - } - return new224Generic() -} - -// new256 returns an assembly implementation of SHA3-256 if available, -// otherwise it returns a generic implementation. -func new256() hash.Hash { - if cpu.S390X.HasSHA3 { - return newAsmState(sha3_256) - } - return new256Generic() -} - -// new384 returns an assembly implementation of SHA3-384 if available, -// otherwise it returns a generic implementation. -func new384() hash.Hash { - if cpu.S390X.HasSHA3 { - return newAsmState(sha3_384) - } - return new384Generic() -} - -// new512 returns an assembly implementation of SHA3-512 if available, -// otherwise it returns a generic implementation. -func new512() hash.Hash { - if cpu.S390X.HasSHA3 { - return newAsmState(sha3_512) - } - return new512Generic() -} - -// newShake128 returns an assembly implementation of SHAKE-128 if available, -// otherwise it returns a generic implementation. -func newShake128() ShakeHash { - if cpu.S390X.HasSHA3 { - return newAsmState(shake_128) - } - return newShake128Generic() -} - -// newShake256 returns an assembly implementation of SHAKE-256 if available, -// otherwise it returns a generic implementation. -func newShake256() ShakeHash { - if cpu.S390X.HasSHA3 { - return newAsmState(shake_256) - } - return newShake256Generic() -} diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/sha3_s390x.s b/go-controller/vendor/golang.org/x/crypto/sha3/sha3_s390x.s deleted file mode 100644 index 826b862c77..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/sha3_s390x.s +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2017 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 gc && !purego - -#include "textflag.h" - -// func kimd(function code, chain *[200]byte, src []byte) -TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40 - MOVD function+0(FP), R0 - MOVD chain+8(FP), R1 - LMG src+16(FP), R2, R3 // R2=base, R3=len - -continue: - WORD $0xB93E0002 // KIMD --, R2 - BVS continue // continue if interrupted - MOVD $0, R0 // reset R0 for pre-go1.8 compilers - RET - -// func klmd(function code, chain *[200]byte, dst, src []byte) -TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64 - // TODO: SHAKE support - MOVD function+0(FP), R0 - MOVD chain+8(FP), R1 - LMG dst+16(FP), R2, R3 // R2=base, R3=len - LMG src+40(FP), R4, R5 // R4=base, R5=len - -continue: - WORD $0xB93F0024 // KLMD R2, R4 - BVS continue // continue if interrupted - MOVD $0, R0 // reset R0 for pre-go1.8 compilers - RET diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/shake.go b/go-controller/vendor/golang.org/x/crypto/sha3/shake.go deleted file mode 100644 index a6b3a4281f..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/shake.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2014 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 sha3 - -// This file defines the ShakeHash interface, and provides -// functions for creating SHAKE and cSHAKE instances, as well as utility -// functions for hashing bytes to arbitrary-length output. -// -// -// SHAKE implementation is based on FIPS PUB 202 [1] -// cSHAKE implementations is based on NIST SP 800-185 [2] -// -// [1] https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf -// [2] https://doi.org/10.6028/NIST.SP.800-185 - -import ( - "bytes" - "encoding/binary" - "errors" - "hash" - "io" - "math/bits" -) - -// ShakeHash defines the interface to hash functions that support -// arbitrary-length output. When used as a plain [hash.Hash], it -// produces minimum-length outputs that provide full-strength generic -// security. -type ShakeHash interface { - hash.Hash - - // Read reads more output from the hash; reading affects the hash's - // state. (ShakeHash.Read is thus very different from Hash.Sum) - // It never returns an error, but subsequent calls to Write or Sum - // will panic. - io.Reader - - // Clone returns a copy of the ShakeHash in its current state. - Clone() ShakeHash -} - -// cSHAKE specific context -type cshakeState struct { - *state // SHA-3 state context and Read/Write operations - - // initBlock is the cSHAKE specific initialization set of bytes. It is initialized - // by newCShake function and stores concatenation of N followed by S, encoded - // by the method specified in 3.3 of [1]. - // It is stored here in order for Reset() to be able to put context into - // initial state. - initBlock []byte -} - -func bytepad(data []byte, rate int) []byte { - out := make([]byte, 0, 9+len(data)+rate-1) - out = append(out, leftEncode(uint64(rate))...) - out = append(out, data...) - if padlen := rate - len(out)%rate; padlen < rate { - out = append(out, make([]byte, padlen)...) - } - return out -} - -func leftEncode(x uint64) []byte { - // Let n be the smallest positive integer for which 2^(8n) > x. - n := (bits.Len64(x) + 7) / 8 - if n == 0 { - n = 1 - } - // Return n || x with n as a byte and x an n bytes in big-endian order. - b := make([]byte, 9) - binary.BigEndian.PutUint64(b[1:], x) - b = b[9-n-1:] - b[0] = byte(n) - return b -} - -func newCShake(N, S []byte, rate, outputLen int, dsbyte byte) ShakeHash { - c := cshakeState{state: &state{rate: rate, outputLen: outputLen, dsbyte: dsbyte}} - c.initBlock = make([]byte, 0, 9+len(N)+9+len(S)) // leftEncode returns max 9 bytes - c.initBlock = append(c.initBlock, leftEncode(uint64(len(N))*8)...) - c.initBlock = append(c.initBlock, N...) - c.initBlock = append(c.initBlock, leftEncode(uint64(len(S))*8)...) - c.initBlock = append(c.initBlock, S...) - c.Write(bytepad(c.initBlock, c.rate)) - return &c -} - -// Reset resets the hash to initial state. -func (c *cshakeState) Reset() { - c.state.Reset() - c.Write(bytepad(c.initBlock, c.rate)) -} - -// Clone returns copy of a cSHAKE context within its current state. -func (c *cshakeState) Clone() ShakeHash { - b := make([]byte, len(c.initBlock)) - copy(b, c.initBlock) - return &cshakeState{state: c.clone(), initBlock: b} -} - -// Clone returns copy of SHAKE context within its current state. -func (c *state) Clone() ShakeHash { - return c.clone() -} - -func (c *cshakeState) MarshalBinary() ([]byte, error) { - return c.AppendBinary(make([]byte, 0, marshaledSize+len(c.initBlock))) -} - -func (c *cshakeState) AppendBinary(b []byte) ([]byte, error) { - b, err := c.state.AppendBinary(b) - if err != nil { - return nil, err - } - b = append(b, c.initBlock...) - return b, nil -} - -func (c *cshakeState) UnmarshalBinary(b []byte) error { - if len(b) <= marshaledSize { - return errors.New("sha3: invalid hash state") - } - if err := c.state.UnmarshalBinary(b[:marshaledSize]); err != nil { - return err - } - c.initBlock = bytes.Clone(b[marshaledSize:]) - return nil -} - -// NewShake128 creates a new SHAKE128 variable-output-length ShakeHash. -// Its generic security strength is 128 bits against all attacks if at -// least 32 bytes of its output are used. -func NewShake128() ShakeHash { - return newShake128() -} - -// NewShake256 creates a new SHAKE256 variable-output-length ShakeHash. -// Its generic security strength is 256 bits against all attacks if -// at least 64 bytes of its output are used. -func NewShake256() ShakeHash { - return newShake256() -} - -func newShake128Generic() *state { - return &state{rate: rateK256, outputLen: 32, dsbyte: dsbyteShake} -} - -func newShake256Generic() *state { - return &state{rate: rateK512, outputLen: 64, dsbyte: dsbyteShake} -} - -// NewCShake128 creates a new instance of cSHAKE128 variable-output-length ShakeHash, -// a customizable variant of SHAKE128. -// N is used to define functions based on cSHAKE, it can be empty when plain cSHAKE is -// desired. S is a customization byte string used for domain separation - two cSHAKE -// computations on same input with different S yield unrelated outputs. -// When N and S are both empty, this is equivalent to NewShake128. -func NewCShake128(N, S []byte) ShakeHash { - if len(N) == 0 && len(S) == 0 { - return NewShake128() - } - return newCShake(N, S, rateK256, 32, dsbyteCShake) -} - -// NewCShake256 creates a new instance of cSHAKE256 variable-output-length ShakeHash, -// a customizable variant of SHAKE256. -// N is used to define functions based on cSHAKE, it can be empty when plain cSHAKE is -// desired. S is a customization byte string used for domain separation - two cSHAKE -// computations on same input with different S yield unrelated outputs. -// When N and S are both empty, this is equivalent to NewShake256. -func NewCShake256(N, S []byte) ShakeHash { - if len(N) == 0 && len(S) == 0 { - return NewShake256() - } - return newCShake(N, S, rateK512, 64, dsbyteCShake) -} - -// ShakeSum128 writes an arbitrary-length digest of data into hash. -func ShakeSum128(hash, data []byte) { - h := NewShake128() - h.Write(data) - h.Read(hash) -} - -// ShakeSum256 writes an arbitrary-length digest of data into hash. -func ShakeSum256(hash, data []byte) { - h := NewShake256() - h.Write(data) - h.Read(hash) -} diff --git a/go-controller/vendor/golang.org/x/crypto/sha3/shake_noasm.go b/go-controller/vendor/golang.org/x/crypto/sha3/shake_noasm.go deleted file mode 100644 index 4276ba4ab2..0000000000 --- a/go-controller/vendor/golang.org/x/crypto/sha3/shake_noasm.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2023 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 !gc || purego || !s390x - -package sha3 - -func newShake128() *state { - return newShake128Generic() -} - -func newShake256() *state { - return newShake256Generic() -} diff --git a/go-controller/vendor/golang.org/x/oauth2/README.md b/go-controller/vendor/golang.org/x/oauth2/README.md index 48dbb9d84c..781770c204 100644 --- a/go-controller/vendor/golang.org/x/oauth2/README.md +++ b/go-controller/vendor/golang.org/x/oauth2/README.md @@ -5,6 +5,15 @@ oauth2 package contains a client implementation for OAuth 2.0 spec. +## Installation + +~~~~ +go get golang.org/x/oauth2 +~~~~ + +Or you can manually git clone the repository to +`$(go env GOPATH)/src/golang.org/x/oauth2`. + See pkg.go.dev for further documentation and examples. * [pkg.go.dev/golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2) @@ -24,11 +33,7 @@ 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://go.dev/doc/contribute. - -The git repository is https://go.googlesource.com/oauth2. - -Note: +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. diff --git a/go-controller/vendor/golang.org/x/oauth2/oauth2.go b/go-controller/vendor/golang.org/x/oauth2/oauth2.go index 74f052aa9f..09f6a49b80 100644 --- a/go-controller/vendor/golang.org/x/oauth2/oauth2.go +++ b/go-controller/vendor/golang.org/x/oauth2/oauth2.go @@ -56,7 +56,7 @@ type Config struct { // the OAuth flow, after the resource owner's URLs. RedirectURL string - // Scopes specifies optional requested permissions. + // Scope specifies optional requested permissions. Scopes []string // authStyleCache caches which auth style to use when Endpoint.AuthStyle is diff --git a/go-controller/vendor/golang.org/x/oauth2/pkce.go b/go-controller/vendor/golang.org/x/oauth2/pkce.go index 6a95da975c..50593b6dfe 100644 --- a/go-controller/vendor/golang.org/x/oauth2/pkce.go +++ b/go-controller/vendor/golang.org/x/oauth2/pkce.go @@ -21,7 +21,7 @@ const ( // // A fresh verifier should be generated for each authorization. // S256ChallengeOption(verifier) should then be passed to Config.AuthCodeURL -// (or Config.DeviceAuth) and VerifierOption(verifier) to Config.Exchange +// (or Config.DeviceAccess) and VerifierOption(verifier) to Config.Exchange // (or Config.DeviceAccessToken). func GenerateVerifier() string { // "RECOMMENDED that the output of a suitable random number generator be @@ -51,7 +51,7 @@ func S256ChallengeFromVerifier(verifier string) string { } // S256ChallengeOption derives a PKCE code challenge derived from verifier with -// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAuth +// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAccess // only. func S256ChallengeOption(verifier string) AuthCodeOption { return challengeOption{ diff --git a/go-controller/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s b/go-controller/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s deleted file mode 100644 index 269e173ca4..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s +++ /dev/null @@ -1,17 +0,0 @@ -// 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 gc - -#include "textflag.h" - -// -// System calls for ppc64, AIX are implemented in runtime/syscall_aix.go -// - -TEXT ·syscall6(SB),NOSPLIT,$0-88 - JMP syscall·syscall6(SB) - -TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 - JMP syscall·rawSyscall6(SB) diff --git a/go-controller/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s b/go-controller/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s deleted file mode 100644 index ec2acfe540..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2024 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 darwin && amd64 && gc - -#include "textflag.h" - -TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_sysctl(SB) -GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 -DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) - -TEXT libc_sysctlbyname_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_sysctlbyname(SB) -GLOBL ·libc_sysctlbyname_trampoline_addr(SB), RODATA, $8 -DATA ·libc_sysctlbyname_trampoline_addr(SB)/8, $libc_sysctlbyname_trampoline<>(SB) diff --git a/go-controller/vendor/golang.org/x/sys/cpu/byteorder.go b/go-controller/vendor/golang.org/x/sys/cpu/byteorder.go deleted file mode 100644 index 271055be0b..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/byteorder.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2019 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 cpu - -import ( - "runtime" -) - -// byteOrder is a subset of encoding/binary.ByteOrder. -type byteOrder interface { - Uint32([]byte) uint32 - Uint64([]byte) uint64 -} - -type littleEndian struct{} -type bigEndian struct{} - -func (littleEndian) Uint32(b []byte) uint32 { - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 -} - -func (littleEndian) Uint64(b []byte) uint64 { - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | - uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 -} - -func (bigEndian) Uint32(b []byte) uint32 { - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24 -} - -func (bigEndian) Uint64(b []byte) uint64 { - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | - uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 -} - -// hostByteOrder returns littleEndian on little-endian machines and -// bigEndian on big-endian machines. -func hostByteOrder() byteOrder { - switch runtime.GOARCH { - case "386", "amd64", "amd64p32", - "alpha", - "arm", "arm64", - "loong64", - "mipsle", "mips64le", "mips64p32le", - "nios2", - "ppc64le", - "riscv", "riscv64", - "sh": - return littleEndian{} - case "armbe", "arm64be", - "m68k", - "mips", "mips64", "mips64p32", - "ppc", "ppc64", - "s390", "s390x", - "shbe", - "sparc", "sparc64": - return bigEndian{} - } - panic("unknown architecture") -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu.go deleted file mode 100644 index 9c105f23af..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu.go +++ /dev/null @@ -1,315 +0,0 @@ -// 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. - -// Package cpu implements processor feature detection for -// various CPU architectures. -package cpu - -import ( - "os" - "strings" -) - -// Initialized reports whether the CPU features were initialized. -// -// For some GOOS/GOARCH combinations initialization of the CPU features depends -// on reading an operating specific file, e.g. /proc/self/auxv on linux/arm -// Initialized will report false if reading the file fails. -var Initialized bool - -// CacheLinePad is used to pad structs to avoid false sharing. -type CacheLinePad struct{ _ [cacheLineSize]byte } - -// X86 contains the supported CPU features of the -// current X86/AMD64 platform. If the current platform -// is not X86/AMD64 then all feature flags are false. -// -// X86 is padded to avoid false sharing. Further the HasAVX -// and HasAVX2 are only set if the OS supports XMM and YMM -// registers in addition to the CPUID feature bit being set. -var X86 struct { - _ CacheLinePad - HasAES bool // AES hardware implementation (AES NI) - HasADX bool // Multi-precision add-carry instruction extensions - HasAVX bool // Advanced vector extension - HasAVX2 bool // Advanced vector extension 2 - HasAVX512 bool // Advanced vector extension 512 - HasAVX512F bool // Advanced vector extension 512 Foundation Instructions - HasAVX512CD bool // Advanced vector extension 512 Conflict Detection Instructions - HasAVX512ER bool // Advanced vector extension 512 Exponential and Reciprocal Instructions - HasAVX512PF bool // Advanced vector extension 512 Prefetch Instructions - HasAVX512VL bool // Advanced vector extension 512 Vector Length Extensions - HasAVX512BW bool // Advanced vector extension 512 Byte and Word Instructions - HasAVX512DQ bool // Advanced vector extension 512 Doubleword and Quadword Instructions - HasAVX512IFMA bool // Advanced vector extension 512 Integer Fused Multiply Add - HasAVX512VBMI bool // Advanced vector extension 512 Vector Byte Manipulation Instructions - HasAVX5124VNNIW bool // Advanced vector extension 512 Vector Neural Network Instructions Word variable precision - HasAVX5124FMAPS bool // Advanced vector extension 512 Fused Multiply Accumulation Packed Single precision - HasAVX512VPOPCNTDQ bool // Advanced vector extension 512 Double and quad word population count instructions - HasAVX512VPCLMULQDQ bool // Advanced vector extension 512 Vector carry-less multiply operations - HasAVX512VNNI bool // Advanced vector extension 512 Vector Neural Network Instructions - HasAVX512GFNI bool // Advanced vector extension 512 Galois field New Instructions - HasAVX512VAES bool // Advanced vector extension 512 Vector AES instructions - HasAVX512VBMI2 bool // Advanced vector extension 512 Vector Byte Manipulation Instructions 2 - HasAVX512BITALG bool // Advanced vector extension 512 Bit Algorithms - HasAVX512BF16 bool // Advanced vector extension 512 BFloat16 Instructions - HasAMXTile bool // Advanced Matrix Extension Tile instructions - HasAMXInt8 bool // Advanced Matrix Extension Int8 instructions - HasAMXBF16 bool // Advanced Matrix Extension BFloat16 instructions - HasBMI1 bool // Bit manipulation instruction set 1 - HasBMI2 bool // Bit manipulation instruction set 2 - HasCX16 bool // Compare and exchange 16 Bytes - HasERMS bool // Enhanced REP for MOVSB and STOSB - HasFMA bool // Fused-multiply-add instructions - HasOSXSAVE bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers. - HasPCLMULQDQ bool // PCLMULQDQ instruction - most often used for AES-GCM - HasPOPCNT bool // Hamming weight instruction POPCNT. - HasRDRAND bool // RDRAND instruction (on-chip random number generator) - HasRDSEED bool // RDSEED instruction (on-chip random number generator) - HasSSE2 bool // Streaming SIMD extension 2 (always available on amd64) - HasSSE3 bool // Streaming SIMD extension 3 - HasSSSE3 bool // Supplemental streaming SIMD extension 3 - HasSSE41 bool // Streaming SIMD extension 4 and 4.1 - HasSSE42 bool // Streaming SIMD extension 4 and 4.2 - HasAVXIFMA bool // Advanced vector extension Integer Fused Multiply Add - HasAVXVNNI bool // Advanced vector extension Vector Neural Network Instructions - HasAVXVNNIInt8 bool // Advanced vector extension Vector Neural Network Int8 instructions - _ CacheLinePad -} - -// ARM64 contains the supported CPU features of the -// current ARMv8(aarch64) platform. If the current platform -// is not arm64 then all feature flags are false. -var ARM64 struct { - _ CacheLinePad - HasFP bool // Floating-point instruction set (always available) - HasASIMD bool // Advanced SIMD (always available) - HasEVTSTRM bool // Event stream support - HasAES bool // AES hardware implementation - HasPMULL bool // Polynomial multiplication instruction set - HasSHA1 bool // SHA1 hardware implementation - HasSHA2 bool // SHA2 hardware implementation - HasCRC32 bool // CRC32 hardware implementation - HasATOMICS bool // Atomic memory operation instruction set - HasFPHP bool // Half precision floating-point instruction set - HasASIMDHP bool // Advanced SIMD half precision instruction set - HasCPUID bool // CPUID identification scheme registers - HasASIMDRDM bool // Rounding double multiply add/subtract instruction set - HasJSCVT bool // Javascript conversion from floating-point to integer - HasFCMA bool // Floating-point multiplication and addition of complex numbers - HasLRCPC bool // Release Consistent processor consistent support - HasDCPOP bool // Persistent memory support - HasSHA3 bool // SHA3 hardware implementation - HasSM3 bool // SM3 hardware implementation - HasSM4 bool // SM4 hardware implementation - HasASIMDDP bool // Advanced SIMD double precision instruction set - HasSHA512 bool // SHA512 hardware implementation - HasSVE bool // Scalable Vector Extensions - HasSVE2 bool // Scalable Vector Extensions 2 - HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32 - HasDIT bool // Data Independent Timing support - HasI8MM bool // Advanced SIMD Int8 matrix multiplication instructions - _ CacheLinePad -} - -// ARM contains the supported CPU features of the current ARM (32-bit) platform. -// All feature flags are false if: -// 1. the current platform is not arm, or -// 2. the current operating system is not Linux. -var ARM struct { - _ CacheLinePad - HasSWP bool // SWP instruction support - HasHALF bool // Half-word load and store support - HasTHUMB bool // ARM Thumb instruction set - Has26BIT bool // Address space limited to 26-bits - HasFASTMUL bool // 32-bit operand, 64-bit result multiplication support - HasFPA bool // Floating point arithmetic support - HasVFP bool // Vector floating point support - HasEDSP bool // DSP Extensions support - HasJAVA bool // Java instruction set - HasIWMMXT bool // Intel Wireless MMX technology support - HasCRUNCH bool // MaverickCrunch context switching and handling - HasTHUMBEE bool // Thumb EE instruction set - HasNEON bool // NEON instruction set - HasVFPv3 bool // Vector floating point version 3 support - HasVFPv3D16 bool // Vector floating point version 3 D8-D15 - HasTLS bool // Thread local storage support - HasVFPv4 bool // Vector floating point version 4 support - HasIDIVA bool // Integer divide instruction support in ARM mode - HasIDIVT bool // Integer divide instruction support in Thumb mode - HasVFPD32 bool // Vector floating point version 3 D15-D31 - HasLPAE bool // Large Physical Address Extensions - HasEVTSTRM bool // Event stream support - HasAES bool // AES hardware implementation - HasPMULL bool // Polynomial multiplication instruction set - HasSHA1 bool // SHA1 hardware implementation - HasSHA2 bool // SHA2 hardware implementation - HasCRC32 bool // CRC32 hardware implementation - _ CacheLinePad -} - -// MIPS64X contains the supported CPU features of the current mips64/mips64le -// platforms. If the current platform is not mips64/mips64le or the current -// operating system is not Linux then all feature flags are false. -var MIPS64X struct { - _ CacheLinePad - HasMSA bool // MIPS SIMD architecture - _ CacheLinePad -} - -// PPC64 contains the supported CPU features of the current ppc64/ppc64le platforms. -// If the current platform is not ppc64/ppc64le then all feature flags are false. -// -// For ppc64/ppc64le, it is safe to check only for ISA level starting on ISA v3.00, -// since there are no optional categories. There are some exceptions that also -// require kernel support to work (DARN, SCV), so there are feature bits for -// those as well. The struct is padded to avoid false sharing. -var PPC64 struct { - _ CacheLinePad - HasDARN bool // Hardware random number generator (requires kernel enablement) - HasSCV bool // Syscall vectored (requires kernel enablement) - IsPOWER8 bool // ISA v2.07 (POWER8) - IsPOWER9 bool // ISA v3.00 (POWER9), implies IsPOWER8 - _ CacheLinePad -} - -// S390X contains the supported CPU features of the current IBM Z -// (s390x) platform. If the current platform is not IBM Z then all -// feature flags are false. -// -// S390X is padded to avoid false sharing. Further HasVX is only set -// if the OS supports vector registers in addition to the STFLE -// feature bit being set. -var S390X struct { - _ CacheLinePad - HasZARCH bool // z/Architecture mode is active [mandatory] - HasSTFLE bool // store facility list extended - HasLDISP bool // long (20-bit) displacements - HasEIMM bool // 32-bit immediates - HasDFP bool // decimal floating point - HasETF3EH bool // ETF-3 enhanced - HasMSA bool // message security assist (CPACF) - HasAES bool // KM-AES{128,192,256} functions - HasAESCBC bool // KMC-AES{128,192,256} functions - HasAESCTR bool // KMCTR-AES{128,192,256} functions - HasAESGCM bool // KMA-GCM-AES{128,192,256} functions - HasGHASH bool // KIMD-GHASH function - HasSHA1 bool // K{I,L}MD-SHA-1 functions - HasSHA256 bool // K{I,L}MD-SHA-256 functions - HasSHA512 bool // K{I,L}MD-SHA-512 functions - HasSHA3 bool // K{I,L}MD-SHA3-{224,256,384,512} and K{I,L}MD-SHAKE-{128,256} functions - HasVX bool // vector facility - HasVXE bool // vector-enhancements facility 1 - _ CacheLinePad -} - -// RISCV64 contains the supported CPU features and performance characteristics for riscv64 -// platforms. The booleans in RISCV64, with the exception of HasFastMisaligned, indicate -// the presence of RISC-V extensions. -// -// It is safe to assume that all the RV64G extensions are supported and so they are omitted from -// this structure. As riscv64 Go programs require at least RV64G, the code that populates -// this structure cannot run successfully if some of the RV64G extensions are missing. -// The struct is padded to avoid false sharing. -var RISCV64 struct { - _ CacheLinePad - HasFastMisaligned bool // Fast misaligned accesses - HasC bool // Compressed instruction-set extension - HasV bool // Vector extension compatible with RVV 1.0 - HasZba bool // Address generation instructions extension - HasZbb bool // Basic bit-manipulation extension - HasZbs bool // Single-bit instructions extension - _ CacheLinePad -} - -func init() { - archInit() - initOptions() - processOptions() -} - -// options contains the cpu debug options that can be used in GODEBUG. -// Options are arch dependent and are added by the arch specific initOptions functions. -// Features that are mandatory for the specific GOARCH should have the Required field set -// (e.g. SSE2 on amd64). -var options []option - -// Option names should be lower case. e.g. avx instead of AVX. -type option struct { - Name string - Feature *bool - Specified bool // whether feature value was specified in GODEBUG - Enable bool // whether feature should be enabled - Required bool // whether feature is mandatory and can not be disabled -} - -func processOptions() { - env := os.Getenv("GODEBUG") -field: - for env != "" { - field := "" - i := strings.IndexByte(env, ',') - if i < 0 { - field, env = env, "" - } else { - field, env = env[:i], env[i+1:] - } - if len(field) < 4 || field[:4] != "cpu." { - continue - } - i = strings.IndexByte(field, '=') - if i < 0 { - print("GODEBUG sys/cpu: no value specified for \"", field, "\"\n") - continue - } - key, value := field[4:i], field[i+1:] // e.g. "SSE2", "on" - - var enable bool - switch value { - case "on": - enable = true - case "off": - enable = false - default: - print("GODEBUG sys/cpu: value \"", value, "\" not supported for cpu option \"", key, "\"\n") - continue field - } - - if key == "all" { - for i := range options { - options[i].Specified = true - options[i].Enable = enable || options[i].Required - } - continue field - } - - for i := range options { - if options[i].Name == key { - options[i].Specified = true - options[i].Enable = enable - continue field - } - } - - print("GODEBUG sys/cpu: unknown cpu feature \"", key, "\"\n") - } - - for _, o := range options { - if !o.Specified { - continue - } - - if o.Enable && !*o.Feature { - print("GODEBUG sys/cpu: can not enable \"", o.Name, "\", missing CPU support\n") - continue - } - - if !o.Enable && o.Required { - print("GODEBUG sys/cpu: can not disable \"", o.Name, "\", required CPU feature\n") - continue - } - - *o.Feature = o.Enable - } -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_aix.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_aix.go deleted file mode 100644 index 9bf0c32eb6..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_aix.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2019 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 - -package cpu - -const ( - // getsystemcfg constants - _SC_IMPL = 2 - _IMPL_POWER8 = 0x10000 - _IMPL_POWER9 = 0x20000 -) - -func archInit() { - impl := getsystemcfg(_SC_IMPL) - if impl&_IMPL_POWER8 != 0 { - PPC64.IsPOWER8 = true - } - if impl&_IMPL_POWER9 != 0 { - PPC64.IsPOWER8 = true - PPC64.IsPOWER9 = true - } - - Initialized = true -} - -func getsystemcfg(label int) (n uint64) { - r0, _ := callgetsystemcfg(label) - n = uint64(r0) - return -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_arm.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_arm.go deleted file mode 100644 index 301b752e9c..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_arm.go +++ /dev/null @@ -1,73 +0,0 @@ -// 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. - -package cpu - -const cacheLineSize = 32 - -// HWCAP/HWCAP2 bits. -// These are specific to Linux. -const ( - hwcap_SWP = 1 << 0 - hwcap_HALF = 1 << 1 - hwcap_THUMB = 1 << 2 - hwcap_26BIT = 1 << 3 - hwcap_FAST_MULT = 1 << 4 - hwcap_FPA = 1 << 5 - hwcap_VFP = 1 << 6 - hwcap_EDSP = 1 << 7 - hwcap_JAVA = 1 << 8 - hwcap_IWMMXT = 1 << 9 - hwcap_CRUNCH = 1 << 10 - hwcap_THUMBEE = 1 << 11 - hwcap_NEON = 1 << 12 - hwcap_VFPv3 = 1 << 13 - hwcap_VFPv3D16 = 1 << 14 - hwcap_TLS = 1 << 15 - hwcap_VFPv4 = 1 << 16 - hwcap_IDIVA = 1 << 17 - hwcap_IDIVT = 1 << 18 - hwcap_VFPD32 = 1 << 19 - hwcap_LPAE = 1 << 20 - hwcap_EVTSTRM = 1 << 21 - - hwcap2_AES = 1 << 0 - hwcap2_PMULL = 1 << 1 - hwcap2_SHA1 = 1 << 2 - hwcap2_SHA2 = 1 << 3 - hwcap2_CRC32 = 1 << 4 -) - -func initOptions() { - options = []option{ - {Name: "pmull", Feature: &ARM.HasPMULL}, - {Name: "sha1", Feature: &ARM.HasSHA1}, - {Name: "sha2", Feature: &ARM.HasSHA2}, - {Name: "swp", Feature: &ARM.HasSWP}, - {Name: "thumb", Feature: &ARM.HasTHUMB}, - {Name: "thumbee", Feature: &ARM.HasTHUMBEE}, - {Name: "tls", Feature: &ARM.HasTLS}, - {Name: "vfp", Feature: &ARM.HasVFP}, - {Name: "vfpd32", Feature: &ARM.HasVFPD32}, - {Name: "vfpv3", Feature: &ARM.HasVFPv3}, - {Name: "vfpv3d16", Feature: &ARM.HasVFPv3D16}, - {Name: "vfpv4", Feature: &ARM.HasVFPv4}, - {Name: "half", Feature: &ARM.HasHALF}, - {Name: "26bit", Feature: &ARM.Has26BIT}, - {Name: "fastmul", Feature: &ARM.HasFASTMUL}, - {Name: "fpa", Feature: &ARM.HasFPA}, - {Name: "edsp", Feature: &ARM.HasEDSP}, - {Name: "java", Feature: &ARM.HasJAVA}, - {Name: "iwmmxt", Feature: &ARM.HasIWMMXT}, - {Name: "crunch", Feature: &ARM.HasCRUNCH}, - {Name: "neon", Feature: &ARM.HasNEON}, - {Name: "idivt", Feature: &ARM.HasIDIVT}, - {Name: "idiva", Feature: &ARM.HasIDIVA}, - {Name: "lpae", Feature: &ARM.HasLPAE}, - {Name: "evtstrm", Feature: &ARM.HasEVTSTRM}, - {Name: "aes", Feature: &ARM.HasAES}, - {Name: "crc32", Feature: &ARM.HasCRC32}, - } - -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_arm64.go deleted file mode 100644 index af2aa99f9f..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_arm64.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2019 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 cpu - -import "runtime" - -// cacheLineSize is used to prevent false sharing of cache lines. -// We choose 128 because Apple Silicon, a.k.a. M1, has 128-byte cache line size. -// It doesn't cost much and is much more future-proof. -const cacheLineSize = 128 - -func initOptions() { - options = []option{ - {Name: "fp", Feature: &ARM64.HasFP}, - {Name: "asimd", Feature: &ARM64.HasASIMD}, - {Name: "evstrm", Feature: &ARM64.HasEVTSTRM}, - {Name: "aes", Feature: &ARM64.HasAES}, - {Name: "fphp", Feature: &ARM64.HasFPHP}, - {Name: "jscvt", Feature: &ARM64.HasJSCVT}, - {Name: "lrcpc", Feature: &ARM64.HasLRCPC}, - {Name: "pmull", Feature: &ARM64.HasPMULL}, - {Name: "sha1", Feature: &ARM64.HasSHA1}, - {Name: "sha2", Feature: &ARM64.HasSHA2}, - {Name: "sha3", Feature: &ARM64.HasSHA3}, - {Name: "sha512", Feature: &ARM64.HasSHA512}, - {Name: "sm3", Feature: &ARM64.HasSM3}, - {Name: "sm4", Feature: &ARM64.HasSM4}, - {Name: "sve", Feature: &ARM64.HasSVE}, - {Name: "sve2", Feature: &ARM64.HasSVE2}, - {Name: "crc32", Feature: &ARM64.HasCRC32}, - {Name: "atomics", Feature: &ARM64.HasATOMICS}, - {Name: "asimdhp", Feature: &ARM64.HasASIMDHP}, - {Name: "cpuid", Feature: &ARM64.HasCPUID}, - {Name: "asimrdm", Feature: &ARM64.HasASIMDRDM}, - {Name: "fcma", Feature: &ARM64.HasFCMA}, - {Name: "dcpop", Feature: &ARM64.HasDCPOP}, - {Name: "asimddp", Feature: &ARM64.HasASIMDDP}, - {Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM}, - {Name: "dit", Feature: &ARM64.HasDIT}, - {Name: "i8mm", Feature: &ARM64.HasI8MM}, - } -} - -func archInit() { - switch runtime.GOOS { - case "freebsd": - readARM64Registers() - case "linux", "netbsd", "openbsd": - doinit() - default: - // Many platforms don't seem to allow reading these registers. - setMinimalFeatures() - } -} - -// setMinimalFeatures fakes the minimal ARM64 features expected by -// TestARM64minimalFeatures. -func setMinimalFeatures() { - ARM64.HasASIMD = true - ARM64.HasFP = true -} - -func readARM64Registers() { - Initialized = true - - parseARM64SystemRegisters(getisar0(), getisar1(), getpfr0()) -} - -func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) { - // ID_AA64ISAR0_EL1 - switch extractBits(isar0, 4, 7) { - case 1: - ARM64.HasAES = true - case 2: - ARM64.HasAES = true - ARM64.HasPMULL = true - } - - switch extractBits(isar0, 8, 11) { - case 1: - ARM64.HasSHA1 = true - } - - switch extractBits(isar0, 12, 15) { - case 1: - ARM64.HasSHA2 = true - case 2: - ARM64.HasSHA2 = true - ARM64.HasSHA512 = true - } - - switch extractBits(isar0, 16, 19) { - case 1: - ARM64.HasCRC32 = true - } - - switch extractBits(isar0, 20, 23) { - case 2: - ARM64.HasATOMICS = true - } - - switch extractBits(isar0, 28, 31) { - case 1: - ARM64.HasASIMDRDM = true - } - - switch extractBits(isar0, 32, 35) { - case 1: - ARM64.HasSHA3 = true - } - - switch extractBits(isar0, 36, 39) { - case 1: - ARM64.HasSM3 = true - } - - switch extractBits(isar0, 40, 43) { - case 1: - ARM64.HasSM4 = true - } - - switch extractBits(isar0, 44, 47) { - case 1: - ARM64.HasASIMDDP = true - } - - // ID_AA64ISAR1_EL1 - switch extractBits(isar1, 0, 3) { - case 1: - ARM64.HasDCPOP = true - } - - switch extractBits(isar1, 12, 15) { - case 1: - ARM64.HasJSCVT = true - } - - switch extractBits(isar1, 16, 19) { - case 1: - ARM64.HasFCMA = true - } - - switch extractBits(isar1, 20, 23) { - case 1: - ARM64.HasLRCPC = true - } - - switch extractBits(isar1, 52, 55) { - case 1: - ARM64.HasI8MM = true - } - - // ID_AA64PFR0_EL1 - switch extractBits(pfr0, 16, 19) { - case 0: - ARM64.HasFP = true - case 1: - ARM64.HasFP = true - ARM64.HasFPHP = true - } - - switch extractBits(pfr0, 20, 23) { - case 0: - ARM64.HasASIMD = true - case 1: - ARM64.HasASIMD = true - ARM64.HasASIMDHP = true - } - - switch extractBits(pfr0, 32, 35) { - case 1: - ARM64.HasSVE = true - - parseARM64SVERegister(getzfr0()) - } - - switch extractBits(pfr0, 48, 51) { - case 1: - ARM64.HasDIT = true - } -} - -func parseARM64SVERegister(zfr0 uint64) { - switch extractBits(zfr0, 0, 3) { - case 1: - ARM64.HasSVE2 = true - } -} - -func extractBits(data uint64, start, end uint) uint { - return (uint)(data>>start) & ((1 << (end - start + 1)) - 1) -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_arm64.s b/go-controller/vendor/golang.org/x/sys/cpu/cpu_arm64.s deleted file mode 100644 index 22cc99844a..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_arm64.s +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2019 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 gc - -#include "textflag.h" - -// func getisar0() uint64 -TEXT ·getisar0(SB),NOSPLIT,$0-8 - // get Instruction Set Attributes 0 into x0 - // mrs x0, ID_AA64ISAR0_EL1 = d5380600 - WORD $0xd5380600 - MOVD R0, ret+0(FP) - RET - -// func getisar1() uint64 -TEXT ·getisar1(SB),NOSPLIT,$0-8 - // get Instruction Set Attributes 1 into x0 - // mrs x0, ID_AA64ISAR1_EL1 = d5380620 - WORD $0xd5380620 - MOVD R0, ret+0(FP) - RET - -// func getpfr0() uint64 -TEXT ·getpfr0(SB),NOSPLIT,$0-8 - // get Processor Feature Register 0 into x0 - // mrs x0, ID_AA64PFR0_EL1 = d5380400 - WORD $0xd5380400 - MOVD R0, ret+0(FP) - RET - -// func getzfr0() uint64 -TEXT ·getzfr0(SB),NOSPLIT,$0-8 - // get SVE Feature Register 0 into x0 - // mrs x0, ID_AA64ZFR0_EL1 = d5380480 - WORD $0xd5380480 - MOVD R0, ret+0(FP) - RET diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go deleted file mode 100644 index b838cb9e95..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 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 darwin && amd64 && gc - -package cpu - -// darwinSupportsAVX512 checks Darwin kernel for AVX512 support via sysctl -// call (see issue 43089). It also restricts AVX512 support for Darwin to -// kernel version 21.3.0 (MacOS 12.2.0) or later (see issue 49233). -// -// Background: -// Darwin implements a special mechanism to economize on thread state when -// AVX512 specific registers are not in use. This scheme minimizes state when -// preempting threads that haven't yet used any AVX512 instructions, but adds -// special requirements to check for AVX512 hardware support at runtime (e.g. -// via sysctl call or commpage inspection). See issue 43089 and link below for -// full background: -// https://github.com/apple-oss-distributions/xnu/blob/xnu-11215.1.10/osfmk/i386/fpu.c#L214-L240 -// -// Additionally, all versions of the Darwin kernel from 19.6.0 through 21.2.0 -// (corresponding to MacOS 10.15.6 - 12.1) have a bug that can cause corruption -// of the AVX512 mask registers (K0-K7) upon signal return. For this reason -// AVX512 is considered unsafe to use on Darwin for kernel versions prior to -// 21.3.0, where a fix has been confirmed. See issue 49233 for full background. -func darwinSupportsAVX512() bool { - return darwinSysctlEnabled([]byte("hw.optional.avx512f\x00")) && darwinKernelVersionCheck(21, 3, 0) -} - -// Ensure Darwin kernel version is at least major.minor.patch, avoiding dependencies -func darwinKernelVersionCheck(major, minor, patch int) bool { - var release [256]byte - err := darwinOSRelease(&release) - if err != nil { - return false - } - - var mmp [3]int - c := 0 -Loop: - for _, b := range release[:] { - switch { - case b >= '0' && b <= '9': - mmp[c] = 10*mmp[c] + int(b-'0') - case b == '.': - c++ - if c > 2 { - return false - } - case b == 0: - break Loop - default: - return false - } - } - if c != 2 { - return false - } - return mmp[0] > major || mmp[0] == major && (mmp[1] > minor || mmp[1] == minor && mmp[2] >= patch) -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go deleted file mode 100644 index 6ac6e1efb2..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2019 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 gc - -package cpu - -func getisar0() uint64 -func getisar1() uint64 -func getpfr0() uint64 -func getzfr0() uint64 diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go deleted file mode 100644 index c8ae6ddc15..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2019 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 gc - -package cpu - -// haveAsmFunctions reports whether the other functions in this file can -// be safely called. -func haveAsmFunctions() bool { return true } - -// The following feature detection functions are defined in cpu_s390x.s. -// They are likely to be expensive to call so the results should be cached. -func stfle() facilityList -func kmQuery() queryResult -func kmcQuery() queryResult -func kmctrQuery() queryResult -func kmaQuery() queryResult -func kimdQuery() queryResult -func klmdQuery() queryResult diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go deleted file mode 100644 index 32a44514e2..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go +++ /dev/null @@ -1,15 +0,0 @@ -// 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 (386 || amd64 || amd64p32) && gc - -package cpu - -// cpuid is implemented in cpu_gc_x86.s for gc compiler -// and in cpu_gccgo.c for gccgo. -func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) - -// xgetbv with ecx = 0 is implemented in cpu_gc_x86.s for gc compiler -// and in cpu_gccgo.c for gccgo. -func xgetbv() (eax, edx uint32) diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s b/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s deleted file mode 100644 index ce208ce6d6..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s +++ /dev/null @@ -1,26 +0,0 @@ -// 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 (386 || amd64 || amd64p32) && gc - -#include "textflag.h" - -// func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) -TEXT ·cpuid(SB), NOSPLIT, $0-24 - MOVL eaxArg+0(FP), AX - MOVL ecxArg+4(FP), CX - CPUID - MOVL AX, eax+8(FP) - MOVL BX, ebx+12(FP) - MOVL CX, ecx+16(FP) - MOVL DX, edx+20(FP) - RET - -// func xgetbv() (eax, edx uint32) -TEXT ·xgetbv(SB), NOSPLIT, $0-8 - MOVL $0, CX - XGETBV - MOVL AX, eax+0(FP) - MOVL DX, edx+4(FP) - RET diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go deleted file mode 100644 index 7f1946780b..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2019 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 gccgo - -package cpu - -func getisar0() uint64 { return 0 } -func getisar1() uint64 { return 0 } -func getpfr0() uint64 { return 0 } diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go deleted file mode 100644 index 9526d2ce3a..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2019 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 gccgo - -package cpu - -// haveAsmFunctions reports whether the other functions in this file can -// be safely called. -func haveAsmFunctions() bool { return false } - -// TODO(mundaym): the following feature detection functions are currently -// stubs. See https://golang.org/cl/162887 for how to fix this. -// They are likely to be expensive to call so the results should be cached. -func stfle() facilityList { panic("not implemented for gccgo") } -func kmQuery() queryResult { panic("not implemented for gccgo") } -func kmcQuery() queryResult { panic("not implemented for gccgo") } -func kmctrQuery() queryResult { panic("not implemented for gccgo") } -func kmaQuery() queryResult { panic("not implemented for gccgo") } -func kimdQuery() queryResult { panic("not implemented for gccgo") } -func klmdQuery() queryResult { panic("not implemented for gccgo") } diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c b/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c deleted file mode 100644 index 3f73a05dcf..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c +++ /dev/null @@ -1,37 +0,0 @@ -// 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 (386 || amd64 || amd64p32) && gccgo - -#include -#include -#include - -// Need to wrap __get_cpuid_count because it's declared as static. -int -gccgoGetCpuidCount(uint32_t leaf, uint32_t subleaf, - uint32_t *eax, uint32_t *ebx, - uint32_t *ecx, uint32_t *edx) -{ - return __get_cpuid_count(leaf, subleaf, eax, ebx, ecx, edx); -} - -#pragma GCC diagnostic ignored "-Wunknown-pragmas" -#pragma GCC push_options -#pragma GCC target("xsave") -#pragma clang attribute push (__attribute__((target("xsave"))), apply_to=function) - -// xgetbv reads the contents of an XCR (Extended Control Register) -// specified in the ECX register into registers EDX:EAX. -// Currently, the only supported value for XCR is 0. -void -gccgoXgetbv(uint32_t *eax, uint32_t *edx) -{ - uint64_t v = _xgetbv(0); - *eax = v & 0xffffffff; - *edx = v >> 32; -} - -#pragma clang attribute pop -#pragma GCC pop_options diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go deleted file mode 100644 index 170d21ddfd..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go +++ /dev/null @@ -1,25 +0,0 @@ -// 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 (386 || amd64 || amd64p32) && gccgo - -package cpu - -//extern gccgoGetCpuidCount -func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32) - -func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) { - var a, b, c, d uint32 - gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d) - return a, b, c, d -} - -//extern gccgoXgetbv -func gccgoXgetbv(eax, edx *uint32) - -func xgetbv() (eax, edx uint32) { - var a, d uint32 - gccgoXgetbv(&a, &d) - return a, d -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux.go deleted file mode 100644 index 743eb54354..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux.go +++ /dev/null @@ -1,15 +0,0 @@ -// 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 !386 && !amd64 && !amd64p32 && !arm64 - -package cpu - -func archInit() { - if err := readHWCAP(); err != nil { - return - } - doinit() - Initialized = true -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_arm.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_arm.go deleted file mode 100644 index 2057006dce..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_arm.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2019 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 cpu - -func doinit() { - ARM.HasSWP = isSet(hwCap, hwcap_SWP) - ARM.HasHALF = isSet(hwCap, hwcap_HALF) - ARM.HasTHUMB = isSet(hwCap, hwcap_THUMB) - ARM.Has26BIT = isSet(hwCap, hwcap_26BIT) - ARM.HasFASTMUL = isSet(hwCap, hwcap_FAST_MULT) - ARM.HasFPA = isSet(hwCap, hwcap_FPA) - ARM.HasVFP = isSet(hwCap, hwcap_VFP) - ARM.HasEDSP = isSet(hwCap, hwcap_EDSP) - ARM.HasJAVA = isSet(hwCap, hwcap_JAVA) - ARM.HasIWMMXT = isSet(hwCap, hwcap_IWMMXT) - ARM.HasCRUNCH = isSet(hwCap, hwcap_CRUNCH) - ARM.HasTHUMBEE = isSet(hwCap, hwcap_THUMBEE) - ARM.HasNEON = isSet(hwCap, hwcap_NEON) - ARM.HasVFPv3 = isSet(hwCap, hwcap_VFPv3) - ARM.HasVFPv3D16 = isSet(hwCap, hwcap_VFPv3D16) - ARM.HasTLS = isSet(hwCap, hwcap_TLS) - ARM.HasVFPv4 = isSet(hwCap, hwcap_VFPv4) - ARM.HasIDIVA = isSet(hwCap, hwcap_IDIVA) - ARM.HasIDIVT = isSet(hwCap, hwcap_IDIVT) - ARM.HasVFPD32 = isSet(hwCap, hwcap_VFPD32) - ARM.HasLPAE = isSet(hwCap, hwcap_LPAE) - ARM.HasEVTSTRM = isSet(hwCap, hwcap_EVTSTRM) - ARM.HasAES = isSet(hwCap2, hwcap2_AES) - ARM.HasPMULL = isSet(hwCap2, hwcap2_PMULL) - ARM.HasSHA1 = isSet(hwCap2, hwcap2_SHA1) - ARM.HasSHA2 = isSet(hwCap2, hwcap2_SHA2) - ARM.HasCRC32 = isSet(hwCap2, hwcap2_CRC32) -} - -func isSet(hwc uint, value uint) bool { - return hwc&value != 0 -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go deleted file mode 100644 index f1caf0f78e..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go +++ /dev/null @@ -1,120 +0,0 @@ -// 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. - -package cpu - -import ( - "strings" - "syscall" -) - -// HWCAP/HWCAP2 bits. These are exposed by Linux. -const ( - hwcap_FP = 1 << 0 - hwcap_ASIMD = 1 << 1 - hwcap_EVTSTRM = 1 << 2 - hwcap_AES = 1 << 3 - hwcap_PMULL = 1 << 4 - hwcap_SHA1 = 1 << 5 - hwcap_SHA2 = 1 << 6 - hwcap_CRC32 = 1 << 7 - hwcap_ATOMICS = 1 << 8 - hwcap_FPHP = 1 << 9 - hwcap_ASIMDHP = 1 << 10 - hwcap_CPUID = 1 << 11 - hwcap_ASIMDRDM = 1 << 12 - hwcap_JSCVT = 1 << 13 - hwcap_FCMA = 1 << 14 - hwcap_LRCPC = 1 << 15 - hwcap_DCPOP = 1 << 16 - hwcap_SHA3 = 1 << 17 - hwcap_SM3 = 1 << 18 - hwcap_SM4 = 1 << 19 - hwcap_ASIMDDP = 1 << 20 - hwcap_SHA512 = 1 << 21 - hwcap_SVE = 1 << 22 - hwcap_ASIMDFHM = 1 << 23 - hwcap_DIT = 1 << 24 - - hwcap2_SVE2 = 1 << 1 - hwcap2_I8MM = 1 << 13 -) - -// linuxKernelCanEmulateCPUID reports whether we're running -// on Linux 4.11+. Ideally we'd like to ask the question about -// whether the current kernel contains -// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77c97b4ee21290f5f083173d957843b615abbff2 -// but the version number will have to do. -func linuxKernelCanEmulateCPUID() bool { - var un syscall.Utsname - syscall.Uname(&un) - var sb strings.Builder - for _, b := range un.Release[:] { - if b == 0 { - break - } - sb.WriteByte(byte(b)) - } - major, minor, _, ok := parseRelease(sb.String()) - return ok && (major > 4 || major == 4 && minor >= 11) -} - -func doinit() { - if err := readHWCAP(); err != nil { - // We failed to read /proc/self/auxv. This can happen if the binary has - // been given extra capabilities(7) with /bin/setcap. - // - // When this happens, we have two options. If the Linux kernel is new - // enough (4.11+), we can read the arm64 registers directly which'll - // trap into the kernel and then return back to userspace. - // - // But on older kernels, such as Linux 4.4.180 as used on many Synology - // devices, calling readARM64Registers (specifically getisar0) will - // cause a SIGILL and we'll die. So for older kernels, parse /proc/cpuinfo - // instead. - // - // See golang/go#57336. - if linuxKernelCanEmulateCPUID() { - readARM64Registers() - } else { - readLinuxProcCPUInfo() - } - return - } - - // HWCAP feature bits - ARM64.HasFP = isSet(hwCap, hwcap_FP) - ARM64.HasASIMD = isSet(hwCap, hwcap_ASIMD) - ARM64.HasEVTSTRM = isSet(hwCap, hwcap_EVTSTRM) - ARM64.HasAES = isSet(hwCap, hwcap_AES) - ARM64.HasPMULL = isSet(hwCap, hwcap_PMULL) - ARM64.HasSHA1 = isSet(hwCap, hwcap_SHA1) - ARM64.HasSHA2 = isSet(hwCap, hwcap_SHA2) - ARM64.HasCRC32 = isSet(hwCap, hwcap_CRC32) - ARM64.HasATOMICS = isSet(hwCap, hwcap_ATOMICS) - ARM64.HasFPHP = isSet(hwCap, hwcap_FPHP) - ARM64.HasASIMDHP = isSet(hwCap, hwcap_ASIMDHP) - ARM64.HasCPUID = isSet(hwCap, hwcap_CPUID) - ARM64.HasASIMDRDM = isSet(hwCap, hwcap_ASIMDRDM) - ARM64.HasJSCVT = isSet(hwCap, hwcap_JSCVT) - ARM64.HasFCMA = isSet(hwCap, hwcap_FCMA) - ARM64.HasLRCPC = isSet(hwCap, hwcap_LRCPC) - ARM64.HasDCPOP = isSet(hwCap, hwcap_DCPOP) - ARM64.HasSHA3 = isSet(hwCap, hwcap_SHA3) - ARM64.HasSM3 = isSet(hwCap, hwcap_SM3) - ARM64.HasSM4 = isSet(hwCap, hwcap_SM4) - ARM64.HasASIMDDP = isSet(hwCap, hwcap_ASIMDDP) - ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512) - ARM64.HasSVE = isSet(hwCap, hwcap_SVE) - ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM) - ARM64.HasDIT = isSet(hwCap, hwcap_DIT) - - // HWCAP2 feature bits - ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2) - ARM64.HasI8MM = isSet(hwCap2, hwcap2_I8MM) -} - -func isSet(hwc uint, value uint) bool { - return hwc&value != 0 -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go deleted file mode 100644 index 4686c1d541..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2020 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 linux && (mips64 || mips64le) - -package cpu - -// HWCAP bits. These are exposed by the Linux kernel 5.4. -const ( - // CPU features - hwcap_MIPS_MSA = 1 << 1 -) - -func doinit() { - // HWCAP feature bits - MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA) -} - -func isSet(hwc uint, value uint) bool { - return hwc&value != 0 -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go deleted file mode 100644 index 7d902b6847..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2019 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 linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64 - -package cpu - -func doinit() {} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go deleted file mode 100644 index 197188e67f..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go +++ /dev/null @@ -1,30 +0,0 @@ -// 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 linux && (ppc64 || ppc64le) - -package cpu - -// HWCAP/HWCAP2 bits. These are exposed by the kernel. -const ( - // ISA Level - _PPC_FEATURE2_ARCH_2_07 = 0x80000000 - _PPC_FEATURE2_ARCH_3_00 = 0x00800000 - - // CPU features - _PPC_FEATURE2_DARN = 0x00200000 - _PPC_FEATURE2_SCV = 0x00100000 -) - -func doinit() { - // HWCAP2 feature bits - PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07) - PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00) - PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN) - PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV) -} - -func isSet(hwc uint, value uint) bool { - return hwc&value != 0 -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go deleted file mode 100644 index cb4a0c5728..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2024 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 cpu - -import ( - "syscall" - "unsafe" -) - -// RISC-V extension discovery code for Linux. The approach here is to first try the riscv_hwprobe -// syscall falling back to HWCAP to check for the C extension if riscv_hwprobe is not available. -// -// A note on detection of the Vector extension using HWCAP. -// -// Support for the Vector extension version 1.0 was added to the Linux kernel in release 6.5. -// Support for the riscv_hwprobe syscall was added in 6.4. It follows that if the riscv_hwprobe -// syscall is not available then neither is the Vector extension (which needs kernel support). -// The riscv_hwprobe syscall should then be all we need to detect the Vector extension. -// However, some RISC-V board manufacturers ship boards with an older kernel on top of which -// they have back-ported various versions of the Vector extension patches but not the riscv_hwprobe -// patches. These kernels advertise support for the Vector extension using HWCAP. Falling -// back to HWCAP to detect the Vector extension, if riscv_hwprobe is not available, or simply not -// bothering with riscv_hwprobe at all and just using HWCAP may then seem like an attractive option. -// -// Unfortunately, simply checking the 'V' bit in AT_HWCAP will not work as this bit is used by -// RISC-V board and cloud instance providers to mean different things. The Lichee Pi 4A board -// and the Scaleway RV1 cloud instances use the 'V' bit to advertise their support for the unratified -// 0.7.1 version of the Vector Specification. The Banana Pi BPI-F3 and the CanMV-K230 board use -// it to advertise support for 1.0 of the Vector extension. Versions 0.7.1 and 1.0 of the Vector -// extension are binary incompatible. HWCAP can then not be used in isolation to populate the -// HasV field as this field indicates that the underlying CPU is compatible with RVV 1.0. -// -// There is a way at runtime to distinguish between versions 0.7.1 and 1.0 of the Vector -// specification by issuing a RVV 1.0 vsetvli instruction and checking the vill bit of the vtype -// register. This check would allow us to safely detect version 1.0 of the Vector extension -// with HWCAP, if riscv_hwprobe were not available. However, the check cannot -// be added until the assembler supports the Vector instructions. -// -// Note the riscv_hwprobe syscall does not suffer from these ambiguities by design as all of the -// extensions it advertises support for are explicitly versioned. It's also worth noting that -// the riscv_hwprobe syscall is the only way to detect multi-letter RISC-V extensions, e.g., Zba. -// These cannot be detected using HWCAP and so riscv_hwprobe must be used to detect the majority -// of RISC-V extensions. -// -// Please see https://docs.kernel.org/arch/riscv/hwprobe.html for more information. - -// golang.org/x/sys/cpu is not allowed to depend on golang.org/x/sys/unix so we must -// reproduce the constants, types and functions needed to make the riscv_hwprobe syscall -// here. - -const ( - // Copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go. - riscv_HWPROBE_KEY_IMA_EXT_0 = 0x4 - riscv_HWPROBE_IMA_C = 0x2 - riscv_HWPROBE_IMA_V = 0x4 - riscv_HWPROBE_EXT_ZBA = 0x8 - riscv_HWPROBE_EXT_ZBB = 0x10 - riscv_HWPROBE_EXT_ZBS = 0x20 - riscv_HWPROBE_KEY_CPUPERF_0 = 0x5 - riscv_HWPROBE_MISALIGNED_FAST = 0x3 - riscv_HWPROBE_MISALIGNED_MASK = 0x7 -) - -const ( - // sys_RISCV_HWPROBE is copied from golang.org/x/sys/unix/zsysnum_linux_riscv64.go. - sys_RISCV_HWPROBE = 258 -) - -// riscvHWProbePairs is copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go. -type riscvHWProbePairs struct { - key int64 - value uint64 -} - -const ( - // CPU features - hwcap_RISCV_ISA_C = 1 << ('C' - 'A') -) - -func doinit() { - // A slice of key/value pair structures is passed to the RISCVHWProbe syscall. The key - // field should be initialised with one of the key constants defined above, e.g., - // RISCV_HWPROBE_KEY_IMA_EXT_0. The syscall will set the value field to the appropriate value. - // If the kernel does not recognise a key it will set the key field to -1 and the value field to 0. - - pairs := []riscvHWProbePairs{ - {riscv_HWPROBE_KEY_IMA_EXT_0, 0}, - {riscv_HWPROBE_KEY_CPUPERF_0, 0}, - } - - // This call only indicates that extensions are supported if they are implemented on all cores. - if riscvHWProbe(pairs, 0) { - if pairs[0].key != -1 { - v := uint(pairs[0].value) - RISCV64.HasC = isSet(v, riscv_HWPROBE_IMA_C) - RISCV64.HasV = isSet(v, riscv_HWPROBE_IMA_V) - RISCV64.HasZba = isSet(v, riscv_HWPROBE_EXT_ZBA) - RISCV64.HasZbb = isSet(v, riscv_HWPROBE_EXT_ZBB) - RISCV64.HasZbs = isSet(v, riscv_HWPROBE_EXT_ZBS) - } - if pairs[1].key != -1 { - v := pairs[1].value & riscv_HWPROBE_MISALIGNED_MASK - RISCV64.HasFastMisaligned = v == riscv_HWPROBE_MISALIGNED_FAST - } - } - - // Let's double check with HWCAP if the C extension does not appear to be supported. - // This may happen if we're running on a kernel older than 6.4. - - if !RISCV64.HasC { - RISCV64.HasC = isSet(hwCap, hwcap_RISCV_ISA_C) - } -} - -func isSet(hwc uint, value uint) bool { - return hwc&value != 0 -} - -// riscvHWProbe is a simplified version of the generated wrapper function found in -// golang.org/x/sys/unix/zsyscall_linux_riscv64.go. We simplify it by removing the -// cpuCount and cpus parameters which we do not need. We always want to pass 0 for -// these parameters here so the kernel only reports the extensions that are present -// on all cores. -func riscvHWProbe(pairs []riscvHWProbePairs, flags uint) bool { - var _zero uintptr - var p0 unsafe.Pointer - if len(pairs) > 0 { - p0 = unsafe.Pointer(&pairs[0]) - } else { - p0 = unsafe.Pointer(&_zero) - } - - _, _, e1 := syscall.Syscall6(sys_RISCV_HWPROBE, uintptr(p0), uintptr(len(pairs)), uintptr(0), uintptr(0), uintptr(flags), 0) - return e1 == 0 -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go deleted file mode 100644 index 1517ac61d3..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2019 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 cpu - -const ( - // bit mask values from /usr/include/bits/hwcap.h - hwcap_ZARCH = 2 - hwcap_STFLE = 4 - hwcap_MSA = 8 - hwcap_LDISP = 16 - hwcap_EIMM = 32 - hwcap_DFP = 64 - hwcap_ETF3EH = 256 - hwcap_VX = 2048 - hwcap_VXE = 8192 -) - -func initS390Xbase() { - // test HWCAP bit vector - has := func(featureMask uint) bool { - return hwCap&featureMask == featureMask - } - - // mandatory - S390X.HasZARCH = has(hwcap_ZARCH) - - // optional - S390X.HasSTFLE = has(hwcap_STFLE) - S390X.HasLDISP = has(hwcap_LDISP) - S390X.HasEIMM = has(hwcap_EIMM) - S390X.HasETF3EH = has(hwcap_ETF3EH) - S390X.HasDFP = has(hwcap_DFP) - S390X.HasMSA = has(hwcap_MSA) - S390X.HasVX = has(hwcap_VX) - if S390X.HasVX { - S390X.HasVXE = has(hwcap_VXE) - } -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_loong64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_loong64.go deleted file mode 100644 index 558635850c..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_loong64.go +++ /dev/null @@ -1,12 +0,0 @@ -// 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. - -//go:build loong64 - -package cpu - -const cacheLineSize = 64 - -func initOptions() { -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_mips64x.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_mips64x.go deleted file mode 100644 index fedb00cc4c..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_mips64x.go +++ /dev/null @@ -1,15 +0,0 @@ -// 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 mips64 || mips64le - -package cpu - -const cacheLineSize = 32 - -func initOptions() { - options = []option{ - {Name: "msa", Feature: &MIPS64X.HasMSA}, - } -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_mipsx.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_mipsx.go deleted file mode 100644 index ffb4ec7eb3..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_mipsx.go +++ /dev/null @@ -1,11 +0,0 @@ -// 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 mips || mipsle - -package cpu - -const cacheLineSize = 32 - -func initOptions() {} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go deleted file mode 100644 index ebfb3fc8e7..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2020 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 cpu - -import ( - "syscall" - "unsafe" -) - -// Minimal copy of functionality from x/sys/unix so the cpu package can call -// sysctl without depending on x/sys/unix. - -const ( - _CTL_QUERY = -2 - - _SYSCTL_VERS_1 = 0x1000000 -) - -var _zero uintptr - -func sysctl(mib []int32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - _, _, errno := syscall.Syscall6( - syscall.SYS___SYSCTL, - uintptr(_p0), - uintptr(len(mib)), - uintptr(unsafe.Pointer(old)), - uintptr(unsafe.Pointer(oldlen)), - uintptr(unsafe.Pointer(new)), - uintptr(newlen)) - if errno != 0 { - return errno - } - return nil -} - -type sysctlNode struct { - Flags uint32 - Num int32 - Name [32]int8 - Ver uint32 - __rsvd uint32 - Un [16]byte - _sysctl_size [8]byte - _sysctl_func [8]byte - _sysctl_parent [8]byte - _sysctl_desc [8]byte -} - -func sysctlNodes(mib []int32) ([]sysctlNode, error) { - var olen uintptr - - // Get a list of all sysctl nodes below the given MIB by performing - // a sysctl for the given MIB with CTL_QUERY appended. - mib = append(mib, _CTL_QUERY) - qnode := sysctlNode{Flags: _SYSCTL_VERS_1} - qp := (*byte)(unsafe.Pointer(&qnode)) - sz := unsafe.Sizeof(qnode) - if err := sysctl(mib, nil, &olen, qp, sz); err != nil { - return nil, err - } - - // Now that we know the size, get the actual nodes. - nodes := make([]sysctlNode, olen/sz) - np := (*byte)(unsafe.Pointer(&nodes[0])) - if err := sysctl(mib, np, &olen, qp, sz); err != nil { - return nil, err - } - - return nodes, nil -} - -func nametomib(name string) ([]int32, error) { - // Split name into components. - var parts []string - last := 0 - for i := 0; i < len(name); i++ { - if name[i] == '.' { - parts = append(parts, name[last:i]) - last = i + 1 - } - } - parts = append(parts, name[last:]) - - mib := []int32{} - // Discover the nodes and construct the MIB OID. - for partno, part := range parts { - nodes, err := sysctlNodes(mib) - if err != nil { - return nil, err - } - for _, node := range nodes { - n := make([]byte, 0) - for i := range node.Name { - if node.Name[i] != 0 { - n = append(n, byte(node.Name[i])) - } - } - if string(n) == part { - mib = append(mib, int32(node.Num)) - break - } - } - if len(mib) != partno+1 { - return nil, err - } - } - - return mib, nil -} - -// aarch64SysctlCPUID is struct aarch64_sysctl_cpu_id from NetBSD's -type aarch64SysctlCPUID struct { - midr uint64 /* Main ID Register */ - revidr uint64 /* Revision ID Register */ - mpidr uint64 /* Multiprocessor Affinity Register */ - aa64dfr0 uint64 /* A64 Debug Feature Register 0 */ - aa64dfr1 uint64 /* A64 Debug Feature Register 1 */ - aa64isar0 uint64 /* A64 Instruction Set Attribute Register 0 */ - aa64isar1 uint64 /* A64 Instruction Set Attribute Register 1 */ - aa64mmfr0 uint64 /* A64 Memory Model Feature Register 0 */ - aa64mmfr1 uint64 /* A64 Memory Model Feature Register 1 */ - aa64mmfr2 uint64 /* A64 Memory Model Feature Register 2 */ - aa64pfr0 uint64 /* A64 Processor Feature Register 0 */ - aa64pfr1 uint64 /* A64 Processor Feature Register 1 */ - aa64zfr0 uint64 /* A64 SVE Feature ID Register 0 */ - mvfr0 uint32 /* Media and VFP Feature Register 0 */ - mvfr1 uint32 /* Media and VFP Feature Register 1 */ - mvfr2 uint32 /* Media and VFP Feature Register 2 */ - pad uint32 - clidr uint64 /* Cache Level ID Register */ - ctr uint64 /* Cache Type Register */ -} - -func sysctlCPUID(name string) (*aarch64SysctlCPUID, error) { - mib, err := nametomib(name) - if err != nil { - return nil, err - } - - out := aarch64SysctlCPUID{} - n := unsafe.Sizeof(out) - _, _, errno := syscall.Syscall6( - syscall.SYS___SYSCTL, - uintptr(unsafe.Pointer(&mib[0])), - uintptr(len(mib)), - uintptr(unsafe.Pointer(&out)), - uintptr(unsafe.Pointer(&n)), - uintptr(0), - uintptr(0)) - if errno != 0 { - return nil, errno - } - return &out, nil -} - -func doinit() { - cpuid, err := sysctlCPUID("machdep.cpu0.cpu_id") - if err != nil { - setMinimalFeatures() - return - } - parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64pfr0) - - Initialized = true -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go deleted file mode 100644 index 85b64d5ccb..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go +++ /dev/null @@ -1,65 +0,0 @@ -// 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 cpu - -import ( - "syscall" - "unsafe" -) - -// Minimal copy of functionality from x/sys/unix so the cpu package can call -// sysctl without depending on x/sys/unix. - -const ( - // From OpenBSD's sys/sysctl.h. - _CTL_MACHDEP = 7 - - // From OpenBSD's machine/cpu.h. - _CPU_ID_AA64ISAR0 = 2 - _CPU_ID_AA64ISAR1 = 3 -) - -// Implemented in the runtime package (runtime/sys_openbsd3.go) -func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) - -//go:linkname syscall_syscall6 syscall.syscall6 - -func sysctl(mib []uint32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { - _, _, errno := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(unsafe.Pointer(&mib[0])), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) - if errno != 0 { - return errno - } - return nil -} - -var libc_sysctl_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_sysctl sysctl "libc.so" - -func sysctlUint64(mib []uint32) (uint64, bool) { - var out uint64 - nout := unsafe.Sizeof(out) - if err := sysctl(mib, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); err != nil { - return 0, false - } - return out, true -} - -func doinit() { - setMinimalFeatures() - - // Get ID_AA64ISAR0 and ID_AA64ISAR1 from sysctl. - isar0, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64ISAR0}) - if !ok { - return - } - isar1, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64ISAR1}) - if !ok { - return - } - parseARM64SystemRegisters(isar0, isar1, 0) - - Initialized = true -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s b/go-controller/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s deleted file mode 100644 index 054ba05d60..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -#include "textflag.h" - -TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_sysctl(SB) - -GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 -DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_arm.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_arm.go deleted file mode 100644 index e9ecf2a456..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_arm.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2020 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 !linux && arm - -package cpu - -func archInit() {} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go deleted file mode 100644 index 89608fba27..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go +++ /dev/null @@ -1,12 +0,0 @@ -// 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. - -//go:build !aix && !linux && (ppc64 || ppc64le) - -package cpu - -func archInit() { - PPC64.IsPOWER8 = true - Initialized = true -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go deleted file mode 100644 index 5ab87808f7..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -//go:build !linux && riscv64 - -package cpu - -func archInit() { - Initialized = true -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_x86.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_x86.go deleted file mode 100644 index a0fd7e2f75..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_x86.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2024 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 386 || amd64p32 || (amd64 && (!darwin || !gc)) - -package cpu - -func darwinSupportsAVX512() bool { - panic("only implemented for gc && amd64 && darwin") -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go deleted file mode 100644 index c14f12b149..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2020 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 ppc64 || ppc64le - -package cpu - -const cacheLineSize = 128 - -func initOptions() { - options = []option{ - {Name: "darn", Feature: &PPC64.HasDARN}, - {Name: "scv", Feature: &PPC64.HasSCV}, - } -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_riscv64.go deleted file mode 100644 index aca3199c91..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2019 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 riscv64 - -package cpu - -const cacheLineSize = 64 - -func initOptions() { - options = []option{ - {Name: "fastmisaligned", Feature: &RISCV64.HasFastMisaligned}, - {Name: "c", Feature: &RISCV64.HasC}, - {Name: "v", Feature: &RISCV64.HasV}, - {Name: "zba", Feature: &RISCV64.HasZba}, - {Name: "zbb", Feature: &RISCV64.HasZbb}, - {Name: "zbs", Feature: &RISCV64.HasZbs}, - } -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_s390x.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_s390x.go deleted file mode 100644 index 5881b8833f..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_s390x.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2020 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 cpu - -const cacheLineSize = 256 - -func initOptions() { - options = []option{ - {Name: "zarch", Feature: &S390X.HasZARCH, Required: true}, - {Name: "stfle", Feature: &S390X.HasSTFLE, Required: true}, - {Name: "ldisp", Feature: &S390X.HasLDISP, Required: true}, - {Name: "eimm", Feature: &S390X.HasEIMM, Required: true}, - {Name: "dfp", Feature: &S390X.HasDFP}, - {Name: "etf3eh", Feature: &S390X.HasETF3EH}, - {Name: "msa", Feature: &S390X.HasMSA}, - {Name: "aes", Feature: &S390X.HasAES}, - {Name: "aescbc", Feature: &S390X.HasAESCBC}, - {Name: "aesctr", Feature: &S390X.HasAESCTR}, - {Name: "aesgcm", Feature: &S390X.HasAESGCM}, - {Name: "ghash", Feature: &S390X.HasGHASH}, - {Name: "sha1", Feature: &S390X.HasSHA1}, - {Name: "sha256", Feature: &S390X.HasSHA256}, - {Name: "sha3", Feature: &S390X.HasSHA3}, - {Name: "sha512", Feature: &S390X.HasSHA512}, - {Name: "vx", Feature: &S390X.HasVX}, - {Name: "vxe", Feature: &S390X.HasVXE}, - } -} - -// bitIsSet reports whether the bit at index is set. The bit index -// is in big endian order, so bit index 0 is the leftmost bit. -func bitIsSet(bits []uint64, index uint) bool { - return bits[index/64]&((1<<63)>>(index%64)) != 0 -} - -// facility is a bit index for the named facility. -type facility uint8 - -const ( - // mandatory facilities - zarch facility = 1 // z architecture mode is active - stflef facility = 7 // store-facility-list-extended - ldisp facility = 18 // long-displacement - eimm facility = 21 // extended-immediate - - // miscellaneous facilities - dfp facility = 42 // decimal-floating-point - etf3eh facility = 30 // extended-translation 3 enhancement - - // cryptography facilities - msa facility = 17 // message-security-assist - msa3 facility = 76 // message-security-assist extension 3 - msa4 facility = 77 // message-security-assist extension 4 - msa5 facility = 57 // message-security-assist extension 5 - msa8 facility = 146 // message-security-assist extension 8 - msa9 facility = 155 // message-security-assist extension 9 - - // vector facilities - vx facility = 129 // vector facility - vxe facility = 135 // vector-enhancements 1 - vxe2 facility = 148 // vector-enhancements 2 -) - -// facilityList contains the result of an STFLE call. -// Bits are numbered in big endian order so the -// leftmost bit (the MSB) is at index 0. -type facilityList struct { - bits [4]uint64 -} - -// Has reports whether the given facilities are present. -func (s *facilityList) Has(fs ...facility) bool { - if len(fs) == 0 { - panic("no facility bits provided") - } - for _, f := range fs { - if !bitIsSet(s.bits[:], uint(f)) { - return false - } - } - return true -} - -// function is the code for the named cryptographic function. -type function uint8 - -const ( - // KM{,A,C,CTR} function codes - aes128 function = 18 // AES-128 - aes192 function = 19 // AES-192 - aes256 function = 20 // AES-256 - - // K{I,L}MD function codes - sha1 function = 1 // SHA-1 - sha256 function = 2 // SHA-256 - sha512 function = 3 // SHA-512 - sha3_224 function = 32 // SHA3-224 - sha3_256 function = 33 // SHA3-256 - sha3_384 function = 34 // SHA3-384 - sha3_512 function = 35 // SHA3-512 - shake128 function = 36 // SHAKE-128 - shake256 function = 37 // SHAKE-256 - - // KLMD function codes - ghash function = 65 // GHASH -) - -// queryResult contains the result of a Query function -// call. Bits are numbered in big endian order so the -// leftmost bit (the MSB) is at index 0. -type queryResult struct { - bits [2]uint64 -} - -// Has reports whether the given functions are present. -func (q *queryResult) Has(fns ...function) bool { - if len(fns) == 0 { - panic("no function codes provided") - } - for _, f := range fns { - if !bitIsSet(q.bits[:], uint(f)) { - return false - } - } - return true -} - -func doinit() { - initS390Xbase() - - // We need implementations of stfle, km and so on - // to detect cryptographic features. - if !haveAsmFunctions() { - return - } - - // optional cryptographic functions - if S390X.HasMSA { - aes := []function{aes128, aes192, aes256} - - // cipher message - km, kmc := kmQuery(), kmcQuery() - S390X.HasAES = km.Has(aes...) - S390X.HasAESCBC = kmc.Has(aes...) - if S390X.HasSTFLE { - facilities := stfle() - if facilities.Has(msa4) { - kmctr := kmctrQuery() - S390X.HasAESCTR = kmctr.Has(aes...) - } - if facilities.Has(msa8) { - kma := kmaQuery() - S390X.HasAESGCM = kma.Has(aes...) - } - } - - // compute message digest - kimd := kimdQuery() // intermediate (no padding) - klmd := klmdQuery() // last (padding) - S390X.HasSHA1 = kimd.Has(sha1) && klmd.Has(sha1) - S390X.HasSHA256 = kimd.Has(sha256) && klmd.Has(sha256) - S390X.HasSHA512 = kimd.Has(sha512) && klmd.Has(sha512) - S390X.HasGHASH = kimd.Has(ghash) // KLMD-GHASH does not exist - sha3 := []function{ - sha3_224, sha3_256, sha3_384, sha3_512, - shake128, shake256, - } - S390X.HasSHA3 = kimd.Has(sha3...) && klmd.Has(sha3...) - } -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_s390x.s b/go-controller/vendor/golang.org/x/sys/cpu/cpu_s390x.s deleted file mode 100644 index 1fb4b70133..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_s390x.s +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2019 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 gc - -#include "textflag.h" - -// func stfle() facilityList -TEXT ·stfle(SB), NOSPLIT|NOFRAME, $0-32 - MOVD $ret+0(FP), R1 - MOVD $3, R0 // last doubleword index to store - XC $32, (R1), (R1) // clear 4 doublewords (32 bytes) - WORD $0xb2b01000 // store facility list extended (STFLE) - RET - -// func kmQuery() queryResult -TEXT ·kmQuery(SB), NOSPLIT|NOFRAME, $0-16 - MOVD $0, R0 // set function code to 0 (KM-Query) - MOVD $ret+0(FP), R1 // address of 16-byte return value - WORD $0xB92E0024 // cipher message (KM) - RET - -// func kmcQuery() queryResult -TEXT ·kmcQuery(SB), NOSPLIT|NOFRAME, $0-16 - MOVD $0, R0 // set function code to 0 (KMC-Query) - MOVD $ret+0(FP), R1 // address of 16-byte return value - WORD $0xB92F0024 // cipher message with chaining (KMC) - RET - -// func kmctrQuery() queryResult -TEXT ·kmctrQuery(SB), NOSPLIT|NOFRAME, $0-16 - MOVD $0, R0 // set function code to 0 (KMCTR-Query) - MOVD $ret+0(FP), R1 // address of 16-byte return value - WORD $0xB92D4024 // cipher message with counter (KMCTR) - RET - -// func kmaQuery() queryResult -TEXT ·kmaQuery(SB), NOSPLIT|NOFRAME, $0-16 - MOVD $0, R0 // set function code to 0 (KMA-Query) - MOVD $ret+0(FP), R1 // address of 16-byte return value - WORD $0xb9296024 // cipher message with authentication (KMA) - RET - -// func kimdQuery() queryResult -TEXT ·kimdQuery(SB), NOSPLIT|NOFRAME, $0-16 - MOVD $0, R0 // set function code to 0 (KIMD-Query) - MOVD $ret+0(FP), R1 // address of 16-byte return value - WORD $0xB93E0024 // compute intermediate message digest (KIMD) - RET - -// func klmdQuery() queryResult -TEXT ·klmdQuery(SB), NOSPLIT|NOFRAME, $0-16 - MOVD $0, R0 // set function code to 0 (KLMD-Query) - MOVD $ret+0(FP), R1 // address of 16-byte return value - WORD $0xB93F0024 // compute last message digest (KLMD) - RET diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_wasm.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_wasm.go deleted file mode 100644 index 384787ea30..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_wasm.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2019 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 wasm - -package cpu - -// We're compiling the cpu package for an unknown (software-abstracted) CPU. -// Make CacheLinePad an empty struct and hope that the usual struct alignment -// rules are good enough. - -const cacheLineSize = 0 - -func initOptions() {} - -func archInit() {} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_x86.go b/go-controller/vendor/golang.org/x/sys/cpu/cpu_x86.go deleted file mode 100644 index 1e642f3304..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_x86.go +++ /dev/null @@ -1,162 +0,0 @@ -// 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 386 || amd64 || amd64p32 - -package cpu - -import "runtime" - -const cacheLineSize = 64 - -func initOptions() { - options = []option{ - {Name: "adx", Feature: &X86.HasADX}, - {Name: "aes", Feature: &X86.HasAES}, - {Name: "avx", Feature: &X86.HasAVX}, - {Name: "avx2", Feature: &X86.HasAVX2}, - {Name: "avx512", Feature: &X86.HasAVX512}, - {Name: "avx512f", Feature: &X86.HasAVX512F}, - {Name: "avx512cd", Feature: &X86.HasAVX512CD}, - {Name: "avx512er", Feature: &X86.HasAVX512ER}, - {Name: "avx512pf", Feature: &X86.HasAVX512PF}, - {Name: "avx512vl", Feature: &X86.HasAVX512VL}, - {Name: "avx512bw", Feature: &X86.HasAVX512BW}, - {Name: "avx512dq", Feature: &X86.HasAVX512DQ}, - {Name: "avx512ifma", Feature: &X86.HasAVX512IFMA}, - {Name: "avx512vbmi", Feature: &X86.HasAVX512VBMI}, - {Name: "avx512vnniw", Feature: &X86.HasAVX5124VNNIW}, - {Name: "avx5124fmaps", Feature: &X86.HasAVX5124FMAPS}, - {Name: "avx512vpopcntdq", Feature: &X86.HasAVX512VPOPCNTDQ}, - {Name: "avx512vpclmulqdq", Feature: &X86.HasAVX512VPCLMULQDQ}, - {Name: "avx512vnni", Feature: &X86.HasAVX512VNNI}, - {Name: "avx512gfni", Feature: &X86.HasAVX512GFNI}, - {Name: "avx512vaes", Feature: &X86.HasAVX512VAES}, - {Name: "avx512vbmi2", Feature: &X86.HasAVX512VBMI2}, - {Name: "avx512bitalg", Feature: &X86.HasAVX512BITALG}, - {Name: "avx512bf16", Feature: &X86.HasAVX512BF16}, - {Name: "amxtile", Feature: &X86.HasAMXTile}, - {Name: "amxint8", Feature: &X86.HasAMXInt8}, - {Name: "amxbf16", Feature: &X86.HasAMXBF16}, - {Name: "bmi1", Feature: &X86.HasBMI1}, - {Name: "bmi2", Feature: &X86.HasBMI2}, - {Name: "cx16", Feature: &X86.HasCX16}, - {Name: "erms", Feature: &X86.HasERMS}, - {Name: "fma", Feature: &X86.HasFMA}, - {Name: "osxsave", Feature: &X86.HasOSXSAVE}, - {Name: "pclmulqdq", Feature: &X86.HasPCLMULQDQ}, - {Name: "popcnt", Feature: &X86.HasPOPCNT}, - {Name: "rdrand", Feature: &X86.HasRDRAND}, - {Name: "rdseed", Feature: &X86.HasRDSEED}, - {Name: "sse3", Feature: &X86.HasSSE3}, - {Name: "sse41", Feature: &X86.HasSSE41}, - {Name: "sse42", Feature: &X86.HasSSE42}, - {Name: "ssse3", Feature: &X86.HasSSSE3}, - {Name: "avxifma", Feature: &X86.HasAVXIFMA}, - {Name: "avxvnni", Feature: &X86.HasAVXVNNI}, - {Name: "avxvnniint8", Feature: &X86.HasAVXVNNIInt8}, - - // These capabilities should always be enabled on amd64: - {Name: "sse2", Feature: &X86.HasSSE2, Required: runtime.GOARCH == "amd64"}, - } -} - -func archInit() { - - Initialized = true - - maxID, _, _, _ := cpuid(0, 0) - - if maxID < 1 { - return - } - - _, _, ecx1, edx1 := cpuid(1, 0) - X86.HasSSE2 = isSet(26, edx1) - - X86.HasSSE3 = isSet(0, ecx1) - X86.HasPCLMULQDQ = isSet(1, ecx1) - X86.HasSSSE3 = isSet(9, ecx1) - X86.HasFMA = isSet(12, ecx1) - X86.HasCX16 = isSet(13, ecx1) - X86.HasSSE41 = isSet(19, ecx1) - X86.HasSSE42 = isSet(20, ecx1) - X86.HasPOPCNT = isSet(23, ecx1) - X86.HasAES = isSet(25, ecx1) - X86.HasOSXSAVE = isSet(27, ecx1) - X86.HasRDRAND = isSet(30, ecx1) - - var osSupportsAVX, osSupportsAVX512 bool - // For XGETBV, OSXSAVE bit is required and sufficient. - if X86.HasOSXSAVE { - eax, _ := xgetbv() - // Check if XMM and YMM registers have OS support. - osSupportsAVX = isSet(1, eax) && isSet(2, eax) - - if runtime.GOOS == "darwin" { - // Darwin requires special AVX512 checks, see cpu_darwin_x86.go - osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512() - } else { - // Check if OPMASK and ZMM registers have OS support. - osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax) - } - } - - X86.HasAVX = isSet(28, ecx1) && osSupportsAVX - - if maxID < 7 { - return - } - - eax7, ebx7, ecx7, edx7 := cpuid(7, 0) - X86.HasBMI1 = isSet(3, ebx7) - X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX - X86.HasBMI2 = isSet(8, ebx7) - X86.HasERMS = isSet(9, ebx7) - X86.HasRDSEED = isSet(18, ebx7) - X86.HasADX = isSet(19, ebx7) - - X86.HasAVX512 = isSet(16, ebx7) && osSupportsAVX512 // Because avx-512 foundation is the core required extension - if X86.HasAVX512 { - X86.HasAVX512F = true - X86.HasAVX512CD = isSet(28, ebx7) - X86.HasAVX512ER = isSet(27, ebx7) - X86.HasAVX512PF = isSet(26, ebx7) - X86.HasAVX512VL = isSet(31, ebx7) - X86.HasAVX512BW = isSet(30, ebx7) - X86.HasAVX512DQ = isSet(17, ebx7) - X86.HasAVX512IFMA = isSet(21, ebx7) - X86.HasAVX512VBMI = isSet(1, ecx7) - X86.HasAVX5124VNNIW = isSet(2, edx7) - X86.HasAVX5124FMAPS = isSet(3, edx7) - X86.HasAVX512VPOPCNTDQ = isSet(14, ecx7) - X86.HasAVX512VPCLMULQDQ = isSet(10, ecx7) - X86.HasAVX512VNNI = isSet(11, ecx7) - X86.HasAVX512GFNI = isSet(8, ecx7) - X86.HasAVX512VAES = isSet(9, ecx7) - X86.HasAVX512VBMI2 = isSet(6, ecx7) - X86.HasAVX512BITALG = isSet(12, ecx7) - } - - X86.HasAMXTile = isSet(24, edx7) - X86.HasAMXInt8 = isSet(25, edx7) - X86.HasAMXBF16 = isSet(22, edx7) - - // These features depend on the second level of extended features. - if eax7 >= 1 { - eax71, _, _, edx71 := cpuid(7, 1) - if X86.HasAVX512 { - X86.HasAVX512BF16 = isSet(5, eax71) - } - if X86.HasAVX { - X86.HasAVXIFMA = isSet(23, eax71) - X86.HasAVXVNNI = isSet(4, eax71) - X86.HasAVXVNNIInt8 = isSet(4, edx71) - } - } -} - -func isSet(bitpos uint, value uint32) bool { - return value&(1<> 63)) -) - -// For those platforms don't have a 'cpuid' equivalent we use HWCAP/HWCAP2 -// These are initialized in cpu_$GOARCH.go -// and should not be changed after they are initialized. -var hwCap uint -var hwCap2 uint - -func readHWCAP() error { - // For Go 1.21+, get auxv from the Go runtime. - if a := getAuxv(); len(a) > 0 { - for len(a) >= 2 { - tag, val := a[0], uint(a[1]) - a = a[2:] - switch tag { - case _AT_HWCAP: - hwCap = val - case _AT_HWCAP2: - hwCap2 = val - } - } - return nil - } - - buf, err := os.ReadFile(procAuxv) - if err != nil { - // e.g. on android /proc/self/auxv is not accessible, so silently - // ignore the error and leave Initialized = false. On some - // architectures (e.g. arm64) doinit() implements a fallback - // readout and will set Initialized = true again. - return err - } - bo := hostByteOrder() - for len(buf) >= 2*(uintSize/8) { - var tag, val uint - switch uintSize { - case 32: - tag = uint(bo.Uint32(buf[0:])) - val = uint(bo.Uint32(buf[4:])) - buf = buf[8:] - case 64: - tag = uint(bo.Uint64(buf[0:])) - val = uint(bo.Uint64(buf[8:])) - buf = buf[16:] - } - switch tag { - case _AT_HWCAP: - hwCap = val - case _AT_HWCAP2: - hwCap2 = val - } - } - return nil -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/parse.go b/go-controller/vendor/golang.org/x/sys/cpu/parse.go deleted file mode 100644 index 762b63d688..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/parse.go +++ /dev/null @@ -1,43 +0,0 @@ -// 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 cpu - -import "strconv" - -// parseRelease parses a dot-separated version number. It follows the semver -// syntax, but allows the minor and patch versions to be elided. -// -// This is a copy of the Go runtime's parseRelease from -// https://golang.org/cl/209597. -func parseRelease(rel string) (major, minor, patch int, ok bool) { - // Strip anything after a dash or plus. - for i := 0; i < len(rel); i++ { - if rel[i] == '-' || rel[i] == '+' { - rel = rel[:i] - break - } - } - - next := func() (int, bool) { - for i := 0; i < len(rel); i++ { - if rel[i] == '.' { - ver, err := strconv.Atoi(rel[:i]) - rel = rel[i+1:] - return ver, err == nil - } - } - ver, err := strconv.Atoi(rel) - rel = "" - return ver, err == nil - } - if major, ok = next(); !ok || rel == "" { - return - } - if minor, ok = next(); !ok || rel == "" { - return - } - patch, ok = next() - return -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go b/go-controller/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go deleted file mode 100644 index 4cd64c7042..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go +++ /dev/null @@ -1,53 +0,0 @@ -// 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. - -//go:build linux && arm64 - -package cpu - -import ( - "errors" - "io" - "os" - "strings" -) - -func readLinuxProcCPUInfo() error { - f, err := os.Open("/proc/cpuinfo") - if err != nil { - return err - } - defer f.Close() - - var buf [1 << 10]byte // enough for first CPU - n, err := io.ReadFull(f, buf[:]) - if err != nil && err != io.ErrUnexpectedEOF { - return err - } - in := string(buf[:n]) - const features = "\nFeatures : " - i := strings.Index(in, features) - if i == -1 { - return errors.New("no CPU features found") - } - in = in[i+len(features):] - if i := strings.Index(in, "\n"); i != -1 { - in = in[:i] - } - m := map[string]*bool{} - - initOptions() // need it early here; it's harmless to call twice - for _, o := range options { - m[o.Name] = o.Feature - } - // The EVTSTRM field has alias "evstrm" in Go, but Linux calls it "evtstrm". - m["evtstrm"] = &ARM64.HasEVTSTRM - - for _, f := range strings.Fields(in) { - if p, ok := m[f]; ok { - *p = true - } - } - return nil -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/runtime_auxv.go b/go-controller/vendor/golang.org/x/sys/cpu/runtime_auxv.go deleted file mode 100644 index 5f92ac9a2e..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/runtime_auxv.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2023 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 cpu - -// getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init) -// on platforms that use auxv. -var getAuxvFn func() []uintptr - -func getAuxv() []uintptr { - if getAuxvFn == nil { - return nil - } - return getAuxvFn() -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go b/go-controller/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go deleted file mode 100644 index 4c9788ea8e..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2023 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 go1.21 - -package cpu - -import ( - _ "unsafe" // for linkname -) - -//go:linkname runtime_getAuxv runtime.getAuxv -func runtime_getAuxv() []uintptr - -func init() { - getAuxvFn = runtime_getAuxv -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/go-controller/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go deleted file mode 100644 index 1b9ccb091a..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2020 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. - -// Recreate a getsystemcfg syscall handler instead of -// using the one provided by x/sys/unix to avoid having -// the dependency between them. (See golang.org/issue/32102) -// Moreover, this file will be used during the building of -// gccgo's libgo and thus must not used a CGo method. - -//go:build aix && gccgo - -package cpu - -import ( - "syscall" -) - -//extern getsystemcfg -func gccgoGetsystemcfg(label uint32) (r uint64) - -func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) { - r1 = uintptr(gccgoGetsystemcfg(uint32(label))) - e1 = syscall.GetErrno() - return -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go b/go-controller/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go deleted file mode 100644 index e8b6cdbe9a..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2019 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. - -// Minimal copy of x/sys/unix so the cpu package can make a -// system call on AIX without depending on x/sys/unix. -// (See golang.org/issue/32102) - -//go:build aix && ppc64 && gc - -package cpu - -import ( - "syscall" - "unsafe" -) - -//go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o" - -//go:linkname libc_getsystemcfg libc_getsystemcfg - -type syscallFunc uintptr - -var libc_getsystemcfg syscallFunc - -type errno = syscall.Errno - -// Implemented in runtime/syscall_aix.go. -func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno) -func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno) - -func callgetsystemcfg(label int) (r1 uintptr, e1 errno) { - r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0) - return -} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go b/go-controller/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go deleted file mode 100644 index 4d0888b0c0..0000000000 --- a/go-controller/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2024 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. - -// Minimal copy of x/sys/unix so the cpu package can make a -// system call on Darwin without depending on x/sys/unix. - -//go:build darwin && amd64 && gc - -package cpu - -import ( - "syscall" - "unsafe" -) - -type _C_int int32 - -// adapted from unix.Uname() at x/sys/unix/syscall_darwin.go L419 -func darwinOSRelease(release *[256]byte) error { - // from x/sys/unix/zerrors_openbsd_amd64.go - const ( - CTL_KERN = 0x1 - KERN_OSRELEASE = 0x2 - ) - - mib := []_C_int{CTL_KERN, KERN_OSRELEASE} - n := unsafe.Sizeof(*release) - - return sysctl(mib, &release[0], &n, nil, 0) -} - -type Errno = syscall.Errno - -var _zero uintptr // Single-word zero for use when we need a valid pointer to 0 bytes. - -// from x/sys/unix/zsyscall_darwin_amd64.go L791-807 -func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error { - var _p0 unsafe.Pointer - if len(mib) > 0 { - _p0 = unsafe.Pointer(&mib[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - if _, _, err := syscall_syscall6( - libc_sysctl_trampoline_addr, - uintptr(_p0), - uintptr(len(mib)), - uintptr(unsafe.Pointer(old)), - uintptr(unsafe.Pointer(oldlen)), - uintptr(unsafe.Pointer(new)), - uintptr(newlen), - ); err != 0 { - return err - } - - return nil -} - -var libc_sysctl_trampoline_addr uintptr - -// adapted from internal/cpu/cpu_arm64_darwin.go -func darwinSysctlEnabled(name []byte) bool { - out := int32(0) - nout := unsafe.Sizeof(out) - if ret := sysctlbyname(&name[0], (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); ret != nil { - return false - } - return out > 0 -} - -//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib" - -var libc_sysctlbyname_trampoline_addr uintptr - -// adapted from runtime/sys_darwin.go in the pattern of sysctl() above, as defined in x/sys/unix -func sysctlbyname(name *byte, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error { - if _, _, err := syscall_syscall6( - libc_sysctlbyname_trampoline_addr, - uintptr(unsafe.Pointer(name)), - uintptr(unsafe.Pointer(old)), - uintptr(unsafe.Pointer(oldlen)), - uintptr(unsafe.Pointer(new)), - uintptr(newlen), - 0, - ); err != 0 { - return err - } - - return nil -} - -//go:cgo_import_dynamic libc_sysctlbyname sysctlbyname "/usr/lib/libSystem.B.dylib" - -// Implemented in the runtime package (runtime/sys_darwin.go) -func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) - -//go:linkname syscall_syscall6 syscall.syscall6 diff --git a/go-controller/vendor/google.golang.org/grpc/CONTRIBUTING.md b/go-controller/vendor/google.golang.org/grpc/CONTRIBUTING.md index d9bfa6e1e7..0854d298e4 100644 --- a/go-controller/vendor/google.golang.org/grpc/CONTRIBUTING.md +++ b/go-controller/vendor/google.golang.org/grpc/CONTRIBUTING.md @@ -4,7 +4,7 @@ We definitely welcome your patches and contributions to gRPC! Please read the gR organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md) and [contribution guidelines](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md) before proceeding. -If you are new to GitHub, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/) +If you are new to github, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/) ## Legal requirements @@ -25,8 +25,8 @@ How to get your contributions merged smoothly and quickly. 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 +- 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 @@ -39,12 +39,12 @@ How to get your contributions merged smoothly and quickly. proposal](https://github.com/grpc/proposal). - 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. + and **why** it was made. Link to a github issue if it exists. -- 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 +- 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 diff --git a/go-controller/vendor/google.golang.org/grpc/MAINTAINERS.md b/go-controller/vendor/google.golang.org/grpc/MAINTAINERS.md index 5d4096d46a..6a8a07781a 100644 --- a/go-controller/vendor/google.golang.org/grpc/MAINTAINERS.md +++ b/go-controller/vendor/google.golang.org/grpc/MAINTAINERS.md @@ -9,28 +9,21 @@ for general contribution guidelines. ## Maintainers (in alphabetical order) -- [aranjans](https://github.com/aranjans), Google LLC -- [arjan-bal](https://github.com/arjan-bal), Google LLC -- [arvindbr8](https://github.com/arvindbr8), Google LLC - [atollena](https://github.com/atollena), Datadog, Inc. +- [cesarghali](https://github.com/cesarghali), Google LLC - [dfawley](https://github.com/dfawley), Google LLC - [easwars](https://github.com/easwars), Google LLC -- [erm-g](https://github.com/erm-g), Google LLC -- [gtcooke94](https://github.com/gtcooke94), Google LLC -- [purnesh42h](https://github.com/purnesh42h), Google LLC -- [zasweq](https://github.com/zasweq), Google LLC +- [menghanl](https://github.com/menghanl), Google LLC +- [srini100](https://github.com/srini100), Google LLC ## Emeritus Maintainers (in alphabetical order) -- [adelez](https://github.com/adelez) -- [canguler](https://github.com/canguler) -- [cesarghali](https://github.com/cesarghali) -- [iamqizhao](https://github.com/iamqizhao) -- [jeanbza](https://github.com/jeanbza) -- [jtattermusch](https://github.com/jtattermusch) -- [lyuxuan](https://github.com/lyuxuan) -- [makmukhi](https://github.com/makmukhi) -- [matt-kwong](https://github.com/matt-kwong) -- [menghanl](https://github.com/menghanl) -- [nicolasnoble](https://github.com/nicolasnoble) -- [srini100](https://github.com/srini100) -- [yongni](https://github.com/yongni) +- [adelez](https://github.com/adelez), Google LLC +- [canguler](https://github.com/canguler), Google LLC +- [iamqizhao](https://github.com/iamqizhao), Google LLC +- [jadekler](https://github.com/jadekler), Google LLC +- [jtattermusch](https://github.com/jtattermusch), Google LLC +- [lyuxuan](https://github.com/lyuxuan), Google LLC +- [makmukhi](https://github.com/makmukhi), Google LLC +- [matt-kwong](https://github.com/matt-kwong), Google LLC +- [nicolasnoble](https://github.com/nicolasnoble), Google LLC +- [yongni](https://github.com/yongni), Google LLC diff --git a/go-controller/vendor/google.golang.org/grpc/SECURITY.md b/go-controller/vendor/google.golang.org/grpc/SECURITY.md index abab279379..be6e108705 100644 --- a/go-controller/vendor/google.golang.org/grpc/SECURITY.md +++ b/go-controller/vendor/google.golang.org/grpc/SECURITY.md @@ -1,3 +1,3 @@ # Security Policy -For information on gRPC Security Policy and reporting potential security issues, please see [gRPC CVE Process](https://github.com/grpc/proposal/blob/master/P4-grpc-cve-process.md). +For information on gRPC Security Policy and reporting potentional security issues, please see [gRPC CVE Process](https://github.com/grpc/proposal/blob/master/P4-grpc-cve-process.md). diff --git a/go-controller/vendor/google.golang.org/grpc/backoff/backoff.go b/go-controller/vendor/google.golang.org/grpc/backoff/backoff.go index d7b40b7cb6..0787d0b50c 100644 --- a/go-controller/vendor/google.golang.org/grpc/backoff/backoff.go +++ b/go-controller/vendor/google.golang.org/grpc/backoff/backoff.go @@ -39,7 +39,7 @@ type Config struct { MaxDelay time.Duration } -// DefaultConfig is a backoff configuration with the default values specified +// DefaultConfig is a backoff configuration with the default values specfied // at https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. // // This should be useful for callers who want to configure backoff with diff --git a/go-controller/vendor/google.golang.org/grpc/balancer/balancer.go b/go-controller/vendor/google.golang.org/grpc/balancer/balancer.go index 3a2092f105..f391744f72 100644 --- a/go-controller/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/go-controller/vendor/google.golang.org/grpc/balancer/balancer.go @@ -30,7 +30,6 @@ import ( "google.golang.org/grpc/channelz" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials" - estats "google.golang.org/grpc/experimental/stats" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" "google.golang.org/grpc/metadata" @@ -73,21 +72,8 @@ func unregisterForTesting(name string) { delete(m, name) } -// connectedAddress returns the connected address for a SubConnState. The -// address is only valid if the state is READY. -func connectedAddress(scs SubConnState) resolver.Address { - return scs.connectedAddress -} - -// setConnectedAddress sets the connected address for a SubConnState. -func setConnectedAddress(scs *SubConnState, addr resolver.Address) { - scs.connectedAddress = addr -} - func init() { internal.BalancerUnregister = unregisterForTesting - internal.ConnectedAddress = connectedAddress - internal.SetConnectedAddress = setConnectedAddress } // Get returns the resolver builder registered with the given name. @@ -130,7 +116,7 @@ type SubConn interface { // UpdateAddresses updates the addresses used in this SubConn. // gRPC checks if currently-connected address is still in the new list. // If it's in the list, the connection will be kept. - // If it's not in the list, the connection will gracefully close, and + // If it's not in the list, the connection will gracefully closed, and // a new connection will be created. // // This will trigger a state transition for the SubConn. @@ -142,11 +128,8 @@ type SubConn interface { Connect() // GetOrBuildProducer returns a reference to the existing Producer for this // ProducerBuilder in this SubConn, or, if one does not currently exist, - // creates a new one and returns it. Returns a close function which may be - // called when the Producer is no longer needed. Otherwise the producer - // will automatically be closed upon connection loss or subchannel close. - // Should only be called on a SubConn in state Ready. Otherwise the - // producer will be unable to create streams. + // creates a new one and returns it. Returns a close function which must + // be called when the Producer is no longer needed. GetOrBuildProducer(ProducerBuilder) (p Producer, close func()) // Shutdown shuts down the SubConn gracefully. Any started RPCs will be // allowed to complete. No future calls should be made on the SubConn. @@ -260,10 +243,6 @@ type BuildOptions struct { // same resolver.Target as passed to the resolver. See the documentation for // the resolver.Target type for details about what it contains. Target resolver.Target - // MetricsRecorder is the metrics recorder that balancers can use to record - // metrics. Balancer implementations which do not register metrics on - // metrics registry and record on them can ignore this field. - MetricsRecorder estats.MetricsRecorder } // Builder creates a balancer. @@ -431,9 +410,6 @@ type SubConnState struct { // ConnectionError is set if the ConnectivityState is TransientFailure, // describing the reason the SubConn failed. Otherwise, it is nil. ConnectionError error - // connectedAddr contains the connected address when ConnectivityState is - // Ready. Otherwise, it is indeterminate. - connectedAddress resolver.Address } // ClientConnState describes the state of a ClientConn relevant to the @@ -455,10 +431,8 @@ type ProducerBuilder interface { // Build creates a Producer. The first parameter is always a // grpc.ClientConnInterface (a type to allow creating RPCs/streams on the // associated SubConn), but is declared as `any` to avoid a dependency - // cycle. Build also returns a close function that will be called when all - // references to the Producer have been given up for a SubConn, or when a - // connectivity state change occurs on the SubConn. The close function - // should always block until all asynchronous cleanup work is completed. + // cycle. Should also return a close function that will be called when all + // references to the Producer have been given up. Build(grpcClientConnInterface any) (p Producer, close func()) } diff --git a/go-controller/vendor/google.golang.org/grpc/balancer/base/balancer.go b/go-controller/vendor/google.golang.org/grpc/balancer/base/balancer.go index d5ed172ae6..a7f1eeec8e 100644 --- a/go-controller/vendor/google.golang.org/grpc/balancer/base/balancer.go +++ b/go-controller/vendor/google.golang.org/grpc/balancer/base/balancer.go @@ -36,7 +36,7 @@ type baseBuilder struct { config Config } -func (bb *baseBuilder) Build(cc balancer.ClientConn, _ balancer.BuildOptions) balancer.Balancer { +func (bb *baseBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balancer.Balancer { bal := &baseBalancer{ cc: cc, pickerBuilder: bb.pickerBuilder, @@ -133,7 +133,7 @@ func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) error { } } // If resolver state contains no addresses, return an error so ClientConn - // will trigger re-resolve. Also records this as a resolver error, so when + // will trigger re-resolve. Also records this as an resolver error, so when // the overall state turns transient failure, the error message will have // the zero address information. if len(s.ResolverState.Addresses) == 0 { @@ -259,6 +259,6 @@ type errPicker struct { err error // Pick() always returns this err. } -func (p *errPicker) Pick(balancer.PickInfo) (balancer.PickResult, error) { +func (p *errPicker) Pick(info balancer.PickInfo) (balancer.PickResult, error) { return balancer.PickResult{}, p.err } diff --git a/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/internal/internal.go b/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/internal/internal.go deleted file mode 100644 index c519789458..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/internal/internal.go +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2024 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 internal contains code internal to the pickfirst package. -package internal - -import "math/rand" - -// RandShuffle pseudo-randomizes the order of addresses. -var RandShuffle = rand.Shuffle diff --git a/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go b/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go index e069346a75..07527603f1 100644 --- a/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go +++ b/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go @@ -26,23 +26,18 @@ import ( "math/rand" "google.golang.org/grpc/balancer" - "google.golang.org/grpc/balancer/pickfirst/internal" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/internal/envconfig" + "google.golang.org/grpc/internal" internalgrpclog "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/internal/pretty" "google.golang.org/grpc/resolver" "google.golang.org/grpc/serviceconfig" - - _ "google.golang.org/grpc/balancer/pickfirst/pickfirstleaf" // For automatically registering the new pickfirst if required. ) func init() { - if envconfig.NewPickFirstEnabled { - return - } balancer.Register(pickfirstBuilder{}) + internal.ShuffleAddressListForTesting = func(n int, swap func(i, j int)) { rand.Shuffle(n, swap) } } var logger = grpclog.Component("pick-first-lb") @@ -55,7 +50,7 @@ const ( type pickfirstBuilder struct{} -func (pickfirstBuilder) Build(cc balancer.ClientConn, _ balancer.BuildOptions) balancer.Balancer { +func (pickfirstBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) balancer.Balancer { b := &pickfirstBalancer{cc: cc} b.logger = internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(logPrefix, b)) return b @@ -108,13 +103,10 @@ func (b *pickfirstBalancer) ResolverError(err error) { }) } -// Shuffler is an interface for shuffling an address list. type Shuffler interface { ShuffleAddressListForTesting(n int, swap func(i, j int)) } -// ShuffleAddressListForTesting pseudo-randomizes the order of addresses. n -// is the number of elements. swap swaps the elements with indexes i and j. func ShuffleAddressListForTesting(n int, swap func(i, j int)) { rand.Shuffle(n, swap) } func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState) error { @@ -148,7 +140,7 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState // within each endpoint. - A61 if cfg.ShuffleAddressList { endpoints = append([]resolver.Endpoint{}, endpoints...) - internal.RandShuffle(len(endpoints), func(i, j int) { endpoints[i], endpoints[j] = endpoints[j], endpoints[i] }) + internal.ShuffleAddressListForTesting.(func(int, func(int, int)))(len(endpoints), func(i, j int) { endpoints[i], endpoints[j] = endpoints[j], endpoints[i] }) } // "Flatten the list by concatenating the ordered list of addresses for each @@ -163,7 +155,7 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState // Endpoints not set, process addresses until we migrate resolver // emissions fully to Endpoints. The top channel does wrap emitted // addresses with endpoints, however some balancers such as weighted - // target do not forward the corresponding correct endpoints down/split + // target do not forwarrd the corresponding correct endpoints down/split // endpoints properly. Once all balancers correctly forward endpoints // down, can delete this else conditional. addrs = state.ResolverState.Addresses diff --git a/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go b/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go deleted file mode 100644 index 985b6edc7f..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go +++ /dev/null @@ -1,625 +0,0 @@ -/* - * - * Copyright 2024 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 pickfirstleaf contains the pick_first load balancing policy which -// will be the universal leaf policy after dualstack changes are implemented. -// -// # Experimental -// -// Notice: This package is EXPERIMENTAL and may be changed or removed in a -// later release. -package pickfirstleaf - -import ( - "encoding/json" - "errors" - "fmt" - "sync" - - "google.golang.org/grpc/balancer" - "google.golang.org/grpc/balancer/pickfirst/internal" - "google.golang.org/grpc/connectivity" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/internal/envconfig" - internalgrpclog "google.golang.org/grpc/internal/grpclog" - "google.golang.org/grpc/internal/pretty" - "google.golang.org/grpc/resolver" - "google.golang.org/grpc/serviceconfig" -) - -func init() { - if envconfig.NewPickFirstEnabled { - // Register as the default pick_first balancer. - Name = "pick_first" - } - balancer.Register(pickfirstBuilder{}) -} - -var ( - logger = grpclog.Component("pick-first-leaf-lb") - // Name is the name of the pick_first_leaf balancer. - // It is changed to "pick_first" in init() if this balancer is to be - // registered as the default pickfirst. - Name = "pick_first_leaf" -) - -// TODO: change to pick-first when this becomes the default pick_first policy. -const logPrefix = "[pick-first-leaf-lb %p] " - -type pickfirstBuilder struct{} - -func (pickfirstBuilder) Build(cc balancer.ClientConn, _ balancer.BuildOptions) balancer.Balancer { - b := &pickfirstBalancer{ - cc: cc, - addressList: addressList{}, - subConns: resolver.NewAddressMap(), - state: connectivity.Connecting, - mu: sync.Mutex{}, - } - b.logger = internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(logPrefix, b)) - return b -} - -func (b pickfirstBuilder) Name() string { - return Name -} - -func (pickfirstBuilder) ParseConfig(js json.RawMessage) (serviceconfig.LoadBalancingConfig, error) { - var cfg pfConfig - if err := json.Unmarshal(js, &cfg); err != nil { - return nil, fmt.Errorf("pickfirst: unable to unmarshal LB policy config: %s, error: %v", string(js), err) - } - return cfg, nil -} - -type pfConfig struct { - serviceconfig.LoadBalancingConfig `json:"-"` - - // If set to true, instructs the LB policy to shuffle the order of the list - // of endpoints received from the name resolver before attempting to - // connect to them. - ShuffleAddressList bool `json:"shuffleAddressList"` -} - -// scData keeps track of the current state of the subConn. -// It is not safe for concurrent access. -type scData struct { - // The following fields are initialized at build time and read-only after - // that. - subConn balancer.SubConn - addr resolver.Address - - state connectivity.State - lastErr error -} - -func (b *pickfirstBalancer) newSCData(addr resolver.Address) (*scData, error) { - sd := &scData{ - state: connectivity.Idle, - addr: addr, - } - sc, err := b.cc.NewSubConn([]resolver.Address{addr}, balancer.NewSubConnOptions{ - StateListener: func(state balancer.SubConnState) { - b.updateSubConnState(sd, state) - }, - }) - if err != nil { - return nil, err - } - sd.subConn = sc - return sd, nil -} - -type pickfirstBalancer struct { - // The following fields are initialized at build time and read-only after - // that and therefore do not need to be guarded by a mutex. - logger *internalgrpclog.PrefixLogger - cc balancer.ClientConn - - // The mutex is used to ensure synchronization of updates triggered - // from the idle picker and the already serialized resolver, - // SubConn state updates. - mu sync.Mutex - state connectivity.State - // scData for active subonns mapped by address. - subConns *resolver.AddressMap - addressList addressList - firstPass bool - numTF int -} - -// ResolverError is called by the ClientConn when the name resolver produces -// an error or when pickfirst determined the resolver update to be invalid. -func (b *pickfirstBalancer) ResolverError(err error) { - b.mu.Lock() - defer b.mu.Unlock() - b.resolverErrorLocked(err) -} - -func (b *pickfirstBalancer) resolverErrorLocked(err error) { - if b.logger.V(2) { - b.logger.Infof("Received error from the name resolver: %v", err) - } - - // The picker will not change since the balancer does not currently - // report an error. If the balancer hasn't received a single good resolver - // update yet, transition to TRANSIENT_FAILURE. - if b.state != connectivity.TransientFailure && b.addressList.size() > 0 { - if b.logger.V(2) { - b.logger.Infof("Ignoring resolver error because balancer is using a previous good update.") - } - return - } - - b.cc.UpdateState(balancer.State{ - ConnectivityState: connectivity.TransientFailure, - Picker: &picker{err: fmt.Errorf("name resolver error: %v", err)}, - }) -} - -func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState) error { - b.mu.Lock() - defer b.mu.Unlock() - if len(state.ResolverState.Addresses) == 0 && len(state.ResolverState.Endpoints) == 0 { - // Cleanup state pertaining to the previous resolver state. - // Treat an empty address list like an error by calling b.ResolverError. - b.state = connectivity.TransientFailure - b.closeSubConnsLocked() - b.addressList.updateAddrs(nil) - b.resolverErrorLocked(errors.New("produced zero addresses")) - return balancer.ErrBadResolverState - } - cfg, ok := state.BalancerConfig.(pfConfig) - if state.BalancerConfig != nil && !ok { - return fmt.Errorf("pickfirst: received illegal BalancerConfig (type %T): %v: %w", state.BalancerConfig, state.BalancerConfig, balancer.ErrBadResolverState) - } - - if b.logger.V(2) { - b.logger.Infof("Received new config %s, resolver state %s", pretty.ToJSON(cfg), pretty.ToJSON(state.ResolverState)) - } - - var newAddrs []resolver.Address - if endpoints := state.ResolverState.Endpoints; len(endpoints) != 0 { - // Perform the optional shuffling described in gRFC A62. The shuffling - // will change the order of endpoints but not touch the order of the - // addresses within each endpoint. - A61 - if cfg.ShuffleAddressList { - endpoints = append([]resolver.Endpoint{}, endpoints...) - internal.RandShuffle(len(endpoints), func(i, j int) { endpoints[i], endpoints[j] = endpoints[j], endpoints[i] }) - } - - // "Flatten the list by concatenating the ordered list of addresses for - // each of the endpoints, in order." - A61 - for _, endpoint := range endpoints { - // "In the flattened list, interleave addresses from the two address - // families, as per RFC-8305 section 4." - A61 - // TODO: support the above language. - newAddrs = append(newAddrs, endpoint.Addresses...) - } - } else { - // Endpoints not set, process addresses until we migrate resolver - // emissions fully to Endpoints. The top channel does wrap emitted - // addresses with endpoints, however some balancers such as weighted - // target do not forward the corresponding correct endpoints down/split - // endpoints properly. Once all balancers correctly forward endpoints - // down, can delete this else conditional. - newAddrs = state.ResolverState.Addresses - if cfg.ShuffleAddressList { - newAddrs = append([]resolver.Address{}, newAddrs...) - internal.RandShuffle(len(endpoints), func(i, j int) { endpoints[i], endpoints[j] = endpoints[j], endpoints[i] }) - } - } - - // If an address appears in multiple endpoints or in the same endpoint - // multiple times, we keep it only once. We will create only one SubConn - // for the address because an AddressMap is used to store SubConns. - // Not de-duplicating would result in attempting to connect to the same - // SubConn multiple times in the same pass. We don't want this. - newAddrs = deDupAddresses(newAddrs) - - // Since we have a new set of addresses, we are again at first pass. - b.firstPass = true - - // If the previous ready SubConn exists in new address list, - // keep this connection and don't create new SubConns. - prevAddr := b.addressList.currentAddress() - prevAddrsCount := b.addressList.size() - b.addressList.updateAddrs(newAddrs) - if b.state == connectivity.Ready && b.addressList.seekTo(prevAddr) { - return nil - } - - b.reconcileSubConnsLocked(newAddrs) - // If it's the first resolver update or the balancer was already READY - // (but the new address list does not contain the ready SubConn) or - // CONNECTING, enter CONNECTING. - // We may be in TRANSIENT_FAILURE due to a previous empty address list, - // we should still enter CONNECTING because the sticky TF behaviour - // mentioned in A62 applies only when the TRANSIENT_FAILURE is reported - // due to connectivity failures. - if b.state == connectivity.Ready || b.state == connectivity.Connecting || prevAddrsCount == 0 { - // Start connection attempt at first address. - b.state = connectivity.Connecting - b.cc.UpdateState(balancer.State{ - ConnectivityState: connectivity.Connecting, - Picker: &picker{err: balancer.ErrNoSubConnAvailable}, - }) - b.requestConnectionLocked() - } else if b.state == connectivity.TransientFailure { - // If we're in TRANSIENT_FAILURE, we stay in TRANSIENT_FAILURE until - // we're READY. See A62. - b.requestConnectionLocked() - } - return nil -} - -// UpdateSubConnState is unused as a StateListener is always registered when -// creating SubConns. -func (b *pickfirstBalancer) UpdateSubConnState(subConn balancer.SubConn, state balancer.SubConnState) { - b.logger.Errorf("UpdateSubConnState(%v, %+v) called unexpectedly", subConn, state) -} - -func (b *pickfirstBalancer) Close() { - b.mu.Lock() - defer b.mu.Unlock() - b.closeSubConnsLocked() - b.state = connectivity.Shutdown -} - -// ExitIdle moves the balancer out of idle state. It can be called concurrently -// by the idlePicker and clientConn so access to variables should be -// synchronized. -func (b *pickfirstBalancer) ExitIdle() { - b.mu.Lock() - defer b.mu.Unlock() - if b.state == connectivity.Idle && b.addressList.currentAddress() == b.addressList.first() { - b.firstPass = true - b.requestConnectionLocked() - } -} - -func (b *pickfirstBalancer) closeSubConnsLocked() { - for _, sd := range b.subConns.Values() { - sd.(*scData).subConn.Shutdown() - } - b.subConns = resolver.NewAddressMap() -} - -// deDupAddresses ensures that each address appears only once in the slice. -func deDupAddresses(addrs []resolver.Address) []resolver.Address { - seenAddrs := resolver.NewAddressMap() - retAddrs := []resolver.Address{} - - for _, addr := range addrs { - if _, ok := seenAddrs.Get(addr); ok { - continue - } - retAddrs = append(retAddrs, addr) - } - return retAddrs -} - -// reconcileSubConnsLocked updates the active subchannels based on a new address -// list from the resolver. It does this by: -// - closing subchannels: any existing subchannels associated with addresses -// that are no longer in the updated list are shut down. -// - removing subchannels: entries for these closed subchannels are removed -// from the subchannel map. -// -// This ensures that the subchannel map accurately reflects the current set of -// addresses received from the name resolver. -func (b *pickfirstBalancer) reconcileSubConnsLocked(newAddrs []resolver.Address) { - newAddrsMap := resolver.NewAddressMap() - for _, addr := range newAddrs { - newAddrsMap.Set(addr, true) - } - - for _, oldAddr := range b.subConns.Keys() { - if _, ok := newAddrsMap.Get(oldAddr); ok { - continue - } - val, _ := b.subConns.Get(oldAddr) - val.(*scData).subConn.Shutdown() - b.subConns.Delete(oldAddr) - } -} - -// shutdownRemainingLocked shuts down remaining subConns. Called when a subConn -// becomes ready, which means that all other subConn must be shutdown. -func (b *pickfirstBalancer) shutdownRemainingLocked(selected *scData) { - for _, v := range b.subConns.Values() { - sd := v.(*scData) - if sd.subConn != selected.subConn { - sd.subConn.Shutdown() - } - } - b.subConns = resolver.NewAddressMap() - b.subConns.Set(selected.addr, selected) -} - -// requestConnectionLocked starts connecting on the subchannel corresponding to -// the current address. If no subchannel exists, one is created. If the current -// subchannel is in TransientFailure, a connection to the next address is -// attempted until a subchannel is found. -func (b *pickfirstBalancer) requestConnectionLocked() { - if !b.addressList.isValid() { - return - } - var lastErr error - for valid := true; valid; valid = b.addressList.increment() { - curAddr := b.addressList.currentAddress() - sd, ok := b.subConns.Get(curAddr) - if !ok { - var err error - // We want to assign the new scData to sd from the outer scope, - // hence we can't use := below. - sd, err = b.newSCData(curAddr) - if err != nil { - // This should never happen, unless the clientConn is being shut - // down. - if b.logger.V(2) { - b.logger.Infof("Failed to create a subConn for address %v: %v", curAddr.String(), err) - } - // Do nothing, the LB policy will be closed soon. - return - } - b.subConns.Set(curAddr, sd) - } - - scd := sd.(*scData) - switch scd.state { - case connectivity.Idle: - scd.subConn.Connect() - case connectivity.TransientFailure: - // Try the next address. - lastErr = scd.lastErr - continue - case connectivity.Ready: - // Should never happen. - b.logger.Errorf("Requesting a connection even though we have a READY SubConn") - case connectivity.Shutdown: - // Should never happen. - b.logger.Errorf("SubConn with state SHUTDOWN present in SubConns map") - case connectivity.Connecting: - // Wait for the SubConn to report success or failure. - } - return - } - // All the remaining addresses in the list are in TRANSIENT_FAILURE, end the - // first pass. - b.endFirstPassLocked(lastErr) -} - -func (b *pickfirstBalancer) updateSubConnState(sd *scData, newState balancer.SubConnState) { - b.mu.Lock() - defer b.mu.Unlock() - oldState := sd.state - sd.state = newState.ConnectivityState - // Previously relevant SubConns can still callback with state updates. - // To prevent pickers from returning these obsolete SubConns, this logic - // is included to check if the current list of active SubConns includes this - // SubConn. - if activeSD, found := b.subConns.Get(sd.addr); !found || activeSD != sd { - return - } - if newState.ConnectivityState == connectivity.Shutdown { - return - } - - if newState.ConnectivityState == connectivity.Ready { - b.shutdownRemainingLocked(sd) - if !b.addressList.seekTo(sd.addr) { - // This should not fail as we should have only one SubConn after - // entering READY. The SubConn should be present in the addressList. - b.logger.Errorf("Address %q not found address list in %v", sd.addr, b.addressList.addresses) - return - } - b.state = connectivity.Ready - b.cc.UpdateState(balancer.State{ - ConnectivityState: connectivity.Ready, - Picker: &picker{result: balancer.PickResult{SubConn: sd.subConn}}, - }) - return - } - - // If the LB policy is READY, and it receives a subchannel state change, - // it means that the READY subchannel has failed. - // A SubConn can also transition from CONNECTING directly to IDLE when - // a transport is successfully created, but the connection fails - // before the SubConn can send the notification for READY. We treat - // this as a successful connection and transition to IDLE. - if (b.state == connectivity.Ready && newState.ConnectivityState != connectivity.Ready) || (oldState == connectivity.Connecting && newState.ConnectivityState == connectivity.Idle) { - // Once a transport fails, the balancer enters IDLE and starts from - // the first address when the picker is used. - b.shutdownRemainingLocked(sd) - b.state = connectivity.Idle - b.addressList.reset() - b.cc.UpdateState(balancer.State{ - ConnectivityState: connectivity.Idle, - Picker: &idlePicker{exitIdle: sync.OnceFunc(b.ExitIdle)}, - }) - return - } - - if b.firstPass { - switch newState.ConnectivityState { - case connectivity.Connecting: - // The balancer can be in either IDLE, CONNECTING or - // TRANSIENT_FAILURE. If it's in TRANSIENT_FAILURE, stay in - // TRANSIENT_FAILURE until it's READY. See A62. - // If the balancer is already in CONNECTING, no update is needed. - if b.state == connectivity.Idle { - b.state = connectivity.Connecting - b.cc.UpdateState(balancer.State{ - ConnectivityState: connectivity.Connecting, - Picker: &picker{err: balancer.ErrNoSubConnAvailable}, - }) - } - case connectivity.TransientFailure: - sd.lastErr = newState.ConnectionError - // Since we're re-using common SubConns while handling resolver - // updates, we could receive an out of turn TRANSIENT_FAILURE from - // a pass over the previous address list. We ignore such updates. - - if curAddr := b.addressList.currentAddress(); !equalAddressIgnoringBalAttributes(&curAddr, &sd.addr) { - return - } - if b.addressList.increment() { - b.requestConnectionLocked() - return - } - // End of the first pass. - b.endFirstPassLocked(newState.ConnectionError) - } - return - } - - // We have finished the first pass, keep re-connecting failing SubConns. - switch newState.ConnectivityState { - case connectivity.TransientFailure: - b.numTF = (b.numTF + 1) % b.subConns.Len() - sd.lastErr = newState.ConnectionError - if b.numTF%b.subConns.Len() == 0 { - b.cc.UpdateState(balancer.State{ - ConnectivityState: connectivity.TransientFailure, - Picker: &picker{err: newState.ConnectionError}, - }) - } - // We don't need to request re-resolution since the SubConn already - // does that before reporting TRANSIENT_FAILURE. - // TODO: #7534 - Move re-resolution requests from SubConn into - // pick_first. - case connectivity.Idle: - sd.subConn.Connect() - } -} - -func (b *pickfirstBalancer) endFirstPassLocked(lastErr error) { - b.firstPass = false - b.numTF = 0 - b.state = connectivity.TransientFailure - - b.cc.UpdateState(balancer.State{ - ConnectivityState: connectivity.TransientFailure, - Picker: &picker{err: lastErr}, - }) - // Start re-connecting all the SubConns that are already in IDLE. - for _, v := range b.subConns.Values() { - sd := v.(*scData) - if sd.state == connectivity.Idle { - sd.subConn.Connect() - } - } -} - -type picker struct { - result balancer.PickResult - err error -} - -func (p *picker) Pick(balancer.PickInfo) (balancer.PickResult, error) { - return p.result, p.err -} - -// idlePicker is used when the SubConn is IDLE and kicks the SubConn into -// CONNECTING when Pick is called. -type idlePicker struct { - exitIdle func() -} - -func (i *idlePicker) Pick(balancer.PickInfo) (balancer.PickResult, error) { - i.exitIdle() - return balancer.PickResult{}, balancer.ErrNoSubConnAvailable -} - -// addressList manages sequentially iterating over addresses present in a list -// of endpoints. It provides a 1 dimensional view of the addresses present in -// the endpoints. -// This type is not safe for concurrent access. -type addressList struct { - addresses []resolver.Address - idx int -} - -func (al *addressList) isValid() bool { - return al.idx < len(al.addresses) -} - -func (al *addressList) size() int { - return len(al.addresses) -} - -// increment moves to the next index in the address list. -// This method returns false if it went off the list, true otherwise. -func (al *addressList) increment() bool { - if !al.isValid() { - return false - } - al.idx++ - return al.idx < len(al.addresses) -} - -// currentAddress returns the current address pointed to in the addressList. -// If the list is in an invalid state, it returns an empty address instead. -func (al *addressList) currentAddress() resolver.Address { - if !al.isValid() { - return resolver.Address{} - } - return al.addresses[al.idx] -} - -// first returns the first address in the list. If the list is empty, it returns -// an empty address instead. -func (al *addressList) first() resolver.Address { - if len(al.addresses) == 0 { - return resolver.Address{} - } - return al.addresses[0] -} - -func (al *addressList) reset() { - al.idx = 0 -} - -func (al *addressList) updateAddrs(addrs []resolver.Address) { - al.addresses = addrs - al.reset() -} - -// seekTo returns false if the needle was not found and the current index was -// left unchanged. -func (al *addressList) seekTo(needle resolver.Address) bool { - for ai, addr := range al.addresses { - if !equalAddressIgnoringBalAttributes(&addr, &needle) { - continue - } - al.idx = ai - return true - } - return false -} - -// equalAddressIgnoringBalAttributes returns true is a and b are considered -// equal. This is different from the Equal method on the resolver.Address type -// which considers all fields to determine equality. Here, we only consider -// fields that are meaningful to the SubConn. -func equalAddressIgnoringBalAttributes(a, b *resolver.Address) bool { - return a.Addr == b.Addr && a.ServerName == b.ServerName && - a.Attributes.Equal(b.Attributes) && - a.Metadata == b.Metadata -} diff --git a/go-controller/vendor/google.golang.org/grpc/balancer_wrapper.go b/go-controller/vendor/google.golang.org/grpc/balancer_wrapper.go index 2a4f2878ae..4161fdf47a 100644 --- a/go-controller/vendor/google.golang.org/grpc/balancer_wrapper.go +++ b/go-controller/vendor/google.golang.org/grpc/balancer_wrapper.go @@ -24,18 +24,13 @@ import ( "sync" "google.golang.org/grpc/balancer" - "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" - "google.golang.org/grpc/internal" "google.golang.org/grpc/internal/balancer/gracefulswitch" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/resolver" - "google.golang.org/grpc/status" ) -var setConnectedAddress = internal.SetConnectedAddress.(func(*balancer.SubConnState, resolver.Address)) - // ccBalancerWrapper sits between the ClientConn and the Balancer. // // ccBalancerWrapper implements methods corresponding to the ones on the @@ -84,7 +79,6 @@ func newCCBalancerWrapper(cc *ClientConn) *ccBalancerWrapper { CustomUserAgent: cc.dopts.copts.UserAgent, ChannelzParent: cc.channelz, Target: cc.parsedTarget, - MetricsRecorder: cc.metricsRecorderList, }, serializer: grpcsync.NewCallbackSerializer(ctx), serializerCancel: cancel, @@ -98,7 +92,7 @@ func newCCBalancerWrapper(cc *ClientConn) *ccBalancerWrapper { // it is safe to call into the balancer here. func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnState) error { errCh := make(chan error) - uccs := func(ctx context.Context) { + ok := ccb.serializer.Schedule(func(ctx context.Context) { defer close(errCh) if ctx.Err() != nil || ccb.balancer == nil { return @@ -113,23 +107,17 @@ func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnStat logger.Infof("error from balancer.UpdateClientConnState: %v", err) } errCh <- err + }) + if !ok { + return nil } - onFailure := func() { close(errCh) } - - // UpdateClientConnState can race with Close, and when the latter wins, the - // serializer is closed, and the attempt to schedule the callback will fail. - // It is acceptable to ignore this failure. But since we want to handle the - // state update in a blocking fashion (when we successfully schedule the - // callback), we have to use the ScheduleOr method and not the MaybeSchedule - // method on the serializer. - ccb.serializer.ScheduleOr(uccs, onFailure) return <-errCh } // resolverError is invoked by grpc to push a resolver error to the underlying // balancer. The call to the balancer is executed from the serializer. func (ccb *ccBalancerWrapper) resolverError(err error) { - ccb.serializer.TrySchedule(func(ctx context.Context) { + ccb.serializer.Schedule(func(ctx context.Context) { if ctx.Err() != nil || ccb.balancer == nil { return } @@ -145,7 +133,7 @@ func (ccb *ccBalancerWrapper) close() { ccb.closed = true ccb.mu.Unlock() channelz.Info(logger, ccb.cc.channelz, "ccBalancerWrapper: closing") - ccb.serializer.TrySchedule(func(context.Context) { + ccb.serializer.Schedule(func(context.Context) { if ccb.balancer == nil { return } @@ -157,7 +145,7 @@ func (ccb *ccBalancerWrapper) close() { // exitIdle invokes the balancer's exitIdle method in the serializer. func (ccb *ccBalancerWrapper) exitIdle() { - ccb.serializer.TrySchedule(func(ctx context.Context) { + ccb.serializer.Schedule(func(ctx context.Context) { if ctx.Err() != nil || ccb.balancer == nil { return } @@ -194,7 +182,7 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer return acbw, nil } -func (ccb *ccBalancerWrapper) RemoveSubConn(balancer.SubConn) { +func (ccb *ccBalancerWrapper) RemoveSubConn(sc balancer.SubConn) { // The graceful switch balancer will never call this. logger.Errorf("ccb RemoveSubConn(%v) called unexpectedly, sc") } @@ -258,28 +246,21 @@ type acBalancerWrapper struct { ccb *ccBalancerWrapper // read-only stateListener func(balancer.SubConnState) - producersMu sync.Mutex - producers map[balancer.ProducerBuilder]*refCountedProducer + mu sync.Mutex + producers map[balancer.ProducerBuilder]*refCountedProducer } // updateState is invoked by grpc to push a subConn state update to the // underlying balancer. -func (acbw *acBalancerWrapper) updateState(s connectivity.State, curAddr resolver.Address, err error) { - acbw.ccb.serializer.TrySchedule(func(ctx context.Context) { +func (acbw *acBalancerWrapper) updateState(s connectivity.State, err error) { + acbw.ccb.serializer.Schedule(func(ctx context.Context) { if ctx.Err() != nil || acbw.ccb.balancer == nil { return } - // Invalidate all producers on any state change. - acbw.closeProducers() - // Even though it is optional for balancers, gracefulswitch ensures // opts.StateListener is set, so this cannot ever be nil. // TODO: delete this comment when UpdateSubConnState is removed. - scs := balancer.SubConnState{ConnectivityState: s, ConnectionError: err} - if s == connectivity.Ready { - setConnectedAddress(&scs, curAddr) - } - acbw.stateListener(scs) + acbw.stateListener(balancer.SubConnState{ConnectivityState: s, ConnectionError: err}) }) } @@ -296,7 +277,6 @@ func (acbw *acBalancerWrapper) Connect() { } func (acbw *acBalancerWrapper) Shutdown() { - acbw.closeProducers() acbw.ccb.cc.removeAddrConn(acbw.ac, errConnDrain) } @@ -304,10 +284,9 @@ func (acbw *acBalancerWrapper) Shutdown() { // ready, blocks until it is or ctx expires. Returns an error when the context // expires or the addrConn is shut down. func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { - transport := acbw.ac.getReadyTransport() - if transport == nil { - return nil, status.Errorf(codes.Unavailable, "SubConn state is not Ready") - + transport, err := acbw.ac.getTransport(ctx) + if err != nil { + return nil, err } return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) } @@ -332,15 +311,15 @@ type refCountedProducer struct { } func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) { - acbw.producersMu.Lock() - defer acbw.producersMu.Unlock() + acbw.mu.Lock() + defer acbw.mu.Unlock() // Look up existing producer from this builder. pData := acbw.producers[pb] if pData == nil { // Not found; create a new one and add it to the producers map. - p, closeFn := pb.Build(acbw) - pData = &refCountedProducer{producer: p, close: closeFn} + p, close := pb.Build(acbw) + pData = &refCountedProducer{producer: p, close: close} acbw.producers[pb] = pData } // Account for this new reference. @@ -350,26 +329,13 @@ func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) ( // and delete the refCountedProducer from the map if the total reference // count goes to zero. unref := func() { - acbw.producersMu.Lock() - // If closeProducers has already closed this producer instance, refs is - // set to 0, so the check after decrementing will never pass, and the - // producer will not be double-closed. + acbw.mu.Lock() pData.refs-- if pData.refs == 0 { defer pData.close() // Run outside the acbw mutex delete(acbw.producers, pb) } - acbw.producersMu.Unlock() + acbw.mu.Unlock() } return pData.producer, grpcsync.OnceFunc(unref) } - -func (acbw *acBalancerWrapper) closeProducers() { - acbw.producersMu.Lock() - defer acbw.producersMu.Unlock() - for pb, pData := range acbw.producers { - pData.refs = 0 - pData.close() - delete(acbw.producers, pb) - } -} diff --git a/go-controller/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/go-controller/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go index 55bffaa77e..63c639e4fe 100644 --- a/go-controller/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go +++ b/go-controller/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.34.2 -// protoc v5.27.1 +// protoc-gen-go v1.34.1 +// protoc v4.25.2 // source: grpc/binlog/v1/binarylog.proto package grpc_binarylog_v1 @@ -1015,7 +1015,7 @@ func file_grpc_binlog_v1_binarylog_proto_rawDescGZIP() []byte { var file_grpc_binlog_v1_binarylog_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_grpc_binlog_v1_binarylog_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_grpc_binlog_v1_binarylog_proto_goTypes = []any{ +var file_grpc_binlog_v1_binarylog_proto_goTypes = []interface{}{ (GrpcLogEntry_EventType)(0), // 0: grpc.binarylog.v1.GrpcLogEntry.EventType (GrpcLogEntry_Logger)(0), // 1: grpc.binarylog.v1.GrpcLogEntry.Logger (Address_Type)(0), // 2: grpc.binarylog.v1.Address.Type @@ -1058,7 +1058,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_grpc_binlog_v1_binarylog_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_grpc_binlog_v1_binarylog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GrpcLogEntry); i { case 0: return &v.state @@ -1070,7 +1070,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_grpc_binlog_v1_binarylog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClientHeader); i { case 0: return &v.state @@ -1082,7 +1082,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_grpc_binlog_v1_binarylog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerHeader); i { case 0: return &v.state @@ -1094,7 +1094,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_grpc_binlog_v1_binarylog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Trailer); i { case 0: return &v.state @@ -1106,7 +1106,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_grpc_binlog_v1_binarylog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Message); i { case 0: return &v.state @@ -1118,7 +1118,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_grpc_binlog_v1_binarylog_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Metadata); i { case 0: return &v.state @@ -1130,7 +1130,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_grpc_binlog_v1_binarylog_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MetadataEntry); i { case 0: return &v.state @@ -1142,7 +1142,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { return nil } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_grpc_binlog_v1_binarylog_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Address); i { case 0: return &v.state @@ -1155,7 +1155,7 @@ func file_grpc_binlog_v1_binarylog_proto_init() { } } } - file_grpc_binlog_v1_binarylog_proto_msgTypes[0].OneofWrappers = []any{ + file_grpc_binlog_v1_binarylog_proto_msgTypes[0].OneofWrappers = []interface{}{ (*GrpcLogEntry_ClientHeader)(nil), (*GrpcLogEntry_ServerHeader)(nil), (*GrpcLogEntry_Message)(nil), diff --git a/go-controller/vendor/google.golang.org/grpc/clientconn.go b/go-controller/vendor/google.golang.org/grpc/clientconn.go index 19763f8edd..423be7b43b 100644 --- a/go-controller/vendor/google.golang.org/grpc/clientconn.go +++ b/go-controller/vendor/google.golang.org/grpc/clientconn.go @@ -24,7 +24,6 @@ import ( "fmt" "math" "net/url" - "slices" "strings" "sync" "sync/atomic" @@ -40,7 +39,6 @@ import ( "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/internal/idle" iresolver "google.golang.org/grpc/internal/resolver" - "google.golang.org/grpc/internal/stats" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/resolver" @@ -196,11 +194,8 @@ func NewClient(target string, opts ...DialOption) (conn *ClientConn, err error) cc.csMgr = newConnectivityStateManager(cc.ctx, cc.channelz) cc.pickerWrapper = newPickerWrapper(cc.dopts.copts.StatsHandlers) - cc.metricsRecorderList = stats.NewMetricsRecorderList(cc.dopts.copts.StatsHandlers) - cc.initIdleStateLocked() // Safe to call without the lock, since nothing else has a reference to cc. cc.idlenessMgr = idle.NewManager((*idler)(cc), cc.dopts.idleTimeout) - return cc, nil } @@ -595,14 +590,13 @@ type ClientConn struct { cancel context.CancelFunc // Cancelled on close. // The following are initialized at dial time, and are read-only after that. - target string // User's dial target. - parsedTarget resolver.Target // See initParsedTargetAndResolverBuilder(). - authority string // See initAuthority(). - dopts dialOptions // Default and user specified dial options. - channelz *channelz.Channel // Channelz object. - resolverBuilder resolver.Builder // See initParsedTargetAndResolverBuilder(). - idlenessMgr *idle.Manager - metricsRecorderList *stats.MetricsRecorderList + target string // User's dial target. + parsedTarget resolver.Target // See initParsedTargetAndResolverBuilder(). + authority string // See initAuthority(). + dopts dialOptions // Default and user specified dial options. + channelz *channelz.Channel // Channelz object. + resolverBuilder resolver.Builder // See initParsedTargetAndResolverBuilder(). + idlenessMgr *idle.Manager // The following provide their own synchronization, and therefore don't // require cc.mu to be held to access them. @@ -632,6 +626,11 @@ type ClientConn struct { // WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or // ctx expires. A true value is returned in former case and false in latter. +// +// # Experimental +// +// Notice: This API is EXPERIMENTAL and may be changed or removed in a +// later release. func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connectivity.State) bool { ch := cc.csMgr.getNotifyChan() if cc.csMgr.getState() != sourceState { @@ -646,6 +645,11 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connec } // GetState returns the connectivity.State of ClientConn. +// +// # Experimental +// +// Notice: This API is EXPERIMENTAL and may be changed or removed in a later +// release. func (cc *ClientConn) GetState() connectivity.State { return cc.csMgr.getState() } @@ -808,11 +812,17 @@ func (cc *ClientConn) applyFailingLBLocked(sc *serviceconfig.ParseResult) { cc.csMgr.updateState(connectivity.TransientFailure) } -// Makes a copy of the input addresses slice. Addresses are passed during -// subconn creation and address update operations. -func copyAddresses(in []resolver.Address) []resolver.Address { +// Makes a copy of the input addresses slice and clears out the balancer +// attributes field. Addresses are passed during subconn creation and address +// update operations. In both cases, we will clear the balancer attributes by +// calling this function, and therefore we will be able to use the Equal method +// provided by the resolver.Address type for comparison. +func copyAddressesWithoutBalancerAttributes(in []resolver.Address) []resolver.Address { out := make([]resolver.Address, len(in)) - copy(out, in) + for i := range in { + out[i] = in[i] + out[i].BalancerAttributes = nil + } return out } @@ -827,11 +837,12 @@ func (cc *ClientConn) newAddrConnLocked(addrs []resolver.Address, opts balancer. ac := &addrConn{ state: connectivity.Idle, cc: cc, - addrs: copyAddresses(addrs), + addrs: copyAddressesWithoutBalancerAttributes(addrs), scopts: opts, dopts: cc.dopts, channelz: channelz.RegisterSubChannel(cc.channelz, ""), resetBackoff: make(chan struct{}), + stateChan: make(chan struct{}), } ac.ctx, ac.cancel = context.WithCancel(cc.ctx) // Start with our address set to the first address; this may be updated if @@ -907,29 +918,28 @@ func (ac *addrConn) connect() error { ac.mu.Unlock() return nil } + ac.mu.Unlock() - ac.resetTransportAndUnlock() + ac.resetTransport() return nil } -// equalAddressIgnoringBalAttributes returns true is a and b are considered equal. -// This is different from the Equal method on the resolver.Address type which -// considers all fields to determine equality. Here, we only consider fields -// that are meaningful to the subConn. -func equalAddressIgnoringBalAttributes(a, b *resolver.Address) bool { - return a.Addr == b.Addr && a.ServerName == b.ServerName && - a.Attributes.Equal(b.Attributes) && - a.Metadata == b.Metadata -} - -func equalAddressesIgnoringBalAttributes(a, b []resolver.Address) bool { - return slices.EqualFunc(a, b, func(a, b resolver.Address) bool { return equalAddressIgnoringBalAttributes(&a, &b) }) +func equalAddresses(a, b []resolver.Address) bool { + if len(a) != len(b) { + return false + } + for i, v := range a { + if !v.Equal(b[i]) { + return false + } + } + return true } // updateAddrs updates ac.addrs with the new addresses list and handles active // connections or connection attempts. func (ac *addrConn) updateAddrs(addrs []resolver.Address) { - addrs = copyAddresses(addrs) + addrs = copyAddressesWithoutBalancerAttributes(addrs) limit := len(addrs) if limit > 5 { limit = 5 @@ -937,7 +947,7 @@ func (ac *addrConn) updateAddrs(addrs []resolver.Address) { channelz.Infof(logger, ac.channelz, "addrConn: updateAddrs addrs (%d of %d): %v", limit, len(addrs), addrs[:limit]) ac.mu.Lock() - if equalAddressesIgnoringBalAttributes(ac.addrs, addrs) { + if equalAddresses(ac.addrs, addrs) { ac.mu.Unlock() return } @@ -956,7 +966,7 @@ func (ac *addrConn) updateAddrs(addrs []resolver.Address) { // Try to find the connected address. for _, a := range addrs { a.ServerName = ac.cc.getServerName(a) - if equalAddressIgnoringBalAttributes(&a, &ac.curAddr) { + if a.Equal(ac.curAddr) { // We are connected to a valid address, so do nothing but // update the addresses. ac.mu.Unlock() @@ -982,9 +992,11 @@ func (ac *addrConn) updateAddrs(addrs []resolver.Address) { ac.updateConnectivityState(connectivity.Idle, nil) } + ac.mu.Unlock() + // Since we were connecting/connected, we should start a new connection // attempt. - go ac.resetTransportAndUnlock() + go ac.resetTransport() } // getServerName determines the serverName to be used in the connection @@ -1140,15 +1152,10 @@ func (cc *ClientConn) Close() error { <-cc.resolverWrapper.serializer.Done() <-cc.balancerWrapper.serializer.Done() - var wg sync.WaitGroup + for ac := range conns { - wg.Add(1) - go func(ac *addrConn) { - defer wg.Done() - ac.tearDown(ErrClientConnClosing) - }(ac) + ac.tearDown(ErrClientConnClosing) } - wg.Wait() cc.addTraceEvent("deleted") // TraceEvent needs to be called before RemoveEntry, as TraceEvent may add // trace reference to the entity being deleted, and thus prevent it from being @@ -1183,7 +1190,8 @@ type addrConn struct { addrs []resolver.Address // All addresses that the resolver resolved to. // Use updateConnectivityState for updating addrConn's connectivity state. - state connectivity.State + state connectivity.State + stateChan chan struct{} // closed and recreated on every state change. backoffIdx int // Needs to be stateful for resetConnectBackoff. resetBackoff chan struct{} @@ -1196,6 +1204,9 @@ func (ac *addrConn) updateConnectivityState(s connectivity.State, lastErr error) if ac.state == s { return } + // When changing states, reset the state change channel. + close(ac.stateChan) + ac.stateChan = make(chan struct{}) ac.state = s ac.channelz.ChannelMetrics.State.Store(&s) if lastErr == nil { @@ -1203,7 +1214,7 @@ func (ac *addrConn) updateConnectivityState(s connectivity.State, lastErr error) } else { channelz.Infof(logger, ac.channelz, "Subchannel Connectivity change to %v, last error: %s", s, lastErr) } - ac.acbw.updateState(s, ac.curAddr, lastErr) + ac.acbw.updateState(s, lastErr) } // adjustParams updates parameters used to create transports upon @@ -1220,10 +1231,8 @@ func (ac *addrConn) adjustParams(r transport.GoAwayReason) { } } -// resetTransportAndUnlock unconditionally connects the addrConn. -// -// ac.mu must be held by the caller, and this function will guarantee it is released. -func (ac *addrConn) resetTransportAndUnlock() { +func (ac *addrConn) resetTransport() { + ac.mu.Lock() acCtx := ac.ctx if acCtx.Err() != nil { ac.mu.Unlock() @@ -1254,8 +1263,6 @@ func (ac *addrConn) resetTransportAndUnlock() { ac.mu.Unlock() if err := ac.tryAllAddrs(acCtx, addrs, connectDeadline); err != nil { - // TODO: #7534 - Move re-resolution requests into the pick_first LB policy - // to ensure one resolution request per pass instead of per subconn failure. ac.cc.resolveNow(resolver.ResolveNowOptions{}) ac.mu.Lock() if acCtx.Err() != nil { @@ -1297,7 +1304,7 @@ func (ac *addrConn) resetTransportAndUnlock() { ac.mu.Unlock() } -// tryAllAddrs tries to create a connection to the addresses, and stop when at +// tryAllAddrs tries to creates a connection to the addresses, and stop when at // the first successful one. It returns an error if no address was successfully // connected, or updates ac appropriately with the new transport. func (ac *addrConn) tryAllAddrs(ctx context.Context, addrs []resolver.Address, connectDeadline time.Time) error { @@ -1509,6 +1516,29 @@ func (ac *addrConn) getReadyTransport() transport.ClientTransport { return nil } +// getTransport waits until the addrconn is ready and returns the transport. +// If the context expires first, returns an appropriate status. If the +// addrConn is stopped first, returns an Unavailable status error. +func (ac *addrConn) getTransport(ctx context.Context) (transport.ClientTransport, error) { + for ctx.Err() == nil { + ac.mu.Lock() + t, state, sc := ac.transport, ac.state, ac.stateChan + ac.mu.Unlock() + if state == connectivity.Ready { + return t, nil + } + if state == connectivity.Shutdown { + return nil, status.Errorf(codes.Unavailable, "SubConn shutting down") + } + + select { + case <-ctx.Done(): + case <-sc: + } + } + return nil, status.FromContextError(ctx.Err()).Err() +} + // tearDown starts to tear down the addrConn. // // Note that tearDown doesn't remove ac from ac.cc.conns, so the addrConn struct @@ -1555,7 +1585,7 @@ func (ac *addrConn) tearDown(err error) { } else { // Hard close the transport when the channel is entering idle or is // being shutdown. In the case where the channel is being shutdown, - // closing of transports is also taken care of by cancellation of cc.ctx. + // closing of transports is also taken care of by cancelation of cc.ctx. // But in the case where the channel is entering idle, we need to // explicitly close the transports here. Instead of distinguishing // between these two cases, it is simpler to close the transport diff --git a/go-controller/vendor/google.golang.org/grpc/codec.go b/go-controller/vendor/google.golang.org/grpc/codec.go index e840858b77..411e3dfd47 100644 --- a/go-controller/vendor/google.golang.org/grpc/codec.go +++ b/go-controller/vendor/google.golang.org/grpc/codec.go @@ -21,73 +21,18 @@ package grpc import ( "google.golang.org/grpc/encoding" _ "google.golang.org/grpc/encoding/proto" // to register the Codec for "proto" - "google.golang.org/grpc/mem" ) -// baseCodec captures the new encoding.CodecV2 interface without the Name -// function, allowing it to be implemented by older Codec and encoding.Codec -// implementations. The omitted Name function is only needed for the register in -// the encoding package and is not part of the core functionality. +// baseCodec contains the functionality of both Codec and encoding.Codec, but +// omits the name/string, which vary between the two and are not needed for +// anything besides the registry in the encoding package. type baseCodec interface { - Marshal(v any) (mem.BufferSlice, error) - Unmarshal(data mem.BufferSlice, v any) error -} - -// getCodec returns an encoding.CodecV2 for the codec of the given name (if -// registered). Initially checks the V2 registry with encoding.GetCodecV2 and -// returns the V2 codec if it is registered. Otherwise, it checks the V1 registry -// with encoding.GetCodec and if it is registered wraps it with newCodecV1Bridge -// to turn it into an encoding.CodecV2. Returns nil otherwise. -func getCodec(name string) encoding.CodecV2 { - if codecV1 := encoding.GetCodec(name); codecV1 != nil { - return newCodecV1Bridge(codecV1) - } - - return encoding.GetCodecV2(name) -} - -func newCodecV0Bridge(c Codec) baseCodec { - return codecV0Bridge{codec: c} -} - -func newCodecV1Bridge(c encoding.Codec) encoding.CodecV2 { - return codecV1Bridge{ - codecV0Bridge: codecV0Bridge{codec: c}, - name: c.Name(), - } -} - -var _ baseCodec = codecV0Bridge{} - -type codecV0Bridge struct { - codec interface { - Marshal(v any) ([]byte, error) - Unmarshal(data []byte, v any) error - } -} - -func (c codecV0Bridge) Marshal(v any) (mem.BufferSlice, error) { - data, err := c.codec.Marshal(v) - if err != nil { - return nil, err - } - return mem.BufferSlice{mem.NewBuffer(&data, nil)}, nil -} - -func (c codecV0Bridge) Unmarshal(data mem.BufferSlice, v any) (err error) { - return c.codec.Unmarshal(data.Materialize(), v) -} - -var _ encoding.CodecV2 = codecV1Bridge{} - -type codecV1Bridge struct { - codecV0Bridge - name string + Marshal(v any) ([]byte, error) + Unmarshal(data []byte, v any) error } -func (c codecV1Bridge) Name() string { - return c.name -} +var _ baseCodec = Codec(nil) +var _ baseCodec = encoding.Codec(nil) // Codec defines the interface gRPC uses to encode and decode messages. // Note that implementations of this interface must be thread safe; diff --git a/go-controller/vendor/google.golang.org/grpc/credentials/insecure/insecure.go b/go-controller/vendor/google.golang.org/grpc/credentials/insecure/insecure.go index 4c805c6446..82bee1443b 100644 --- a/go-controller/vendor/google.golang.org/grpc/credentials/insecure/insecure.go +++ b/go-controller/vendor/google.golang.org/grpc/credentials/insecure/insecure.go @@ -40,7 +40,7 @@ func NewCredentials() credentials.TransportCredentials { // NoSecurity. type insecureTC struct{} -func (insecureTC) ClientHandshake(_ context.Context, _ string, conn net.Conn) (net.Conn, credentials.AuthInfo, error) { +func (insecureTC) ClientHandshake(ctx context.Context, _ string, conn net.Conn) (net.Conn, credentials.AuthInfo, error) { return conn, info{credentials.CommonAuthInfo{SecurityLevel: credentials.NoSecurity}}, nil } diff --git a/go-controller/vendor/google.golang.org/grpc/credentials/tls.go b/go-controller/vendor/google.golang.org/grpc/credentials/tls.go index e163a473df..4114358545 100644 --- a/go-controller/vendor/google.golang.org/grpc/credentials/tls.go +++ b/go-controller/vendor/google.golang.org/grpc/credentials/tls.go @@ -200,40 +200,25 @@ var tls12ForbiddenCipherSuites = map[uint16]struct{}{ // NewTLS uses c to construct a TransportCredentials based on TLS. func NewTLS(c *tls.Config) TransportCredentials { - config := applyDefaults(c) - if config.GetConfigForClient != nil { - oldFn := config.GetConfigForClient - config.GetConfigForClient = func(hello *tls.ClientHelloInfo) (*tls.Config, error) { - cfgForClient, err := oldFn(hello) - if err != nil || cfgForClient == nil { - return cfgForClient, err - } - return applyDefaults(cfgForClient), nil - } - } - return &tlsCreds{config: config} -} - -func applyDefaults(c *tls.Config) *tls.Config { - config := credinternal.CloneTLSConfig(c) - config.NextProtos = credinternal.AppendH2ToNextProtos(config.NextProtos) + tc := &tlsCreds{credinternal.CloneTLSConfig(c)} + tc.config.NextProtos = credinternal.AppendH2ToNextProtos(tc.config.NextProtos) // If the user did not configure a MinVersion and did not configure a // MaxVersion < 1.2, use MinVersion=1.2, which is required by // https://datatracker.ietf.org/doc/html/rfc7540#section-9.2 - if config.MinVersion == 0 && (config.MaxVersion == 0 || config.MaxVersion >= tls.VersionTLS12) { - config.MinVersion = tls.VersionTLS12 + if tc.config.MinVersion == 0 && (tc.config.MaxVersion == 0 || tc.config.MaxVersion >= tls.VersionTLS12) { + tc.config.MinVersion = tls.VersionTLS12 } // If the user did not configure CipherSuites, use all "secure" cipher // suites reported by the TLS package, but remove some explicitly forbidden // by https://datatracker.ietf.org/doc/html/rfc7540#appendix-A - if config.CipherSuites == nil { + if tc.config.CipherSuites == nil { for _, cs := range tls.CipherSuites() { if _, ok := tls12ForbiddenCipherSuites[cs.ID]; !ok { - config.CipherSuites = append(config.CipherSuites, cs.ID) + tc.config.CipherSuites = append(tc.config.CipherSuites, cs.ID) } } } - return config + return tc } // NewClientTLSFromCert constructs TLS credentials from the provided root diff --git a/go-controller/vendor/google.golang.org/grpc/credentials/tls/certprovider/pemfile/builder.go b/go-controller/vendor/google.golang.org/grpc/credentials/tls/certprovider/pemfile/builder.go index ad4207892b..8c15baeb59 100644 --- a/go-controller/vendor/google.golang.org/grpc/credentials/tls/certprovider/pemfile/builder.go +++ b/go-controller/vendor/google.golang.org/grpc/credentials/tls/certprovider/pemfile/builder.go @@ -29,7 +29,6 @@ import ( ) const ( - // PluginName is the name of the PEM file watcher plugin. PluginName = "file_watcher" defaultRefreshInterval = 10 * time.Minute ) diff --git a/go-controller/vendor/google.golang.org/grpc/credentials/tls/certprovider/store.go b/go-controller/vendor/google.golang.org/grpc/credentials/tls/certprovider/store.go index a4b99e3d4a..87528b4e23 100644 --- a/go-controller/vendor/google.golang.org/grpc/credentials/tls/certprovider/store.go +++ b/go-controller/vendor/google.golang.org/grpc/credentials/tls/certprovider/store.go @@ -58,7 +58,7 @@ type wrappedProvider struct { // closedProvider always returns errProviderClosed error. type closedProvider struct{} -func (c closedProvider) KeyMaterial(context.Context) (*KeyMaterial, error) { +func (c closedProvider) KeyMaterial(ctx context.Context) (*KeyMaterial, error) { return nil, errProviderClosed } diff --git a/go-controller/vendor/google.golang.org/grpc/dialoptions.go b/go-controller/vendor/google.golang.org/grpc/dialoptions.go index 518692c3af..f5453d48a5 100644 --- a/go-controller/vendor/google.golang.org/grpc/dialoptions.go +++ b/go-controller/vendor/google.golang.org/grpc/dialoptions.go @@ -33,7 +33,6 @@ import ( "google.golang.org/grpc/internal/binarylog" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" - "google.golang.org/grpc/mem" "google.golang.org/grpc/resolver" "google.golang.org/grpc/stats" ) @@ -61,7 +60,7 @@ func init() { internal.WithBinaryLogger = withBinaryLogger internal.JoinDialOptions = newJoinDialOption internal.DisableGlobalDialOptions = newDisableGlobalDialOptions - internal.WithBufferPool = withBufferPool + internal.WithRecvBufferPool = withRecvBufferPool } // dialOptions configure a Dial call. dialOptions are set by the DialOption @@ -93,6 +92,7 @@ type dialOptions struct { defaultServiceConfigRawJSON *string resolvers []resolver.Builder idleTimeout time.Duration + recvBufferPool SharedBufferPool defaultScheme string maxCallAttempts int } @@ -436,7 +436,7 @@ func WithTimeout(d time.Duration) DialOption { // option to true from the Control field. For a concrete example of how to do // this, see internal.NetDialerWithTCPKeepalive(). // -// For more information, please see [issue 23459] in the Go GitHub repo. +// For more information, please see [issue 23459] in the Go github repo. // // [issue 23459]: https://github.com/golang/go/issues/23459 func WithContextDialer(f func(context.Context, string) (net.Conn, error)) DialOption { @@ -518,8 +518,6 @@ func WithUserAgent(s string) DialOption { // WithKeepaliveParams returns a DialOption that specifies keepalive parameters // for the client transport. -// -// Keepalive is disabled by default. func WithKeepaliveParams(kp keepalive.ClientParameters) DialOption { if kp.Time < internal.KeepaliveMinPingTime { logger.Warningf("Adjusting keepalive ping interval to minimum period of %v", internal.KeepaliveMinPingTime) @@ -679,11 +677,11 @@ func defaultDialOptions() dialOptions { WriteBufferSize: defaultWriteBufSize, UseProxy: true, UserAgent: grpcUA, - BufferPool: mem.DefaultBufferPool(), }, bs: internalbackoff.DefaultExponential, healthCheckFunc: internal.HealthCheckFunc, idleTimeout: 30 * time.Minute, + recvBufferPool: nopBufferPool{}, defaultScheme: "dns", maxCallAttempts: defaultMaxCallAttempts, } @@ -760,8 +758,25 @@ func WithMaxCallAttempts(n int) DialOption { }) } -func withBufferPool(bufferPool mem.BufferPool) DialOption { +// WithRecvBufferPool returns a DialOption that configures the ClientConn +// to use the provided shared buffer pool for parsing incoming messages. Depending +// on the application's workload, this could result in reduced memory allocation. +// +// If you are unsure about how to implement a memory pool but want to utilize one, +// begin with grpc.NewSharedBufferPool. +// +// Note: The shared buffer pool feature will not be active if any of the following +// options are used: WithStatsHandler, EnableTracing, or binary logging. In such +// cases, the shared buffer pool will be ignored. +// +// Deprecated: use experimental.WithRecvBufferPool instead. Will be deleted in +// v1.60.0 or later. +func WithRecvBufferPool(bufferPool SharedBufferPool) DialOption { + return withRecvBufferPool(bufferPool) +} + +func withRecvBufferPool(bufferPool SharedBufferPool) DialOption { return newFuncDialOption(func(o *dialOptions) { - o.copts.BufferPool = bufferPool + o.recvBufferPool = bufferPool }) } diff --git a/go-controller/vendor/google.golang.org/grpc/doc.go b/go-controller/vendor/google.golang.org/grpc/doc.go index e7b532b6f8..0022859ad7 100644 --- a/go-controller/vendor/google.golang.org/grpc/doc.go +++ b/go-controller/vendor/google.golang.org/grpc/doc.go @@ -16,7 +16,7 @@ * */ -//go:generate ./scripts/regenerate.sh +//go:generate ./regenerate.sh /* Package grpc implements an RPC system called gRPC. diff --git a/go-controller/vendor/google.golang.org/grpc/encoding/encoding.go b/go-controller/vendor/google.golang.org/grpc/encoding/encoding.go index 11d0ae142c..5ebf88d714 100644 --- a/go-controller/vendor/google.golang.org/grpc/encoding/encoding.go +++ b/go-controller/vendor/google.golang.org/grpc/encoding/encoding.go @@ -94,7 +94,7 @@ type Codec interface { Name() string } -var registeredCodecs = make(map[string]any) +var registeredCodecs = make(map[string]Codec) // RegisterCodec registers the provided Codec for use with all gRPC clients and // servers. @@ -126,6 +126,5 @@ func RegisterCodec(codec Codec) { // // The content-subtype is expected to be lowercase. func GetCodec(contentSubtype string) Codec { - c, _ := registeredCodecs[contentSubtype].(Codec) - return c + return registeredCodecs[contentSubtype] } diff --git a/go-controller/vendor/google.golang.org/grpc/encoding/encoding_v2.go b/go-controller/vendor/google.golang.org/grpc/encoding/encoding_v2.go deleted file mode 100644 index 074c5e234a..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/encoding/encoding_v2.go +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * Copyright 2024 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 encoding - -import ( - "strings" - - "google.golang.org/grpc/mem" -) - -// CodecV2 defines the interface gRPC uses to encode and decode messages. Note -// that implementations of this interface must be thread safe; a CodecV2's -// methods can be called from concurrent goroutines. -type CodecV2 interface { - // Marshal returns the wire format of v. The buffers in the returned - // [mem.BufferSlice] must have at least one reference each, which will be freed - // by gRPC when they are no longer needed. - Marshal(v any) (out mem.BufferSlice, err error) - // Unmarshal parses the wire format into v. Note that data will be freed as soon - // as this function returns. If the codec wishes to guarantee access to the data - // after this function, it must take its own reference that it frees when it is - // no longer needed. - Unmarshal(data mem.BufferSlice, v any) error - // Name returns the name of the Codec implementation. The returned string - // will be used as part of content type in transmission. The result must be - // static; the result cannot change between calls. - Name() string -} - -// RegisterCodecV2 registers the provided CodecV2 for use with all gRPC clients and -// servers. -// -// The CodecV2 will be stored and looked up by result of its Name() method, which -// should match the content-subtype of the encoding handled by the CodecV2. This -// is case-insensitive, and is stored and looked up as lowercase. If the -// result of calling Name() is an empty string, RegisterCodecV2 will panic. See -// Content-Type on -// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for -// more details. -// -// If both a Codec and CodecV2 are registered with the same name, the CodecV2 -// will be used. -// -// NOTE: this function must only be called during initialization time (i.e. in -// an init() function), and is not thread-safe. If multiple Codecs are -// registered with the same name, the one registered last will take effect. -func RegisterCodecV2(codec CodecV2) { - if codec == nil { - panic("cannot register a nil CodecV2") - } - if codec.Name() == "" { - panic("cannot register CodecV2 with empty string result for Name()") - } - contentSubtype := strings.ToLower(codec.Name()) - registeredCodecs[contentSubtype] = codec -} - -// GetCodecV2 gets a registered CodecV2 by content-subtype, or nil if no CodecV2 is -// registered for the content-subtype. -// -// The content-subtype is expected to be lowercase. -func GetCodecV2(contentSubtype string) CodecV2 { - c, _ := registeredCodecs[contentSubtype].(CodecV2) - return c -} diff --git a/go-controller/vendor/google.golang.org/grpc/encoding/proto/proto.go b/go-controller/vendor/google.golang.org/grpc/encoding/proto/proto.go index ceec319dd2..66d5cdf03e 100644 --- a/go-controller/vendor/google.golang.org/grpc/encoding/proto/proto.go +++ b/go-controller/vendor/google.golang.org/grpc/encoding/proto/proto.go @@ -1,6 +1,6 @@ /* * - * Copyright 2024 gRPC authors. + * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ import ( "fmt" "google.golang.org/grpc/encoding" - "google.golang.org/grpc/mem" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/protoadapt" ) @@ -33,51 +32,28 @@ import ( const Name = "proto" func init() { - encoding.RegisterCodecV2(&codecV2{}) + encoding.RegisterCodec(codec{}) } -// codec is a CodecV2 implementation with protobuf. It is the default codec for -// gRPC. -type codecV2 struct{} +// codec is a Codec implementation with protobuf. It is the default codec for gRPC. +type codec struct{} -func (c *codecV2) Marshal(v any) (data mem.BufferSlice, err error) { +func (codec) Marshal(v any) ([]byte, error) { vv := messageV2Of(v) if vv == nil { - return nil, fmt.Errorf("proto: failed to marshal, message is %T, want proto.Message", v) + return nil, fmt.Errorf("failed to marshal, message is %T, want proto.Message", v) } - size := proto.Size(vv) - if mem.IsBelowBufferPoolingThreshold(size) { - buf, err := proto.Marshal(vv) - if err != nil { - return nil, err - } - data = append(data, mem.SliceBuffer(buf)) - } else { - pool := mem.DefaultBufferPool() - buf := pool.Get(size) - if _, err := (proto.MarshalOptions{}).MarshalAppend((*buf)[:0], vv); err != nil { - pool.Put(buf) - return nil, err - } - data = append(data, mem.NewBuffer(buf, pool)) - } - - return data, nil + return proto.Marshal(vv) } -func (c *codecV2) Unmarshal(data mem.BufferSlice, v any) (err error) { +func (codec) Unmarshal(data []byte, v any) error { vv := messageV2Of(v) if vv == nil { return fmt.Errorf("failed to unmarshal, message is %T, want proto.Message", v) } - buf := data.MaterializeToBuffer(mem.DefaultBufferPool()) - defer buf.Free() - // TODO: Upgrade proto.Unmarshal to support mem.BufferSlice. Right now, it's not - // really possible without a major overhaul of the proto package, but the - // vtprotobuf library may be able to support this. - return proto.Unmarshal(buf.ReadOnlyData(), vv) + return proto.Unmarshal(data, vv) } func messageV2Of(v any) proto.Message { @@ -91,6 +67,6 @@ func messageV2Of(v any) proto.Message { return nil } -func (c *codecV2) Name() string { +func (codec) Name() string { return Name } diff --git a/go-controller/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go b/go-controller/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go deleted file mode 100644 index 1d827dd5d9..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go +++ /dev/null @@ -1,269 +0,0 @@ -/* - * - * Copyright 2024 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 stats - -import ( - "maps" - - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/internal" -) - -func init() { - internal.SnapshotMetricRegistryForTesting = snapshotMetricsRegistryForTesting -} - -var logger = grpclog.Component("metrics-registry") - -// DefaultMetrics are the default metrics registered through global metrics -// registry. This is written to at initialization time only, and is read only -// after initialization. -var DefaultMetrics = NewMetrics() - -// MetricDescriptor is the data for a registered metric. -type MetricDescriptor struct { - // The name of this metric. This name must be unique across the whole binary - // (including any per call metrics). See - // https://github.com/grpc/proposal/blob/master/A79-non-per-call-metrics-architecture.md#metric-instrument-naming-conventions - // for metric naming conventions. - Name Metric - // The description of this metric. - Description string - // The unit (e.g. entries, seconds) of this metric. - Unit string - // The required label keys for this metric. These are intended to - // metrics emitted from a stats handler. - Labels []string - // The optional label keys for this metric. These are intended to attached - // to metrics emitted from a stats handler if configured. - OptionalLabels []string - // Whether this metric is on by default. - Default bool - // The type of metric. This is set by the metric registry, and not intended - // to be set by a component registering a metric. - Type MetricType - // Bounds are the bounds of this metric. This only applies to histogram - // metrics. If unset or set with length 0, stats handlers will fall back to - // default bounds. - Bounds []float64 -} - -// MetricType is the type of metric. -type MetricType int - -// Type of metric supported by this instrument registry. -const ( - MetricTypeIntCount MetricType = iota - MetricTypeFloatCount - MetricTypeIntHisto - MetricTypeFloatHisto - MetricTypeIntGauge -) - -// Int64CountHandle is a typed handle for a int count metric. This handle -// is passed at the recording point in order to know which metric to record -// on. -type Int64CountHandle MetricDescriptor - -// Descriptor returns the int64 count handle typecast to a pointer to a -// MetricDescriptor. -func (h *Int64CountHandle) Descriptor() *MetricDescriptor { - return (*MetricDescriptor)(h) -} - -// Record records the int64 count value on the metrics recorder provided. -func (h *Int64CountHandle) Record(recorder MetricsRecorder, incr int64, labels ...string) { - recorder.RecordInt64Count(h, incr, labels...) -} - -// Float64CountHandle is a typed handle for a float count metric. This handle is -// passed at the recording point in order to know which metric to record on. -type Float64CountHandle MetricDescriptor - -// Descriptor returns the float64 count handle typecast to a pointer to a -// MetricDescriptor. -func (h *Float64CountHandle) Descriptor() *MetricDescriptor { - return (*MetricDescriptor)(h) -} - -// Record records the float64 count value on the metrics recorder provided. -func (h *Float64CountHandle) Record(recorder MetricsRecorder, incr float64, labels ...string) { - recorder.RecordFloat64Count(h, incr, labels...) -} - -// Int64HistoHandle is a typed handle for an int histogram metric. This handle -// is passed at the recording point in order to know which metric to record on. -type Int64HistoHandle MetricDescriptor - -// Descriptor returns the int64 histo handle typecast to a pointer to a -// MetricDescriptor. -func (h *Int64HistoHandle) Descriptor() *MetricDescriptor { - return (*MetricDescriptor)(h) -} - -// Record records the int64 histo value on the metrics recorder provided. -func (h *Int64HistoHandle) Record(recorder MetricsRecorder, incr int64, labels ...string) { - recorder.RecordInt64Histo(h, incr, labels...) -} - -// Float64HistoHandle is a typed handle for a float histogram metric. This -// handle is passed at the recording point in order to know which metric to -// record on. -type Float64HistoHandle MetricDescriptor - -// Descriptor returns the float64 histo handle typecast to a pointer to a -// MetricDescriptor. -func (h *Float64HistoHandle) Descriptor() *MetricDescriptor { - return (*MetricDescriptor)(h) -} - -// Record records the float64 histo value on the metrics recorder provided. -func (h *Float64HistoHandle) Record(recorder MetricsRecorder, incr float64, labels ...string) { - recorder.RecordFloat64Histo(h, incr, labels...) -} - -// Int64GaugeHandle is a typed handle for an int gauge metric. This handle is -// passed at the recording point in order to know which metric to record on. -type Int64GaugeHandle MetricDescriptor - -// Descriptor returns the int64 gauge handle typecast to a pointer to a -// MetricDescriptor. -func (h *Int64GaugeHandle) Descriptor() *MetricDescriptor { - return (*MetricDescriptor)(h) -} - -// Record records the int64 histo value on the metrics recorder provided. -func (h *Int64GaugeHandle) Record(recorder MetricsRecorder, incr int64, labels ...string) { - recorder.RecordInt64Gauge(h, incr, labels...) -} - -// registeredMetrics are the registered metric descriptor names. -var registeredMetrics = make(map[Metric]bool) - -// metricsRegistry contains all of the registered metrics. -// -// This is written to only at init time, and read only after that. -var metricsRegistry = make(map[Metric]*MetricDescriptor) - -// DescriptorForMetric returns the MetricDescriptor from the global registry. -// -// Returns nil if MetricDescriptor not present. -func DescriptorForMetric(metric Metric) *MetricDescriptor { - return metricsRegistry[metric] -} - -func registerMetric(name Metric, def bool) { - if registeredMetrics[name] { - logger.Fatalf("metric %v already registered", name) - } - registeredMetrics[name] = true - if def { - DefaultMetrics = DefaultMetrics.Add(name) - } -} - -// RegisterInt64Count registers the metric description onto the global registry. -// It returns a typed handle to use to recording data. -// -// NOTE: this function must only be called during initialization time (i.e. in -// an init() function), and is not thread-safe. If multiple metrics are -// registered with the same name, this function will panic. -func RegisterInt64Count(descriptor MetricDescriptor) *Int64CountHandle { - registerMetric(descriptor.Name, descriptor.Default) - descriptor.Type = MetricTypeIntCount - descPtr := &descriptor - metricsRegistry[descriptor.Name] = descPtr - return (*Int64CountHandle)(descPtr) -} - -// RegisterFloat64Count registers the metric description onto the global -// registry. It returns a typed handle to use to recording data. -// -// NOTE: this function must only be called during initialization time (i.e. in -// an init() function), and is not thread-safe. If multiple metrics are -// registered with the same name, this function will panic. -func RegisterFloat64Count(descriptor MetricDescriptor) *Float64CountHandle { - registerMetric(descriptor.Name, descriptor.Default) - descriptor.Type = MetricTypeFloatCount - descPtr := &descriptor - metricsRegistry[descriptor.Name] = descPtr - return (*Float64CountHandle)(descPtr) -} - -// RegisterInt64Histo registers the metric description onto the global registry. -// It returns a typed handle to use to recording data. -// -// NOTE: this function must only be called during initialization time (i.e. in -// an init() function), and is not thread-safe. If multiple metrics are -// registered with the same name, this function will panic. -func RegisterInt64Histo(descriptor MetricDescriptor) *Int64HistoHandle { - registerMetric(descriptor.Name, descriptor.Default) - descriptor.Type = MetricTypeIntHisto - descPtr := &descriptor - metricsRegistry[descriptor.Name] = descPtr - return (*Int64HistoHandle)(descPtr) -} - -// RegisterFloat64Histo registers the metric description onto the global -// registry. It returns a typed handle to use to recording data. -// -// NOTE: this function must only be called during initialization time (i.e. in -// an init() function), and is not thread-safe. If multiple metrics are -// registered with the same name, this function will panic. -func RegisterFloat64Histo(descriptor MetricDescriptor) *Float64HistoHandle { - registerMetric(descriptor.Name, descriptor.Default) - descriptor.Type = MetricTypeFloatHisto - descPtr := &descriptor - metricsRegistry[descriptor.Name] = descPtr - return (*Float64HistoHandle)(descPtr) -} - -// RegisterInt64Gauge registers the metric description onto the global registry. -// It returns a typed handle to use to recording data. -// -// NOTE: this function must only be called during initialization time (i.e. in -// an init() function), and is not thread-safe. If multiple metrics are -// registered with the same name, this function will panic. -func RegisterInt64Gauge(descriptor MetricDescriptor) *Int64GaugeHandle { - registerMetric(descriptor.Name, descriptor.Default) - descriptor.Type = MetricTypeIntGauge - descPtr := &descriptor - metricsRegistry[descriptor.Name] = descPtr - return (*Int64GaugeHandle)(descPtr) -} - -// snapshotMetricsRegistryForTesting snapshots the global data of the metrics -// registry. Returns a cleanup function that sets the metrics registry to its -// original state. -func snapshotMetricsRegistryForTesting() func() { - oldDefaultMetrics := DefaultMetrics - oldRegisteredMetrics := registeredMetrics - oldMetricsRegistry := metricsRegistry - - registeredMetrics = make(map[Metric]bool) - metricsRegistry = make(map[Metric]*MetricDescriptor) - maps.Copy(registeredMetrics, registeredMetrics) - maps.Copy(metricsRegistry, metricsRegistry) - - return func() { - DefaultMetrics = oldDefaultMetrics - registeredMetrics = oldRegisteredMetrics - metricsRegistry = oldMetricsRegistry - } -} diff --git a/go-controller/vendor/google.golang.org/grpc/experimental/stats/metrics.go b/go-controller/vendor/google.golang.org/grpc/experimental/stats/metrics.go deleted file mode 100644 index 3221f7a633..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/experimental/stats/metrics.go +++ /dev/null @@ -1,114 +0,0 @@ -/* - * - * Copyright 2024 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 stats contains experimental metrics/stats API's. -package stats - -import "maps" - -// MetricsRecorder records on metrics derived from metric registry. -type MetricsRecorder interface { - // RecordInt64Count records the measurement alongside labels on the int - // count associated with the provided handle. - RecordInt64Count(handle *Int64CountHandle, incr int64, labels ...string) - // RecordFloat64Count records the measurement alongside labels on the float - // count associated with the provided handle. - RecordFloat64Count(handle *Float64CountHandle, incr float64, labels ...string) - // RecordInt64Histo records the measurement alongside labels on the int - // histo associated with the provided handle. - RecordInt64Histo(handle *Int64HistoHandle, incr int64, labels ...string) - // RecordFloat64Histo records the measurement alongside labels on the float - // histo associated with the provided handle. - RecordFloat64Histo(handle *Float64HistoHandle, incr float64, labels ...string) - // RecordInt64Gauge records the measurement alongside labels on the int - // gauge associated with the provided handle. - RecordInt64Gauge(handle *Int64GaugeHandle, incr int64, labels ...string) -} - -// Metric is an identifier for a metric. -type Metric string - -// Metrics is a set of metrics to record. Once created, Metrics is immutable, -// however Add and Remove can make copies with specific metrics added or -// removed, respectively. -// -// Do not construct directly; use NewMetrics instead. -type Metrics struct { - // metrics are the set of metrics to initialize. - metrics map[Metric]bool -} - -// NewMetrics returns a Metrics containing Metrics. -func NewMetrics(metrics ...Metric) *Metrics { - newMetrics := make(map[Metric]bool) - for _, metric := range metrics { - newMetrics[metric] = true - } - return &Metrics{ - metrics: newMetrics, - } -} - -// Metrics returns the metrics set. The returned map is read-only and must not -// be modified. -func (m *Metrics) Metrics() map[Metric]bool { - return m.metrics -} - -// Add adds the metrics to the metrics set and returns a new copy with the -// additional metrics. -func (m *Metrics) Add(metrics ...Metric) *Metrics { - newMetrics := make(map[Metric]bool) - for metric := range m.metrics { - newMetrics[metric] = true - } - - for _, metric := range metrics { - newMetrics[metric] = true - } - return &Metrics{ - metrics: newMetrics, - } -} - -// Join joins the metrics passed in with the metrics set, and returns a new copy -// with the merged metrics. -func (m *Metrics) Join(metrics *Metrics) *Metrics { - newMetrics := make(map[Metric]bool) - maps.Copy(newMetrics, m.metrics) - maps.Copy(newMetrics, metrics.metrics) - return &Metrics{ - metrics: newMetrics, - } -} - -// Remove removes the metrics from the metrics set and returns a new copy with -// the metrics removed. -func (m *Metrics) Remove(metrics ...Metric) *Metrics { - newMetrics := make(map[Metric]bool) - for metric := range m.metrics { - newMetrics[metric] = true - } - - for _, metric := range metrics { - delete(newMetrics, metric) - } - return &Metrics{ - metrics: newMetrics, - } -} diff --git a/go-controller/vendor/google.golang.org/grpc/grpclog/component.go b/go-controller/vendor/google.golang.org/grpc/grpclog/component.go index f1ae080dcb..ac73c9ced2 100644 --- a/go-controller/vendor/google.golang.org/grpc/grpclog/component.go +++ b/go-controller/vendor/google.golang.org/grpc/grpclog/component.go @@ -20,6 +20,8 @@ package grpclog import ( "fmt" + + "google.golang.org/grpc/internal/grpclog" ) // componentData records the settings for a component. @@ -31,22 +33,22 @@ var cache = map[string]*componentData{} func (c *componentData) InfoDepth(depth int, args ...any) { args = append([]any{"[" + string(c.name) + "]"}, args...) - InfoDepth(depth+1, args...) + grpclog.InfoDepth(depth+1, args...) } func (c *componentData) WarningDepth(depth int, args ...any) { args = append([]any{"[" + string(c.name) + "]"}, args...) - WarningDepth(depth+1, args...) + grpclog.WarningDepth(depth+1, args...) } func (c *componentData) ErrorDepth(depth int, args ...any) { args = append([]any{"[" + string(c.name) + "]"}, args...) - ErrorDepth(depth+1, args...) + grpclog.ErrorDepth(depth+1, args...) } func (c *componentData) FatalDepth(depth int, args ...any) { args = append([]any{"[" + string(c.name) + "]"}, args...) - FatalDepth(depth+1, args...) + grpclog.FatalDepth(depth+1, args...) } func (c *componentData) Info(args ...any) { diff --git a/go-controller/vendor/google.golang.org/grpc/grpclog/grpclog.go b/go-controller/vendor/google.golang.org/grpc/grpclog/grpclog.go index db320105e6..16928c9cb9 100644 --- a/go-controller/vendor/google.golang.org/grpc/grpclog/grpclog.go +++ b/go-controller/vendor/google.golang.org/grpc/grpclog/grpclog.go @@ -18,15 +18,18 @@ // Package grpclog defines logging for grpc. // -// In the default logger, severity level can be set by environment variable -// GRPC_GO_LOG_SEVERITY_LEVEL, verbosity level can be set by -// GRPC_GO_LOG_VERBOSITY_LEVEL. -package grpclog +// All logs in transport and grpclb packages only go to verbose level 2. +// All logs in other packages in grpc are logged in spite of the verbosity level. +// +// In the default logger, +// severity level can be set by environment variable GRPC_GO_LOG_SEVERITY_LEVEL, +// verbosity level can be set by GRPC_GO_LOG_VERBOSITY_LEVEL. +package grpclog // import "google.golang.org/grpc/grpclog" import ( "os" - "google.golang.org/grpc/grpclog/internal" + "google.golang.org/grpc/internal/grpclog" ) func init() { @@ -35,58 +38,58 @@ func init() { // V reports whether verbosity level l is at least the requested verbose level. func V(l int) bool { - return internal.LoggerV2Impl.V(l) + return grpclog.Logger.V(l) } // Info logs to the INFO log. func Info(args ...any) { - internal.LoggerV2Impl.Info(args...) + grpclog.Logger.Info(args...) } // Infof logs to the INFO log. Arguments are handled in the manner of fmt.Printf. func Infof(format string, args ...any) { - internal.LoggerV2Impl.Infof(format, args...) + grpclog.Logger.Infof(format, args...) } // Infoln logs to the INFO log. Arguments are handled in the manner of fmt.Println. func Infoln(args ...any) { - internal.LoggerV2Impl.Infoln(args...) + grpclog.Logger.Infoln(args...) } // Warning logs to the WARNING log. func Warning(args ...any) { - internal.LoggerV2Impl.Warning(args...) + grpclog.Logger.Warning(args...) } // Warningf logs to the WARNING log. Arguments are handled in the manner of fmt.Printf. func Warningf(format string, args ...any) { - internal.LoggerV2Impl.Warningf(format, args...) + grpclog.Logger.Warningf(format, args...) } // Warningln logs to the WARNING log. Arguments are handled in the manner of fmt.Println. func Warningln(args ...any) { - internal.LoggerV2Impl.Warningln(args...) + grpclog.Logger.Warningln(args...) } // Error logs to the ERROR log. func Error(args ...any) { - internal.LoggerV2Impl.Error(args...) + grpclog.Logger.Error(args...) } // Errorf logs to the ERROR log. Arguments are handled in the manner of fmt.Printf. func Errorf(format string, args ...any) { - internal.LoggerV2Impl.Errorf(format, args...) + grpclog.Logger.Errorf(format, args...) } // Errorln logs to the ERROR log. Arguments are handled in the manner of fmt.Println. func Errorln(args ...any) { - internal.LoggerV2Impl.Errorln(args...) + grpclog.Logger.Errorln(args...) } // Fatal logs to the FATAL log. Arguments are handled in the manner of fmt.Print. // It calls os.Exit() with exit code 1. func Fatal(args ...any) { - internal.LoggerV2Impl.Fatal(args...) + grpclog.Logger.Fatal(args...) // Make sure fatal logs will exit. os.Exit(1) } @@ -94,15 +97,15 @@ func Fatal(args ...any) { // Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf. // It calls os.Exit() with exit code 1. func Fatalf(format string, args ...any) { - internal.LoggerV2Impl.Fatalf(format, args...) + grpclog.Logger.Fatalf(format, args...) // Make sure fatal logs will exit. os.Exit(1) } // Fatalln logs to the FATAL log. Arguments are handled in the manner of fmt.Println. -// It calls os.Exit() with exit code 1. +// It calle os.Exit()) with exit code 1. func Fatalln(args ...any) { - internal.LoggerV2Impl.Fatalln(args...) + grpclog.Logger.Fatalln(args...) // Make sure fatal logs will exit. os.Exit(1) } @@ -111,76 +114,19 @@ func Fatalln(args ...any) { // // Deprecated: use Info. func Print(args ...any) { - internal.LoggerV2Impl.Info(args...) + grpclog.Logger.Info(args...) } // Printf prints to the logger. Arguments are handled in the manner of fmt.Printf. // // Deprecated: use Infof. func Printf(format string, args ...any) { - internal.LoggerV2Impl.Infof(format, args...) + grpclog.Logger.Infof(format, args...) } // Println prints to the logger. Arguments are handled in the manner of fmt.Println. // // Deprecated: use Infoln. func Println(args ...any) { - internal.LoggerV2Impl.Infoln(args...) -} - -// InfoDepth logs to the INFO log at the specified depth. -// -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. -func InfoDepth(depth int, args ...any) { - if internal.DepthLoggerV2Impl != nil { - internal.DepthLoggerV2Impl.InfoDepth(depth, args...) - } else { - internal.LoggerV2Impl.Infoln(args...) - } -} - -// WarningDepth logs to the WARNING log at the specified depth. -// -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. -func WarningDepth(depth int, args ...any) { - if internal.DepthLoggerV2Impl != nil { - internal.DepthLoggerV2Impl.WarningDepth(depth, args...) - } else { - internal.LoggerV2Impl.Warningln(args...) - } -} - -// ErrorDepth logs to the ERROR log at the specified depth. -// -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. -func ErrorDepth(depth int, args ...any) { - if internal.DepthLoggerV2Impl != nil { - internal.DepthLoggerV2Impl.ErrorDepth(depth, args...) - } else { - internal.LoggerV2Impl.Errorln(args...) - } -} - -// FatalDepth logs to the FATAL log at the specified depth. -// -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. -func FatalDepth(depth int, args ...any) { - if internal.DepthLoggerV2Impl != nil { - internal.DepthLoggerV2Impl.FatalDepth(depth, args...) - } else { - internal.LoggerV2Impl.Fatalln(args...) - } - os.Exit(1) + grpclog.Logger.Infoln(args...) } diff --git a/go-controller/vendor/google.golang.org/grpc/grpclog/internal/grpclog.go b/go-controller/vendor/google.golang.org/grpc/grpclog/internal/grpclog.go deleted file mode 100644 index 59c03bc14c..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/grpclog/internal/grpclog.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * Copyright 2024 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 internal contains functionality internal to the grpclog package. -package internal - -// LoggerV2Impl is the logger used for the non-depth log functions. -var LoggerV2Impl LoggerV2 - -// DepthLoggerV2Impl is the logger used for the depth log functions. -var DepthLoggerV2Impl DepthLoggerV2 diff --git a/go-controller/vendor/google.golang.org/grpc/grpclog/internal/logger.go b/go-controller/vendor/google.golang.org/grpc/grpclog/internal/logger.go deleted file mode 100644 index e524fdd40b..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/grpclog/internal/logger.go +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * Copyright 2024 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 internal - -// Logger mimics golang's standard Logger as an interface. -// -// Deprecated: use LoggerV2. -type Logger interface { - Fatal(args ...any) - Fatalf(format string, args ...any) - Fatalln(args ...any) - Print(args ...any) - Printf(format string, args ...any) - Println(args ...any) -} - -// LoggerWrapper wraps Logger into a LoggerV2. -type LoggerWrapper struct { - Logger -} - -// Info logs to INFO log. Arguments are handled in the manner of fmt.Print. -func (l *LoggerWrapper) Info(args ...any) { - l.Logger.Print(args...) -} - -// Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println. -func (l *LoggerWrapper) Infoln(args ...any) { - l.Logger.Println(args...) -} - -// Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf. -func (l *LoggerWrapper) Infof(format string, args ...any) { - l.Logger.Printf(format, args...) -} - -// Warning logs to WARNING log. Arguments are handled in the manner of fmt.Print. -func (l *LoggerWrapper) Warning(args ...any) { - l.Logger.Print(args...) -} - -// Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println. -func (l *LoggerWrapper) Warningln(args ...any) { - l.Logger.Println(args...) -} - -// Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf. -func (l *LoggerWrapper) Warningf(format string, args ...any) { - l.Logger.Printf(format, args...) -} - -// Error logs to ERROR log. Arguments are handled in the manner of fmt.Print. -func (l *LoggerWrapper) Error(args ...any) { - l.Logger.Print(args...) -} - -// Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println. -func (l *LoggerWrapper) Errorln(args ...any) { - l.Logger.Println(args...) -} - -// Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. -func (l *LoggerWrapper) Errorf(format string, args ...any) { - l.Logger.Printf(format, args...) -} - -// V reports whether verbosity level l is at least the requested verbose level. -func (*LoggerWrapper) V(int) bool { - // Returns true for all verbose level. - return true -} diff --git a/go-controller/vendor/google.golang.org/grpc/grpclog/logger.go b/go-controller/vendor/google.golang.org/grpc/grpclog/logger.go index 4b20358570..b1674d8267 100644 --- a/go-controller/vendor/google.golang.org/grpc/grpclog/logger.go +++ b/go-controller/vendor/google.golang.org/grpc/grpclog/logger.go @@ -18,17 +18,70 @@ package grpclog -import "google.golang.org/grpc/grpclog/internal" +import "google.golang.org/grpc/internal/grpclog" // Logger mimics golang's standard Logger as an interface. // // Deprecated: use LoggerV2. -type Logger internal.Logger +type Logger interface { + Fatal(args ...any) + Fatalf(format string, args ...any) + Fatalln(args ...any) + Print(args ...any) + Printf(format string, args ...any) + Println(args ...any) +} // SetLogger sets the logger that is used in grpc. Call only from // init() functions. // // Deprecated: use SetLoggerV2. func SetLogger(l Logger) { - internal.LoggerV2Impl = &internal.LoggerWrapper{Logger: l} + grpclog.Logger = &loggerWrapper{Logger: l} +} + +// loggerWrapper wraps Logger into a LoggerV2. +type loggerWrapper struct { + Logger +} + +func (g *loggerWrapper) Info(args ...any) { + g.Logger.Print(args...) +} + +func (g *loggerWrapper) Infoln(args ...any) { + g.Logger.Println(args...) +} + +func (g *loggerWrapper) Infof(format string, args ...any) { + g.Logger.Printf(format, args...) +} + +func (g *loggerWrapper) Warning(args ...any) { + g.Logger.Print(args...) +} + +func (g *loggerWrapper) Warningln(args ...any) { + g.Logger.Println(args...) +} + +func (g *loggerWrapper) Warningf(format string, args ...any) { + g.Logger.Printf(format, args...) +} + +func (g *loggerWrapper) Error(args ...any) { + g.Logger.Print(args...) +} + +func (g *loggerWrapper) Errorln(args ...any) { + g.Logger.Println(args...) +} + +func (g *loggerWrapper) Errorf(format string, args ...any) { + g.Logger.Printf(format, args...) +} + +func (g *loggerWrapper) V(l int) bool { + // Returns true for all verbose level. + return true } diff --git a/go-controller/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/go-controller/vendor/google.golang.org/grpc/grpclog/loggerv2.go index 892dc13d16..ecfd36d713 100644 --- a/go-controller/vendor/google.golang.org/grpc/grpclog/loggerv2.go +++ b/go-controller/vendor/google.golang.org/grpc/grpclog/loggerv2.go @@ -19,16 +19,52 @@ package grpclog import ( + "encoding/json" + "fmt" "io" + "log" "os" "strconv" "strings" - "google.golang.org/grpc/grpclog/internal" + "google.golang.org/grpc/internal/grpclog" ) // LoggerV2 does underlying logging work for grpclog. -type LoggerV2 internal.LoggerV2 +type LoggerV2 interface { + // Info logs to INFO log. Arguments are handled in the manner of fmt.Print. + Info(args ...any) + // Infoln logs to INFO log. Arguments are handled in the manner of fmt.Println. + Infoln(args ...any) + // Infof logs to INFO log. Arguments are handled in the manner of fmt.Printf. + Infof(format string, args ...any) + // Warning logs to WARNING log. Arguments are handled in the manner of fmt.Print. + Warning(args ...any) + // Warningln logs to WARNING log. Arguments are handled in the manner of fmt.Println. + Warningln(args ...any) + // Warningf logs to WARNING log. Arguments are handled in the manner of fmt.Printf. + Warningf(format string, args ...any) + // Error logs to ERROR log. Arguments are handled in the manner of fmt.Print. + Error(args ...any) + // Errorln logs to ERROR log. Arguments are handled in the manner of fmt.Println. + Errorln(args ...any) + // Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. + Errorf(format string, args ...any) + // Fatal logs to ERROR log. Arguments are handled in the manner of fmt.Print. + // gRPC ensures that all Fatal logs will exit with os.Exit(1). + // Implementations may also call os.Exit() with a non-zero exit code. + Fatal(args ...any) + // Fatalln logs to ERROR log. Arguments are handled in the manner of fmt.Println. + // gRPC ensures that all Fatal logs will exit with os.Exit(1). + // Implementations may also call os.Exit() with a non-zero exit code. + Fatalln(args ...any) + // Fatalf logs to ERROR log. Arguments are handled in the manner of fmt.Printf. + // gRPC ensures that all Fatal logs will exit with os.Exit(1). + // Implementations may also call os.Exit() with a non-zero exit code. + Fatalf(format string, args ...any) + // V reports whether verbosity level l is at least the requested verbose level. + V(l int) bool +} // SetLoggerV2 sets logger that is used in grpc to a V2 logger. // Not mutex-protected, should be called before any gRPC functions. @@ -36,8 +72,34 @@ func SetLoggerV2(l LoggerV2) { if _, ok := l.(*componentData); ok { panic("cannot use component logger as grpclog logger") } - internal.LoggerV2Impl = l - internal.DepthLoggerV2Impl, _ = l.(internal.DepthLoggerV2) + grpclog.Logger = l + grpclog.DepthLogger, _ = l.(grpclog.DepthLoggerV2) +} + +const ( + // infoLog indicates Info severity. + infoLog int = iota + // warningLog indicates Warning severity. + warningLog + // errorLog indicates Error severity. + errorLog + // fatalLog indicates Fatal severity. + fatalLog +) + +// severityName contains the string representation of each severity. +var severityName = []string{ + infoLog: "INFO", + warningLog: "WARNING", + errorLog: "ERROR", + fatalLog: "FATAL", +} + +// loggerT is the default logger used by grpclog. +type loggerT struct { + m []*log.Logger + v int + jsonFormat bool } // NewLoggerV2 creates a loggerV2 with the provided writers. @@ -46,13 +108,32 @@ func SetLoggerV2(l LoggerV2) { // Warning logs will be written to warningW and infoW. // Info logs will be written to infoW. func NewLoggerV2(infoW, warningW, errorW io.Writer) LoggerV2 { - return internal.NewLoggerV2(infoW, warningW, errorW, internal.LoggerV2Config{}) + return newLoggerV2WithConfig(infoW, warningW, errorW, loggerV2Config{}) } // NewLoggerV2WithVerbosity creates a loggerV2 with the provided writers and // verbosity level. func NewLoggerV2WithVerbosity(infoW, warningW, errorW io.Writer, v int) LoggerV2 { - return internal.NewLoggerV2(infoW, warningW, errorW, internal.LoggerV2Config{Verbosity: v}) + return newLoggerV2WithConfig(infoW, warningW, errorW, loggerV2Config{verbose: v}) +} + +type loggerV2Config struct { + verbose int + jsonFormat bool +} + +func newLoggerV2WithConfig(infoW, warningW, errorW io.Writer, c loggerV2Config) LoggerV2 { + var m []*log.Logger + flag := log.LstdFlags + if c.jsonFormat { + flag = 0 + } + m = append(m, log.New(infoW, "", flag)) + m = append(m, log.New(io.MultiWriter(infoW, warningW), "", flag)) + ew := io.MultiWriter(infoW, warningW, errorW) // ew will be used for error and fatal. + m = append(m, log.New(ew, "", flag)) + m = append(m, log.New(ew, "", flag)) + return &loggerT{m: m, v: c.verbose, jsonFormat: c.jsonFormat} } // newLoggerV2 creates a loggerV2 to be used as default logger. @@ -80,10 +161,80 @@ func newLoggerV2() LoggerV2 { jsonFormat := strings.EqualFold(os.Getenv("GRPC_GO_LOG_FORMATTER"), "json") - return internal.NewLoggerV2(infoW, warningW, errorW, internal.LoggerV2Config{ - Verbosity: v, - FormatJSON: jsonFormat, + return newLoggerV2WithConfig(infoW, warningW, errorW, loggerV2Config{ + verbose: v, + jsonFormat: jsonFormat, + }) +} + +func (g *loggerT) output(severity int, s string) { + sevStr := severityName[severity] + if !g.jsonFormat { + g.m[severity].Output(2, fmt.Sprintf("%v: %v", sevStr, s)) + return + } + // TODO: we can also include the logging component, but that needs more + // (API) changes. + b, _ := json.Marshal(map[string]string{ + "severity": sevStr, + "message": s, }) + g.m[severity].Output(2, string(b)) +} + +func (g *loggerT) Info(args ...any) { + g.output(infoLog, fmt.Sprint(args...)) +} + +func (g *loggerT) Infoln(args ...any) { + g.output(infoLog, fmt.Sprintln(args...)) +} + +func (g *loggerT) Infof(format string, args ...any) { + g.output(infoLog, fmt.Sprintf(format, args...)) +} + +func (g *loggerT) Warning(args ...any) { + g.output(warningLog, fmt.Sprint(args...)) +} + +func (g *loggerT) Warningln(args ...any) { + g.output(warningLog, fmt.Sprintln(args...)) +} + +func (g *loggerT) Warningf(format string, args ...any) { + g.output(warningLog, fmt.Sprintf(format, args...)) +} + +func (g *loggerT) Error(args ...any) { + g.output(errorLog, fmt.Sprint(args...)) +} + +func (g *loggerT) Errorln(args ...any) { + g.output(errorLog, fmt.Sprintln(args...)) +} + +func (g *loggerT) Errorf(format string, args ...any) { + g.output(errorLog, fmt.Sprintf(format, args...)) +} + +func (g *loggerT) Fatal(args ...any) { + g.output(fatalLog, fmt.Sprint(args...)) + os.Exit(1) +} + +func (g *loggerT) Fatalln(args ...any) { + g.output(fatalLog, fmt.Sprintln(args...)) + os.Exit(1) +} + +func (g *loggerT) Fatalf(format string, args ...any) { + g.output(fatalLog, fmt.Sprintf(format, args...)) + os.Exit(1) +} + +func (g *loggerT) V(l int) bool { + return l <= g.v } // DepthLoggerV2 logs at a specified call frame. If a LoggerV2 also implements @@ -94,4 +245,14 @@ func newLoggerV2() LoggerV2 { // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. -type DepthLoggerV2 internal.DepthLoggerV2 +type DepthLoggerV2 interface { + LoggerV2 + // InfoDepth logs to INFO log at the specified depth. Arguments are handled in the manner of fmt.Println. + InfoDepth(depth int, args ...any) + // WarningDepth logs to WARNING log at the specified depth. Arguments are handled in the manner of fmt.Println. + WarningDepth(depth int, args ...any) + // ErrorDepth logs to ERROR log at the specified depth. Arguments are handled in the manner of fmt.Println. + ErrorDepth(depth int, args ...any) + // FatalDepth logs to FATAL log at the specified depth. Arguments are handled in the manner of fmt.Println. + FatalDepth(depth int, args ...any) +} diff --git a/go-controller/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/config.go b/go-controller/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/config.go index 85540f86a7..13821a9266 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/config.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/config.go @@ -33,8 +33,6 @@ type lbConfig struct { childConfig serviceconfig.LoadBalancingConfig } -// ChildName returns the name of the child balancer of the gracefulswitch -// Balancer. func ChildName(l serviceconfig.LoadBalancingConfig) string { return l.(*lbConfig).childBuilder.Name() } diff --git a/go-controller/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/go-controller/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go index 9669328914..aa4505a871 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go @@ -106,7 +106,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(_ context.Context, c LogEntryConfig) { +func (ml *TruncatingMethodLogger) Log(ctx context.Context, c LogEntryConfig) { ml.sink.Write(ml.Build(c)) } diff --git a/go-controller/vendor/google.golang.org/grpc/internal/channelz/channel.go b/go-controller/vendor/google.golang.org/grpc/internal/channelz/channel.go index 3ec662799a..d7e9e1d54e 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/channelz/channel.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/channelz/channel.go @@ -43,8 +43,6 @@ type Channel struct { // Non-zero traceRefCount means the trace of this channel cannot be deleted. traceRefCount int32 - // ChannelMetrics holds connectivity state, target and call metrics for the - // channel within channelz. ChannelMetrics ChannelMetrics } @@ -52,8 +50,6 @@ type Channel struct { // nesting. func (c *Channel) channelzIdentifier() {} -// String returns a string representation of the Channel, including its parent -// entity and ID. func (c *Channel) String() string { if c.Parent == nil { return fmt.Sprintf("Channel #%d", c.ID) @@ -65,31 +61,24 @@ func (c *Channel) id() int64 { return c.ID } -// SubChans returns a copy of the map of sub-channels associated with the -// Channel. func (c *Channel) SubChans() map[int64]string { db.mu.RLock() defer db.mu.RUnlock() return copyMap(c.subChans) } -// NestedChans returns a copy of the map of nested channels associated with the -// Channel. func (c *Channel) NestedChans() map[int64]string { db.mu.RLock() defer db.mu.RUnlock() return copyMap(c.nestedChans) } -// Trace returns a copy of the Channel's trace data. func (c *Channel) Trace() *ChannelTrace { db.mu.RLock() defer db.mu.RUnlock() return c.trace.copy() } -// ChannelMetrics holds connectivity state, target and call metrics for the -// channel within channelz. type ChannelMetrics struct { // The current connectivity state of the channel. State atomic.Pointer[connectivity.State] @@ -147,16 +136,12 @@ func strFromPointer(s *string) string { return *s } -// String returns a string representation of the ChannelMetrics, including its -// state, target, and call metrics. func (c *ChannelMetrics) String() string { return fmt.Sprintf("State: %v, Target: %s, CallsStarted: %v, CallsSucceeded: %v, CallsFailed: %v, LastCallStartedTimestamp: %v", c.State.Load(), strFromPointer(c.Target.Load()), c.CallsStarted.Load(), c.CallsSucceeded.Load(), c.CallsFailed.Load(), c.LastCallStartedTimestamp.Load(), ) } -// NewChannelMetricForTesting creates a new instance of ChannelMetrics with -// specified initial values for testing purposes. func NewChannelMetricForTesting(state connectivity.State, target string, started, succeeded, failed, timestamp int64) *ChannelMetrics { c := &ChannelMetrics{} c.State.Store(&state) diff --git a/go-controller/vendor/google.golang.org/grpc/internal/channelz/channelmap.go b/go-controller/vendor/google.golang.org/grpc/internal/channelz/channelmap.go index 64c791953d..dfe18b0892 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/channelz/channelmap.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/channelz/channelmap.go @@ -46,7 +46,7 @@ type entry interface { // channelMap is the storage data structure for channelz. // -// Methods of channelMap can be divided into two categories with respect to +// Methods of channelMap can be divided in two two categories with respect to // locking. // // 1. Methods acquire the global lock. @@ -234,6 +234,13 @@ func copyMap(m map[int64]string) map[int64]string { return n } +func min(a, b int) int { + if a < b { + return a + } + return b +} + func (c *channelMap) getTopChannels(id int64, maxResults int) ([]*Channel, bool) { if maxResults <= 0 { maxResults = EntriesPerPage diff --git a/go-controller/vendor/google.golang.org/grpc/internal/channelz/funcs.go b/go-controller/vendor/google.golang.org/grpc/internal/channelz/funcs.go index 078bb81238..03e24e1507 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/channelz/funcs.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/channelz/funcs.go @@ -33,7 +33,7 @@ var ( // outside this package except by tests. IDGen IDGenerator - db = newChannelMap() + db *channelMap = newChannelMap() // EntriesPerPage defines the number of channelz entries to be shown on a web page. EntriesPerPage = 50 curState int32 diff --git a/go-controller/vendor/google.golang.org/grpc/internal/channelz/server.go b/go-controller/vendor/google.golang.org/grpc/internal/channelz/server.go index b5a8249929..cdfc49d6ea 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/channelz/server.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/channelz/server.go @@ -59,8 +59,6 @@ func NewServerMetricsForTesting(started, succeeded, failed, timestamp int64) *Se return sm } -// CopyFrom copies the metrics data from the provided ServerMetrics -// instance into the current instance. func (sm *ServerMetrics) CopyFrom(o *ServerMetrics) { sm.CallsStarted.Store(o.CallsStarted.Load()) sm.CallsSucceeded.Store(o.CallsSucceeded.Load()) diff --git a/go-controller/vendor/google.golang.org/grpc/internal/channelz/socket.go b/go-controller/vendor/google.golang.org/grpc/internal/channelz/socket.go index 90103847c5..fa64834b25 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/channelz/socket.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/channelz/socket.go @@ -70,18 +70,13 @@ type EphemeralSocketMetrics struct { RemoteFlowControlWindow int64 } -// SocketType represents the type of socket. type SocketType string -// SocketType can be one of these. const ( SocketTypeNormal = "NormalSocket" SocketTypeListen = "ListenSocket" ) -// Socket represents a socket within channelz which includes socket -// metrics and data related to socket activity and provides methods -// for managing and interacting with sockets. type Socket struct { Entity SocketType SocketType @@ -105,8 +100,6 @@ type Socket struct { Security credentials.ChannelzSecurityValue } -// String returns a string representation of the Socket, including its parent -// entity, socket type, and ID. func (ls *Socket) String() string { return fmt.Sprintf("%s %s #%d", ls.Parent, ls.SocketType, ls.ID) } diff --git a/go-controller/vendor/google.golang.org/grpc/internal/channelz/subchannel.go b/go-controller/vendor/google.golang.org/grpc/internal/channelz/subchannel.go index b20802e6e9..3b88e4cba8 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/channelz/subchannel.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/channelz/subchannel.go @@ -47,14 +47,12 @@ func (sc *SubChannel) id() int64 { return sc.ID } -// Sockets returns a copy of the sockets map associated with the SubChannel. func (sc *SubChannel) Sockets() map[int64]string { db.mu.RLock() defer db.mu.RUnlock() return copyMap(sc.sockets) } -// Trace returns a copy of the ChannelTrace associated with the SubChannel. func (sc *SubChannel) Trace() *ChannelTrace { db.mu.RLock() defer db.mu.RUnlock() diff --git a/go-controller/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go b/go-controller/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go index 0e6e18e185..d1ed8df6a5 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/channelz/syscall_nonlinux.go @@ -35,13 +35,13 @@ type SocketOptionData struct { // Getsockopt defines the function to get socket options requested by channelz. // It is to be passed to syscall.RawConn.Control(). // Windows OS doesn't support Socket Option -func (s *SocketOptionData) Getsockopt(uintptr) { +func (s *SocketOptionData) Getsockopt(fd uintptr) { once.Do(func() { logger.Warning("Channelz: socket options are not supported on non-linux environments") }) } // GetSocketOption gets the socket option info of the conn. -func GetSocketOption(any) *SocketOptionData { +func GetSocketOption(c any) *SocketOptionData { return nil } diff --git a/go-controller/vendor/google.golang.org/grpc/internal/channelz/trace.go b/go-controller/vendor/google.golang.org/grpc/internal/channelz/trace.go index 2bffe47776..36b8674032 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/channelz/trace.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/channelz/trace.go @@ -79,21 +79,13 @@ type TraceEvent struct { Parent *TraceEvent } -// ChannelTrace provides tracing information for a channel. -// It tracks various events and metadata related to the channel's lifecycle -// and operations. type ChannelTrace struct { - cm *channelMap - clearCalled bool - // The time when the trace was created. + cm *channelMap + clearCalled bool CreationTime time.Time - // A counter for the number of events recorded in the - // trace. - EventNum int64 - mu sync.Mutex - // A slice of traceEvent pointers representing the events recorded for - // this channel. - Events []*traceEvent + EventNum int64 + mu sync.Mutex + Events []*traceEvent } func (c *ChannelTrace) copy() *ChannelTrace { @@ -183,7 +175,6 @@ var refChannelTypeToString = map[RefChannelType]string{ RefNormalSocket: "NormalSocket", } -// String returns a string representation of the RefChannelType func (r RefChannelType) String() string { return refChannelTypeToString[r] } diff --git a/go-controller/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/go-controller/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 6e7dd6b772..d906487139 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -45,16 +45,7 @@ var ( // option is present for backward compatibility. This option may be overridden // by setting the environment variable "GRPC_ENFORCE_ALPN_ENABLED" to "true" // or "false". - EnforceALPNEnabled = boolFromEnv("GRPC_ENFORCE_ALPN_ENABLED", true) - // XDSFallbackSupport is the env variable that controls whether support for - // xDS fallback is turned on. If this is unset or is false, only the first - // xDS server in the list of server configs will be used. - XDSFallbackSupport = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FALLBACK", false) - // NewPickFirstEnabled is set if the new pickfirst leaf policy is to be used - // instead of the exiting pickfirst implementation. This can be enabled by - // setting the environment variable "GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST" - // to "true". - NewPickFirstEnabled = boolFromEnv("GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST", false) + EnforceALPNEnabled = boolFromEnv("GRPC_ENFORCE_ALPN_ENABLED", false) ) func boolFromEnv(envVar string, def bool) bool { diff --git a/go-controller/vendor/google.golang.org/grpc/internal/experimental.go b/go-controller/vendor/google.golang.org/grpc/internal/experimental.go index 7617be2158..7f7044e173 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/experimental.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/experimental.go @@ -18,11 +18,11 @@ package internal var ( - // WithBufferPool is implemented by the grpc package and returns a dial + // WithRecvBufferPool is implemented by the grpc package and returns a dial // option to configure a shared buffer pool for a grpc.ClientConn. - WithBufferPool any // func (grpc.SharedBufferPool) grpc.DialOption + WithRecvBufferPool any // func (grpc.SharedBufferPool) grpc.DialOption - // BufferPool is implemented by the grpc package and returns a server + // RecvBufferPool is implemented by the grpc package and returns a server // option to configure a shared buffer pool for a grpc.Server. - BufferPool any // func (grpc.SharedBufferPool) grpc.ServerOption + RecvBufferPool any // func (grpc.SharedBufferPool) grpc.ServerOption ) diff --git a/go-controller/vendor/google.golang.org/grpc/grpclog/internal/loggerv2.go b/go-controller/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go similarity index 52% rename from go-controller/vendor/google.golang.org/grpc/grpclog/internal/loggerv2.go rename to go-controller/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go index 07df71e98a..bfc45102ab 100644 --- a/go-controller/vendor/google.golang.org/grpc/grpclog/internal/loggerv2.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go @@ -1,6 +1,6 @@ /* * - * Copyright 2024 gRPC authors. + * Copyright 2020 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,17 +16,59 @@ * */ -package internal +// Package grpclog (internal) defines depth logging for grpc. +package grpclog import ( - "encoding/json" - "fmt" - "io" - "log" "os" ) +// Logger is the logger used for the non-depth log functions. +var Logger LoggerV2 + +// DepthLogger is the logger used for the depth log functions. +var DepthLogger DepthLoggerV2 + +// InfoDepth logs to the INFO log at the specified depth. +func InfoDepth(depth int, args ...any) { + if DepthLogger != nil { + DepthLogger.InfoDepth(depth, args...) + } else { + Logger.Infoln(args...) + } +} + +// WarningDepth logs to the WARNING log at the specified depth. +func WarningDepth(depth int, args ...any) { + if DepthLogger != nil { + DepthLogger.WarningDepth(depth, args...) + } else { + Logger.Warningln(args...) + } +} + +// ErrorDepth logs to the ERROR log at the specified depth. +func ErrorDepth(depth int, args ...any) { + if DepthLogger != nil { + DepthLogger.ErrorDepth(depth, args...) + } else { + Logger.Errorln(args...) + } +} + +// FatalDepth logs to the FATAL log at the specified depth. +func FatalDepth(depth int, args ...any) { + if DepthLogger != nil { + DepthLogger.FatalDepth(depth, args...) + } else { + Logger.Fatalln(args...) + } + os.Exit(1) +} + // LoggerV2 does underlying logging work for grpclog. +// This is a copy of the LoggerV2 defined in the external grpclog package. It +// is defined here to avoid a circular dependency. type LoggerV2 interface { // Info logs to INFO log. Arguments are handled in the manner of fmt.Print. Info(args ...any) @@ -65,13 +107,14 @@ type LoggerV2 interface { // DepthLoggerV2 logs at a specified call frame. If a LoggerV2 also implements // DepthLoggerV2, the below functions will be called with the appropriate stack // depth set for trivial functions the logger may ignore. +// This is a copy of the DepthLoggerV2 defined in the external grpclog package. +// It is defined here to avoid a circular dependency. // // # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. type DepthLoggerV2 interface { - LoggerV2 // InfoDepth logs to INFO log at the specified depth. Arguments are handled in the manner of fmt.Println. InfoDepth(depth int, args ...any) // WarningDepth logs to WARNING log at the specified depth. Arguments are handled in the manner of fmt.Println. @@ -81,124 +124,3 @@ type DepthLoggerV2 interface { // FatalDepth logs to FATAL log at the specified depth. Arguments are handled in the manner of fmt.Println. FatalDepth(depth int, args ...any) } - -const ( - // infoLog indicates Info severity. - infoLog int = iota - // warningLog indicates Warning severity. - warningLog - // errorLog indicates Error severity. - errorLog - // fatalLog indicates Fatal severity. - fatalLog -) - -// severityName contains the string representation of each severity. -var severityName = []string{ - infoLog: "INFO", - warningLog: "WARNING", - errorLog: "ERROR", - fatalLog: "FATAL", -} - -// loggerT is the default logger used by grpclog. -type loggerT struct { - m []*log.Logger - v int - jsonFormat bool -} - -func (g *loggerT) output(severity int, s string) { - sevStr := severityName[severity] - if !g.jsonFormat { - g.m[severity].Output(2, fmt.Sprintf("%v: %v", sevStr, s)) - return - } - // TODO: we can also include the logging component, but that needs more - // (API) changes. - b, _ := json.Marshal(map[string]string{ - "severity": sevStr, - "message": s, - }) - g.m[severity].Output(2, string(b)) -} - -func (g *loggerT) Info(args ...any) { - g.output(infoLog, fmt.Sprint(args...)) -} - -func (g *loggerT) Infoln(args ...any) { - g.output(infoLog, fmt.Sprintln(args...)) -} - -func (g *loggerT) Infof(format string, args ...any) { - g.output(infoLog, fmt.Sprintf(format, args...)) -} - -func (g *loggerT) Warning(args ...any) { - g.output(warningLog, fmt.Sprint(args...)) -} - -func (g *loggerT) Warningln(args ...any) { - g.output(warningLog, fmt.Sprintln(args...)) -} - -func (g *loggerT) Warningf(format string, args ...any) { - g.output(warningLog, fmt.Sprintf(format, args...)) -} - -func (g *loggerT) Error(args ...any) { - g.output(errorLog, fmt.Sprint(args...)) -} - -func (g *loggerT) Errorln(args ...any) { - g.output(errorLog, fmt.Sprintln(args...)) -} - -func (g *loggerT) Errorf(format string, args ...any) { - g.output(errorLog, fmt.Sprintf(format, args...)) -} - -func (g *loggerT) Fatal(args ...any) { - g.output(fatalLog, fmt.Sprint(args...)) - os.Exit(1) -} - -func (g *loggerT) Fatalln(args ...any) { - g.output(fatalLog, fmt.Sprintln(args...)) - os.Exit(1) -} - -func (g *loggerT) Fatalf(format string, args ...any) { - g.output(fatalLog, fmt.Sprintf(format, args...)) - os.Exit(1) -} - -func (g *loggerT) V(l int) bool { - return l <= g.v -} - -// LoggerV2Config configures the LoggerV2 implementation. -type LoggerV2Config struct { - // Verbosity sets the verbosity level of the logger. - Verbosity int - // FormatJSON controls whether the logger should output logs in JSON format. - FormatJSON bool -} - -// NewLoggerV2 creates a new LoggerV2 instance with the provided configuration. -// The infoW, warningW, and errorW writers are used to write log messages of -// different severity levels. -func NewLoggerV2(infoW, warningW, errorW io.Writer, c LoggerV2Config) LoggerV2 { - var m []*log.Logger - flag := log.LstdFlags - if c.FormatJSON { - flag = 0 - } - m = append(m, log.New(infoW, "", flag)) - m = append(m, log.New(io.MultiWriter(infoW, warningW), "", flag)) - ew := io.MultiWriter(infoW, warningW, errorW) // ew will be used for error and fatal. - m = append(m, log.New(ew, "", flag)) - m = append(m, log.New(ew, "", flag)) - return &loggerT{m: m, v: c.Verbosity, jsonFormat: c.FormatJSON} -} diff --git a/go-controller/vendor/google.golang.org/grpc/internal/grpclog/prefix_logger.go b/go-controller/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go similarity index 63% rename from go-controller/vendor/google.golang.org/grpc/internal/grpclog/prefix_logger.go rename to go-controller/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go index 092ad187a2..faa998de76 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/grpclog/prefix_logger.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go @@ -16,21 +16,17 @@ * */ -// Package grpclog provides logging functionality for internal gRPC packages, -// outside of the functionality provided by the external `grpclog` package. package grpclog import ( "fmt" - - "google.golang.org/grpc/grpclog" ) // PrefixLogger does logging with a prefix. // // Logging method on a nil logs without any prefix. type PrefixLogger struct { - logger grpclog.DepthLoggerV2 + logger DepthLoggerV2 prefix string } @@ -42,7 +38,7 @@ func (pl *PrefixLogger) Infof(format string, args ...any) { pl.logger.InfoDepth(1, fmt.Sprintf(format, args...)) return } - grpclog.InfoDepth(1, fmt.Sprintf(format, args...)) + InfoDepth(1, fmt.Sprintf(format, args...)) } // Warningf does warning logging. @@ -52,7 +48,7 @@ func (pl *PrefixLogger) Warningf(format string, args ...any) { pl.logger.WarningDepth(1, fmt.Sprintf(format, args...)) return } - grpclog.WarningDepth(1, fmt.Sprintf(format, args...)) + WarningDepth(1, fmt.Sprintf(format, args...)) } // Errorf does error logging. @@ -62,18 +58,36 @@ func (pl *PrefixLogger) Errorf(format string, args ...any) { pl.logger.ErrorDepth(1, fmt.Sprintf(format, args...)) return } - grpclog.ErrorDepth(1, fmt.Sprintf(format, args...)) + ErrorDepth(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 { +// Debugf does info logging at verbose level 2. +func (pl *PrefixLogger) Debugf(format string, args ...any) { + // 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 + } if pl != nil { - return pl.logger.V(l) + // Handle nil, so the tests can pass in a nil logger. + format = pl.prefix + format + pl.logger.InfoDepth(1, fmt.Sprintf(format, args...)) + return } - return true + 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. -func NewPrefixLogger(logger grpclog.DepthLoggerV2, prefix string) *PrefixLogger { +func NewPrefixLogger(logger DepthLoggerV2, prefix string) *PrefixLogger { return &PrefixLogger{logger: logger, prefix: prefix} } diff --git a/go-controller/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go b/go-controller/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go index 8e8e861280..f7f40a16ac 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go @@ -53,28 +53,16 @@ func NewCallbackSerializer(ctx context.Context) *CallbackSerializer { return cs } -// TrySchedule tries to schedule the provided callback function f to be -// executed in the order it was added. This is a best-effort operation. If the -// context passed to NewCallbackSerializer was canceled before this method is -// called, the callback will not be scheduled. +// 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 (cs *CallbackSerializer) TrySchedule(f func(ctx context.Context)) { - cs.callbacks.Put(f) -} - -// ScheduleOr schedules the provided callback function f to be executed in the -// order it was added. If the context passed to NewCallbackSerializer has been -// canceled before this method is called, the onFailure callback will be -// executed inline instead. // -// Callbacks are expected to honor the context when performing any blocking -// operations, and should return early when the context is canceled. -func (cs *CallbackSerializer) ScheduleOr(f func(ctx context.Context), onFailure func()) { - if cs.callbacks.Put(f) != nil { - onFailure() - } +// Return value indicates if the callback was successfully added to the list of +// callbacks to be executed by the serializer. It is not possible to add +// callbacks once the context passed to NewCallbackSerializer is cancelled. +func (cs *CallbackSerializer) Schedule(f func(ctx context.Context)) bool { + return cs.callbacks.Put(f) == nil } func (cs *CallbackSerializer) run(ctx context.Context) { diff --git a/go-controller/vendor/google.golang.org/grpc/internal/grpcsync/pubsub.go b/go-controller/vendor/google.golang.org/grpc/internal/grpcsync/pubsub.go index 6d8c2f518d..aef8cec1ab 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/grpcsync/pubsub.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/grpcsync/pubsub.go @@ -77,7 +77,7 @@ func (ps *PubSub) Subscribe(sub Subscriber) (cancel func()) { if ps.msg != nil { msg := ps.msg - ps.cs.TrySchedule(func(context.Context) { + ps.cs.Schedule(func(context.Context) { ps.mu.Lock() defer ps.mu.Unlock() if !ps.subscribers[sub] { @@ -103,7 +103,7 @@ func (ps *PubSub) Publish(msg any) { ps.msg = msg for sub := range ps.subscribers { s := sub - ps.cs.TrySchedule(func(context.Context) { + ps.cs.Schedule(func(context.Context) { ps.mu.Lock() defer ps.mu.Unlock() if !ps.subscribers[s] { diff --git a/go-controller/vendor/google.golang.org/grpc/internal/grpcutil/method.go b/go-controller/vendor/google.golang.org/grpc/internal/grpcutil/method.go index 683d1955c6..ec62b4775e 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/grpcutil/method.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/grpcutil/method.go @@ -39,7 +39,7 @@ func ParseMethod(methodName string) (service, method string, _ error) { } // baseContentType is the base content-type for gRPC. This is a valid -// content-type on its own, but can also include a content-subtype such as +// content-type on it's own, but can also include a content-subtype such as // "proto" as a suffix after "+" or ";". See // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests // for more details. diff --git a/go-controller/vendor/google.golang.org/grpc/internal/idle/idle.go b/go-controller/vendor/google.golang.org/grpc/internal/idle/idle.go index 2c13ee9dac..fe49cb74c5 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/idle/idle.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/idle/idle.go @@ -182,7 +182,6 @@ func (m *Manager) tryEnterIdleMode() bool { return true } -// EnterIdleModeForTesting instructs the channel to enter idle mode. func (m *Manager) EnterIdleModeForTesting() { m.tryEnterIdleMode() } @@ -226,7 +225,7 @@ func (m *Manager) ExitIdleMode() error { // came in and OnCallBegin() noticed that the calls count is negative. // - Channel is in idle mode, and multiple new RPCs come in at the same // time, all of them notice a negative calls count in OnCallBegin and get - // here. The first one to get the lock would get the channel to exit idle. + // here. The first one to get the lock would got the channel to exit idle. // - Channel is not in idle mode, and the user calls Connect which calls // m.ExitIdleMode. // @@ -267,7 +266,6 @@ func (m *Manager) isClosed() bool { return atomic.LoadInt32(&m.closed) == 1 } -// Close stops the timer associated with the Manager, if it exists. func (m *Manager) Close() { atomic.StoreInt32(&m.closed, 1) diff --git a/go-controller/vendor/google.golang.org/grpc/internal/internal.go b/go-controller/vendor/google.golang.org/grpc/internal/internal.go index 20b4dc3d35..5d66539869 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/internal.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/internal.go @@ -183,7 +183,7 @@ var ( // GRPCResolverSchemeExtraMetadata determines when gRPC will add extra // metadata to RPCs. - GRPCResolverSchemeExtraMetadata = "xds" + GRPCResolverSchemeExtraMetadata string = "xds" // EnterIdleModeForTesting gets the ClientConn to enter IDLE mode. EnterIdleModeForTesting any // func(*grpc.ClientConn) @@ -191,8 +191,6 @@ var ( // ExitIdleModeForTesting gets the ClientConn to exit IDLE mode. ExitIdleModeForTesting any // func(*grpc.ClientConn) error - // ChannelzTurnOffForTesting disables the Channelz service for testing - // purposes. ChannelzTurnOffForTesting func() // TriggerXDSResourceNotFoundForTesting causes the provided xDS Client to @@ -205,27 +203,11 @@ var ( // UserSetDefaultScheme is set to true if the user has overridden the // default resolver scheme. - UserSetDefaultScheme = false + UserSetDefaultScheme bool = false - // ConnectedAddress returns the connected address for a SubConnState. The - // address is only valid if the state is READY. - ConnectedAddress any // func (scs SubConnState) resolver.Address - - // SetConnectedAddress sets the connected address for a SubConnState. - SetConnectedAddress any // func(scs *SubConnState, addr resolver.Address) - - // SnapshotMetricRegistryForTesting snapshots the global data of the metric - // registry. Returns a cleanup function that sets the metric registry to its - // original state. Only called in testing functions. - SnapshotMetricRegistryForTesting func() func() - - // SetDefaultBufferPoolForTesting updates the default buffer pool, for - // testing purposes. - SetDefaultBufferPoolForTesting any // func(mem.BufferPool) - - // SetBufferPoolingThresholdForTesting updates the buffer pooling threshold, for - // testing purposes. - SetBufferPoolingThresholdForTesting any // func(int) + // ShuffleAddressListForTesting pseudo-randomizes the order of addresses. n + // is the number of elements. swap swaps the elements with indexes i and j. + ShuffleAddressListForTesting any // func(n int, swap func(i, j int)) ) // HealthChecker defines the signature of the client-side LB channel health @@ -233,7 +215,7 @@ var ( // // The implementation is expected to create a health checking RPC stream by // calling newStream(), watch for the health status of serviceName, and report -// its health back by calling setConnectivityState(). +// it's health back by calling setConnectivityState(). // // The health checking protocol is defined at: // https://github.com/grpc/grpc/blob/master/doc/health-checking.md diff --git a/go-controller/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/go-controller/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go index 374c12fb77..4552db16b0 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go @@ -177,7 +177,7 @@ type dnsResolver struct { // finished. Otherwise, data race will be possible. [Race Example] in // dns_resolver_test we replace the real lookup functions with mocked ones to // facilitate testing. If Close() doesn't wait for watcher() goroutine - // finishes, race detector sometimes will warn lookup (READ the lookup + // finishes, race detector sometimes will warns lookup (READ the lookup // function pointers) inside watcher() goroutine has data race with // replaceNetFunc (WRITE the lookup function pointers). wg sync.WaitGroup @@ -237,9 +237,7 @@ func (d *dnsResolver) watcher() { } func (d *dnsResolver) lookupSRV(ctx context.Context) ([]resolver.Address, error) { - // Skip this particular host to avoid timeouts with some versions of - // systemd-resolved. - if !EnableSRVLookups || d.host == "metadata.google.internal." { + if !EnableSRVLookups { return nil, nil } var newAddrs []resolver.Address diff --git a/go-controller/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go b/go-controller/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go index b901c7bace..afac56572a 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go @@ -55,7 +55,7 @@ func (r *passthroughResolver) start() { r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint()}}}) } -func (*passthroughResolver) ResolveNow(resolver.ResolveNowOptions) {} +func (*passthroughResolver) ResolveNow(o resolver.ResolveNowOptions) {} func (*passthroughResolver) Close() {} diff --git a/go-controller/vendor/google.golang.org/grpc/internal/stats/labels.go b/go-controller/vendor/google.golang.org/grpc/internal/stats/labels.go deleted file mode 100644 index fd33af51ae..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/internal/stats/labels.go +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright 2024 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 stats provides internal stats related functionality. -package stats - -import "context" - -// Labels are the labels for metrics. -type Labels struct { - // TelemetryLabels are the telemetry labels to record. - TelemetryLabels map[string]string -} - -type labelsKey struct{} - -// GetLabels returns the Labels stored in the context, or nil if there is one. -func GetLabels(ctx context.Context) *Labels { - labels, _ := ctx.Value(labelsKey{}).(*Labels) - return labels -} - -// SetLabels sets the Labels in the context. -func SetLabels(ctx context.Context, labels *Labels) context.Context { - // could also append - return context.WithValue(ctx, labelsKey{}, labels) -} diff --git a/go-controller/vendor/google.golang.org/grpc/internal/stats/metrics_recorder_list.go b/go-controller/vendor/google.golang.org/grpc/internal/stats/metrics_recorder_list.go deleted file mode 100644 index 79044657be..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/internal/stats/metrics_recorder_list.go +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2024 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 stats - -import ( - "fmt" - - estats "google.golang.org/grpc/experimental/stats" - "google.golang.org/grpc/stats" -) - -// MetricsRecorderList forwards Record calls to all of its metricsRecorders. -// -// It eats any record calls where the label values provided do not match the -// number of label keys. -type MetricsRecorderList struct { - // metricsRecorders are the metrics recorders this list will forward to. - metricsRecorders []estats.MetricsRecorder -} - -// NewMetricsRecorderList creates a new metric recorder list with all the stats -// handlers provided which implement the MetricsRecorder interface. -// If no stats handlers provided implement the MetricsRecorder interface, -// the MetricsRecorder list returned is a no-op. -func NewMetricsRecorderList(shs []stats.Handler) *MetricsRecorderList { - var mrs []estats.MetricsRecorder - for _, sh := range shs { - if mr, ok := sh.(estats.MetricsRecorder); ok { - mrs = append(mrs, mr) - } - } - return &MetricsRecorderList{ - metricsRecorders: mrs, - } -} - -func verifyLabels(desc *estats.MetricDescriptor, labelsRecv ...string) { - if got, want := len(labelsRecv), len(desc.Labels)+len(desc.OptionalLabels); got != want { - panic(fmt.Sprintf("Received %d labels in call to record metric %q, but expected %d.", got, desc.Name, want)) - } -} - -// RecordInt64Count records the measurement alongside labels on the int -// count associated with the provided handle. -func (l *MetricsRecorderList) RecordInt64Count(handle *estats.Int64CountHandle, incr int64, labels ...string) { - verifyLabels(handle.Descriptor(), labels...) - - for _, metricRecorder := range l.metricsRecorders { - metricRecorder.RecordInt64Count(handle, incr, labels...) - } -} - -// RecordFloat64Count records the measurement alongside labels on the float -// count associated with the provided handle. -func (l *MetricsRecorderList) RecordFloat64Count(handle *estats.Float64CountHandle, incr float64, labels ...string) { - verifyLabels(handle.Descriptor(), labels...) - - for _, metricRecorder := range l.metricsRecorders { - metricRecorder.RecordFloat64Count(handle, incr, labels...) - } -} - -// RecordInt64Histo records the measurement alongside labels on the int -// histo associated with the provided handle. -func (l *MetricsRecorderList) RecordInt64Histo(handle *estats.Int64HistoHandle, incr int64, labels ...string) { - verifyLabels(handle.Descriptor(), labels...) - - for _, metricRecorder := range l.metricsRecorders { - metricRecorder.RecordInt64Histo(handle, incr, labels...) - } -} - -// RecordFloat64Histo records the measurement alongside labels on the float -// histo associated with the provided handle. -func (l *MetricsRecorderList) RecordFloat64Histo(handle *estats.Float64HistoHandle, incr float64, labels ...string) { - verifyLabels(handle.Descriptor(), labels...) - - for _, metricRecorder := range l.metricsRecorders { - metricRecorder.RecordFloat64Histo(handle, incr, labels...) - } -} - -// RecordInt64Gauge records the measurement alongside labels on the int -// gauge associated with the provided handle. -func (l *MetricsRecorderList) RecordInt64Gauge(handle *estats.Int64GaugeHandle, incr int64, labels ...string) { - verifyLabels(handle.Descriptor(), labels...) - - for _, metricRecorder := range l.metricsRecorders { - metricRecorder.RecordInt64Gauge(handle, incr, labels...) - } -} diff --git a/go-controller/vendor/google.golang.org/grpc/internal/status/status.go b/go-controller/vendor/google.golang.org/grpc/internal/status/status.go index 1186f1e9a9..c7dbc82059 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/status/status.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/status/status.go @@ -138,19 +138,17 @@ func (s *Status) WithDetails(details ...protoadapt.MessageV1) (*Status, error) { // s.Code() != OK implies that s.Proto() != nil. p := s.Proto() for _, detail := range details { - m, err := anypb.New(protoadapt.MessageV2Of(detail)) + any, err := anypb.New(protoadapt.MessageV2Of(detail)) if err != nil { return nil, err } - p.Details = append(p.Details, m) + p.Details = append(p.Details, any) } return &Status{s: p}, nil } // Details returns a slice of details messages attached to the status. // If a detail cannot be decoded, the error is returned in place of the detail. -// If the detail can be decoded, the proto message returned is of the same -// type that was given to WithDetails(). func (s *Status) Details() []any { if s == nil || s.s == nil { return nil @@ -162,38 +160,7 @@ func (s *Status) Details() []any { details = append(details, err) continue } - // The call to MessageV1Of is required to unwrap the proto message if - // it implemented only the MessageV1 API. The proto message would have - // been wrapped in a V2 wrapper in Status.WithDetails. V2 messages are - // added to a global registry used by any.UnmarshalNew(). - // MessageV1Of has the following behaviour: - // 1. If the given message is a wrapped MessageV1, it returns the - // unwrapped value. - // 2. If the given message already implements MessageV1, it returns it - // as is. - // 3. Else, it wraps the MessageV2 in a MessageV1 wrapper. - // - // Since the Status.WithDetails() API only accepts MessageV1, calling - // MessageV1Of ensures we return the same type that was given to - // WithDetails: - // * If the give type implemented only MessageV1, the unwrapping from - // point 1 above will restore the type. - // * If the given type implemented both MessageV1 and MessageV2, point 2 - // above will ensure no wrapping is performed. - // * If the given type implemented only MessageV2 and was wrapped using - // MessageV1Of before passing to WithDetails(), it would be unwrapped - // in WithDetails by calling MessageV2Of(). Point 3 above will ensure - // that the type is wrapped in a MessageV1 wrapper again before - // returning. Note that protoc-gen-go doesn't generate code which - // implements ONLY MessageV2 at the time of writing. - // - // NOTE: Status details can also be added using the FromProto method. - // This could theoretically allow passing a Detail message that only - // implements the V2 API. In such a case the message will be wrapped in - // a MessageV1 wrapper when fetched using Details(). - // Since protoc-gen-go generates only code that implements both V1 and - // V2 APIs for backward compatibility, this is not a concern. - details = append(details, protoadapt.MessageV1Of(detail)) + details = append(details, detail) } return details } diff --git a/go-controller/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go b/go-controller/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go index 54c24c2ff3..999f52cd75 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go @@ -58,20 +58,20 @@ func GetRusage() *Rusage { // CPUTimeDiff returns the differences of user CPU time and system CPU time used // between two Rusage structs. It a no-op function for non-linux environments. -func CPUTimeDiff(*Rusage, *Rusage) (float64, float64) { +func CPUTimeDiff(first *Rusage, latest *Rusage) (float64, float64) { log() return 0, 0 } // SetTCPUserTimeout is a no-op function under non-linux environments. -func SetTCPUserTimeout(net.Conn, time.Duration) error { +func SetTCPUserTimeout(conn net.Conn, timeout time.Duration) error { log() return nil } // GetTCPUserTimeout is a no-op function under non-linux environments. // A negative return value indicates the operation is not supported -func GetTCPUserTimeout(net.Conn) (int, error) { +func GetTCPUserTimeout(conn net.Conn) (int, error) { log() return -1, nil } diff --git a/go-controller/vendor/google.golang.org/grpc/internal/tcp_keepalive_unix.go b/go-controller/vendor/google.golang.org/grpc/internal/tcp_keepalive_unix.go index 7e7aaa5463..078137b7fd 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/tcp_keepalive_unix.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/tcp_keepalive_unix.go @@ -44,7 +44,7 @@ func NetDialerWithTCPKeepalive() *net.Dialer { // combination of unconditionally enabling TCP keepalives here, and // disabling the overriding of TCP keepalive parameters by setting the // KeepAlive field to a negative value above, results in OS defaults for - // the TCP keepalive interval and time parameters. + // the TCP keealive interval and time parameters. Control: func(_, _ string, c syscall.RawConn) error { return c.Control(func(fd uintptr) { unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_KEEPALIVE, 1) diff --git a/go-controller/vendor/google.golang.org/grpc/internal/tcp_keepalive_windows.go b/go-controller/vendor/google.golang.org/grpc/internal/tcp_keepalive_windows.go index d5c1085eea..fd7d43a890 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/tcp_keepalive_windows.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/tcp_keepalive_windows.go @@ -44,7 +44,7 @@ func NetDialerWithTCPKeepalive() *net.Dialer { // combination of unconditionally enabling TCP keepalives here, and // disabling the overriding of TCP keepalive parameters by setting the // KeepAlive field to a negative value above, results in OS defaults for - // the TCP keepalive interval and time parameters. + // the TCP keealive interval and time parameters. Control: func(_, _ string, c syscall.RawConn) error { return c.Control(func(fd uintptr) { windows.SetsockoptInt(windows.Handle(fd), windows.SOL_SOCKET, windows.SO_KEEPALIVE, 1) diff --git a/go-controller/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/go-controller/vendor/google.golang.org/grpc/internal/transport/controlbuf.go index ef72fbb3a0..3deadfb4a2 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/transport/controlbuf.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/transport/controlbuf.go @@ -32,7 +32,6 @@ import ( "golang.org/x/net/http2/hpack" "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/internal/grpcutil" - "google.golang.org/grpc/mem" "google.golang.org/grpc/status" ) @@ -149,9 +148,9 @@ type dataFrame struct { streamID uint32 endStream bool h []byte - reader mem.Reader + d []byte // onEachWrite is called every time - // a part of data is written out. + // a part of d is written out. onEachWrite func() } @@ -290,22 +289,18 @@ func (l *outStreamList) dequeue() *outStream { } // controlBuffer is a way to pass information to loopy. -// -// Information is passed as specific struct types called control frames. A -// control frame not only represents data, messages or headers to be sent out -// but can also be used to instruct loopy to update its internal state. It -// shouldn't be confused with an HTTP2 frame, although some of the control -// frames like dataFrame and headerFrame do go out on wire as HTTP2 frames. +// Information is passed as specific struct types called control frames. +// A control frame not only represents data, messages or headers to be sent out +// but can also be used to instruct loopy to update its internal state. +// It shouldn't be confused with an HTTP2 frame, although some of the control frames +// like dataFrame and headerFrame do go out on wire as HTTP2 frames. type controlBuffer struct { - wakeupCh chan struct{} // Unblocks readers waiting for something to read. - done <-chan struct{} // Closed when the transport is done. - - // Mutex guards all the fields below, except trfChan which can be read - // atomically without holding mu. + ch chan struct{} + done <-chan struct{} mu sync.Mutex - consumerWaiting bool // True when readers are blocked waiting for new data. - closed bool // True when the controlbuf is finished. - list *itemList // List of queued control frames. + consumerWaiting bool + list *itemList + err error // transportResponseFrames counts the number of queued items that represent // the response of an action initiated by the peer. trfChan is created @@ -313,59 +308,47 @@ type controlBuffer struct { // closed and nilled when transportResponseFrames drops below the // threshold. Both fields are protected by mu. transportResponseFrames int - trfChan atomic.Pointer[chan struct{}] + trfChan atomic.Value // chan struct{} } func newControlBuffer(done <-chan struct{}) *controlBuffer { return &controlBuffer{ - wakeupCh: make(chan struct{}, 1), - list: &itemList{}, - done: done, + ch: make(chan struct{}, 1), + list: &itemList{}, + done: done, } } -// throttle blocks if there are too many frames in the control buf that -// represent the response of an action initiated by the peer, like -// incomingSettings cleanupStreams etc. +// throttle blocks if there are too many incomingSettings/cleanupStreams in the +// controlbuf. func (c *controlBuffer) throttle() { - if ch := c.trfChan.Load(); ch != nil { + ch, _ := c.trfChan.Load().(chan struct{}) + if ch != nil { select { - case <-(*ch): + case <-ch: case <-c.done: } } } -// put adds an item to the controlbuf. func (c *controlBuffer) put(it cbItem) error { _, err := c.executeAndPut(nil, it) return err } -// executeAndPut runs f, and if the return value is true, adds the given item to -// the controlbuf. The item could be nil, in which case, this method simply -// executes f and does not add the item to the controlbuf. -// -// The first return value indicates whether the item was successfully added to -// the control buffer. A non-nil error, specifically ErrConnClosing, is returned -// if the control buffer is already closed. func (c *controlBuffer) executeAndPut(f func() bool, it cbItem) (bool, error) { + var wakeUp bool c.mu.Lock() - defer c.mu.Unlock() - - if c.closed { - return false, ErrConnClosing + if c.err != nil { + c.mu.Unlock() + return false, c.err } if f != nil { if !f() { // f wasn't successful + c.mu.Unlock() return false, nil } } - if it == nil { - return true, nil - } - - var wakeUp bool if c.consumerWaiting { wakeUp = true c.consumerWaiting = false @@ -376,102 +359,98 @@ func (c *controlBuffer) executeAndPut(f func() bool, it cbItem) (bool, error) { if c.transportResponseFrames == maxQueuedTransportResponseFrames { // We are adding the frame that puts us over the threshold; create // a throttling channel. - ch := make(chan struct{}) - c.trfChan.Store(&ch) + c.trfChan.Store(make(chan struct{})) } } + c.mu.Unlock() if wakeUp { select { - case c.wakeupCh <- struct{}{}: + case c.ch <- struct{}{}: default: } } return true, nil } -// get returns the next control frame from the control buffer. If block is true -// **and** there are no control frames in the control buffer, the call blocks -// until one of the conditions is met: there is a frame to return or the -// transport is closed. +// Note argument f should never be nil. +func (c *controlBuffer) execute(f func(it any) bool, it any) (bool, error) { + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return false, c.err + } + if !f(it) { // f wasn't successful + c.mu.Unlock() + return false, nil + } + c.mu.Unlock() + return true, nil +} + func (c *controlBuffer) get(block bool) (any, error) { for { c.mu.Lock() - frame, err := c.getOnceLocked() - if frame != nil || err != nil || !block { - // If we read a frame or an error, we can return to the caller. The - // call to getOnceLocked() returns a nil frame and a nil error if - // there is nothing to read, and in that case, if the caller asked - // us not to block, we can return now as well. + if c.err != nil { c.mu.Unlock() - return frame, err + return nil, c.err + } + if !c.list.isEmpty() { + h := c.list.dequeue().(cbItem) + if h.isTransportResponseFrame() { + if c.transportResponseFrames == maxQueuedTransportResponseFrames { + // We are removing the frame that put us over the + // threshold; close and clear the throttling channel. + ch := c.trfChan.Load().(chan struct{}) + close(ch) + c.trfChan.Store((chan struct{})(nil)) + } + c.transportResponseFrames-- + } + c.mu.Unlock() + return h, nil + } + if !block { + c.mu.Unlock() + return nil, nil } c.consumerWaiting = true c.mu.Unlock() - - // Release the lock above and wait to be woken up. select { - case <-c.wakeupCh: + case <-c.ch: case <-c.done: return nil, errors.New("transport closed by client") } } } -// Callers must not use this method, but should instead use get(). -// -// Caller must hold c.mu. -func (c *controlBuffer) getOnceLocked() (any, error) { - if c.closed { - return false, ErrConnClosing - } - if c.list.isEmpty() { - return nil, nil - } - h := c.list.dequeue().(cbItem) - if h.isTransportResponseFrame() { - if c.transportResponseFrames == maxQueuedTransportResponseFrames { - // We are removing the frame that put us over the - // threshold; close and clear the throttling channel. - ch := c.trfChan.Swap(nil) - close(*ch) - } - c.transportResponseFrames-- - } - return h, nil -} - -// finish closes the control buffer, cleaning up any streams that have queued -// header frames. Once this method returns, no more frames can be added to the -// control buffer, and attempts to do so will return ErrConnClosing. func (c *controlBuffer) finish() { c.mu.Lock() - defer c.mu.Unlock() - - if c.closed { + if c.err != nil { + c.mu.Unlock() return } - c.closed = true + c.err = ErrConnClosing // There may be headers for streams in the control buffer. // These streams need to be cleaned out since the transport // is still not aware of these yet. for head := c.list.dequeueAll(); head != nil; head = head.next { - switch v := head.it.(type) { - case *headerFrame: - if v.onOrphaned != nil { // It will be nil on the server-side. - v.onOrphaned(ErrConnClosing) - } - case *dataFrame: - _ = v.reader.Close() + hdr, ok := head.it.(*headerFrame) + if !ok { + continue + } + if hdr.onOrphaned != nil { // It will be nil on the server-side. + hdr.onOrphaned(ErrConnClosing) } } - // In case throttle() is currently in flight, it needs to be unblocked. // Otherwise, the transport may not close, since the transport is closed by // the reader encountering the connection error. - ch := c.trfChan.Swap(nil) + ch, _ := c.trfChan.Load().(chan struct{}) if ch != nil { - close(*ch) + close(ch) } + c.trfChan.Store((chan struct{})(nil)) + c.mu.Unlock() } type side int @@ -487,7 +466,7 @@ const ( // stream maintains a queue of data frames; as loopy receives data frames // it gets added to the queue of the relevant stream. // Loopy goes over this list of active streams by processing one node every iteration, -// thereby closely resembling a round-robin scheduling over all streams. While +// thereby closely resemebling to a round-robin scheduling over all streams. While // processing a stream, loopy writes out data bytes from this stream capped by the min // of http2MaxFrameLen, connection-level flow control and stream-level flow control. type loopyWriter struct { @@ -511,13 +490,12 @@ type loopyWriter struct { draining bool conn net.Conn logger *grpclog.PrefixLogger - bufferPool mem.BufferPool // Side-specific handlers ssGoAwayHandler func(*goAway) (bool, error) } -func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimator, conn net.Conn, logger *grpclog.PrefixLogger, goAwayHandler func(*goAway) (bool, error), bufferPool mem.BufferPool) *loopyWriter { +func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimator, conn net.Conn, logger *grpclog.PrefixLogger, goAwayHandler func(*goAway) (bool, error)) *loopyWriter { var buf bytes.Buffer l := &loopyWriter{ side: s, @@ -533,7 +511,6 @@ func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimato conn: conn, logger: logger, ssGoAwayHandler: goAwayHandler, - bufferPool: bufferPool, } return l } @@ -791,11 +768,6 @@ func (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error { // not be established yet. delete(l.estdStreams, c.streamID) str.deleteSelf() - for head := str.itl.dequeueAll(); head != nil; head = head.next { - if df, ok := head.it.(*dataFrame); ok { - _ = df.reader.Close() - } - } } if c.rst { // If RST_STREAM needs to be sent. if err := l.framer.fr.WriteRSTStream(c.streamID, c.rstCode); err != nil { @@ -931,18 +903,16 @@ func (l *loopyWriter) processData() (bool, error) { dataItem := str.itl.peek().(*dataFrame) // Peek at the first data item this stream. // A data item is represented by a dataFrame, since it later translates into // multiple HTTP2 data frames. - // Every dataFrame has two buffers; h that keeps grpc-message header and data - // that is the actual message. As an optimization to keep wire traffic low, data - // from data is copied to h to make as big as the maximum possible HTTP2 frame - // size. + // Every dataFrame has two buffers; h that keeps grpc-message header and d that is actual data. + // As an optimization to keep wire traffic low, data from d is copied to h to make as big as the + // maximum possible HTTP2 frame size. - if len(dataItem.h) == 0 && dataItem.reader.Remaining() == 0 { // Empty data frame + if len(dataItem.h) == 0 && len(dataItem.d) == 0 { // Empty data frame // Client sends out empty data frame with endStream = true if err := l.framer.fr.WriteData(dataItem.streamID, dataItem.endStream, nil); err != nil { return false, err } str.itl.dequeue() // remove the empty data item from stream - _ = dataItem.reader.Close() if str.itl.isEmpty() { str.state = empty } else if trailer, ok := str.itl.peek().(*headerFrame); ok { // the next item is trailers. @@ -957,7 +927,9 @@ func (l *loopyWriter) processData() (bool, error) { } return false, nil } - + var ( + buf []byte + ) // Figure out the maximum size we can send maxSize := http2MaxFrameLen if strQuota := int(l.oiws) - str.bytesOutStanding; strQuota <= 0 { // stream-level flow control. @@ -971,50 +943,43 @@ func (l *loopyWriter) processData() (bool, error) { } // Compute how much of the header and data we can send within quota and max frame length hSize := min(maxSize, len(dataItem.h)) - dSize := min(maxSize-hSize, dataItem.reader.Remaining()) - remainingBytes := len(dataItem.h) + dataItem.reader.Remaining() - hSize - dSize - size := hSize + dSize - - var buf *[]byte - - if hSize != 0 && dSize == 0 { - buf = &dataItem.h - } else { - // Note: this is only necessary because the http2.Framer does not support - // partially writing a frame, so the sequence must be materialized into a buffer. - // TODO: Revisit once https://github.com/golang/go/issues/66655 is addressed. - pool := l.bufferPool - if pool == nil { - // Note that this is only supposed to be nil in tests. Otherwise, stream is - // always initialized with a BufferPool. - pool = mem.DefaultBufferPool() + dSize := min(maxSize-hSize, len(dataItem.d)) + if hSize != 0 { + if dSize == 0 { + buf = dataItem.h + } else { + // We can add some data to grpc message header to distribute bytes more equally across frames. + // Copy on the stack to avoid generating garbage + var localBuf [http2MaxFrameLen]byte + copy(localBuf[:hSize], dataItem.h) + copy(localBuf[hSize:], dataItem.d[:dSize]) + buf = localBuf[:hSize+dSize] } - buf = pool.Get(size) - defer pool.Put(buf) - - copy((*buf)[:hSize], dataItem.h) - _, _ = dataItem.reader.Read((*buf)[hSize:]) + } else { + buf = dataItem.d } + size := hSize + dSize + // Now that outgoing flow controls are checked we can replenish str's write quota str.wq.replenish(size) var endStream bool // If this is the last data message on this stream and all of it can be written in this iteration. - if dataItem.endStream && remainingBytes == 0 { + if dataItem.endStream && len(dataItem.h)+len(dataItem.d) <= size { endStream = true } if dataItem.onEachWrite != nil { dataItem.onEachWrite() } - if err := l.framer.fr.WriteData(dataItem.streamID, endStream, (*buf)[:size]); err != nil { + if err := l.framer.fr.WriteData(dataItem.streamID, endStream, buf[:size]); err != nil { return false, err } str.bytesOutStanding += size l.sendQuota -= uint32(size) dataItem.h = dataItem.h[hSize:] + dataItem.d = dataItem.d[dSize:] - if remainingBytes == 0 { // All the data from that message was written out. - _ = dataItem.reader.Close() + if len(dataItem.h) == 0 && len(dataItem.d) == 0 { // All the data from that message was written out. str.itl.dequeue() } if str.itl.isEmpty() { @@ -1033,3 +998,10 @@ func (l *loopyWriter) processData() (bool, error) { } return false, nil } + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/go-controller/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/go-controller/vendor/google.golang.org/grpc/internal/transport/handler_server.go index ce878693bd..4a3ddce29a 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -24,6 +24,7 @@ package transport import ( + "bytes" "context" "errors" "fmt" @@ -39,7 +40,6 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/internal/grpcutil" - "google.golang.org/grpc/mem" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" "google.golang.org/grpc/stats" @@ -50,7 +50,7 @@ import ( // NewServerHandlerTransport returns a ServerTransport handling gRPC from // inside an http.Handler, or writes an HTTP error to w and returns an error. // It requires that the http Server supports HTTP/2. -func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []stats.Handler, bufferPool mem.BufferPool) (ServerTransport, error) { +func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []stats.Handler) (ServerTransport, error) { if r.Method != http.MethodPost { w.Header().Set("Allow", http.MethodPost) msg := fmt.Sprintf("invalid gRPC request method %q", r.Method) @@ -98,7 +98,6 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []s contentType: contentType, contentSubtype: contentSubtype, stats: stats, - bufferPool: bufferPool, } st.logger = prefixLoggerForServerHandlerTransport(st) @@ -172,8 +171,6 @@ type serverHandlerTransport struct { stats []stats.Handler logger *grpclog.PrefixLogger - - bufferPool mem.BufferPool } func (ht *serverHandlerTransport) Close(err error) { @@ -247,7 +244,6 @@ func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) erro } s.hdrMu.Lock() - defer s.hdrMu.Unlock() if p := st.Proto(); p != nil && len(p.Details) > 0 { delete(s.trailer, grpcStatusDetailsBinHeader) stBytes, err := proto.Marshal(p) @@ -272,6 +268,7 @@ func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) erro } } } + s.hdrMu.Unlock() }) if err == nil { // transport has not been closed @@ -333,28 +330,16 @@ func (ht *serverHandlerTransport) writeCustomHeaders(s *Stream) { s.hdrMu.Unlock() } -func (ht *serverHandlerTransport) Write(s *Stream, hdr []byte, data mem.BufferSlice, _ *Options) error { - // Always take a reference because otherwise there is no guarantee the data will - // be available after this function returns. This is what callers to Write - // expect. - data.Ref() +func (ht *serverHandlerTransport) Write(s *Stream, hdr []byte, data []byte, opts *Options) error { headersWritten := s.updateHeaderSent() - err := ht.do(func() { - defer data.Free() + return ht.do(func() { if !headersWritten { ht.writePendingHeaders(s) } ht.rw.Write(hdr) - for _, b := range data { - _, _ = ht.rw.Write(b.ReadOnlyData()) - } + ht.rw.Write(data) ht.rw.(http.Flusher).Flush() }) - if err != nil { - data.Free() - return err - } - return nil } func (ht *serverHandlerTransport) WriteHeader(s *Stream, md metadata.MD) error { @@ -421,7 +406,7 @@ func (ht *serverHandlerTransport) HandleStreams(ctx context.Context, startStream headerWireLength: 0, // won't have access to header wire length until golang/go#18997. } s.trReader = &transportReader{ - reader: &recvBufferReader{ctx: s.ctx, ctxDone: s.ctx.Done(), recv: s.buf}, + reader: &recvBufferReader{ctx: s.ctx, ctxDone: s.ctx.Done(), recv: s.buf, freeBuffer: func(*bytes.Buffer) {}}, windowHandler: func(int) {}, } @@ -430,19 +415,21 @@ func (ht *serverHandlerTransport) HandleStreams(ctx context.Context, startStream go func() { defer close(readerDone) - for { - buf := ht.bufferPool.Get(http2MaxFrameLen) - n, err := req.Body.Read(*buf) + // TODO: minimize garbage, optimize recvBuffer code/ownership + const readSize = 8196 + for buf := make([]byte, readSize); ; { + n, err := req.Body.Read(buf) if n > 0 { - *buf = (*buf)[:n] - s.buf.put(recvMsg{buffer: mem.NewBuffer(buf, ht.bufferPool)}) - } else { - ht.bufferPool.Put(buf) + s.buf.put(recvMsg{buffer: bytes.NewBuffer(buf[:n:n])}) + buf = buf[n:] } if err != nil { s.buf.put(recvMsg{err: mapRecvMsgError(err)}) return } + if len(buf) == 0 { + buf = make([]byte, readSize) + } } }() @@ -475,7 +462,7 @@ func (ht *serverHandlerTransport) IncrMsgSent() {} func (ht *serverHandlerTransport) IncrMsgRecv() {} -func (ht *serverHandlerTransport) Drain(string) { +func (ht *serverHandlerTransport) Drain(debugData string) { panic("Drain() is not implemented") } diff --git a/go-controller/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/go-controller/vendor/google.golang.org/grpc/internal/transport/http2_client.go index 62b81885d8..3c63c70698 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -47,7 +47,6 @@ import ( isyscall "google.golang.org/grpc/internal/syscall" "google.golang.org/grpc/internal/transport/networktype" "google.golang.org/grpc/keepalive" - "google.golang.org/grpc/mem" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" "google.golang.org/grpc/resolver" @@ -60,8 +59,6 @@ import ( // atomically. var clientConnectionCounter uint64 -var goAwayLoopyWriterTimeout = 5 * time.Second - var metadataFromOutgoingContextRaw = internal.FromOutgoingContextRaw.(func(context.Context) (metadata.MD, [][]string, bool)) // http2Client implements the ClientTransport interface with HTTP2. @@ -86,9 +83,9 @@ type http2Client struct { writerDone chan struct{} // sync point to enable testing. // goAway is closed to notify the upper layer (i.e., addrConn.transportMonitor) // that the server sent GoAway on this transport. - goAway chan struct{} - keepaliveDone chan struct{} // Closed when the keepalive goroutine exits. - framer *framer + goAway chan struct{} + + framer *framer // controlBuf delivers all the control related tasks (e.g., window // updates, reset streams, and various settings) to the controller. // Do not access controlBuf with mu held. @@ -147,7 +144,7 @@ type http2Client struct { onClose func(GoAwayReason) - bufferPool mem.BufferPool + bufferPool *bufferPool connectionID uint64 logger *grpclog.PrefixLogger @@ -232,7 +229,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } }(conn) - // The following defer and goroutine monitor the connectCtx for cancellation + // The following defer and goroutine monitor the connectCtx for cancelation // and deadline. On context expiration, the connection is hard closed and // this function will naturally fail as a result. Otherwise, the defer // waits for the goroutine to exit to prevent the context from being @@ -335,7 +332,6 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts readerDone: make(chan struct{}), writerDone: make(chan struct{}), goAway: make(chan struct{}), - keepaliveDone: make(chan struct{}), framer: newFramer(conn, writeBufSize, readBufSize, opts.SharedWriteBuffer, maxHeaderListSize), fc: &trInFlow{limit: uint32(icwz)}, scheme: scheme, @@ -350,7 +346,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts streamQuota: defaultMaxStreamsClient, streamsQuotaAvailable: make(chan struct{}, 1), keepaliveEnabled: keepaliveEnabled, - bufferPool: opts.BufferPool, + bufferPool: newBufferPool(), onClose: onClose, } var czSecurity credentials.ChannelzSecurityValue @@ -467,7 +463,7 @@ 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, t.conn, t.logger, t.outgoingGoAwayHandler, t.bufferPool) + t.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger, t.outgoingGoAwayHandler) if err := t.loopy.run(); !isIOError(err) { // Immediately close the connection, as the loopy writer returns // when there are no more active streams and we were draining (the @@ -508,6 +504,7 @@ func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream { closeStream: func(err error) { t.CloseStream(s, err) }, + freeBuffer: t.bufferPool.put, }, windowHandler: func(n int) { t.updateWindow(s, uint32(n)) @@ -528,9 +525,8 @@ func (t *http2Client) getPeer() *peer.Peer { // to be the last frame loopy writes to the transport. func (t *http2Client) outgoingGoAwayHandler(g *goAway) (bool, error) { t.mu.Lock() - maxStreamID := t.nextID - 2 - t.mu.Unlock() - if err := t.framer.fr.WriteGoAway(maxStreamID, http2.ErrCodeNo, g.debugData); err != nil { + defer t.mu.Unlock() + if err := t.framer.fr.WriteGoAway(t.nextID-2, http2.ErrCodeNo, g.debugData); err != nil { return false, err } return false, g.closeConn @@ -774,7 +770,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, hdr := &headerFrame{ hf: headerFields, endStream: false, - initStream: func(uint32) error { + initStream: func(id uint32) error { t.mu.Lock() // TODO: handle transport closure in loopy instead and remove this // initStream is never called when transport is draining. @@ -987,7 +983,6 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2. // only once on a transport. Once it is called, the transport should not be // accessed anymore. func (t *http2Client) Close(err error) { - t.conn.SetWriteDeadline(time.Now().Add(time.Second * 10)) t.mu.Lock() // Make sure we only close once. if t.state == closing { @@ -1010,33 +1005,18 @@ func (t *http2Client) Close(err error) { // should unblock it so that the goroutine eventually exits. t.kpDormancyCond.Signal() } - // Append info about previous goaways if there were any, since this may be important - // for understanding the root cause for this connection to be closed. - goAwayDebugMessage := t.goAwayDebugMessage t.mu.Unlock() - // Per HTTP/2 spec, a GOAWAY frame must be sent before closing the - // connection. See https://httpwg.org/specs/rfc7540.html#GOAWAY. It - // also waits for loopyWriter to be closed with a timer to avoid the - // long blocking in case the connection is blackholed, i.e. TCP is - // just stuck. + // connection. See https://httpwg.org/specs/rfc7540.html#GOAWAY. t.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte("client transport shutdown"), closeConn: err}) - timer := time.NewTimer(goAwayLoopyWriterTimeout) - defer timer.Stop() - select { - case <-t.writerDone: // success - case <-timer.C: - t.logger.Infof("Failed to write a GOAWAY frame as part of connection close after %s. Giving up and closing the transport.", goAwayLoopyWriterTimeout) - } + <-t.writerDone t.cancel() t.conn.Close() - // Waits for the reader and keepalive goroutines to exit before returning to - // ensure all resources are cleaned up before Close can return. - <-t.readerDone - if t.keepaliveEnabled { - <-t.keepaliveDone - } channelz.RemoveEntry(t.channelz.ID) + // Append info about previous goaways if there were any, since this may be important + // for understanding the root cause for this connection to be closed. + _, goAwayDebugMessage := t.GetGoAwayReason() + var st *status.Status if len(goAwayDebugMessage) > 0 { st = status.Newf(codes.Unavailable, "closing transport due to: %v, received prior goaway: %v", err, goAwayDebugMessage) @@ -1085,36 +1065,27 @@ func (t *http2Client) GracefulClose() { // Write formats the data into HTTP2 data frame(s) and sends it out. The caller // should proceed only if Write returns nil. -func (t *http2Client) Write(s *Stream, hdr []byte, data mem.BufferSlice, opts *Options) error { - reader := data.Reader() - +func (t *http2Client) Write(s *Stream, hdr []byte, data []byte, opts *Options) error { if opts.Last { // If it's the last message, update stream state. if !s.compareAndSwapState(streamActive, streamWriteDone) { - _ = reader.Close() return errStreamDone } } else if s.getState() != streamActive { - _ = reader.Close() return errStreamDone } df := &dataFrame{ streamID: s.id, endStream: opts.Last, h: hdr, - reader: reader, + d: data, } - if hdr != nil || df.reader.Remaining() != 0 { // If it's not an empty data frame, check quota. - if err := s.wq.get(int32(len(hdr) + df.reader.Remaining())); err != nil { - _ = reader.Close() + if hdr != nil || data != nil { // If it's not an empty data frame, check quota. + if err := s.wq.get(int32(len(hdr) + len(data))); err != nil { return err } } - if err := t.controlBuf.put(df); err != nil { - _ = reader.Close() - return err - } - return nil + return t.controlBuf.put(df) } func (t *http2Client) getStream(f http2.Frame) *Stream { @@ -1219,13 +1190,10 @@ func (t *http2Client) handleData(f *http2.DataFrame) { // guarantee f.Data() is consumed before the arrival of next frame. // Can this copy be eliminated? if len(f.Data()) > 0 { - pool := t.bufferPool - if pool == nil { - // Note that this is only supposed to be nil in tests. Otherwise, stream is - // always initialized with a BufferPool. - pool = mem.DefaultBufferPool() - } - s.write(recvMsg{buffer: mem.Copy(f.Data(), pool)}) + buffer := t.bufferPool.get() + buffer.Reset() + buffer.Write(f.Data()) + s.write(recvMsg{buffer: buffer}) } } // The server has closed the stream without sending trailers. Record that @@ -1254,7 +1222,7 @@ func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) { if statusCode == codes.Canceled { if d, ok := s.ctx.Deadline(); ok && !d.After(time.Now()) { // Our deadline was already exceeded, and that was likely the cause - // of this cancellation. Alter the status code accordingly. + // of this cancelation. Alter the status code accordingly. statusCode = codes.DeadlineExceeded } } @@ -1323,11 +1291,11 @@ func (t *http2Client) handlePing(f *http2.PingFrame) { t.controlBuf.put(pingAck) } -func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) error { +func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { t.mu.Lock() if t.state == closing { t.mu.Unlock() - return nil + return } 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 @@ -1339,7 +1307,8 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) error { id := f.LastStreamID if id > 0 && id%2 == 0 { t.mu.Unlock() - return connectionErrorf(true, nil, "received goaway with non-zero even-numbered stream id: %v", id) + t.Close(connectionErrorf(true, nil, "received goaway with non-zero even-numbered numbered stream id: %v", id)) + return } // A client can receive multiple GoAways from the server (see // https://github.com/grpc/grpc-go/issues/1387). The idea is that the first @@ -1356,7 +1325,8 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) error { // If there are multiple GoAways the first one should always have an ID greater than the following ones. if id > t.prevGoAwayID { t.mu.Unlock() - return connectionErrorf(true, nil, "received goaway with stream id: %v, which exceeds stream id of previous goaway: %v", id, t.prevGoAwayID) + t.Close(connectionErrorf(true, nil, "received goaway with stream id: %v, which exceeds stream id of previous goaway: %v", id, t.prevGoAwayID)) + return } default: t.setGoAwayReason(f) @@ -1380,7 +1350,8 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) error { t.prevGoAwayID = id if len(t.activeStreams) == 0 { t.mu.Unlock() - return connectionErrorf(true, nil, "received goaway and there are no active streams") + t.Close(connectionErrorf(true, nil, "received goaway and there are no active streams")) + return } streamsToClose := make([]*Stream, 0) @@ -1397,7 +1368,6 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) error { for _, stream := range streamsToClose { t.closeStream(stream, errStreamDrain, false, http2.ErrCodeNo, statusGoAway, nil, false) } - return nil } // setGoAwayReason sets the value of t.goAwayReason based @@ -1633,13 +1603,7 @@ func (t *http2Client) readServerPreface() error { // network connection. If the server preface is not read successfully, an // error is pushed to errCh; otherwise errCh is closed with no error. func (t *http2Client) reader(errCh chan<- error) { - var errClose error - defer func() { - close(t.readerDone) - if errClose != nil { - t.Close(errClose) - } - }() + defer close(t.readerDone) if err := t.readServerPreface(); err != nil { errCh <- err @@ -1678,10 +1642,11 @@ func (t *http2Client) reader(errCh chan<- error) { t.closeStream(s, status.Error(code, msg), true, http2.ErrCodeProtocol, status.New(code, msg), nil, false) } continue + } else { + // Transport error. + t.Close(connectionErrorf(true, err, "error reading from server: %v", err)) + return } - // Transport error. - errClose = connectionErrorf(true, err, "error reading from server: %v", err) - return } switch frame := frame.(type) { case *http2.MetaHeadersFrame: @@ -1695,7 +1660,7 @@ func (t *http2Client) reader(errCh chan<- error) { case *http2.PingFrame: t.handlePing(frame) case *http2.GoAwayFrame: - errClose = t.handleGoAway(frame) + t.handleGoAway(frame) case *http2.WindowUpdateFrame: t.handleWindowUpdate(frame) default: @@ -1706,15 +1671,15 @@ func (t *http2Client) reader(errCh chan<- error) { } } +func minTime(a, b time.Duration) time.Duration { + if a < b { + return a + } + return b +} + // keepalive running in a separate goroutine makes sure the connection is alive by sending pings. func (t *http2Client) keepalive() { - var err error - defer func() { - close(t.keepaliveDone) - if err != nil { - t.Close(err) - } - }() p := &ping{data: [8]byte{}} // True iff a ping has been sent, and no data has been received since then. outstandingPing := false @@ -1738,7 +1703,7 @@ func (t *http2Client) keepalive() { continue } if outstandingPing && timeoutLeft <= 0 { - err = connectionErrorf(true, nil, "keepalive ping failed to receive ACK within timeout") + t.Close(connectionErrorf(true, nil, "keepalive ping failed to receive ACK within timeout")) return } t.mu.Lock() @@ -1780,7 +1745,7 @@ func (t *http2Client) keepalive() { // timeoutLeft. This will ensure that we wait only for kp.Time // before sending out the next ping (for cases where the ping is // acked). - sleepDuration := min(t.kp.Time, timeoutLeft) + sleepDuration := minTime(t.kp.Time, timeoutLeft) timeoutLeft -= sleepDuration timer.Reset(sleepDuration) case <-t.ctx.Done(): diff --git a/go-controller/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/go-controller/vendor/google.golang.org/grpc/internal/transport/http2_server.go index 584b50fe55..b7091165b5 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -39,7 +39,6 @@ import ( "google.golang.org/grpc/internal/grpcutil" "google.golang.org/grpc/internal/pretty" "google.golang.org/grpc/internal/syscall" - "google.golang.org/grpc/mem" "google.golang.org/protobuf/proto" "google.golang.org/grpc/codes" @@ -120,7 +119,7 @@ type http2Server struct { // Fields below are for channelz metric collection. channelz *channelz.Socket - bufferPool mem.BufferPool + bufferPool *bufferPool connectionID uint64 @@ -262,7 +261,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, idle: time.Now(), kep: kep, initialWindowSize: iwz, - bufferPool: config.BufferPool, + bufferPool: newBufferPool(), } var czSecurity credentials.ChannelzSecurityValue if au, ok := authInfo.(credentials.ChannelzSecurityInfo); ok { @@ -331,7 +330,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, t.handleSettings(sf) go func() { - t.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger, t.outgoingGoAwayHandler, t.bufferPool) + t.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger, t.outgoingGoAwayHandler) err := t.loopy.run() close(t.loopyWriterDone) if !isIOError(err) { @@ -614,9 +613,10 @@ func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeade s.wq = newWriteQuota(defaultWriteQuota, s.ctxDone) s.trReader = &transportReader{ reader: &recvBufferReader{ - ctx: s.ctx, - ctxDone: s.ctxDone, - recv: s.buf, + ctx: s.ctx, + ctxDone: s.ctxDone, + recv: s.buf, + freeBuffer: t.bufferPool.put, }, windowHandler: func(n int) { t.updateWindow(s, uint32(n)) @@ -813,13 +813,10 @@ func (t *http2Server) handleData(f *http2.DataFrame) { // guarantee f.Data() is consumed before the arrival of next frame. // Can this copy be eliminated? if len(f.Data()) > 0 { - pool := t.bufferPool - if pool == nil { - // Note that this is only supposed to be nil in tests. Otherwise, stream is - // always initialized with a BufferPool. - pool = mem.DefaultBufferPool() - } - s.write(recvMsg{buffer: mem.Copy(f.Data(), pool)}) + buffer := t.bufferPool.get() + buffer.Reset() + buffer.Write(f.Data()) + s.write(recvMsg{buffer: buffer}) } } if f.StreamEnded() { @@ -1092,9 +1089,7 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { onWrite: t.setResetPingStrikes, } - success, err := t.controlBuf.executeAndPut(func() bool { - return t.checkForHeaderListSize(trailingHeader) - }, nil) + success, err := t.controlBuf.execute(t.checkForHeaderListSize, trailingHeader) if !success { if err != nil { return err @@ -1117,37 +1112,27 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { // Write converts the data into HTTP2 data frame and sends it out. Non-nil error // is returns if it fails (e.g., framing error, transport error). -func (t *http2Server) Write(s *Stream, hdr []byte, data mem.BufferSlice, _ *Options) error { - reader := data.Reader() - +func (t *http2Server) Write(s *Stream, hdr []byte, data []byte, opts *Options) error { if !s.isHeaderSent() { // Headers haven't been written yet. if err := t.WriteHeader(s, nil); err != nil { - _ = reader.Close() return err } } else { // Writing headers checks for this condition. if s.getState() == streamDone { - _ = reader.Close() return t.streamContextErr(s) } } - df := &dataFrame{ streamID: s.id, h: hdr, - reader: reader, + d: data, onEachWrite: t.setResetPingStrikes, } - if err := s.wq.get(int32(len(hdr) + df.reader.Remaining())); err != nil { - _ = reader.Close() + if err := s.wq.get(int32(len(hdr) + len(data))); err != nil { return t.streamContextErr(s) } - if err := t.controlBuf.put(df); err != nil { - _ = reader.Close() - return err - } - return nil + return t.controlBuf.put(df) } // keepalive running in a separate goroutine does the following: @@ -1238,7 +1223,7 @@ func (t *http2Server) keepalive() { // timeoutLeft. This will ensure that we wait only for kp.Time // before sending out the next ping (for cases where the ping is // acked). - sleepDuration := min(t.kp.Time, kpTimeoutLeft) + sleepDuration := minTime(t.kp.Time, kpTimeoutLeft) kpTimeoutLeft -= sleepDuration kpTimer.Reset(sleepDuration) case <-t.done: diff --git a/go-controller/vendor/google.golang.org/grpc/internal/transport/http_util.go b/go-controller/vendor/google.golang.org/grpc/internal/transport/http_util.go index 3613d7b648..39cef3bd44 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/transport/http_util.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/transport/http_util.go @@ -317,32 +317,28 @@ func newBufWriter(conn net.Conn, batchSize int, pool *sync.Pool) *bufWriter { return w } -func (w *bufWriter) Write(b []byte) (int, error) { +func (w *bufWriter) Write(b []byte) (n int, err error) { if w.err != nil { return 0, w.err } if w.batchSize == 0 { // Buffer has been disabled. - n, err := w.conn.Write(b) + n, err = w.conn.Write(b) return n, toIOError(err) } if w.buf == nil { b := w.pool.Get().(*[]byte) w.buf = *b } - written := 0 for len(b) > 0 { - copied := copy(w.buf[w.offset:], b) - b = b[copied:] - written += copied - w.offset += copied - if w.offset < w.batchSize { - continue - } - if err := w.flushKeepBuffer(); err != nil { - return written, err + nn := copy(w.buf[w.offset:], b) + b = b[nn:] + w.offset += nn + n += nn + if w.offset >= w.batchSize { + err = w.flushKeepBuffer() } } - return written, nil + return n, err } func (w *bufWriter) Flush() error { @@ -393,7 +389,7 @@ type framer struct { fr *http2.Framer } -var writeBufferPoolMap = make(map[int]*sync.Pool) +var writeBufferPoolMap map[int]*sync.Pool = make(map[int]*sync.Pool) var writeBufferMutex sync.Mutex func newFramer(conn net.Conn, writeBufferSize, readBufferSize int, sharedWriteBuffer bool, maxHeaderListSize uint32) *framer { diff --git a/go-controller/vendor/google.golang.org/grpc/internal/transport/proxy.go b/go-controller/vendor/google.golang.org/grpc/internal/transport/proxy.go index 54b2244365..24fa103257 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/transport/proxy.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/transport/proxy.go @@ -107,14 +107,8 @@ func doHTTPConnectHandshake(ctx context.Context, conn net.Conn, backendAddr stri } return nil, fmt.Errorf("failed to do connect handshake, response: %q", dump) } - // The buffer could contain extra bytes from the target server, so we can't - // discard it. However, in many cases where the server waits for the client - // to send the first message (e.g. when TLS is being used), the buffer will - // be empty, so we can avoid the overhead of reading through this buffer. - if r.Buffered() != 0 { - return &bufConn{Conn: conn, r: r}, nil - } - return conn, nil + + return &bufConn{Conn: conn, r: r}, nil } // proxyDial dials, connecting to a proxy first if necessary. Checks if a proxy diff --git a/go-controller/vendor/google.golang.org/grpc/internal/transport/transport.go b/go-controller/vendor/google.golang.org/grpc/internal/transport/transport.go index e12cb0bc91..4b39c0ade9 100644 --- a/go-controller/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/go-controller/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -22,6 +22,7 @@ package transport import ( + "bytes" "context" "errors" "fmt" @@ -36,7 +37,6 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/keepalive" - "google.golang.org/grpc/mem" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" "google.golang.org/grpc/resolver" @@ -47,10 +47,32 @@ import ( const logLevel = 2 +type bufferPool struct { + pool sync.Pool +} + +func newBufferPool() *bufferPool { + return &bufferPool{ + pool: sync.Pool{ + New: func() any { + return new(bytes.Buffer) + }, + }, + } +} + +func (p *bufferPool) get() *bytes.Buffer { + return p.pool.Get().(*bytes.Buffer) +} + +func (p *bufferPool) put(b *bytes.Buffer) { + p.pool.Put(b) +} + // recvMsg represents the received msg from the transport. All transport // protocol specific info has been removed. type recvMsg struct { - buffer mem.Buffer + buffer *bytes.Buffer // nil: received some data // io.EOF: stream is completed. data is nil. // other non-nil error: transport failure. data is nil. @@ -80,9 +102,6 @@ func newRecvBuffer() *recvBuffer { func (b *recvBuffer) put(r recvMsg) { b.mu.Lock() if b.err != nil { - // drop the buffer on the floor. Since b.err is not nil, any subsequent reads - // will always return an error, making this buffer inaccessible. - r.buffer.Free() b.mu.Unlock() // An error had occurred earlier, don't accept more // data or errors. @@ -129,97 +148,45 @@ type recvBufferReader struct { ctx context.Context ctxDone <-chan struct{} // cache of ctx.Done() (for performance). recv *recvBuffer - last mem.Buffer // Stores the remaining data in the previous calls. + last *bytes.Buffer // Stores the remaining data in the previous calls. err error + freeBuffer func(*bytes.Buffer) } -func (r *recvBufferReader) ReadHeader(header []byte) (n int, err error) { +// Read reads the next len(p) bytes from last. If last is drained, it tries to +// read additional data from recv. It blocks if there no additional data available +// in recv. If Read returns any non-nil error, it will continue to return that error. +func (r *recvBufferReader) Read(p []byte) (n int, err error) { if r.err != nil { return 0, r.err } if r.last != nil { - n, r.last = mem.ReadUnsafe(header, r.last) - return n, nil - } - if r.closeStream != nil { - n, r.err = r.readHeaderClient(header) - } else { - n, r.err = r.readHeader(header) - } - return n, r.err -} - -// Read reads the next n bytes from last. If last is drained, it tries to read -// additional data from recv. It blocks if there no additional data available in -// recv. If Read returns any non-nil error, it will continue to return that -// error. -func (r *recvBufferReader) Read(n int) (buf mem.Buffer, err error) { - if r.err != nil { - return nil, r.err - } - if r.last != nil { - buf = r.last - if r.last.Len() > n { - buf, r.last = mem.SplitUnsafe(buf, n) - } else { + // Read remaining data left in last call. + copied, _ := r.last.Read(p) + if r.last.Len() == 0 { + r.freeBuffer(r.last) r.last = nil } - return buf, nil + return copied, nil } if r.closeStream != nil { - buf, r.err = r.readClient(n) + n, r.err = r.readClient(p) } else { - buf, r.err = r.read(n) + n, r.err = r.read(p) } - return buf, r.err + return n, r.err } -func (r *recvBufferReader) readHeader(header []byte) (n int, err error) { +func (r *recvBufferReader) read(p []byte) (n int, err error) { select { case <-r.ctxDone: return 0, ContextErr(r.ctx.Err()) case m := <-r.recv.get(): - return r.readHeaderAdditional(m, header) - } -} - -func (r *recvBufferReader) read(n int) (buf mem.Buffer, err error) { - select { - case <-r.ctxDone: - return nil, ContextErr(r.ctx.Err()) - case m := <-r.recv.get(): - return r.readAdditional(m, n) - } -} - -func (r *recvBufferReader) readHeaderClient(header []byte) (n int, err error) { - // If the context is canceled, then closes the stream with nil metadata. - // closeStream writes its error parameter to r.recv as a recvMsg. - // r.readAdditional acts on that message and returns the necessary error. - select { - case <-r.ctxDone: - // Note that this adds the ctx error to the end of recv buffer, and - // reads from the head. This will delay the error until recv buffer is - // empty, thus will delay ctx cancellation in Recv(). - // - // It's done this way to fix a race between ctx cancel and trailer. The - // race was, stream.Recv() may return ctx error if ctxDone wins the - // race, but stream.Trailer() may return a non-nil md because the stream - // was not marked as done when trailer is received. This closeStream - // call will mark stream as done, thus fix the race. - // - // TODO: delaying ctx error seems like a unnecessary side effect. What - // we really want is to mark the stream as done, and return ctx error - // faster. - r.closeStream(ContextErr(r.ctx.Err())) - m := <-r.recv.get() - return r.readHeaderAdditional(m, header) - case m := <-r.recv.get(): - return r.readHeaderAdditional(m, header) + return r.readAdditional(m, p) } } -func (r *recvBufferReader) readClient(n int) (buf mem.Buffer, err error) { +func (r *recvBufferReader) readClient(p []byte) (n int, err error) { // If the context is canceled, then closes the stream with nil metadata. // closeStream writes its error parameter to r.recv as a recvMsg. // r.readAdditional acts on that message and returns the necessary error. @@ -240,40 +207,25 @@ func (r *recvBufferReader) readClient(n int) (buf mem.Buffer, err error) { // faster. r.closeStream(ContextErr(r.ctx.Err())) m := <-r.recv.get() - return r.readAdditional(m, n) + return r.readAdditional(m, p) case m := <-r.recv.get(): - return r.readAdditional(m, n) + return r.readAdditional(m, p) } } -func (r *recvBufferReader) readHeaderAdditional(m recvMsg, header []byte) (n int, err error) { +func (r *recvBufferReader) readAdditional(m recvMsg, p []byte) (n int, err error) { r.recv.load() if m.err != nil { - if m.buffer != nil { - m.buffer.Free() - } return 0, m.err } - - n, r.last = mem.ReadUnsafe(header, m.buffer) - - return n, nil -} - -func (r *recvBufferReader) readAdditional(m recvMsg, n int) (b mem.Buffer, err error) { - r.recv.load() - if m.err != nil { - if m.buffer != nil { - m.buffer.Free() - } - return nil, m.err - } - - if m.buffer.Len() > n { - m.buffer, r.last = mem.SplitUnsafe(m.buffer, n) + copied, _ := m.buffer.Read(p) + if m.buffer.Len() == 0 { + r.freeBuffer(m.buffer) + r.last = nil + } else { + r.last = m.buffer } - - return m.buffer, nil + return copied, nil } type streamState uint32 @@ -289,7 +241,7 @@ const ( type Stream struct { id uint32 st ServerTransport // nil for client side Stream - ct ClientTransport // nil for server side Stream + ct *http2Client // nil for server side Stream ctx context.Context // the associated context of the stream cancel context.CancelFunc // always nil for client side Stream done chan struct{} // closed at the end of stream to unblock writers. On the client side. @@ -299,7 +251,7 @@ type Stream struct { recvCompress string sendCompress string buf *recvBuffer - trReader *transportReader + trReader io.Reader fc *inFlow wq *writeQuota @@ -456,7 +408,7 @@ func (s *Stream) TrailersOnly() bool { return s.noHeaders } -// Trailer returns the cached trailer metadata. Note that if it is not called +// Trailer returns the cached trailer metedata. Note that if it is not called // after the entire stream is done, it could return an empty MD. Client // side only. // It can be safely read only after stream has ended that is either read @@ -547,96 +499,36 @@ func (s *Stream) write(m recvMsg) { s.buf.put(m) } -// ReadHeader reads data into the provided header slice from the stream. It -// first checks if there was an error during a previous read operation and -// returns it if present. It then requests a read operation for the length of -// the header. It continues to read from the stream until the entire header -// slice is filled or an error occurs. If an `io.EOF` error is encountered -// with partially read data, it is converted to `io.ErrUnexpectedEOF` to -// indicate an unexpected end of the stream. The method returns any error -// encountered during the read process or nil if the header was successfully -// read. -func (s *Stream) ReadHeader(header []byte) (err error) { - // Don't request a read if there was an error earlier - if er := s.trReader.er; er != nil { - return er - } - s.requestRead(len(header)) - for len(header) != 0 { - n, err := s.trReader.ReadHeader(header) - header = header[n:] - if len(header) == 0 { - err = nil - } - if err != nil { - if n > 0 && err == io.EOF { - err = io.ErrUnexpectedEOF - } - return err - } - } - return nil -} - -// Read reads n bytes from the wire for this stream. -func (s *Stream) Read(n int) (data mem.BufferSlice, err error) { +// Read reads all p bytes from the wire for this stream. +func (s *Stream) Read(p []byte) (n int, err error) { // Don't request a read if there was an error earlier - if er := s.trReader.er; er != nil { - return nil, er + if er := s.trReader.(*transportReader).er; er != nil { + return 0, er } - s.requestRead(n) - for n != 0 { - buf, err := s.trReader.Read(n) - var bufLen int - if buf != nil { - bufLen = buf.Len() - } - n -= bufLen - if n == 0 { - err = nil - } - if err != nil { - if bufLen > 0 && err == io.EOF { - err = io.ErrUnexpectedEOF - } - data.Free() - return nil, err - } - data = append(data, buf) - } - return data, nil + s.requestRead(len(p)) + return io.ReadFull(s.trReader, p) } -// transportReader reads all the data available for this Stream from the transport and +// tranportReader reads all the data available for this Stream from the transport and // passes them into the decoder, which converts them into a gRPC message stream. // The error is io.EOF when the stream is done or another non-nil error if // the stream broke. type transportReader struct { - reader *recvBufferReader + reader io.Reader // The handler to control the window update procedure for both this // particular stream and the associated transport. windowHandler func(int) er error } -func (t *transportReader) ReadHeader(header []byte) (int, error) { - n, err := t.reader.ReadHeader(header) +func (t *transportReader) Read(p []byte) (n int, err error) { + n, err = t.reader.Read(p) if err != nil { t.er = err - return 0, err + return } t.windowHandler(n) - return n, nil -} - -func (t *transportReader) Read(n int) (mem.Buffer, error) { - buf, err := t.reader.Read(n) - if err != nil { - t.er = err - return buf, err - } - t.windowHandler(buf.Len()) - return buf, nil + return } // BytesReceived indicates whether any bytes have been received on this stream. @@ -682,7 +574,6 @@ type ServerConfig struct { ChannelzParent *channelz.Server MaxHeaderListSize *uint32 HeaderTableSize *uint32 - BufferPool mem.BufferPool } // ConnectOptions covers all relevant options for communicating with the server. @@ -721,8 +612,6 @@ type ConnectOptions struct { MaxHeaderListSize *uint32 // UseProxy specifies if a proxy should be used. UseProxy bool - // The mem.BufferPool to use when reading/writing to the wire. - BufferPool mem.BufferPool } // NewClientTransport establishes the transport with the required ConnectOptions @@ -784,7 +673,7 @@ type ClientTransport interface { // Write sends the data for the given stream. A nil stream indicates // the write is to be performed on the transport as a whole. - Write(s *Stream, hdr []byte, data mem.BufferSlice, opts *Options) error + Write(s *Stream, hdr []byte, data []byte, opts *Options) error // NewStream creates a Stream for an RPC. NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, error) @@ -836,7 +725,7 @@ type ServerTransport interface { // Write sends the data for the given stream. // Write may not be called on all streams. - Write(s *Stream, hdr []byte, data mem.BufferSlice, opts *Options) error + Write(s *Stream, hdr []byte, data []byte, opts *Options) error // WriteStatus sends the status of a stream to the client. WriteStatus is // the final call made on a stream and always occurs. @@ -909,7 +798,7 @@ var ( // connection is draining. This could be caused by goaway or balancer // removing the address. errStreamDrain = status.Error(codes.Unavailable, "the connection is draining") - // errStreamDone is returned from write at the client side to indicate application + // errStreamDone is returned from write at the client side to indiacte application // layer of an error. errStreamDone = errors.New("the stream is done") // StatusGoAway indicates that the server sent a GOAWAY that included this diff --git a/go-controller/vendor/google.golang.org/grpc/keepalive/keepalive.go b/go-controller/vendor/google.golang.org/grpc/keepalive/keepalive.go index eb42b19fb9..34d31b5e7d 100644 --- a/go-controller/vendor/google.golang.org/grpc/keepalive/keepalive.go +++ b/go-controller/vendor/google.golang.org/grpc/keepalive/keepalive.go @@ -34,29 +34,15 @@ type ClientParameters struct { // After a duration of this time if the client doesn't see any activity it // pings the server to see if the transport is still alive. // If set below 10s, a minimum value of 10s will be used instead. - // - // Note that gRPC servers have a default EnforcementPolicy.MinTime of 5 - // minutes (which means the client shouldn't ping more frequently than every - // 5 minutes). - // - // Though not ideal, it's not a strong requirement for Time to be less than - // EnforcementPolicy.MinTime. Time will automatically double if the server - // disconnects due to its enforcement policy. - // - // For more details, see - // https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md - Time time.Duration + Time time.Duration // The current default value is infinity. // After having pinged for keepalive check, the client waits for a duration // of Timeout and if no activity is seen even after that the connection is // closed. - // - // If keepalive is enabled, and this value is not explicitly set, the default - // is 20 seconds. - Timeout time.Duration + Timeout time.Duration // The current default value is 20 seconds. // If true, client sends keepalive pings even with no active RPCs. If false, // when there are no active RPCs, Time and Timeout will be ignored and no // keepalive pings will be sent. - PermitWithoutStream bool + PermitWithoutStream bool // false by default. } // ServerParameters is used to set keepalive and max-age parameters on the diff --git a/go-controller/vendor/google.golang.org/grpc/mem/buffer_pool.go b/go-controller/vendor/google.golang.org/grpc/mem/buffer_pool.go deleted file mode 100644 index c37c58c023..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/mem/buffer_pool.go +++ /dev/null @@ -1,194 +0,0 @@ -/* - * - * Copyright 2024 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 mem - -import ( - "sort" - "sync" - - "google.golang.org/grpc/internal" -) - -// BufferPool is a pool of buffers that can be shared and reused, resulting in -// decreased memory allocation. -type BufferPool interface { - // Get returns a buffer with specified length from the pool. - Get(length int) *[]byte - - // Put returns a buffer to the pool. - Put(*[]byte) -} - -var defaultBufferPoolSizes = []int{ - 256, - 4 << 10, // 4KB (go page size) - 16 << 10, // 16KB (max HTTP/2 frame size used by gRPC) - 32 << 10, // 32KB (default buffer size for io.Copy) - 1 << 20, // 1MB -} - -var defaultBufferPool BufferPool - -func init() { - defaultBufferPool = NewTieredBufferPool(defaultBufferPoolSizes...) - - internal.SetDefaultBufferPoolForTesting = func(pool BufferPool) { - defaultBufferPool = pool - } - - internal.SetBufferPoolingThresholdForTesting = func(threshold int) { - bufferPoolingThreshold = threshold - } -} - -// DefaultBufferPool returns the current default buffer pool. It is a BufferPool -// created with NewBufferPool that uses a set of default sizes optimized for -// expected workflows. -func DefaultBufferPool() BufferPool { - return defaultBufferPool -} - -// NewTieredBufferPool returns a BufferPool implementation that uses multiple -// underlying pools of the given pool sizes. -func NewTieredBufferPool(poolSizes ...int) BufferPool { - sort.Ints(poolSizes) - pools := make([]*sizedBufferPool, len(poolSizes)) - for i, s := range poolSizes { - pools[i] = newSizedBufferPool(s) - } - return &tieredBufferPool{ - sizedPools: pools, - } -} - -// tieredBufferPool implements the BufferPool interface with multiple tiers of -// buffer pools for different sizes of buffers. -type tieredBufferPool struct { - sizedPools []*sizedBufferPool - fallbackPool simpleBufferPool -} - -func (p *tieredBufferPool) Get(size int) *[]byte { - return p.getPool(size).Get(size) -} - -func (p *tieredBufferPool) Put(buf *[]byte) { - p.getPool(cap(*buf)).Put(buf) -} - -func (p *tieredBufferPool) getPool(size int) BufferPool { - poolIdx := sort.Search(len(p.sizedPools), func(i int) bool { - return p.sizedPools[i].defaultSize >= size - }) - - if poolIdx == len(p.sizedPools) { - return &p.fallbackPool - } - - return p.sizedPools[poolIdx] -} - -// sizedBufferPool is a BufferPool implementation that is optimized for specific -// buffer sizes. For example, HTTP/2 frames within gRPC have a default max size -// of 16kb and a sizedBufferPool can be configured to only return buffers with a -// capacity of 16kb. Note that however it does not support returning larger -// buffers and in fact panics if such a buffer is requested. Because of this, -// this BufferPool implementation is not meant to be used on its own and rather -// is intended to be embedded in a tieredBufferPool such that Get is only -// invoked when the required size is smaller than or equal to defaultSize. -type sizedBufferPool struct { - pool sync.Pool - defaultSize int -} - -func (p *sizedBufferPool) Get(size int) *[]byte { - buf := p.pool.Get().(*[]byte) - b := *buf - clear(b[:cap(b)]) - *buf = b[:size] - return buf -} - -func (p *sizedBufferPool) Put(buf *[]byte) { - if cap(*buf) < p.defaultSize { - // Ignore buffers that are too small to fit in the pool. Otherwise, when - // Get is called it will panic as it tries to index outside the bounds - // of the buffer. - return - } - p.pool.Put(buf) -} - -func newSizedBufferPool(size int) *sizedBufferPool { - return &sizedBufferPool{ - pool: sync.Pool{ - New: func() any { - buf := make([]byte, size) - return &buf - }, - }, - defaultSize: size, - } -} - -var _ BufferPool = (*simpleBufferPool)(nil) - -// simpleBufferPool is an implementation of the BufferPool interface that -// attempts to pool buffers with a sync.Pool. When Get is invoked, it tries to -// acquire a buffer from the pool but if that buffer is too small, it returns it -// to the pool and creates a new one. -type simpleBufferPool struct { - pool sync.Pool -} - -func (p *simpleBufferPool) Get(size int) *[]byte { - bs, ok := p.pool.Get().(*[]byte) - if ok && cap(*bs) >= size { - *bs = (*bs)[:size] - return bs - } - - // A buffer was pulled from the pool, but it is too small. Put it back in - // the pool and create one large enough. - if ok { - p.pool.Put(bs) - } - - b := make([]byte, size) - return &b -} - -func (p *simpleBufferPool) Put(buf *[]byte) { - p.pool.Put(buf) -} - -var _ BufferPool = NopBufferPool{} - -// NopBufferPool is a buffer pool that returns new buffers without pooling. -type NopBufferPool struct{} - -// Get returns a buffer with specified length from the pool. -func (NopBufferPool) Get(length int) *[]byte { - b := make([]byte, length) - return &b -} - -// Put returns a buffer to the pool. -func (NopBufferPool) Put(*[]byte) { -} diff --git a/go-controller/vendor/google.golang.org/grpc/mem/buffer_slice.go b/go-controller/vendor/google.golang.org/grpc/mem/buffer_slice.go deleted file mode 100644 index 228e9c2f20..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/mem/buffer_slice.go +++ /dev/null @@ -1,226 +0,0 @@ -/* - * - * Copyright 2024 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 mem - -import ( - "io" -) - -// BufferSlice offers a means to represent data that spans one or more Buffer -// instances. A BufferSlice is meant to be immutable after creation, and methods -// like Ref create and return copies of the slice. This is why all methods have -// value receivers rather than pointer receivers. -// -// Note that any of the methods that read the underlying buffers such as Ref, -// Len or CopyTo etc., will panic if any underlying buffers have already been -// freed. It is recommended to not directly interact with any of the underlying -// buffers directly, rather such interactions should be mediated through the -// various methods on this type. -// -// By convention, any APIs that return (mem.BufferSlice, error) should reduce -// the burden on the caller by never returning a mem.BufferSlice that needs to -// be freed if the error is non-nil, unless explicitly stated. -type BufferSlice []Buffer - -// Len returns the sum of the length of all the Buffers in this slice. -// -// # Warning -// -// Invoking the built-in len on a BufferSlice will return the number of buffers -// in the slice, and *not* the value returned by this function. -func (s BufferSlice) Len() int { - var length int - for _, b := range s { - length += b.Len() - } - return length -} - -// Ref invokes Ref on each buffer in the slice. -func (s BufferSlice) Ref() { - for _, b := range s { - b.Ref() - } -} - -// Free invokes Buffer.Free() on each Buffer in the slice. -func (s BufferSlice) Free() { - for _, b := range s { - b.Free() - } -} - -// CopyTo copies each of the underlying Buffer's data into the given buffer, -// returning the number of bytes copied. Has the same semantics as the copy -// builtin in that it will copy as many bytes as it can, stopping when either dst -// is full or s runs out of data, returning the minimum of s.Len() and len(dst). -func (s BufferSlice) CopyTo(dst []byte) int { - off := 0 - for _, b := range s { - off += copy(dst[off:], b.ReadOnlyData()) - } - return off -} - -// Materialize concatenates all the underlying Buffer's data into a single -// contiguous buffer using CopyTo. -func (s BufferSlice) Materialize() []byte { - l := s.Len() - if l == 0 { - return nil - } - out := make([]byte, l) - s.CopyTo(out) - return out -} - -// MaterializeToBuffer functions like Materialize except that it writes the data -// to a single Buffer pulled from the given BufferPool. -// -// As a special case, if the input BufferSlice only actually has one Buffer, this -// function simply increases the refcount before returning said Buffer. Freeing this -// buffer won't release it until the BufferSlice is itself released. -func (s BufferSlice) MaterializeToBuffer(pool BufferPool) Buffer { - if len(s) == 1 { - s[0].Ref() - return s[0] - } - sLen := s.Len() - if sLen == 0 { - return emptyBuffer{} - } - buf := pool.Get(sLen) - s.CopyTo(*buf) - return NewBuffer(buf, pool) -} - -// Reader returns a new Reader for the input slice after taking references to -// each underlying buffer. -func (s BufferSlice) Reader() Reader { - s.Ref() - return &sliceReader{ - data: s, - len: s.Len(), - } -} - -// Reader exposes a BufferSlice's data as an io.Reader, allowing it to interface -// with other parts systems. It also provides an additional convenience method -// Remaining(), which returns the number of unread bytes remaining in the slice. -// Buffers will be freed as they are read. -type Reader interface { - io.Reader - io.ByteReader - // Close frees the underlying BufferSlice and never returns an error. Subsequent - // calls to Read will return (0, io.EOF). - Close() error - // Remaining returns the number of unread bytes remaining in the slice. - Remaining() int -} - -type sliceReader struct { - data BufferSlice - len int - // The index into data[0].ReadOnlyData(). - bufferIdx int -} - -func (r *sliceReader) Remaining() int { - return r.len -} - -func (r *sliceReader) Close() error { - r.data.Free() - r.data = nil - r.len = 0 - return nil -} - -func (r *sliceReader) freeFirstBufferIfEmpty() bool { - if len(r.data) == 0 || r.bufferIdx != len(r.data[0].ReadOnlyData()) { - return false - } - - r.data[0].Free() - r.data = r.data[1:] - r.bufferIdx = 0 - return true -} - -func (r *sliceReader) Read(buf []byte) (n int, _ error) { - if r.len == 0 { - return 0, io.EOF - } - - for len(buf) != 0 && r.len != 0 { - // Copy as much as possible from the first Buffer in the slice into the - // given byte slice. - data := r.data[0].ReadOnlyData() - copied := copy(buf, data[r.bufferIdx:]) - r.len -= copied // Reduce len by the number of bytes copied. - r.bufferIdx += copied // Increment the buffer index. - n += copied // Increment the total number of bytes read. - buf = buf[copied:] // Shrink the given byte slice. - - // If we have copied all the data from the first Buffer, free it and advance to - // the next in the slice. - r.freeFirstBufferIfEmpty() - } - - return n, nil -} - -func (r *sliceReader) ReadByte() (byte, error) { - if r.len == 0 { - return 0, io.EOF - } - - // There may be any number of empty buffers in the slice, clear them all until a - // non-empty buffer is reached. This is guaranteed to exit since r.len is not 0. - for r.freeFirstBufferIfEmpty() { - } - - b := r.data[0].ReadOnlyData()[r.bufferIdx] - r.len-- - r.bufferIdx++ - // Free the first buffer in the slice if the last byte was read - r.freeFirstBufferIfEmpty() - return b, nil -} - -var _ io.Writer = (*writer)(nil) - -type writer struct { - buffers *BufferSlice - pool BufferPool -} - -func (w *writer) Write(p []byte) (n int, err error) { - b := Copy(p, w.pool) - *w.buffers = append(*w.buffers, b) - return b.Len(), nil -} - -// NewWriter wraps the given BufferSlice and BufferPool to implement the -// io.Writer interface. Every call to Write copies the contents of the given -// buffer into a new Buffer pulled from the given pool and the Buffer is added to -// the given BufferSlice. -func NewWriter(buffers *BufferSlice, pool BufferPool) io.Writer { - return &writer{buffers: buffers, pool: pool} -} diff --git a/go-controller/vendor/google.golang.org/grpc/mem/buffers.go b/go-controller/vendor/google.golang.org/grpc/mem/buffers.go deleted file mode 100644 index ecbf0b9a73..0000000000 --- a/go-controller/vendor/google.golang.org/grpc/mem/buffers.go +++ /dev/null @@ -1,268 +0,0 @@ -/* - * - * Copyright 2024 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 mem provides utilities that facilitate memory reuse in byte slices -// that are used as buffers. -// -// # Experimental -// -// Notice: All APIs in this package are EXPERIMENTAL and may be changed or -// removed in a later release. -package mem - -import ( - "fmt" - "sync" - "sync/atomic" -) - -// A Buffer represents a reference counted piece of data (in bytes) that can be -// acquired by a call to NewBuffer() or Copy(). A reference to a Buffer may be -// released by calling Free(), which invokes the free function given at creation -// only after all references are released. -// -// Note that a Buffer is not safe for concurrent access and instead each -// goroutine should use its own reference to the data, which can be acquired via -// a call to Ref(). -// -// Attempts to access the underlying data after releasing the reference to the -// Buffer will panic. -type Buffer interface { - // ReadOnlyData returns the underlying byte slice. Note that it is undefined - // behavior to modify the contents of this slice in any way. - ReadOnlyData() []byte - // Ref increases the reference counter for this Buffer. - Ref() - // Free decrements this Buffer's reference counter and frees the underlying - // byte slice if the counter reaches 0 as a result of this call. - Free() - // Len returns the Buffer's size. - Len() int - - split(n int) (left, right Buffer) - read(buf []byte) (int, Buffer) -} - -var ( - bufferPoolingThreshold = 1 << 10 - - bufferObjectPool = sync.Pool{New: func() any { return new(buffer) }} - refObjectPool = sync.Pool{New: func() any { return new(atomic.Int32) }} -) - -// IsBelowBufferPoolingThreshold returns true if the given size is less than or -// equal to the threshold for buffer pooling. This is used to determine whether -// to pool buffers or allocate them directly. -func IsBelowBufferPoolingThreshold(size int) bool { - return size <= bufferPoolingThreshold -} - -type buffer struct { - origData *[]byte - data []byte - refs *atomic.Int32 - pool BufferPool -} - -func newBuffer() *buffer { - return bufferObjectPool.Get().(*buffer) -} - -// NewBuffer creates a new Buffer from the given data, initializing the reference -// counter to 1. The data will then be returned to the given pool when all -// references to the returned Buffer are released. As a special case to avoid -// additional allocations, if the given buffer pool is nil, the returned buffer -// will be a "no-op" Buffer where invoking Buffer.Free() does nothing and the -// underlying data is never freed. -// -// Note that the backing array of the given data is not copied. -func NewBuffer(data *[]byte, pool BufferPool) Buffer { - // Use the buffer's capacity instead of the length, otherwise buffers may - // not be reused under certain conditions. For example, if a large buffer - // is acquired from the pool, but fewer bytes than the buffering threshold - // are written to it, the buffer will not be returned to the pool. - if pool == nil || IsBelowBufferPoolingThreshold(cap(*data)) { - return (SliceBuffer)(*data) - } - b := newBuffer() - b.origData = data - b.data = *data - b.pool = pool - b.refs = refObjectPool.Get().(*atomic.Int32) - b.refs.Add(1) - return b -} - -// Copy creates a new Buffer from the given data, initializing the reference -// counter to 1. -// -// It acquires a []byte from the given pool and copies over the backing array -// of the given data. The []byte acquired from the pool is returned to the -// pool when all references to the returned Buffer are released. -func Copy(data []byte, pool BufferPool) Buffer { - if IsBelowBufferPoolingThreshold(len(data)) { - buf := make(SliceBuffer, len(data)) - copy(buf, data) - return buf - } - - buf := pool.Get(len(data)) - copy(*buf, data) - return NewBuffer(buf, pool) -} - -func (b *buffer) ReadOnlyData() []byte { - if b.refs == nil { - panic("Cannot read freed buffer") - } - return b.data -} - -func (b *buffer) Ref() { - if b.refs == nil { - panic("Cannot ref freed buffer") - } - b.refs.Add(1) -} - -func (b *buffer) Free() { - if b.refs == nil { - panic("Cannot free freed buffer") - } - - refs := b.refs.Add(-1) - switch { - case refs > 0: - return - case refs == 0: - if b.pool != nil { - b.pool.Put(b.origData) - } - - refObjectPool.Put(b.refs) - b.origData = nil - b.data = nil - b.refs = nil - b.pool = nil - bufferObjectPool.Put(b) - default: - panic("Cannot free freed buffer") - } -} - -func (b *buffer) Len() int { - return len(b.ReadOnlyData()) -} - -func (b *buffer) split(n int) (Buffer, Buffer) { - if b.refs == nil { - panic("Cannot split freed buffer") - } - - b.refs.Add(1) - split := newBuffer() - split.origData = b.origData - split.data = b.data[n:] - split.refs = b.refs - split.pool = b.pool - - b.data = b.data[:n] - - return b, split -} - -func (b *buffer) read(buf []byte) (int, Buffer) { - if b.refs == nil { - panic("Cannot read freed buffer") - } - - n := copy(buf, b.data) - if n == len(b.data) { - b.Free() - return n, nil - } - - b.data = b.data[n:] - return n, b -} - -func (b *buffer) String() string { - return fmt.Sprintf("mem.Buffer(%p, data: %p, length: %d)", b, b.ReadOnlyData(), len(b.ReadOnlyData())) -} - -// ReadUnsafe reads bytes from the given Buffer into the provided slice. -// It does not perform safety checks. -func ReadUnsafe(dst []byte, buf Buffer) (int, Buffer) { - return buf.read(dst) -} - -// SplitUnsafe modifies the receiver to point to the first n bytes while it -// returns a new reference to the remaining bytes. The returned Buffer -// functions just like a normal reference acquired using Ref(). -func SplitUnsafe(buf Buffer, n int) (left, right Buffer) { - return buf.split(n) -} - -type emptyBuffer struct{} - -func (e emptyBuffer) ReadOnlyData() []byte { - return nil -} - -func (e emptyBuffer) Ref() {} -func (e emptyBuffer) Free() {} - -func (e emptyBuffer) Len() int { - return 0 -} - -func (e emptyBuffer) split(int) (left, right Buffer) { - return e, e -} - -func (e emptyBuffer) read([]byte) (int, Buffer) { - return 0, e -} - -// SliceBuffer is a Buffer implementation that wraps a byte slice. It provides -// methods for reading, splitting, and managing the byte slice. -type SliceBuffer []byte - -// ReadOnlyData returns the byte slice. -func (s SliceBuffer) ReadOnlyData() []byte { return s } - -// Ref is a noop implementation of Ref. -func (s SliceBuffer) Ref() {} - -// Free is a noop implementation of Free. -func (s SliceBuffer) Free() {} - -// Len is a noop implementation of Len. -func (s SliceBuffer) Len() int { return len(s) } - -func (s SliceBuffer) split(n int) (left, right Buffer) { - return s[:n], s[n:] -} - -func (s SliceBuffer) read(buf []byte) (int, Buffer) { - n := copy(buf, s) - if n == len(s) { - return n, nil - } - return n, s[n:] -} diff --git a/go-controller/vendor/google.golang.org/grpc/metadata/metadata.go b/go-controller/vendor/google.golang.org/grpc/metadata/metadata.go index d2e15253bb..1e9485fd6e 100644 --- a/go-controller/vendor/google.golang.org/grpc/metadata/metadata.go +++ b/go-controller/vendor/google.golang.org/grpc/metadata/metadata.go @@ -213,6 +213,11 @@ func FromIncomingContext(ctx context.Context) (MD, bool) { // ValueFromIncomingContext returns the metadata value corresponding to the metadata // key from the incoming metadata if it exists. Keys are matched in a case insensitive // manner. +// +// # Experimental +// +// Notice: This API is EXPERIMENTAL and may be changed or removed in a +// later release. func ValueFromIncomingContext(ctx context.Context, key string) []string { md, ok := ctx.Value(mdIncomingKey{}).(MD) if !ok { @@ -223,7 +228,7 @@ func ValueFromIncomingContext(ctx context.Context, key string) []string { return copyOf(v) } for k, v := range md { - // Case insensitive comparison: MD is a map, and there's no guarantee + // Case insenitive comparison: MD is a map, and there's no guarantee // that the MD attached to the context is created using our helper // functions. if strings.EqualFold(k, key) { diff --git a/go-controller/vendor/google.golang.org/grpc/preloader.go b/go-controller/vendor/google.golang.org/grpc/preloader.go index e87a17f36a..73bd633643 100644 --- a/go-controller/vendor/google.golang.org/grpc/preloader.go +++ b/go-controller/vendor/google.golang.org/grpc/preloader.go @@ -20,7 +20,6 @@ package grpc import ( "google.golang.org/grpc/codes" - "google.golang.org/grpc/mem" "google.golang.org/grpc/status" ) @@ -32,10 +31,9 @@ import ( // later release. type PreparedMsg struct { // Struct for preparing msg before sending them - encodedData mem.BufferSlice + encodedData []byte hdr []byte - payload mem.BufferSlice - pf payloadFormat + payload []byte } // Encode marshalls and compresses the message using the codec and compressor for the stream. @@ -59,27 +57,11 @@ func (p *PreparedMsg) Encode(s Stream, msg any) error { if err != nil { return err } - - materializedData := data.Materialize() - data.Free() - p.encodedData = mem.BufferSlice{mem.NewBuffer(&materializedData, nil)} - - // TODO: it should be possible to grab the bufferPool from the underlying - // stream implementation with a type cast to its actual type (such as - // addrConnStream) and accessing the buffer pool directly. - var compData mem.BufferSlice - compData, p.pf, err = compress(p.encodedData, rpcInfo.preloaderInfo.cp, rpcInfo.preloaderInfo.comp, mem.DefaultBufferPool()) + p.encodedData = data + compData, err := compress(data, rpcInfo.preloaderInfo.cp, rpcInfo.preloaderInfo.comp) if err != nil { return err } - - if p.pf.isCompressed() { - materializedCompData := compData.Materialize() - compData.Free() - compData = mem.BufferSlice{mem.NewBuffer(&materializedCompData, nil)} - } - - p.hdr, p.payload = msgHeader(p.encodedData, compData, p.pf) - + p.hdr, p.payload = msgHeader(data, compData) return nil } diff --git a/go-controller/vendor/google.golang.org/grpc/regenerate.sh b/go-controller/vendor/google.golang.org/grpc/regenerate.sh new file mode 100644 index 0000000000..3edca296c2 --- /dev/null +++ b/go-controller/vendor/google.golang.org/grpc/regenerate.sh @@ -0,0 +1,123 @@ +#!/bin/bash +# Copyright 2020 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. + +set -eu -o pipefail + +WORKDIR=$(mktemp -d) + +function finish { + rm -rf "$WORKDIR" +} +trap finish EXIT + +export GOBIN=${WORKDIR}/bin +export PATH=${GOBIN}:${PATH} +mkdir -p ${GOBIN} + +echo "remove existing generated files" +# grpc_testing_not_regenerate/*.pb.go is not re-generated, +# see grpc_testing_not_regenerate/README.md for details. +rm -f $(find . -name '*.pb.go' | grep -v 'grpc_testing_not_regenerate') + +echo "go install google.golang.org/protobuf/cmd/protoc-gen-go" +(cd test/tools && go install google.golang.org/protobuf/cmd/protoc-gen-go) + +echo "go install cmd/protoc-gen-go-grpc" +(cd cmd/protoc-gen-go-grpc && go install .) + +echo "git clone https://github.com/grpc/grpc-proto" +git clone --quiet https://github.com/grpc/grpc-proto ${WORKDIR}/grpc-proto + +echo "git clone https://github.com/protocolbuffers/protobuf" +git clone --quiet https://github.com/protocolbuffers/protobuf ${WORKDIR}/protobuf + +# Pull in code.proto as a proto dependency +mkdir -p ${WORKDIR}/googleapis/google/rpc +echo "curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/code.proto" +curl --silent https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/code.proto > ${WORKDIR}/googleapis/google/rpc/code.proto + +mkdir -p ${WORKDIR}/out + +# Generates sources without the embed requirement +LEGACY_SOURCES=( + ${WORKDIR}/grpc-proto/grpc/binlog/v1/binarylog.proto + ${WORKDIR}/grpc-proto/grpc/channelz/v1/channelz.proto + ${WORKDIR}/grpc-proto/grpc/health/v1/health.proto + ${WORKDIR}/grpc-proto/grpc/lb/v1/load_balancer.proto + profiling/proto/service.proto + ${WORKDIR}/grpc-proto/grpc/reflection/v1alpha/reflection.proto + ${WORKDIR}/grpc-proto/grpc/reflection/v1/reflection.proto +) + +# Generates only the new gRPC Service symbols +SOURCES=( + $(git ls-files --exclude-standard --cached --others "*.proto" | grep -v '^profiling/proto/service.proto$') + ${WORKDIR}/grpc-proto/grpc/gcp/altscontext.proto + ${WORKDIR}/grpc-proto/grpc/gcp/handshaker.proto + ${WORKDIR}/grpc-proto/grpc/gcp/transport_security_common.proto + ${WORKDIR}/grpc-proto/grpc/lookup/v1/rls.proto + ${WORKDIR}/grpc-proto/grpc/lookup/v1/rls_config.proto + ${WORKDIR}/grpc-proto/grpc/testing/*.proto + ${WORKDIR}/grpc-proto/grpc/core/*.proto +) + +# These options of the form 'Mfoo.proto=bar' instruct the codegen to use an +# import path of 'bar' in the generated code when 'foo.proto' is imported in +# one of the sources. +# +# Note that the protos listed here are all for testing purposes. All protos to +# be used externally should have a go_package option (and they don't need to be +# listed here). +OPTS=Mgrpc/core/stats.proto=google.golang.org/grpc/interop/grpc_testing/core,\ +Mgrpc/testing/benchmark_service.proto=google.golang.org/grpc/interop/grpc_testing,\ +Mgrpc/testing/stats.proto=google.golang.org/grpc/interop/grpc_testing,\ +Mgrpc/testing/report_qps_scenario_service.proto=google.golang.org/grpc/interop/grpc_testing,\ +Mgrpc/testing/messages.proto=google.golang.org/grpc/interop/grpc_testing,\ +Mgrpc/testing/worker_service.proto=google.golang.org/grpc/interop/grpc_testing,\ +Mgrpc/testing/control.proto=google.golang.org/grpc/interop/grpc_testing,\ +Mgrpc/testing/test.proto=google.golang.org/grpc/interop/grpc_testing,\ +Mgrpc/testing/payloads.proto=google.golang.org/grpc/interop/grpc_testing,\ +Mgrpc/testing/empty.proto=google.golang.org/grpc/interop/grpc_testing + +for src in ${SOURCES[@]}; do + echo "protoc ${src}" + protoc --go_out=${OPTS}:${WORKDIR}/out --go-grpc_out=${OPTS},use_generic_streams_experimental=true:${WORKDIR}/out \ + -I"." \ + -I${WORKDIR}/grpc-proto \ + -I${WORKDIR}/googleapis \ + -I${WORKDIR}/protobuf/src \ + ${src} +done + +for src in ${LEGACY_SOURCES[@]}; do + echo "protoc ${src}" + protoc --go_out=${OPTS}:${WORKDIR}/out --go-grpc_out=${OPTS},require_unimplemented_servers=false:${WORKDIR}/out \ + -I"." \ + -I${WORKDIR}/grpc-proto \ + -I${WORKDIR}/googleapis \ + -I${WORKDIR}/protobuf/src \ + ${src} +done + +# The go_package option in grpc/lookup/v1/rls.proto doesn't match the +# current location. Move it into the right place. +mkdir -p ${WORKDIR}/out/google.golang.org/grpc/internal/proto/grpc_lookup_v1 +mv ${WORKDIR}/out/google.golang.org/grpc/lookup/grpc_lookup_v1/* ${WORKDIR}/out/google.golang.org/grpc/internal/proto/grpc_lookup_v1 + +# grpc_testing_not_regenerate/*.pb.go are not re-generated, +# see grpc_testing_not_regenerate/README.md for details. +rm ${WORKDIR}/out/google.golang.org/grpc/reflection/test/grpc_testing_not_regenerate/*.pb.go + +cp -R ${WORKDIR}/out/google.golang.org/grpc/* . diff --git a/go-controller/vendor/google.golang.org/grpc/resolver_wrapper.go b/go-controller/vendor/google.golang.org/grpc/resolver_wrapper.go index 23bb3fb258..c5fb45236f 100644 --- a/go-controller/vendor/google.golang.org/grpc/resolver_wrapper.go +++ b/go-controller/vendor/google.golang.org/grpc/resolver_wrapper.go @@ -66,7 +66,7 @@ func newCCResolverWrapper(cc *ClientConn) *ccResolverWrapper { // any newly created ccResolverWrapper, except that close may be called instead. func (ccr *ccResolverWrapper) start() error { errCh := make(chan error) - ccr.serializer.TrySchedule(func(ctx context.Context) { + ccr.serializer.Schedule(func(ctx context.Context) { if ctx.Err() != nil { return } @@ -85,7 +85,7 @@ func (ccr *ccResolverWrapper) start() error { } func (ccr *ccResolverWrapper) resolveNow(o resolver.ResolveNowOptions) { - ccr.serializer.TrySchedule(func(ctx context.Context) { + ccr.serializer.Schedule(func(ctx context.Context) { if ctx.Err() != nil || ccr.resolver == nil { return } @@ -102,7 +102,7 @@ func (ccr *ccResolverWrapper) close() { ccr.closed = true ccr.mu.Unlock() - ccr.serializer.TrySchedule(func(context.Context) { + ccr.serializer.Schedule(func(context.Context) { if ccr.resolver == nil { return } @@ -177,9 +177,6 @@ func (ccr *ccResolverWrapper) ParseServiceConfig(scJSON string) *serviceconfig.P // addChannelzTraceEvent adds a channelz trace event containing the new // state received from resolver implementations. func (ccr *ccResolverWrapper) addChannelzTraceEvent(s resolver.State) { - if !logger.V(0) && !channelz.IsOn() { - return - } var updates []string var oldSC, newSC *ServiceConfig var oldOK, newOK bool diff --git a/go-controller/vendor/google.golang.org/grpc/rpc_util.go b/go-controller/vendor/google.golang.org/grpc/rpc_util.go index aba1ae3e67..fdd49e6e91 100644 --- a/go-controller/vendor/google.golang.org/grpc/rpc_util.go +++ b/go-controller/vendor/google.golang.org/grpc/rpc_util.go @@ -19,6 +19,7 @@ package grpc import ( + "bytes" "compress/gzip" "context" "encoding/binary" @@ -34,7 +35,6 @@ import ( "google.golang.org/grpc/encoding" "google.golang.org/grpc/encoding/proto" "google.golang.org/grpc/internal/transport" - "google.golang.org/grpc/mem" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" "google.golang.org/grpc/stats" @@ -220,8 +220,8 @@ type HeaderCallOption struct { HeaderAddr *metadata.MD } -func (o HeaderCallOption) before(*callInfo) error { return nil } -func (o HeaderCallOption) after(_ *callInfo, attempt *csAttempt) { +func (o HeaderCallOption) before(c *callInfo) error { return nil } +func (o HeaderCallOption) after(c *callInfo, attempt *csAttempt) { *o.HeaderAddr, _ = attempt.s.Header() } @@ -242,8 +242,8 @@ type TrailerCallOption struct { TrailerAddr *metadata.MD } -func (o TrailerCallOption) before(*callInfo) error { return nil } -func (o TrailerCallOption) after(_ *callInfo, attempt *csAttempt) { +func (o TrailerCallOption) before(c *callInfo) error { return nil } +func (o TrailerCallOption) after(c *callInfo, attempt *csAttempt) { *o.TrailerAddr = attempt.s.Trailer() } @@ -264,20 +264,24 @@ type PeerCallOption struct { PeerAddr *peer.Peer } -func (o PeerCallOption) before(*callInfo) error { return nil } -func (o PeerCallOption) after(_ *callInfo, attempt *csAttempt) { +func (o PeerCallOption) before(c *callInfo) error { return nil } +func (o PeerCallOption) after(c *callInfo, attempt *csAttempt) { if x, ok := peer.FromContext(attempt.s.Context()); ok { *o.PeerAddr = *x } } -// WaitForReady configures the RPC's behavior when the client is in -// TRANSIENT_FAILURE, which occurs when all addresses fail to connect. If -// waitForReady is false, the RPC will fail immediately. Otherwise, the client -// will wait until a connection becomes available or the RPC's deadline is -// reached. +// WaitForReady configures the action to take when an RPC is attempted on broken +// connections or unreachable servers. If waitForReady is false and the +// connection is in the TRANSIENT_FAILURE state, the RPC will fail +// immediately. Otherwise, the RPC client will block the call until a +// connection is available (or the call is canceled or times out) and will +// retry the call if it fails due to a transient error. gRPC will not retry if +// data was written to the wire unless the server indicates it did not process +// the data. Please refer to +// https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md. // -// By default, RPCs do not "wait for ready". +// By default, RPCs don't "wait for ready". func WaitForReady(waitForReady bool) CallOption { return FailFastCallOption{FailFast: !waitForReady} } @@ -304,7 +308,7 @@ func (o FailFastCallOption) before(c *callInfo) error { c.failFast = o.FailFast return nil } -func (o FailFastCallOption) after(*callInfo, *csAttempt) {} +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 @@ -339,7 +343,7 @@ func (o OnFinishCallOption) before(c *callInfo) error { return nil } -func (o OnFinishCallOption) after(*callInfo, *csAttempt) {} +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 @@ -363,7 +367,7 @@ func (o MaxRecvMsgSizeCallOption) before(c *callInfo) error { c.maxReceiveMessageSize = &o.MaxRecvMsgSize return nil } -func (o MaxRecvMsgSizeCallOption) after(*callInfo, *csAttempt) {} +func (o MaxRecvMsgSizeCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxCallSendMsgSize returns a CallOption which sets the maximum message size // in bytes the client can send. If this is not set, gRPC uses the default @@ -387,7 +391,7 @@ func (o MaxSendMsgSizeCallOption) before(c *callInfo) error { c.maxSendMessageSize = &o.MaxSendMsgSize return nil } -func (o MaxSendMsgSizeCallOption) after(*callInfo, *csAttempt) {} +func (o MaxSendMsgSizeCallOption) after(c *callInfo, attempt *csAttempt) {} // PerRPCCredentials returns a CallOption that sets credentials.PerRPCCredentials // for a call. @@ -410,7 +414,7 @@ func (o PerRPCCredsCallOption) before(c *callInfo) error { c.creds = o.Creds return nil } -func (o PerRPCCredsCallOption) after(*callInfo, *csAttempt) {} +func (o PerRPCCredsCallOption) after(c *callInfo, attempt *csAttempt) {} // UseCompressor returns a CallOption which sets the compressor used when // sending the request. If WithCompressor is also set, UseCompressor has @@ -438,7 +442,7 @@ func (o CompressorCallOption) before(c *callInfo) error { c.compressorType = o.CompressorType return nil } -func (o CompressorCallOption) after(*callInfo, *csAttempt) {} +func (o CompressorCallOption) after(c *callInfo, attempt *csAttempt) {} // CallContentSubtype returns a CallOption that will set the content-subtype // for a call. For example, if content-subtype is "json", the Content-Type over @@ -475,7 +479,7 @@ func (o ContentSubtypeCallOption) before(c *callInfo) error { c.contentSubtype = o.ContentSubtype return nil } -func (o ContentSubtypeCallOption) after(*callInfo, *csAttempt) {} +func (o ContentSubtypeCallOption) after(c *callInfo, attempt *csAttempt) {} // ForceCodec returns a CallOption that will set codec to be used for all // request and response messages for a call. The result of calling Name() will @@ -511,50 +515,10 @@ type ForceCodecCallOption struct { } func (o ForceCodecCallOption) before(c *callInfo) error { - c.codec = newCodecV1Bridge(o.Codec) + c.codec = o.Codec return nil } -func (o ForceCodecCallOption) after(*callInfo, *csAttempt) {} - -// ForceCodecV2 returns a CallOption that will set codec to be used for all -// request and response messages for a call. The result of calling Name() will -// be used as the content-subtype after converting to lowercase, unless -// CallContentSubtype is also used. -// -// See Content-Type on -// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for -// more details. Also see the documentation on RegisterCodec and -// CallContentSubtype for more details on the interaction between Codec and -// content-subtype. -// -// This function is provided for advanced users; prefer to use only -// CallContentSubtype to select a registered codec instead. -// -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. -func ForceCodecV2(codec encoding.CodecV2) CallOption { - return ForceCodecV2CallOption{CodecV2: codec} -} - -// ForceCodecV2CallOption is a CallOption that indicates the codec used for -// marshaling messages. -// -// # Experimental -// -// Notice: This type is EXPERIMENTAL and may be changed or removed in a -// later release. -type ForceCodecV2CallOption struct { - CodecV2 encoding.CodecV2 -} - -func (o ForceCodecV2CallOption) before(c *callInfo) error { - c.codec = o.CodecV2 - return nil -} - -func (o ForceCodecV2CallOption) after(*callInfo, *csAttempt) {} +func (o ForceCodecCallOption) after(c *callInfo, attempt *csAttempt) {} // CallCustomCodec behaves like ForceCodec, but accepts a grpc.Codec instead of // an encoding.Codec. @@ -576,10 +540,10 @@ type CustomCodecCallOption struct { } func (o CustomCodecCallOption) before(c *callInfo) error { - c.codec = newCodecV0Bridge(o.Codec) + c.codec = o.Codec return nil } -func (o CustomCodecCallOption) after(*callInfo, *csAttempt) {} +func (o CustomCodecCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxRetryRPCBufferSize returns a CallOption that limits the amount of memory // used for buffering this RPC's requests for retry purposes. @@ -607,7 +571,7 @@ func (o MaxRetryRPCBufferSizeCallOption) before(c *callInfo) error { c.maxRetryRPCBufferSize = o.MaxRetryRPCBufferSize return nil } -func (o MaxRetryRPCBufferSizeCallOption) after(*callInfo, *csAttempt) {} +func (o MaxRetryRPCBufferSizeCallOption) after(c *callInfo, attempt *csAttempt) {} // The format of the payload: compressed or not? type payloadFormat uint8 @@ -617,28 +581,19 @@ const ( compressionMade payloadFormat = 1 // compressed ) -func (pf payloadFormat) isCompressed() bool { - return pf == compressionMade -} - -type streamReader interface { - ReadHeader(header []byte) error - Read(n int) (mem.BufferSlice, error) -} - // parser reads complete gRPC messages from the underlying reader. type parser struct { // r is the underlying reader. // See the comment on recvMsg for the permissible // error types. - r streamReader + r io.Reader // The header of a gRPC message. Find more detail at // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md header [5]byte - // bufferPool is the pool of shared receive buffers. - bufferPool mem.BufferPool + // recvBufferPool is the pool of shared receive buffers. + recvBufferPool SharedBufferPool } // recvMsg reads a complete gRPC message from the stream. @@ -653,15 +608,14 @@ type parser struct { // - an error from the status package // // No other error values or types must be returned, which also means -// that the underlying streamReader must not return an incompatible +// that the underlying io.Reader must not return an incompatible // error. -func (p *parser) recvMsg(maxReceiveMessageSize int) (payloadFormat, mem.BufferSlice, error) { - err := p.r.ReadHeader(p.header[:]) - if err != nil { +func (p *parser) recvMsg(maxReceiveMessageSize int) (pf payloadFormat, msg []byte, err error) { + if _, err := p.r.Read(p.header[:]); err != nil { return 0, nil, err } - pf := payloadFormat(p.header[0]) + pf = payloadFormat(p.header[0]) length := binary.BigEndian.Uint32(p.header[1:]) if length == 0 { @@ -673,21 +627,20 @@ func (p *parser) recvMsg(maxReceiveMessageSize int) (payloadFormat, mem.BufferSl if int(length) > maxReceiveMessageSize { return 0, nil, status.Errorf(codes.ResourceExhausted, "grpc: received message larger than max (%d vs. %d)", length, maxReceiveMessageSize) } - - data, err := p.r.Read(int(length)) - if err != nil { + msg = p.recvBufferPool.Get(int(length)) + if _, err := p.r.Read(msg); err != nil { if err == io.EOF { err = io.ErrUnexpectedEOF } return 0, nil, err } - return pf, data, nil + return pf, msg, nil } // encode serializes msg and returns a buffer containing the message, or an // error if it is too large to be transmitted by grpc. If msg is nil, it // generates an empty message. -func encode(c baseCodec, msg any) (mem.BufferSlice, error) { +func encode(c baseCodec, msg any) ([]byte, error) { if msg == nil { // NOTE: typed nils will not be caught by this check return nil, nil } @@ -695,8 +648,7 @@ func encode(c baseCodec, msg any) (mem.BufferSlice, error) { if err != nil { return nil, status.Errorf(codes.Internal, "grpc: error while marshaling: %v", err.Error()) } - if uint(b.Len()) > math.MaxUint32 { - b.Free() + if uint(len(b)) > math.MaxUint32 { return nil, status.Errorf(codes.ResourceExhausted, "grpc: message too large (%d bytes)", len(b)) } return b, nil @@ -707,41 +659,34 @@ func encode(c baseCodec, msg any) (mem.BufferSlice, error) { // indicating no compression was done. // // TODO(dfawley): eliminate cp parameter by wrapping Compressor in an encoding.Compressor. -func compress(in mem.BufferSlice, cp Compressor, compressor encoding.Compressor, pool mem.BufferPool) (mem.BufferSlice, payloadFormat, error) { - if (compressor == nil && cp == nil) || in.Len() == 0 { - return nil, compressionNone, nil +func compress(in []byte, cp Compressor, compressor encoding.Compressor) ([]byte, error) { + if compressor == nil && cp == nil { + return nil, nil + } + if len(in) == 0 { + return nil, nil } - var out mem.BufferSlice - w := mem.NewWriter(&out, pool) wrapErr := func(err error) error { - out.Free() return status.Errorf(codes.Internal, "grpc: error while compressing: %v", err.Error()) } + cbuf := &bytes.Buffer{} if compressor != nil { - z, err := compressor.Compress(w) + z, err := compressor.Compress(cbuf) if err != nil { - return nil, 0, wrapErr(err) + return nil, wrapErr(err) } - for _, b := range in { - if _, err := z.Write(b.ReadOnlyData()); err != nil { - return nil, 0, wrapErr(err) - } + if _, err := z.Write(in); err != nil { + return nil, wrapErr(err) } if err := z.Close(); err != nil { - return nil, 0, wrapErr(err) + return nil, wrapErr(err) } } else { - // This is obviously really inefficient since it fully materializes the data, but - // there is no way around this with the old Compressor API. At least it attempts - // to return the buffer to the provider, in the hopes it can be reused (maybe - // even by a subsequent call to this very function). - buf := in.MaterializeToBuffer(pool) - defer buf.Free() - if err := cp.Do(w, buf.ReadOnlyData()); err != nil { - return nil, 0, wrapErr(err) + if err := cp.Do(cbuf, in); err != nil { + return nil, wrapErr(err) } } - return out, compressionMade, nil + return cbuf.Bytes(), nil } const ( @@ -752,36 +697,33 @@ const ( // msgHeader returns a 5-byte header for the message being transmitted and the // payload, which is compData if non-nil or data otherwise. -func msgHeader(data, compData mem.BufferSlice, pf payloadFormat) (hdr []byte, payload mem.BufferSlice) { +func msgHeader(data, compData []byte) (hdr []byte, payload []byte) { hdr = make([]byte, headerLen) - hdr[0] = byte(pf) - - var length uint32 - if pf.isCompressed() { - length = uint32(compData.Len()) - payload = compData + if compData != nil { + hdr[0] = byte(compressionMade) + data = compData } else { - length = uint32(data.Len()) - payload = data + hdr[0] = byte(compressionNone) } // Write length of payload into buf - binary.BigEndian.PutUint32(hdr[payloadLen:], length) - return hdr, payload + binary.BigEndian.PutUint32(hdr[payloadLen:], uint32(len(data))) + return hdr, data } -func outPayload(client bool, msg any, dataLength, payloadLength int, t time.Time) *stats.OutPayload { +func outPayload(client bool, msg any, data, payload []byte, t time.Time) *stats.OutPayload { return &stats.OutPayload{ Client: client, Payload: msg, - Length: dataLength, - WireLength: payloadLength + headerLen, - CompressedLength: payloadLength, + Data: data, + Length: len(data), + WireLength: len(payload) + headerLen, + CompressedLength: len(payload), SentTime: t, } } -func checkRecvPayload(pf payloadFormat, recvCompress string, haveCompressor bool, isServer bool) *status.Status { +func checkRecvPayload(pf payloadFormat, recvCompress string, haveCompressor bool) *status.Status { switch pf { case compressionNone: case compressionMade: @@ -789,10 +731,7 @@ func checkRecvPayload(pf payloadFormat, recvCompress string, haveCompressor bool return status.New(codes.Internal, "grpc: compressed flag set with identity or empty encoding") } if !haveCompressor { - if isServer { - return status.Newf(codes.Unimplemented, "grpc: Decompressor is not installed for grpc-encoding %q", recvCompress) - } - return status.Newf(codes.Internal, "grpc: Decompressor is not installed for grpc-encoding %q", recvCompress) + return status.Newf(codes.Unimplemented, "grpc: Decompressor is not installed for grpc-encoding %q", recvCompress) } default: return status.Newf(codes.Internal, "grpc: received unexpected payload format %d", pf) @@ -802,129 +741,104 @@ func checkRecvPayload(pf payloadFormat, recvCompress string, haveCompressor bool type payloadInfo struct { compressedLength int // The compressed length got from wire. - uncompressedBytes mem.BufferSlice -} - -func (p *payloadInfo) free() { - if p != nil && p.uncompressedBytes != nil { - p.uncompressedBytes.Free() - } + uncompressedBytes []byte } // recvAndDecompress reads a message from the stream, decompressing it if necessary. // // Cancelling the returned cancel function releases the buffer back to the pool. So the caller should cancel as soon as // the buffer is no longer needed. -// TODO: Refactor this function to reduce the number of arguments. -// See: https://google.github.io/styleguide/go/best-practices.html#function-argument-lists -func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, isServer bool, -) (out mem.BufferSlice, err error) { - pf, compressed, err := p.recvMsg(maxReceiveMessageSize) +func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, +) (uncompressedBuf []byte, cancel func(), err error) { + pf, compressedBuf, err := p.recvMsg(maxReceiveMessageSize) if err != nil { - return nil, err + return nil, nil, err } - compressedLength := compressed.Len() - - if st := checkRecvPayload(pf, s.RecvCompress(), compressor != nil || dc != nil, isServer); st != nil { - compressed.Free() - return nil, st.Err() + if st := checkRecvPayload(pf, s.RecvCompress(), compressor != nil || dc != nil); st != nil { + return nil, nil, st.Err() } var size int - if pf.isCompressed() { - defer compressed.Free() - + if pf == compressionMade { // To match legacy behavior, if the decompressor is set by WithDecompressor or RPCDecompressor, // use this decompressor as the default. if dc != nil { - var uncompressedBuf []byte - uncompressedBuf, err = dc.Do(compressed.Reader()) - if err == nil { - out = mem.BufferSlice{mem.NewBuffer(&uncompressedBuf, nil)} - } + uncompressedBuf, err = dc.Do(bytes.NewReader(compressedBuf)) size = len(uncompressedBuf) } else { - out, size, err = decompress(compressor, compressed, maxReceiveMessageSize, p.bufferPool) + uncompressedBuf, size, err = decompress(compressor, compressedBuf, maxReceiveMessageSize) } if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message: %v", err) + return nil, nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message: %v", err) } if size > maxReceiveMessageSize { - out.Free() // TODO: Revisit the error code. Currently keep it consistent with java // implementation. - return nil, status.Errorf(codes.ResourceExhausted, "grpc: received message after decompression larger than max (%d vs. %d)", size, maxReceiveMessageSize) + return nil, nil, status.Errorf(codes.ResourceExhausted, "grpc: received message after decompression larger than max (%d vs. %d)", size, maxReceiveMessageSize) } } else { - out = compressed + uncompressedBuf = compressedBuf } if payInfo != nil { - payInfo.compressedLength = compressedLength - out.Ref() - payInfo.uncompressedBytes = out + payInfo.compressedLength = len(compressedBuf) + payInfo.uncompressedBytes = uncompressedBuf + + cancel = func() {} + } else { + cancel = func() { + p.recvBufferPool.Put(&compressedBuf) + } } - return out, nil + return uncompressedBuf, cancel, nil } // Using compressor, decompress d, returning data and size. // Optionally, if data will be over maxReceiveMessageSize, just return the size. -func decompress(compressor encoding.Compressor, d mem.BufferSlice, maxReceiveMessageSize int, pool mem.BufferPool) (mem.BufferSlice, int, error) { - dcReader, err := compressor.Decompress(d.Reader()) +func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize int) ([]byte, int, error) { + dcReader, err := compressor.Decompress(bytes.NewReader(d)) if err != nil { return nil, 0, err } - - // TODO: Can/should this still be preserved with the new BufferSlice API? Are - // there any actual benefits to allocating a single large buffer instead of - // multiple smaller ones? - //if sizer, ok := compressor.(interface { - // DecompressedSize(compressedBytes []byte) int - //}); ok { - // if size := sizer.DecompressedSize(d); size >= 0 { - // if size > maxReceiveMessageSize { - // return nil, size, nil - // } - // // size is used as an estimate to size the buffer, but we - // // will read more data if available. - // // +MinRead so ReadFrom will not reallocate if size is correct. - // // - // // TODO: If we ensure that the buffer size is the same as the DecompressedSize, - // // we can also utilize the recv buffer pool here. - // buf := bytes.NewBuffer(make([]byte, 0, size+bytes.MinRead)) - // bytesRead, err := buf.ReadFrom(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) - // return buf.Bytes(), int(bytesRead), err - // } - //} - - var out mem.BufferSlice - _, err = io.Copy(mem.NewWriter(&out, pool), io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) - if err != nil { - out.Free() - return nil, 0, err + if sizer, ok := compressor.(interface { + DecompressedSize(compressedBytes []byte) int + }); ok { + if size := sizer.DecompressedSize(d); size >= 0 { + if size > maxReceiveMessageSize { + return nil, size, nil + } + // size is used as an estimate to size the buffer, but we + // will read more data if available. + // +MinRead so ReadFrom will not reallocate if size is correct. + // + // TODO: If we ensure that the buffer size is the same as the DecompressedSize, + // we can also utilize the recv buffer pool here. + buf := bytes.NewBuffer(make([]byte, 0, size+bytes.MinRead)) + bytesRead, err := buf.ReadFrom(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) + return buf.Bytes(), int(bytesRead), err + } } - return out, out.Len(), nil + // Read from LimitReader with limit max+1. So if the underlying + // reader is over limit, the result will be bigger than max. + d, err = io.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) + return d, len(d), err } // For the two compressor parameters, both should not be set, but if they are, // dc takes precedence over compressor. // TODO(dfawley): wrap the old compressor/decompressor using the new API? -func recv(p *parser, c baseCodec, s *transport.Stream, dc Decompressor, m any, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, isServer bool) error { - data, err := recvAndDecompress(p, s, dc, maxReceiveMessageSize, payInfo, compressor, isServer) +func recv(p *parser, c baseCodec, s *transport.Stream, dc Decompressor, m any, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor) error { + buf, cancel, err := recvAndDecompress(p, s, dc, maxReceiveMessageSize, payInfo, compressor) if err != nil { return err } + defer cancel() - // If the codec wants its own reference to the data, it can get it. Otherwise, always - // free the buffers. - defer data.Free() - - if err := c.Unmarshal(data, m); err != nil { + if err := c.Unmarshal(buf, m); err != nil { return status.Errorf(codes.Internal, "grpc: failed to unmarshal the received message: %v", err) } - return nil } @@ -1027,7 +941,7 @@ func setCallInfoCodec(c *callInfo) error { // encoding.Codec (Name vs. String method name). We only support // setting content subtype from encoding.Codec to avoid a behavior // change with the deprecated version. - if ec, ok := c.codec.(encoding.CodecV2); ok { + if ec, ok := c.codec.(encoding.Codec); ok { c.contentSubtype = strings.ToLower(ec.Name()) } } @@ -1036,12 +950,12 @@ func setCallInfoCodec(c *callInfo) error { if c.contentSubtype == "" { // No codec specified in CallOptions; use proto by default. - c.codec = getCodec(proto.Name) + c.codec = encoding.GetCodec(proto.Name) return nil } // c.contentSubtype is already lowercased in CallContentSubtype - c.codec = getCodec(c.contentSubtype) + c.codec = encoding.GetCodec(c.contentSubtype) if c.codec == nil { return status.Errorf(codes.Internal, "no codec registered for content-subtype %s", c.contentSubtype) } diff --git a/go-controller/vendor/google.golang.org/grpc/server.go b/go-controller/vendor/google.golang.org/grpc/server.go index d1e1415a40..89f8e4792b 100644 --- a/go-controller/vendor/google.golang.org/grpc/server.go +++ b/go-controller/vendor/google.golang.org/grpc/server.go @@ -45,7 +45,6 @@ import ( "google.golang.org/grpc/internal/grpcutil" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" - "google.golang.org/grpc/mem" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" "google.golang.org/grpc/stats" @@ -81,7 +80,7 @@ func init() { } internal.BinaryLogger = binaryLogger internal.JoinServerOptions = newJoinServerOption - internal.BufferPool = bufferPool + internal.RecvBufferPool = recvBufferPool } var statusOK = status.New(codes.OK, "") @@ -171,7 +170,7 @@ type serverOptions struct { maxHeaderListSize *uint32 headerTableSize *uint32 numServerWorkers uint32 - bufferPool mem.BufferPool + recvBufferPool SharedBufferPool waitForHandlers bool } @@ -182,7 +181,7 @@ var defaultServerOptions = serverOptions{ connectionTimeout: 120 * time.Second, writeBufferSize: defaultWriteBufSize, readBufferSize: defaultReadBufSize, - bufferPool: mem.DefaultBufferPool(), + recvBufferPool: nopBufferPool{}, } var globalServerOptions []ServerOption @@ -314,7 +313,7 @@ func KeepaliveEnforcementPolicy(kep keepalive.EnforcementPolicy) ServerOption { // Will be supported throughout 1.x. func CustomCodec(codec Codec) ServerOption { return newFuncServerOption(func(o *serverOptions) { - o.codec = newCodecV0Bridge(codec) + o.codec = codec }) } @@ -343,22 +342,7 @@ func CustomCodec(codec Codec) ServerOption { // later release. func ForceServerCodec(codec encoding.Codec) ServerOption { return newFuncServerOption(func(o *serverOptions) { - o.codec = newCodecV1Bridge(codec) - }) -} - -// ForceServerCodecV2 is the equivalent of ForceServerCodec, but for the new -// CodecV2 interface. -// -// Will be supported throughout 1.x. -// -// # Experimental -// -// Notice: This API is EXPERIMENTAL and may be changed or removed in a -// later release. -func ForceServerCodecV2(codecV2 encoding.CodecV2) ServerOption { - return newFuncServerOption(func(o *serverOptions) { - o.codec = codecV2 + o.codec = codec }) } @@ -608,9 +592,26 @@ func WaitForHandlers(w bool) ServerOption { }) } -func bufferPool(bufferPool mem.BufferPool) ServerOption { +// RecvBufferPool returns a ServerOption that configures the server +// to use the provided shared buffer pool for parsing incoming messages. Depending +// on the application's workload, this could result in reduced memory allocation. +// +// If you are unsure about how to implement a memory pool but want to utilize one, +// begin with grpc.NewSharedBufferPool. +// +// Note: The shared buffer pool feature will not be active if any of the following +// options are used: StatsHandler, EnableTracing, or binary logging. In such +// cases, the shared buffer pool will be ignored. +// +// Deprecated: use experimental.WithRecvBufferPool instead. Will be deleted in +// v1.60.0 or later. +func RecvBufferPool(bufferPool SharedBufferPool) ServerOption { + return recvBufferPool(bufferPool) +} + +func recvBufferPool(bufferPool SharedBufferPool) ServerOption { return newFuncServerOption(func(o *serverOptions) { - o.bufferPool = bufferPool + o.recvBufferPool = bufferPool }) } @@ -621,7 +622,7 @@ func bufferPool(bufferPool mem.BufferPool) ServerOption { // workload (assuming a QPS of a few thousand requests/sec). const serverWorkerResetThreshold = 1 << 16 -// serverWorker blocks on a *transport.Stream channel forever and waits for +// serverWorkers blocks on a *transport.Stream channel forever and waits for // 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]). @@ -979,7 +980,6 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport { ChannelzParent: s.channelz, MaxHeaderListSize: s.opts.maxHeaderListSize, HeaderTableSize: s.opts.headerTableSize, - BufferPool: s.opts.bufferPool, } st, err := transport.NewServerTransport(c, config) if err != nil { @@ -1072,7 +1072,7 @@ var _ http.Handler = (*Server)(nil) // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { - st, err := transport.NewServerHandlerTransport(w, r, s.opts.statsHandlers, s.opts.bufferPool) + st, err := transport.NewServerHandlerTransport(w, r, s.opts.statsHandlers) if err != nil { // Errors returned from transport.NewServerHandlerTransport have // already been written to w. @@ -1142,35 +1142,20 @@ func (s *Server) sendResponse(ctx context.Context, t transport.ServerTransport, channelz.Error(logger, s.channelz, "grpc: server failed to encode response: ", err) return err } - - compData, pf, err := compress(data, cp, comp, s.opts.bufferPool) + compData, err := compress(data, cp, comp) if err != nil { - data.Free() channelz.Error(logger, s.channelz, "grpc: server failed to compress response: ", err) return err } - - hdr, payload := msgHeader(data, compData, pf) - - defer func() { - compData.Free() - data.Free() - // payload does not need to be freed here, it is either data or compData, both of - // which are already freed. - }() - - dataLen := data.Len() - payloadLen := payload.Len() + hdr, payload := msgHeader(data, compData) // TODO(dfawley): should we be checking len(data) instead? - if payloadLen > s.opts.maxSendMessageSize { - return status.Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max (%d vs. %d)", payloadLen, s.opts.maxSendMessageSize) + if len(payload) > s.opts.maxSendMessageSize { + return status.Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max (%d vs. %d)", len(payload), s.opts.maxSendMessageSize) } err = t.Write(stream, hdr, payload, opts) if err == nil { - if len(s.opts.statsHandlers) != 0 { - for _, sh := range s.opts.statsHandlers { - sh.HandleRPC(ctx, outPayload(false, msg, dataLen, payloadLen, time.Now())) - } + for _, sh := range s.opts.statsHandlers { + sh.HandleRPC(ctx, outPayload(false, msg, data, payload, time.Now())) } } return err @@ -1349,37 +1334,37 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor var payInfo *payloadInfo if len(shs) != 0 || len(binlogs) != 0 { payInfo = &payloadInfo{} - defer payInfo.free() } - d, err := recvAndDecompress(&parser{r: stream, bufferPool: s.opts.bufferPool}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp, true) + d, cancel, err := recvAndDecompress(&parser{r: stream, recvBufferPool: s.opts.recvBufferPool}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp) if err != nil { if e := t.WriteStatus(stream, status.Convert(err)); e != nil { channelz.Warningf(logger, s.channelz, "grpc: Server.processUnaryRPC failed to write status: %v", e) } return err } - defer d.Free() if channelz.IsOn() { t.IncrMsgRecv() } df := func(v any) error { + defer cancel() + if err := s.getCodec(stream.ContentSubtype()).Unmarshal(d, v); err != nil { return status.Errorf(codes.Internal, "grpc: error unmarshalling request: %v", err) } - for _, sh := range shs { sh.HandleRPC(ctx, &stats.InPayload{ RecvTime: time.Now(), Payload: v, - Length: d.Len(), + Length: len(d), WireLength: payInfo.compressedLength + headerLen, CompressedLength: payInfo.compressedLength, + Data: d, }) } if len(binlogs) != 0 { cm := &binarylog.ClientMessage{ - Message: d.Materialize(), + Message: d, } for _, binlog := range binlogs { binlog.Log(ctx, cm) @@ -1563,7 +1548,7 @@ func (s *Server) processStreamingRPC(ctx context.Context, t transport.ServerTran ctx: ctx, t: t, s: stream, - p: &parser{r: stream, bufferPool: s.opts.bufferPool}, + p: &parser{r: stream, recvBufferPool: s.opts.recvBufferPool}, codec: s.getCodec(stream.ContentSubtype()), maxReceiveMessageSize: s.opts.maxReceiveMessageSize, maxSendMessageSize: s.opts.maxSendMessageSize, @@ -1978,12 +1963,12 @@ func (s *Server) getCodec(contentSubtype string) baseCodec { return s.opts.codec } if contentSubtype == "" { - return getCodec(proto.Name) + return encoding.GetCodec(proto.Name) } - codec := getCodec(contentSubtype) + codec := encoding.GetCodec(contentSubtype) if codec == nil { logger.Warningf("Unsupported codec %q. Defaulting to %q for now. This will start to fail in future releases.", contentSubtype, proto.Name) - return getCodec(proto.Name) + return encoding.GetCodec(proto.Name) } return codec } diff --git a/go-controller/vendor/google.golang.org/grpc/shared_buffer_pool.go b/go-controller/vendor/google.golang.org/grpc/shared_buffer_pool.go new file mode 100644 index 0000000000..48a64cfe8e --- /dev/null +++ b/go-controller/vendor/google.golang.org/grpc/shared_buffer_pool.go @@ -0,0 +1,154 @@ +/* + * + * 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 grpc + +import "sync" + +// SharedBufferPool is a pool of buffers that can be shared, resulting in +// decreased memory allocation. Currently, in gRPC-go, it is only utilized +// for parsing incoming messages. +// +// # Experimental +// +// Notice: This API is EXPERIMENTAL and may be changed or removed in a +// later release. +type SharedBufferPool interface { + // Get returns a buffer with specified length from the pool. + // + // The returned byte slice may be not zero initialized. + Get(length int) []byte + + // Put returns a buffer to the pool. + Put(*[]byte) +} + +// NewSharedBufferPool creates a simple SharedBufferPool with buckets +// of different sizes to optimize memory usage. This prevents the pool from +// wasting large amounts of memory, even when handling messages of varying sizes. +// +// # Experimental +// +// Notice: This API is EXPERIMENTAL and may be changed or removed in a +// later release. +func NewSharedBufferPool() SharedBufferPool { + return &simpleSharedBufferPool{ + pools: [poolArraySize]simpleSharedBufferChildPool{ + newBytesPool(level0PoolMaxSize), + newBytesPool(level1PoolMaxSize), + newBytesPool(level2PoolMaxSize), + newBytesPool(level3PoolMaxSize), + newBytesPool(level4PoolMaxSize), + newBytesPool(0), + }, + } +} + +// simpleSharedBufferPool is a simple implementation of SharedBufferPool. +type simpleSharedBufferPool struct { + pools [poolArraySize]simpleSharedBufferChildPool +} + +func (p *simpleSharedBufferPool) Get(size int) []byte { + return p.pools[p.poolIdx(size)].Get(size) +} + +func (p *simpleSharedBufferPool) Put(bs *[]byte) { + p.pools[p.poolIdx(cap(*bs))].Put(bs) +} + +func (p *simpleSharedBufferPool) poolIdx(size int) int { + switch { + case size <= level0PoolMaxSize: + return level0PoolIdx + case size <= level1PoolMaxSize: + return level1PoolIdx + case size <= level2PoolMaxSize: + return level2PoolIdx + case size <= level3PoolMaxSize: + return level3PoolIdx + case size <= level4PoolMaxSize: + return level4PoolIdx + default: + return levelMaxPoolIdx + } +} + +const ( + level0PoolMaxSize = 16 // 16 B + level1PoolMaxSize = level0PoolMaxSize * 16 // 256 B + level2PoolMaxSize = level1PoolMaxSize * 16 // 4 KB + level3PoolMaxSize = level2PoolMaxSize * 16 // 64 KB + level4PoolMaxSize = level3PoolMaxSize * 16 // 1 MB +) + +const ( + level0PoolIdx = iota + level1PoolIdx + level2PoolIdx + level3PoolIdx + level4PoolIdx + levelMaxPoolIdx + poolArraySize +) + +type simpleSharedBufferChildPool interface { + Get(size int) []byte + Put(any) +} + +type bufferPool struct { + sync.Pool + + defaultSize int +} + +func (p *bufferPool) Get(size int) []byte { + bs := p.Pool.Get().(*[]byte) + + if cap(*bs) < size { + p.Pool.Put(bs) + + return make([]byte, size) + } + + return (*bs)[:size] +} + +func newBytesPool(size int) simpleSharedBufferChildPool { + return &bufferPool{ + Pool: sync.Pool{ + New: func() any { + bs := make([]byte, size) + return &bs + }, + }, + defaultSize: size, + } +} + +// nopBufferPool is a buffer pool just makes new buffer without pooling. +type nopBufferPool struct { +} + +func (nopBufferPool) Get(length int) []byte { + return make([]byte, length) +} + +func (nopBufferPool) Put(*[]byte) { +} diff --git a/go-controller/vendor/google.golang.org/grpc/stats/stats.go b/go-controller/vendor/google.golang.org/grpc/stats/stats.go index 71195c4943..fdb0bd6518 100644 --- a/go-controller/vendor/google.golang.org/grpc/stats/stats.go +++ b/go-controller/vendor/google.golang.org/grpc/stats/stats.go @@ -77,6 +77,9 @@ type InPayload struct { // the call to HandleRPC which provides the InPayload returns and must be // copied if needed later. Payload any + // Data is the serialized message payload. + // Deprecated: Data will be removed in the next release. + Data []byte // Length is the size of the uncompressed payload data. Does not include any // framing (gRPC or HTTP/2). @@ -147,6 +150,9 @@ type OutPayload struct { // the call to HandleRPC which provides the OutPayload returns and must be // copied if needed later. Payload any + // Data is the serialized message payload. + // Deprecated: Data will be removed in the next release. + Data []byte // Length is the size of the uncompressed payload data. Does not include any // framing (gRPC or HTTP/2). Length int diff --git a/go-controller/vendor/google.golang.org/grpc/stream.go b/go-controller/vendor/google.golang.org/grpc/stream.go index bb2b2a216c..8051ef5b51 100644 --- a/go-controller/vendor/google.golang.org/grpc/stream.go +++ b/go-controller/vendor/google.golang.org/grpc/stream.go @@ -41,7 +41,6 @@ import ( "google.golang.org/grpc/internal/serviceconfig" istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/transport" - "google.golang.org/grpc/mem" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" "google.golang.org/grpc/stats" @@ -360,7 +359,7 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client cs.attempt = a return nil } - if err := cs.withRetry(op, func() { cs.bufferForRetryLocked(0, op, nil) }); err != nil { + if err := cs.withRetry(op, func() { cs.bufferForRetryLocked(0, op) }); err != nil { return nil, err } @@ -518,7 +517,7 @@ func (a *csAttempt) newStream() error { } a.s = s a.ctx = s.Context() - a.p = &parser{r: s, bufferPool: a.cs.cc.dopts.copts.BufferPool} + a.p = &parser{r: s, recvBufferPool: a.cs.cc.dopts.recvBufferPool} return nil } @@ -567,15 +566,10 @@ type clientStream struct { // place where we need to check if the attempt is nil. attempt *csAttempt // TODO(hedging): hedging will have multiple attempts simultaneously. - committed bool // active attempt committed for retry? - onCommit func() - replayBuffer []replayOp // operations to replay on retry - replayBufferSize int // current size of replayBuffer -} - -type replayOp struct { - op func(a *csAttempt) error - cleanup func() + committed bool // active attempt committed for retry? + onCommit func() + buffer []func(a *csAttempt) error // operations to replay on retry + bufferSize int // current size of buffer } // csAttempt implements a single transport stream attempt within a @@ -613,12 +607,7 @@ func (cs *clientStream) commitAttemptLocked() { cs.onCommit() } cs.committed = true - for _, op := range cs.replayBuffer { - if op.cleanup != nil { - op.cleanup() - } - } - cs.replayBuffer = nil + cs.buffer = nil } func (cs *clientStream) commitAttempt() { @@ -743,7 +732,7 @@ func (cs *clientStream) retryLocked(attempt *csAttempt, lastErr error) error { // the stream is canceled. return err } - // Note that the first op in replayBuffer always sets cs.attempt + // Note that the first op in the replay buffer always sets cs.attempt // if it is able to pick a transport and create a stream. if lastErr = cs.replayBufferLocked(attempt); lastErr == nil { return nil @@ -772,7 +761,7 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func()) // already be status errors. return toRPCErr(op(cs.attempt)) } - if len(cs.replayBuffer) == 0 { + if len(cs.buffer) == 0 { // For the first op, which controls creation of the stream and // assigns cs.attempt, we need to create a new attempt inline // before executing the first op. On subsequent ops, the attempt @@ -862,26 +851,25 @@ func (cs *clientStream) Trailer() metadata.MD { } func (cs *clientStream) replayBufferLocked(attempt *csAttempt) error { - for _, f := range cs.replayBuffer { - if err := f.op(attempt); err != nil { + for _, f := range cs.buffer { + if err := f(attempt); err != nil { return err } } return nil } -func (cs *clientStream) bufferForRetryLocked(sz int, op func(a *csAttempt) error, cleanup func()) { +func (cs *clientStream) bufferForRetryLocked(sz int, op func(a *csAttempt) error) { // Note: we still will buffer if retry is disabled (for transparent retries). if cs.committed { return } - cs.replayBufferSize += sz - if cs.replayBufferSize > cs.callInfo.maxRetryRPCBufferSize { + cs.bufferSize += sz + if cs.bufferSize > cs.callInfo.maxRetryRPCBufferSize { cs.commitAttemptLocked() - cleanup() return } - cs.replayBuffer = append(cs.replayBuffer, replayOp{op: op, cleanup: cleanup}) + cs.buffer = append(cs.buffer, op) } func (cs *clientStream) SendMsg(m any) (err error) { @@ -903,50 +891,23 @@ func (cs *clientStream) SendMsg(m any) (err error) { } // load hdr, payload, data - hdr, data, payload, pf, err := prepareMsg(m, cs.codec, cs.cp, cs.comp, cs.cc.dopts.copts.BufferPool) + hdr, payload, data, err := prepareMsg(m, cs.codec, cs.cp, cs.comp) if err != nil { return err } - defer func() { - data.Free() - // only free payload if compression was made, and therefore it is a different set - // of buffers from data. - if pf.isCompressed() { - payload.Free() - } - }() - - dataLen := data.Len() - payloadLen := payload.Len() // TODO(dfawley): should we be checking len(data) instead? - if payloadLen > *cs.callInfo.maxSendMessageSize { - return status.Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", payloadLen, *cs.callInfo.maxSendMessageSize) + if len(payload) > *cs.callInfo.maxSendMessageSize { + return status.Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", len(payload), *cs.callInfo.maxSendMessageSize) } - - // always take an extra ref in case data == payload (i.e. when the data isn't - // compressed). The original ref will always be freed by the deferred free above. - payload.Ref() op := func(a *csAttempt) error { - return a.sendMsg(m, hdr, payload, dataLen, payloadLen) - } - - // onSuccess is invoked when the op is captured for a subsequent retry. If the - // stream was established by a previous message and therefore retries are - // disabled, onSuccess will not be invoked, and payloadRef can be freed - // immediately. - onSuccessCalled := false - err = cs.withRetry(op, func() { - cs.bufferForRetryLocked(len(hdr)+payloadLen, op, payload.Free) - onSuccessCalled = true - }) - if !onSuccessCalled { - payload.Free() + return a.sendMsg(m, hdr, payload, data) } + err = cs.withRetry(op, func() { cs.bufferForRetryLocked(len(hdr)+len(payload), op) }) if len(cs.binlogs) != 0 && err == nil { cm := &binarylog.ClientMessage{ OnClientSide: true, - Message: data.Materialize(), + Message: data, } for _, binlog := range cs.binlogs { binlog.Log(cs.ctx, cm) @@ -963,7 +924,6 @@ func (cs *clientStream) RecvMsg(m any) error { var recvInfo *payloadInfo if len(cs.binlogs) != 0 { recvInfo = &payloadInfo{} - defer recvInfo.free() } err := cs.withRetry(func(a *csAttempt) error { return a.recvMsg(m, recvInfo) @@ -971,7 +931,7 @@ func (cs *clientStream) RecvMsg(m any) error { if len(cs.binlogs) != 0 && err == nil { sm := &binarylog.ServerMessage{ OnClientSide: true, - Message: recvInfo.uncompressedBytes.Materialize(), + Message: recvInfo.uncompressedBytes, } for _, binlog := range cs.binlogs { binlog.Log(cs.ctx, sm) @@ -998,7 +958,7 @@ func (cs *clientStream) CloseSend() error { // RecvMsg. This also matches historical behavior. return nil } - cs.withRetry(op, func() { cs.bufferForRetryLocked(0, op, nil) }) + cs.withRetry(op, func() { cs.bufferForRetryLocked(0, op) }) if len(cs.binlogs) != 0 { chc := &binarylog.ClientHalfClose{ OnClientSide: true, @@ -1074,7 +1034,7 @@ func (cs *clientStream) finish(err error) { cs.cancel() } -func (a *csAttempt) sendMsg(m any, hdr []byte, payld mem.BufferSlice, dataLength, payloadLength int) error { +func (a *csAttempt) sendMsg(m any, hdr, payld, data []byte) error { cs := a.cs if a.trInfo != nil { a.mu.Lock() @@ -1092,10 +1052,8 @@ func (a *csAttempt) sendMsg(m any, hdr []byte, payld mem.BufferSlice, dataLength } return io.EOF } - if len(a.statsHandlers) != 0 { - for _, sh := range a.statsHandlers { - sh.HandleRPC(a.ctx, outPayload(true, m, dataLength, payloadLength, time.Now())) - } + for _, sh := range a.statsHandlers { + sh.HandleRPC(a.ctx, outPayload(true, m, data, payld, time.Now())) } if channelz.IsOn() { a.t.IncrMsgSent() @@ -1107,7 +1065,6 @@ func (a *csAttempt) recvMsg(m any, payInfo *payloadInfo) (err error) { cs := a.cs if len(a.statsHandlers) != 0 && payInfo == nil { payInfo = &payloadInfo{} - defer payInfo.free() } if !a.decompSet { @@ -1126,7 +1083,8 @@ func (a *csAttempt) recvMsg(m any, payInfo *payloadInfo) (err error) { // Only initialize this state once per stream. a.decompSet = true } - if err := recv(a.p, cs.codec, a.s, a.dc, m, *cs.callInfo.maxReceiveMessageSize, payInfo, a.decomp, false); err != nil { + err = recv(a.p, cs.codec, a.s, a.dc, m, *cs.callInfo.maxReceiveMessageSize, payInfo, a.decomp) + if err != nil { if err == io.EOF { if statusErr := a.s.Status().Err(); statusErr != nil { return statusErr @@ -1145,12 +1103,14 @@ func (a *csAttempt) recvMsg(m any, payInfo *payloadInfo) (err error) { } for _, sh := range a.statsHandlers { sh.HandleRPC(a.ctx, &stats.InPayload{ - Client: true, - RecvTime: time.Now(), - Payload: m, + Client: true, + RecvTime: time.Now(), + Payload: m, + // TODO truncate large payload. + Data: payInfo.uncompressedBytes, WireLength: payInfo.compressedLength + headerLen, CompressedLength: payInfo.compressedLength, - Length: payInfo.uncompressedBytes.Len(), + Length: len(payInfo.uncompressedBytes), }) } if channelz.IsOn() { @@ -1162,12 +1122,14 @@ func (a *csAttempt) recvMsg(m any, payInfo *payloadInfo) (err error) { } // Special handling for non-server-stream rpcs. // This recv expects EOF or errors, so we don't collect inPayload. - if err := recv(a.p, cs.codec, a.s, a.dc, m, *cs.callInfo.maxReceiveMessageSize, nil, a.decomp, false); err == io.EOF { + err = recv(a.p, cs.codec, a.s, a.dc, m, *cs.callInfo.maxReceiveMessageSize, nil, a.decomp) + if err == nil { + return toRPCErr(errors.New("grpc: client streaming protocol violation: get , want ")) + } + if err == io.EOF { return a.s.Status().Err() // non-server streaming Recv returns nil on success - } else if err != nil { - return toRPCErr(err) } - return toRPCErr(errors.New("grpc: client streaming protocol violation: get , want ")) + return toRPCErr(err) } func (a *csAttempt) finish(err error) { @@ -1223,12 +1185,12 @@ func (a *csAttempt) finish(err error) { a.mu.Unlock() } -// newNonRetryClientStream creates a ClientStream with the specified transport, on the +// newClientStream creates a ClientStream with the specified transport, on the // given addrConn. // // It's expected that the given transport is either the same one in addrConn, or // is already closed. To avoid race, transport is specified separately, instead -// of using ac.transport. +// of using ac.transpot. // // Main difference between this and ClientConn.NewStream: // - no retry @@ -1314,7 +1276,7 @@ func newNonRetryClientStream(ctx context.Context, desc *StreamDesc, method strin return nil, err } as.s = s - as.p = &parser{r: s, bufferPool: ac.dopts.copts.BufferPool} + as.p = &parser{r: s, recvBufferPool: ac.dopts.recvBufferPool} ac.incrCallsStarted() if desc != unaryStreamDesc { // Listen on stream context to cleanup when the stream context is @@ -1411,26 +1373,17 @@ func (as *addrConnStream) SendMsg(m any) (err error) { } // load hdr, payload, data - hdr, data, payload, pf, err := prepareMsg(m, as.codec, as.cp, as.comp, as.ac.dopts.copts.BufferPool) + hdr, payld, _, err := prepareMsg(m, as.codec, as.cp, as.comp) if err != nil { return err } - defer func() { - data.Free() - // only free payload if compression was made, and therefore it is a different set - // of buffers from data. - if pf.isCompressed() { - payload.Free() - } - }() - // TODO(dfawley): should we be checking len(data) instead? - if payload.Len() > *as.callInfo.maxSendMessageSize { - return status.Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", payload.Len(), *as.callInfo.maxSendMessageSize) + if len(payld) > *as.callInfo.maxSendMessageSize { + return status.Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", len(payld), *as.callInfo.maxSendMessageSize) } - if err := as.t.Write(as.s, hdr, payload, &transport.Options{Last: !as.desc.ClientStreams}); err != nil { + if err := as.t.Write(as.s, hdr, payld, &transport.Options{Last: !as.desc.ClientStreams}); err != nil { if !as.desc.ClientStreams { // For non-client-streaming RPCs, we return nil instead of EOF on error // because the generated code requires it. finish is not called; RecvMsg() @@ -1470,7 +1423,8 @@ func (as *addrConnStream) RecvMsg(m any) (err error) { // Only initialize this state once per stream. as.decompSet = true } - if err := recv(as.p, as.codec, as.s, as.dc, m, *as.callInfo.maxReceiveMessageSize, nil, as.decomp, false); err != nil { + err = recv(as.p, as.codec, as.s, as.dc, m, *as.callInfo.maxReceiveMessageSize, nil, as.decomp) + if err != nil { if err == io.EOF { if statusErr := as.s.Status().Err(); statusErr != nil { return statusErr @@ -1490,12 +1444,14 @@ func (as *addrConnStream) RecvMsg(m any) (err error) { // Special handling for non-server-stream rpcs. // This recv expects EOF or errors, so we don't collect inPayload. - if err := recv(as.p, as.codec, as.s, as.dc, m, *as.callInfo.maxReceiveMessageSize, nil, as.decomp, false); err == io.EOF { + err = recv(as.p, as.codec, as.s, as.dc, m, *as.callInfo.maxReceiveMessageSize, nil, as.decomp) + if err == nil { + return toRPCErr(errors.New("grpc: client streaming protocol violation: get , want ")) + } + if err == io.EOF { return as.s.Status().Err() // non-server streaming Recv returns nil on success - } else if err != nil { - return toRPCErr(err) } - return toRPCErr(errors.New("grpc: client streaming protocol violation: get , want ")) + return toRPCErr(err) } func (as *addrConnStream) finish(err error) { @@ -1689,31 +1645,18 @@ func (ss *serverStream) SendMsg(m any) (err error) { } // load hdr, payload, data - hdr, data, payload, pf, err := prepareMsg(m, ss.codec, ss.cp, ss.comp, ss.p.bufferPool) + hdr, payload, data, err := prepareMsg(m, ss.codec, ss.cp, ss.comp) if err != nil { return err } - defer func() { - data.Free() - // only free payload if compression was made, and therefore it is a different set - // of buffers from data. - if pf.isCompressed() { - payload.Free() - } - }() - - dataLen := data.Len() - payloadLen := payload.Len() - // TODO(dfawley): should we be checking len(data) instead? - if payloadLen > ss.maxSendMessageSize { - return status.Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", payloadLen, ss.maxSendMessageSize) + if len(payload) > ss.maxSendMessageSize { + return status.Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", len(payload), ss.maxSendMessageSize) } if err := ss.t.Write(ss.s, hdr, payload, &transport.Options{Last: false}); err != nil { return toRPCErr(err) } - if len(ss.binlogs) != 0 { if !ss.serverHeaderBinlogged { h, _ := ss.s.Header() @@ -1726,7 +1669,7 @@ func (ss *serverStream) SendMsg(m any) (err error) { } } sm := &binarylog.ServerMessage{ - Message: data.Materialize(), + Message: data, } for _, binlog := range ss.binlogs { binlog.Log(ss.ctx, sm) @@ -1734,7 +1677,7 @@ func (ss *serverStream) SendMsg(m any) (err error) { } if len(ss.statsHandler) != 0 { for _, sh := range ss.statsHandler { - sh.HandleRPC(ss.s.Context(), outPayload(false, m, dataLen, payloadLen, time.Now())) + sh.HandleRPC(ss.s.Context(), outPayload(false, m, data, payload, time.Now())) } } return nil @@ -1771,9 +1714,8 @@ func (ss *serverStream) RecvMsg(m any) (err error) { var payInfo *payloadInfo if len(ss.statsHandler) != 0 || len(ss.binlogs) != 0 { payInfo = &payloadInfo{} - defer payInfo.free() } - if err := recv(ss.p, ss.codec, ss.s, ss.dc, m, ss.maxReceiveMessageSize, payInfo, ss.decomp, true); err != nil { + if err := recv(ss.p, ss.codec, ss.s, ss.dc, m, ss.maxReceiveMessageSize, payInfo, ss.decomp); err != nil { if err == io.EOF { if len(ss.binlogs) != 0 { chc := &binarylog.ClientHalfClose{} @@ -1791,9 +1733,11 @@ func (ss *serverStream) RecvMsg(m any) (err error) { if len(ss.statsHandler) != 0 { for _, sh := range ss.statsHandler { sh.HandleRPC(ss.s.Context(), &stats.InPayload{ - RecvTime: time.Now(), - Payload: m, - Length: payInfo.uncompressedBytes.Len(), + RecvTime: time.Now(), + Payload: m, + // TODO truncate large payload. + Data: payInfo.uncompressedBytes, + Length: len(payInfo.uncompressedBytes), WireLength: payInfo.compressedLength + headerLen, CompressedLength: payInfo.compressedLength, }) @@ -1801,7 +1745,7 @@ func (ss *serverStream) RecvMsg(m any) (err error) { } if len(ss.binlogs) != 0 { cm := &binarylog.ClientMessage{ - Message: payInfo.uncompressedBytes.Materialize(), + Message: payInfo.uncompressedBytes, } for _, binlog := range ss.binlogs { binlog.Log(ss.ctx, cm) @@ -1816,26 +1760,23 @@ func MethodFromServerStream(stream ServerStream) (string, bool) { return Method(stream.Context()) } -// prepareMsg returns the hdr, payload and data using the compressors passed or -// using the passed preparedmsg. The returned boolean indicates whether -// compression was made and therefore whether the payload needs to be freed in -// addition to the returned data. Freeing the payload if the returned boolean is -// false can lead to undefined behavior. -func prepareMsg(m any, codec baseCodec, cp Compressor, comp encoding.Compressor, pool mem.BufferPool) (hdr []byte, data, payload mem.BufferSlice, pf payloadFormat, err error) { +// prepareMsg returns the hdr, payload and data +// using the compressors passed or using the +// passed preparedmsg +func prepareMsg(m any, codec baseCodec, cp Compressor, comp encoding.Compressor) (hdr, payload, data []byte, err error) { if preparedMsg, ok := m.(*PreparedMsg); ok { - return preparedMsg.hdr, preparedMsg.encodedData, preparedMsg.payload, preparedMsg.pf, nil + return preparedMsg.hdr, preparedMsg.payload, preparedMsg.encodedData, nil } // The input interface is not a prepared msg. // Marshal and Compress the data at this point data, err = encode(codec, m) if err != nil { - return nil, nil, nil, 0, err + return nil, nil, nil, err } - compData, pf, err := compress(data, cp, comp, pool) + compData, err := compress(data, cp, comp) if err != nil { - data.Free() - return nil, nil, nil, 0, err + return nil, nil, nil, err } - hdr, payload = msgHeader(data, compData, pf) - return hdr, data, payload, pf, nil + hdr, payload = msgHeader(data, compData) + return hdr, payload, data, nil } diff --git a/go-controller/vendor/google.golang.org/grpc/stream_interfaces.go b/go-controller/vendor/google.golang.org/grpc/stream_interfaces.go index 0037fee0bd..8b813529c0 100644 --- a/go-controller/vendor/google.golang.org/grpc/stream_interfaces.go +++ b/go-controller/vendor/google.golang.org/grpc/stream_interfaces.go @@ -22,35 +22,15 @@ package grpc // request, many responses) RPC. It is generic over the type of the response // message. It is used in generated code. type ServerStreamingClient[Res any] interface { - // Recv receives the next response message from the server. The client may - // repeatedly call Recv to read messages from the response stream. If - // io.EOF is returned, the stream has terminated with an OK status. Any - // other error is compatible with the status package and indicates the - // RPC's status code and message. Recv() (*Res, error) - - // ClientStream is embedded to provide Context, Header, and Trailer - // functionality. No other methods in the ClientStream should be called - // directly. ClientStream } // ServerStreamingServer represents the server side of a server-streaming (one // request, many responses) RPC. It is generic over the type of the response // message. It is used in generated code. -// -// To terminate the response stream, return from the handler method and return -// an error from the status package, or use nil to indicate an OK status code. type ServerStreamingServer[Res any] interface { - // Send sends a response message to the client. The server handler may - // call Send multiple times to send multiple messages to the client. An - // error is returned if the stream was terminated unexpectedly, and the - // handler method should return, as the stream is no longer usable. Send(*Res) error - - // ServerStream is embedded to provide Context, SetHeader, SendHeader, and - // SetTrailer functionality. No other methods in the ServerStream should - // be called directly. ServerStream } @@ -59,22 +39,8 @@ type ServerStreamingServer[Res any] interface { // message stream and the type of the unary response message. It is used in // generated code. type ClientStreamingClient[Req any, Res any] interface { - // Send sends a request message to the server. The client may call Send - // multiple times to send multiple messages to the server. On error, Send - // aborts the stream. If the error was generated by the client, the status - // is returned directly. Otherwise, io.EOF is returned, and the status of - // the stream may be discovered using CloseAndRecv(). Send(*Req) error - - // CloseAndRecv closes the request stream and waits for the server's - // response. This method must be called once and only once after sending - // all request messages. Any error returned is implemented by the status - // package. CloseAndRecv() (*Res, error) - - // ClientStream is embedded to provide Context, Header, and Trailer - // functionality. No other methods in the ClientStream should be called - // directly. ClientStream } @@ -82,28 +48,9 @@ type ClientStreamingClient[Req any, Res any] interface { // requests, one response) RPC. It is generic over both the type of the request // message stream and the type of the unary response message. It is used in // generated code. -// -// To terminate the RPC, call SendAndClose and return nil from the method -// handler or do not call SendAndClose and return an error from the status -// package. type ClientStreamingServer[Req any, Res any] interface { - // Recv receives the next request message from the client. The server may - // repeatedly call Recv to read messages from the request stream. If - // io.EOF is returned, it indicates the client called CloseAndRecv on its - // ClientStreamingClient. Any other error indicates the stream was - // terminated unexpectedly, and the handler method should return, as the - // stream is no longer usable. Recv() (*Req, error) - - // SendAndClose sends a single response message to the client and closes - // the stream. This method must be called once and only once after all - // request messages have been processed. Recv should not be called after - // calling SendAndClose. SendAndClose(*Res) error - - // ServerStream is embedded to provide Context, SetHeader, SendHeader, and - // SetTrailer functionality. No other methods in the ServerStream should - // be called directly. ServerStream } @@ -112,23 +59,8 @@ type ClientStreamingServer[Req any, Res any] interface { // request message stream and the type of the response message stream. It is // used in generated code. type BidiStreamingClient[Req any, Res any] interface { - // Send sends a request message to the server. The client may call Send - // multiple times to send multiple messages to the server. On error, Send - // aborts the stream. If the error was generated by the client, the status - // is returned directly. Otherwise, io.EOF is returned, and the status of - // the stream may be discovered using Recv(). Send(*Req) error - - // Recv receives the next response message from the server. The client may - // repeatedly call Recv to read messages from the response stream. If - // io.EOF is returned, the stream has terminated with an OK status. Any - // other error is compatible with the status package and indicates the - // RPC's status code and message. Recv() (*Res, error) - - // ClientStream is embedded to provide Context, Header, Trailer, and - // CloseSend functionality. No other methods in the ClientStream should be - // called directly. ClientStream } @@ -136,27 +68,9 @@ type BidiStreamingClient[Req any, Res any] interface { // (many requests, many responses) RPC. It is generic over both the type of the // request message stream and the type of the response message stream. It is // used in generated code. -// -// To terminate the stream, return from the handler method and return -// an error from the status package, or use nil to indicate an OK status code. type BidiStreamingServer[Req any, Res any] interface { - // Recv receives the next request message from the client. The server may - // repeatedly call Recv to read messages from the request stream. If - // io.EOF is returned, it indicates the client called CloseSend on its - // BidiStreamingClient. Any other error indicates the stream was - // terminated unexpectedly, and the handler method should return, as the - // stream is no longer usable. Recv() (*Req, error) - - // Send sends a response message to the client. The server handler may - // call Send multiple times to send multiple messages to the client. An - // error is returned if the stream was terminated unexpectedly, and the - // handler method should return, as the stream is no longer usable. Send(*Res) error - - // ServerStream is embedded to provide Context, SetHeader, SendHeader, and - // SetTrailer functionality. No other methods in the ServerStream should - // be called directly. ServerStream } diff --git a/go-controller/vendor/google.golang.org/grpc/version.go b/go-controller/vendor/google.golang.org/grpc/version.go index 5a47094ae8..bafaef99be 100644 --- a/go-controller/vendor/google.golang.org/grpc/version.go +++ b/go-controller/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.68.1" +const Version = "1.65.0" diff --git a/go-controller/vendor/google.golang.org/protobuf/encoding/protojson/decode.go b/go-controller/vendor/google.golang.org/protobuf/encoding/protojson/decode.go index 737d6876d5..8f9e592f87 100644 --- a/go-controller/vendor/google.golang.org/protobuf/encoding/protojson/decode.go +++ b/go-controller/vendor/google.golang.org/protobuf/encoding/protojson/decode.go @@ -192,6 +192,11 @@ func (d decoder) unmarshalMessage(m protoreflect.Message, skipTypeURL bool) erro fd = fieldDescs.ByTextName(name) } } + if flags.ProtoLegacy { + if fd != nil && fd.IsWeak() && fd.Message().IsPlaceholder() { + fd = nil // reset since the weak reference is not linked in + } + } if fd == nil { // Field is unknown. diff --git a/go-controller/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go b/go-controller/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go index e9fe103943..4b177c8206 100644 --- a/go-controller/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go +++ b/go-controller/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go @@ -348,11 +348,7 @@ func (d decoder) unmarshalAnyValue(unmarshal unmarshalFunc, m protoreflect.Messa switch tok.Kind() { case json.ObjectClose: if !found { - // We tolerate an omitted `value` field with the google.protobuf.Empty Well-Known-Type, - // for compatibility with other proto runtimes that have interpreted the spec differently. - if m.Descriptor().FullName() != genid.Empty_message_fullname { - return d.newError(tok.Pos(), `missing "value" field`) - } + return d.newError(tok.Pos(), `missing "value" field`) } return nil diff --git a/go-controller/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/go-controller/vendor/google.golang.org/protobuf/encoding/prototext/decode.go index b53805056a..24bc98ac42 100644 --- a/go-controller/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ b/go-controller/vendor/google.golang.org/protobuf/encoding/prototext/decode.go @@ -185,6 +185,11 @@ func (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) erro } else if xtErr != nil && xtErr != protoregistry.NotFound { return d.newError(tok.Pos(), "unable to resolve [%s]: %v", tok.RawString(), xtErr) } + if flags.ProtoLegacy { + if fd != nil && fd.IsWeak() && fd.Message().IsPlaceholder() { + fd = nil // reset since the weak reference is not linked in + } + } // Handle unknown fields. if fd == nil { diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb b/go-controller/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb index 5a57ef6f3c..ff6a38360a 100644 Binary files a/go-controller/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb and b/go-controller/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb differ diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go b/go-controller/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go new file mode 100644 index 0000000000..08dad7692c --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go @@ -0,0 +1,13 @@ +// Copyright 2024 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 editionssupport defines constants for editions that are supported. +package editionssupport + +import "google.golang.org/protobuf/types/descriptorpb" + +const ( + Minimum = descriptorpb.Edition_EDITION_PROTO2 + Maximum = descriptorpb.Edition_EDITION_2023 +) diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go b/go-controller/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go index 669133d04d..7e87c76044 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go @@ -26,7 +26,7 @@ var byteType = reflect.TypeOf(byte(0)) // The type is the underlying field type (e.g., a repeated field may be // represented by []T, but the Go type passed in is just T). // A list of enum value descriptors must be provided for enum fields. -// This does not populate the Enum or Message. +// This does not populate the Enum or Message (except for weak message). // // This function is a best effort attempt; parsing errors are ignored. func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor { @@ -109,6 +109,9 @@ func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescri } case s == "packed": f.L1.EditionFeatures.IsPacked = true + case strings.HasPrefix(s, "weak="): + f.L1.IsWeak = true + f.L1.Message = filedesc.PlaceholderMessage(protoreflect.FullName(s[len("weak="):])) case strings.HasPrefix(s, "def="): // The default tag is special in that everything afterwards is the // default regardless of the presence of commas. @@ -180,6 +183,9 @@ func Marshal(fd protoreflect.FieldDescriptor, enumName string) string { // the exact same semantics from the previous generator. tag = append(tag, "json="+jsonName) } + if fd.IsWeak() { + tag = append(tag, "weak="+string(fd.Message().FullName())) + } // The previous implementation does not tag extension fields as proto3, // even when the field is defined in a proto3 file. Match that behavior // for consistency. diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/errors/is_go112.go b/go-controller/vendor/google.golang.org/protobuf/internal/errors/is_go112.go new file mode 100644 index 0000000000..fbcd349207 --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/internal/errors/is_go112.go @@ -0,0 +1,40 @@ +// Copyright 2020 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 !go1.13 +// +build !go1.13 + +package errors + +import "reflect" + +// Is is a copy of Go 1.13's errors.Is for use with older Go versions. +func Is(err, target error) bool { + if target == nil { + return err == target + } + + isComparable := reflect.TypeOf(target).Comparable() + for { + if isComparable && err == target { + return true + } + if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { + return true + } + if err = unwrap(err); err == nil { + return false + } + } +} + +func unwrap(err error) error { + u, ok := err.(interface { + Unwrap() error + }) + if !ok { + return nil + } + return u.Unwrap() +} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go b/go-controller/vendor/google.golang.org/protobuf/internal/errors/is_go113.go similarity index 52% rename from go-controller/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go rename to go-controller/vendor/google.golang.org/protobuf/internal/errors/is_go113.go index 5f8f2419ab..5e72f1cde9 100644 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/errors/is_go113.go @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !linux && (mips64 || mips64le) +//go:build go1.13 +// +build go1.13 -package cpu +package errors -func archInit() { - Initialized = true -} +import "errors" + +// Is is errors.Is. +func Is(err, target error) bool { return errors.Is(err, target) } diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index 688aabe434..fa790e0ff1 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -19,6 +19,7 @@ import ( "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" ) // Edition is an Enum for proto2.Edition @@ -31,7 +32,6 @@ const ( EditionProto2 Edition = 998 EditionProto3 Edition = 999 Edition2023 Edition = 1000 - Edition2024 Edition = 1001 EditionUnsupported Edition = 100000 ) @@ -77,48 +77,31 @@ type ( Locations SourceLocations } - // EditionFeatures is a frequently-instantiated struct, so please take care - // to minimize padding when adding new fields to this struct (add them in - // the right place/order). EditionFeatures struct { - // StripEnumPrefix determines if the plugin generates enum value - // constants as-is, with their prefix stripped, or both variants. - StripEnumPrefix int - // IsFieldPresence is true if field_presence is EXPLICIT // https://protobuf.dev/editions/features/#field_presence IsFieldPresence bool - // IsFieldPresence is true if field_presence is LEGACY_REQUIRED // https://protobuf.dev/editions/features/#field_presence IsLegacyRequired bool - // IsOpenEnum is true if enum_type is OPEN // https://protobuf.dev/editions/features/#enum_type IsOpenEnum bool - // IsPacked is true if repeated_field_encoding is PACKED // https://protobuf.dev/editions/features/#repeated_field_encoding IsPacked bool - // IsUTF8Validated is true if utf_validation is VERIFY // https://protobuf.dev/editions/features/#utf8_validation IsUTF8Validated bool - // IsDelimitedEncoded is true if message_encoding is DELIMITED // https://protobuf.dev/editions/features/#message_encoding IsDelimitedEncoded bool - // IsJSONCompliant is true if json_format is ALLOW // https://protobuf.dev/editions/features/#json_format IsJSONCompliant bool - // GenerateLegacyUnmarshalJSON determines if the plugin generates the // UnmarshalJSON([]byte) error method for enums. GenerateLegacyUnmarshalJSON bool - // APILevel controls which API (Open, Hybrid or Opaque) should be used - // for generated code (.pb.go files). - APILevel int } ) @@ -274,6 +257,7 @@ type ( Kind protoreflect.Kind StringName stringName IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto + IsWeak bool // promoted from google.protobuf.FieldOptions IsLazy bool // promoted from google.protobuf.FieldOptions Default defaultValue ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields @@ -367,7 +351,7 @@ func (fd *Field) IsPacked() bool { return fd.L1.EditionFeatures.IsPacked } func (fd *Field) IsExtension() bool { return false } -func (fd *Field) IsWeak() bool { return false } +func (fd *Field) IsWeak() bool { return fd.L1.IsWeak } func (fd *Field) IsLazy() bool { return fd.L1.IsLazy } func (fd *Field) IsList() bool { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() } func (fd *Field) IsMap() bool { return fd.Message() != nil && fd.Message().IsMapEntry() } @@ -394,6 +378,11 @@ func (fd *Field) Enum() protoreflect.EnumDescriptor { return fd.L1.Enum } func (fd *Field) Message() protoreflect.MessageDescriptor { + if fd.L1.IsWeak { + if d, _ := protoregistry.GlobalFiles.FindDescriptorByName(fd.L1.Message.FullName()); d != nil { + return d.(protoreflect.MessageDescriptor) + } + } return fd.L1.Message } func (fd *Field) IsMapEntry() bool { diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go index d4c94458bd..67a51b327c 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -32,6 +32,11 @@ func (file *File) resolveMessages() { for j := range md.L2.Fields.List { fd := &md.L2.Fields.List[j] + // Weak fields are resolved upon actual use. + if fd.L1.IsWeak { + continue + } + // Resolve message field dependency. switch fd.L1.Kind { case protoreflect.EnumKind: @@ -145,6 +150,8 @@ func (fd *File) unmarshalFull(b []byte) { switch num { case genid.FileDescriptorProto_PublicDependency_field_number: fd.L2.Imports[v].IsPublic = true + case genid.FileDescriptorProto_WeakDependency_field_number: + fd.L2.Imports[v].IsWeak = true } case protowire.BytesType: v, m := protowire.ConsumeBytes(b) @@ -495,6 +502,8 @@ func (fd *Field) unmarshalOptions(b []byte) { switch num { case genid.FieldOptions_Packed_field_number: fd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) + case genid.FieldOptions_Weak_field_number: + fd.L1.IsWeak = protowire.DecodeBool(v) case genid.FieldOptions_Lazy_field_number: fd.L1.IsLazy = protowire.DecodeBool(v) case FieldOptions_EnforceUTF8: diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/editions.go index 10132c9b38..fd4d0c83d2 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/filedesc/editions.go @@ -32,14 +32,6 @@ func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures { v, m := protowire.ConsumeVarint(b) b = b[m:] parent.GenerateLegacyUnmarshalJSON = protowire.DecodeBool(v) - case genid.GoFeatures_ApiLevel_field_number: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - parent.APILevel = int(v) - case genid.GoFeatures_StripEnumPrefix_field_number: - v, m := protowire.ConsumeVarint(b) - b = b[m:] - parent.StripEnumPrefix = int(v) default: panic(fmt.Sprintf("unkown field number %d while unmarshalling GoFeatures", num)) } diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/filetype/build.go b/go-controller/vendor/google.golang.org/protobuf/internal/filetype/build.go index e1b4130bd2..ba83fea44c 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/filetype/build.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/filetype/build.go @@ -63,7 +63,7 @@ type Builder struct { // message declarations in "flattened ordering". // // Dependencies are Go types for enums or messages referenced by - // message fields, for parent extended messages of + // message fields (excluding weak fields), for parent extended messages of // extension fields, for enums or messages referenced by extension fields, // and for input and output messages referenced by service methods. // Dependencies must come after declarations, but the ordering of diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/flags/flags.go b/go-controller/vendor/google.golang.org/protobuf/internal/flags/flags.go index a06ccabc2f..58372dd348 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/flags/flags.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/flags/flags.go @@ -6,7 +6,7 @@ package flags // ProtoLegacy specifies whether to enable support for legacy functionality -// such as MessageSets, and various other obscure behavior +// such as MessageSets, weak fields, and various other obscure behavior // that is necessary to maintain backwards compatibility with proto1 or // the pre-release variants of proto2 and proto3. // diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go b/go-controller/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go index f5ee7f5c2b..7f67cbb6e9 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go @@ -21,47 +21,13 @@ const ( // Field names for pb.GoFeatures. const ( GoFeatures_LegacyUnmarshalJsonEnum_field_name protoreflect.Name = "legacy_unmarshal_json_enum" - GoFeatures_ApiLevel_field_name protoreflect.Name = "api_level" - GoFeatures_StripEnumPrefix_field_name protoreflect.Name = "strip_enum_prefix" GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "pb.GoFeatures.legacy_unmarshal_json_enum" - GoFeatures_ApiLevel_field_fullname protoreflect.FullName = "pb.GoFeatures.api_level" - GoFeatures_StripEnumPrefix_field_fullname protoreflect.FullName = "pb.GoFeatures.strip_enum_prefix" ) // Field numbers for pb.GoFeatures. const ( GoFeatures_LegacyUnmarshalJsonEnum_field_number protoreflect.FieldNumber = 1 - GoFeatures_ApiLevel_field_number protoreflect.FieldNumber = 2 - GoFeatures_StripEnumPrefix_field_number protoreflect.FieldNumber = 3 -) - -// Full and short names for pb.GoFeatures.APILevel. -const ( - GoFeatures_APILevel_enum_fullname = "pb.GoFeatures.APILevel" - GoFeatures_APILevel_enum_name = "APILevel" -) - -// Enum values for pb.GoFeatures.APILevel. -const ( - GoFeatures_API_LEVEL_UNSPECIFIED_enum_value = 0 - GoFeatures_API_OPEN_enum_value = 1 - GoFeatures_API_HYBRID_enum_value = 2 - GoFeatures_API_OPAQUE_enum_value = 3 -) - -// Full and short names for pb.GoFeatures.StripEnumPrefix. -const ( - GoFeatures_StripEnumPrefix_enum_fullname = "pb.GoFeatures.StripEnumPrefix" - GoFeatures_StripEnumPrefix_enum_name = "StripEnumPrefix" -) - -// Enum values for pb.GoFeatures.StripEnumPrefix. -const ( - GoFeatures_STRIP_ENUM_PREFIX_UNSPECIFIED_enum_value = 0 - GoFeatures_STRIP_ENUM_PREFIX_KEEP_enum_value = 1 - GoFeatures_STRIP_ENUM_PREFIX_GENERATE_BOTH_enum_value = 2 - GoFeatures_STRIP_ENUM_PREFIX_STRIP_enum_value = 3 ) // Extension numbers diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/genid/goname.go b/go-controller/vendor/google.golang.org/protobuf/internal/genid/goname.go index 99bb95bafd..693d2e9e1f 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/genid/goname.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/genid/goname.go @@ -11,10 +11,15 @@ const ( SizeCache_goname = "sizeCache" SizeCacheA_goname = "XXX_sizecache" + WeakFields_goname = "weakFields" + WeakFieldsA_goname = "XXX_weak" + UnknownFields_goname = "unknownFields" UnknownFieldsA_goname = "XXX_unrecognized" ExtensionFields_goname = "extensionFields" ExtensionFieldsA_goname = "XXX_InternalExtensions" ExtensionFieldsB_goname = "XXX_extensions" + + WeakFieldPrefix_goname = "XXX_weak_" ) diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/genid/name.go b/go-controller/vendor/google.golang.org/protobuf/internal/genid/name.go deleted file mode 100644 index 224f339302..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/genid/name.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 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 genid - -const ( - NoUnkeyedLiteral_goname = "noUnkeyedLiteral" - NoUnkeyedLiteralA_goname = "XXX_NoUnkeyedLiteral" - - BuilderSuffix_goname = "_builder" -) diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go deleted file mode 100644 index 6075d6f696..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/api_export_opaque.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2024 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 impl - -import ( - "strconv" - "sync/atomic" - "unsafe" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -func (Export) UnmarshalField(msg any, fieldNum int32) { - UnmarshalField(msg.(protoreflect.ProtoMessage).ProtoReflect(), protoreflect.FieldNumber(fieldNum)) -} - -// Present checks the presence set for a certain field number (zero -// based, ordered by appearance in original proto file). part is -// a pointer to the correct element in the bitmask array, num is the -// field number unaltered. Example (field number 70 -> part = -// &m.XXX_presence[1], num = 70) -func (Export) Present(part *uint32, num uint32) bool { - // This hook will read an unprotected shadow presence set if - // we're unning under the race detector - raceDetectHookPresent(part, num) - return atomic.LoadUint32(part)&(1<<(num%32)) > 0 -} - -// SetPresent adds a field to the presence set. part is a pointer to -// the relevant element in the array and num is the field number -// unaltered. size is the number of fields in the protocol -// buffer. -func (Export) SetPresent(part *uint32, num uint32, size uint32) { - // This hook will mutate an unprotected shadow presence set if - // we're running under the race detector - raceDetectHookSetPresent(part, num, presenceSize(size)) - for { - old := atomic.LoadUint32(part) - if atomic.CompareAndSwapUint32(part, old, old|(1<<(num%32))) { - return - } - } -} - -// SetPresentNonAtomic is like SetPresent, but operates non-atomically. -// It is meant for use by builder methods, where the message is known not -// to be accessible yet by other goroutines. -func (Export) SetPresentNonAtomic(part *uint32, num uint32, size uint32) { - // This hook will mutate an unprotected shadow presence set if - // we're running under the race detector - raceDetectHookSetPresent(part, num, presenceSize(size)) - *part |= 1 << (num % 32) -} - -// ClearPresence removes a field from the presence set. part is a -// pointer to the relevant element in the presence array and num is -// the field number unaltered. -func (Export) ClearPresent(part *uint32, num uint32) { - // This hook will mutate an unprotected shadow presence set if - // we're running under the race detector - raceDetectHookClearPresent(part, num) - for { - old := atomic.LoadUint32(part) - if atomic.CompareAndSwapUint32(part, old, old&^(1<<(num%32))) { - return - } - } -} - -// interfaceToPointer takes a pointer to an empty interface whose value is a -// pointer type, and converts it into a "pointer" that points to the same -// target -func interfaceToPointer(i *any) pointer { - return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} -} - -func (p pointer) atomicGetPointer() pointer { - return pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))} -} - -func (p pointer) atomicSetPointer(q pointer) { - atomic.StorePointer((*unsafe.Pointer)(p.p), q.p) -} - -// AtomicCheckPointerIsNil takes an interface (which is a pointer to a -// pointer) and returns true if the pointed-to pointer is nil (using an -// atomic load). This function is inlineable and, on x86, just becomes a -// simple load and compare. -func (Export) AtomicCheckPointerIsNil(ptr any) bool { - return interfaceToPointer(&ptr).atomicGetPointer().IsNil() -} - -// AtomicSetPointer takes two interfaces (first is a pointer to a pointer, -// second is a pointer) and atomically sets the second pointer into location -// referenced by first pointer. Unfortunately, atomicSetPointer() does not inline -// (even on x86), so this does not become a simple store on x86. -func (Export) AtomicSetPointer(dstPtr, valPtr any) { - interfaceToPointer(&dstPtr).atomicSetPointer(interfaceToPointer(&valPtr)) -} - -// AtomicLoadPointer loads the pointer at the location pointed at by src, -// and stores that pointer value into the location pointed at by dst. -func (Export) AtomicLoadPointer(ptr Pointer, dst Pointer) { - *(*unsafe.Pointer)(unsafe.Pointer(dst)) = atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(ptr))) -} - -// AtomicInitializePointer makes ptr and dst point to the same value. -// -// If *ptr is a nil pointer, it sets *ptr = *dst. -// -// If *ptr is a non-nil pointer, it sets *dst = *ptr. -func (Export) AtomicInitializePointer(ptr Pointer, dst Pointer) { - if !atomic.CompareAndSwapPointer((*unsafe.Pointer)(ptr), unsafe.Pointer(nil), *(*unsafe.Pointer)(dst)) { - *(*unsafe.Pointer)(unsafe.Pointer(dst)) = atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(ptr))) - } -} - -// MessageFieldStringOf returns the field formatted as a string, -// either as the field name if resolvable otherwise as a decimal string. -func (Export) MessageFieldStringOf(md protoreflect.MessageDescriptor, n protoreflect.FieldNumber) string { - fd := md.Fields().ByNumber(n) - if fd != nil { - return string(fd.Name()) - } - return strconv.Itoa(int(n)) -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/bitmap.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/bitmap.go deleted file mode 100644 index ea276547cd..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/bitmap.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2024 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 !race - -package impl - -// There is no additional data as we're not running under race detector. -type RaceDetectHookData struct{} - -// Empty stubs for when not using the race detector. Calls to these from index.go should be optimized away. -func (presence) raceDetectHookPresent(num uint32) {} -func (presence) raceDetectHookSetPresent(num uint32, size presenceSize) {} -func (presence) raceDetectHookClearPresent(num uint32) {} -func (presence) raceDetectHookAllocAndCopy(src presence) {} - -// raceDetectHookPresent is called by the generated file interface -// (*proto.internalFuncs) Present to optionally read an unprotected -// shadow bitmap when race detection is enabled. In regular code it is -// a noop. -func raceDetectHookPresent(field *uint32, num uint32) {} - -// raceDetectHookSetPresent is called by the generated file interface -// (*proto.internalFuncs) SetPresent to optionally write an unprotected -// shadow bitmap when race detection is enabled. In regular code it is -// a noop. -func raceDetectHookSetPresent(field *uint32, num uint32, size presenceSize) {} - -// raceDetectHookClearPresent is called by the generated file interface -// (*proto.internalFuncs) ClearPresent to optionally write an unprotected -// shadow bitmap when race detection is enabled. In regular code it is -// a noop. -func raceDetectHookClearPresent(field *uint32, num uint32) {} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go deleted file mode 100644 index e9a27583ae..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/bitmap_race.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2024 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 race - -package impl - -// When running under race detector, we add a presence map of bytes, that we can access -// in the hook functions so that we trigger the race detection whenever we have concurrent -// Read-Writes or Write-Writes. The race detector does not otherwise detect invalid concurrent -// access to lazy fields as all updates of bitmaps and pointers are done using atomic operations. -type RaceDetectHookData struct { - shadowPresence *[]byte -} - -// Hooks for presence bitmap operations that allocate, read and write the shadowPresence -// using non-atomic operations. -func (data *RaceDetectHookData) raceDetectHookAlloc(size presenceSize) { - sp := make([]byte, size) - atomicStoreShadowPresence(&data.shadowPresence, &sp) -} - -func (p presence) raceDetectHookPresent(num uint32) { - data := p.toRaceDetectData() - if data == nil { - return - } - sp := atomicLoadShadowPresence(&data.shadowPresence) - if sp != nil { - _ = (*sp)[num] - } -} - -func (p presence) raceDetectHookSetPresent(num uint32, size presenceSize) { - data := p.toRaceDetectData() - if data == nil { - return - } - sp := atomicLoadShadowPresence(&data.shadowPresence) - if sp == nil { - data.raceDetectHookAlloc(size) - sp = atomicLoadShadowPresence(&data.shadowPresence) - } - (*sp)[num] = 1 -} - -func (p presence) raceDetectHookClearPresent(num uint32) { - data := p.toRaceDetectData() - if data == nil { - return - } - sp := atomicLoadShadowPresence(&data.shadowPresence) - if sp != nil { - (*sp)[num] = 0 - - } -} - -// raceDetectHookAllocAndCopy allocates a new shadowPresence slice at lazy and copies -// shadowPresence bytes from src to lazy. -func (p presence) raceDetectHookAllocAndCopy(q presence) { - sData := q.toRaceDetectData() - dData := p.toRaceDetectData() - if sData == nil { - return - } - srcSp := atomicLoadShadowPresence(&sData.shadowPresence) - if srcSp == nil { - atomicStoreShadowPresence(&dData.shadowPresence, nil) - return - } - n := len(*srcSp) - dSlice := make([]byte, n) - atomicStoreShadowPresence(&dData.shadowPresence, &dSlice) - for i := 0; i < n; i++ { - dSlice[i] = (*srcSp)[i] - } -} - -// raceDetectHookPresent is called by the generated file interface -// (*proto.internalFuncs) Present to optionally read an unprotected -// shadow bitmap when race detection is enabled. In regular code it is -// a noop. -func raceDetectHookPresent(field *uint32, num uint32) { - data := findPointerToRaceDetectData(field, num) - if data == nil { - return - } - sp := atomicLoadShadowPresence(&data.shadowPresence) - if sp != nil { - _ = (*sp)[num] - } -} - -// raceDetectHookSetPresent is called by the generated file interface -// (*proto.internalFuncs) SetPresent to optionally write an unprotected -// shadow bitmap when race detection is enabled. In regular code it is -// a noop. -func raceDetectHookSetPresent(field *uint32, num uint32, size presenceSize) { - data := findPointerToRaceDetectData(field, num) - if data == nil { - return - } - sp := atomicLoadShadowPresence(&data.shadowPresence) - if sp == nil { - data.raceDetectHookAlloc(size) - sp = atomicLoadShadowPresence(&data.shadowPresence) - } - (*sp)[num] = 1 -} - -// raceDetectHookClearPresent is called by the generated file interface -// (*proto.internalFuncs) ClearPresent to optionally write an unprotected -// shadow bitmap when race detection is enabled. In regular code it is -// a noop. -func raceDetectHookClearPresent(field *uint32, num uint32) { - data := findPointerToRaceDetectData(field, num) - if data == nil { - return - } - sp := atomicLoadShadowPresence(&data.shadowPresence) - if sp != nil { - (*sp)[num] = 0 - } -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/checkinit.go index fe2c719ce4..f29e6a8fa8 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/checkinit.go @@ -35,12 +35,6 @@ func (mi *MessageInfo) checkInitializedPointer(p pointer) error { } return nil } - - var presence presence - if mi.presenceOffset.IsValid() { - presence = p.Apply(mi.presenceOffset).PresenceInfo() - } - if mi.extensionOffset.IsValid() { e := p.Apply(mi.extensionOffset).Extensions() if err := mi.isInitExtensions(e); err != nil { @@ -51,33 +45,6 @@ func (mi *MessageInfo) checkInitializedPointer(p pointer) error { if !f.isRequired && f.funcs.isInit == nil { continue } - - if f.presenceIndex != noPresence { - if !presence.Present(f.presenceIndex) { - if f.isRequired { - return errors.RequiredNotSet(string(mi.Desc.Fields().ByNumber(f.num).FullName())) - } - continue - } - if f.funcs.isInit != nil { - f.mi.init() - if f.mi.needsInitCheck { - if f.isLazy && p.Apply(f.offset).AtomicGetPointer().IsNil() { - lazy := *p.Apply(mi.lazyOffset).LazyInfoPtr() - if !lazy.AllowedPartial() { - // Nothing to see here, it was checked on unmarshal - continue - } - mi.lazyUnmarshal(p, f.num) - } - if err := f.funcs.isInit(p.Apply(f.offset), f); err != nil { - return err - } - } - } - continue - } - fptr := p.Apply(f.offset) if f.isPointer && fptr.Elem().IsNil() { if f.isRequired { diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_field.go index d14d7d93cc..7c1f66c8c1 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_field.go @@ -5,12 +5,15 @@ package impl import ( + "fmt" "reflect" + "sync" "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/runtime/protoiface" ) @@ -118,6 +121,78 @@ func (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si } } +func makeWeakMessageFieldCoder(fd protoreflect.FieldDescriptor) pointerCoderFuncs { + var once sync.Once + var messageType protoreflect.MessageType + lazyInit := func() { + once.Do(func() { + messageName := fd.Message().FullName() + messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName) + }) + } + + return pointerCoderFuncs{ + size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int { + m, ok := p.WeakFields().get(f.num) + if !ok { + return 0 + } + lazyInit() + if messageType == nil { + panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName())) + } + return sizeMessage(m, f.tagsize, opts) + }, + marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { + m, ok := p.WeakFields().get(f.num) + if !ok { + return b, nil + } + lazyInit() + if messageType == nil { + panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName())) + } + return appendMessage(b, m, f.wiretag, opts) + }, + unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) { + fs := p.WeakFields() + m, ok := fs.get(f.num) + if !ok { + lazyInit() + if messageType == nil { + return unmarshalOutput{}, errUnknown + } + m = messageType.New().Interface() + fs.set(f.num, m) + } + return consumeMessage(b, m, wtyp, opts) + }, + isInit: func(p pointer, f *coderFieldInfo) error { + m, ok := p.WeakFields().get(f.num) + if !ok { + return nil + } + return proto.CheckInitialized(m) + }, + merge: func(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { + sm, ok := src.WeakFields().get(f.num) + if !ok { + return + } + dm, ok := dst.WeakFields().get(f.num) + if !ok { + lazyInit() + if messageType == nil { + panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName())) + } + dm = messageType.New().Interface() + dst.WeakFields().set(f.num, dm) + } + opts.Merge(dm, sm) + }, + } +} + func makeMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { if mi := getMessageInfo(ft); mi != nil { funcs := pointerCoderFuncs{ diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go deleted file mode 100644 index 76818ea252..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_field_opaque.go +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright 2024 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 impl - -import ( - "fmt" - "reflect" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func makeOpaqueMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) { - mi := getMessageInfo(ft) - if mi == nil { - panic(fmt.Sprintf("invalid field: %v: unsupported message type %v", fd.FullName(), ft)) - } - switch fd.Kind() { - case protoreflect.MessageKind: - return mi, pointerCoderFuncs{ - size: sizeOpaqueMessage, - marshal: appendOpaqueMessage, - unmarshal: consumeOpaqueMessage, - isInit: isInitOpaqueMessage, - merge: mergeOpaqueMessage, - } - case protoreflect.GroupKind: - return mi, pointerCoderFuncs{ - size: sizeOpaqueGroup, - marshal: appendOpaqueGroup, - unmarshal: consumeOpaqueGroup, - isInit: isInitOpaqueMessage, - merge: mergeOpaqueMessage, - } - } - panic("unexpected field kind") -} - -func sizeOpaqueMessage(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return protowire.SizeBytes(f.mi.sizePointer(p.AtomicGetPointer(), opts)) + f.tagsize -} - -func appendOpaqueMessage(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - mp := p.AtomicGetPointer() - calculatedSize := f.mi.sizePointer(mp, opts) - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(calculatedSize)) - before := len(b) - b, err := f.mi.marshalAppendPointer(b, mp, opts) - if measuredSize := len(b) - before; calculatedSize != measuredSize && err == nil { - return nil, errors.MismatchedSizeCalculation(calculatedSize, measuredSize) - } - return b, err -} - -func consumeOpaqueMessage(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - mp := p.AtomicGetPointer() - if mp.IsNil() { - mp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) - } - o, err := f.mi.unmarshalPointer(v, mp, 0, opts) - if err != nil { - return out, err - } - out.n = n - out.initialized = o.initialized - return out, nil -} - -func isInitOpaqueMessage(p pointer, f *coderFieldInfo) error { - mp := p.AtomicGetPointer() - if mp.IsNil() { - return nil - } - return f.mi.checkInitializedPointer(mp) -} - -func mergeOpaqueMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - dstmp := dst.AtomicGetPointer() - if dstmp.IsNil() { - dstmp = dst.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) - } - f.mi.mergePointer(dstmp, src.AtomicGetPointer(), opts) -} - -func sizeOpaqueGroup(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return 2*f.tagsize + f.mi.sizePointer(p.AtomicGetPointer(), opts) -} - -func appendOpaqueGroup(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - b = protowire.AppendVarint(b, f.wiretag) // start group - b, err := f.mi.marshalAppendPointer(b, p.AtomicGetPointer(), opts) - b = protowire.AppendVarint(b, f.wiretag+1) // end group - return b, err -} - -func consumeOpaqueGroup(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.StartGroupType { - return out, errUnknown - } - mp := p.AtomicGetPointer() - if mp.IsNil() { - mp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.mi.GoReflectType.Elem()))) - } - o, e := f.mi.unmarshalPointer(b, mp, f.num, opts) - return o, e -} - -func makeOpaqueRepeatedMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) { - if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice { - panic(fmt.Sprintf("invalid field: %v: unsupported type for opaque repeated message: %v", fd.FullName(), ft)) - } - mt := ft.Elem().Elem() // *[]*T -> *T - mi := getMessageInfo(mt) - if mi == nil { - panic(fmt.Sprintf("invalid field: %v: unsupported message type %v", fd.FullName(), mt)) - } - switch fd.Kind() { - case protoreflect.MessageKind: - return mi, pointerCoderFuncs{ - size: sizeOpaqueMessageSlice, - marshal: appendOpaqueMessageSlice, - unmarshal: consumeOpaqueMessageSlice, - isInit: isInitOpaqueMessageSlice, - merge: mergeOpaqueMessageSlice, - } - case protoreflect.GroupKind: - return mi, pointerCoderFuncs{ - size: sizeOpaqueGroupSlice, - marshal: appendOpaqueGroupSlice, - unmarshal: consumeOpaqueGroupSlice, - isInit: isInitOpaqueMessageSlice, - merge: mergeOpaqueMessageSlice, - } - } - panic("unexpected field kind") -} - -func sizeOpaqueMessageSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := p.AtomicGetPointer().PointerSlice() - n := 0 - for _, v := range s { - n += protowire.SizeBytes(f.mi.sizePointer(v, opts)) + f.tagsize - } - return n -} - -func appendOpaqueMessageSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := p.AtomicGetPointer().PointerSlice() - var err error - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) - siz := f.mi.sizePointer(v, opts) - b = protowire.AppendVarint(b, uint64(siz)) - before := len(b) - b, err = f.mi.marshalAppendPointer(b, v, opts) - if err != nil { - return b, err - } - if measuredSize := len(b) - before; siz != measuredSize { - return nil, errors.MismatchedSizeCalculation(siz, measuredSize) - } - } - return b, nil -} - -func consumeOpaqueMessageSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.BytesType { - return out, errUnknown - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - mp := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())) - o, err := f.mi.unmarshalPointer(v, mp, 0, opts) - if err != nil { - return out, err - } - sp := p.AtomicGetPointer() - if sp.IsNil() { - sp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem()))) - } - sp.AppendPointerSlice(mp) - out.n = n - out.initialized = o.initialized - return out, nil -} - -func isInitOpaqueMessageSlice(p pointer, f *coderFieldInfo) error { - sp := p.AtomicGetPointer() - if sp.IsNil() { - return nil - } - s := sp.PointerSlice() - for _, v := range s { - if err := f.mi.checkInitializedPointer(v); err != nil { - return err - } - } - return nil -} - -func mergeOpaqueMessageSlice(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { - ds := dst.AtomicGetPointer() - if ds.IsNil() { - ds = dst.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem()))) - } - for _, sp := range src.AtomicGetPointer().PointerSlice() { - dm := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())) - f.mi.mergePointer(dm, sp, opts) - ds.AppendPointerSlice(dm) - } -} - -func sizeOpaqueGroupSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := p.AtomicGetPointer().PointerSlice() - n := 0 - for _, v := range s { - n += 2*f.tagsize + f.mi.sizePointer(v, opts) - } - return n -} - -func appendOpaqueGroupSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := p.AtomicGetPointer().PointerSlice() - var err error - for _, v := range s { - b = protowire.AppendVarint(b, f.wiretag) // start group - b, err = f.mi.marshalAppendPointer(b, v, opts) - if err != nil { - return b, err - } - b = protowire.AppendVarint(b, f.wiretag+1) // end group - } - return b, nil -} - -func consumeOpaqueGroupSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.StartGroupType { - return out, errUnknown - } - mp := pointerOfValue(reflect.New(f.mi.GoReflectType.Elem())) - out, err = f.mi.unmarshalPointer(b, mp, f.num, opts) - if err != nil { - return out, err - } - sp := p.AtomicGetPointer() - if sp.IsNil() { - sp = p.AtomicSetPointerIfNil(pointerOfValue(reflect.New(f.ft.Elem()))) - } - sp.AppendPointerSlice(mp) - return out, err -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map.go index 229c698013..fb35f0bae9 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map.go @@ -94,7 +94,7 @@ func sizeMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, opts marshalO return 0 } n := 0 - iter := mapv.MapRange() + iter := mapRange(mapv) for iter.Next() { key := mapi.conv.keyConv.PBValueOf(iter.Key()).MapKey() keySize := mapi.keyFuncs.size(key.Value(), mapKeyTagSize, opts) @@ -281,7 +281,7 @@ func appendMap(b []byte, mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo, o if opts.Deterministic() { return appendMapDeterministic(b, mapv, mapi, f, opts) } - iter := mapv.MapRange() + iter := mapRange(mapv) for iter.Next() { var err error b = protowire.AppendVarint(b, f.wiretag) @@ -328,7 +328,7 @@ func isInitMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo) error { if !mi.needsInitCheck { return nil } - iter := mapv.MapRange() + iter := mapRange(mapv) for iter.Next() { val := pointerOfValue(iter.Value()) if err := mi.checkInitializedPointer(val); err != nil { @@ -336,7 +336,7 @@ func isInitMap(mapv reflect.Value, mapi *mapInfo, f *coderFieldInfo) error { } } } else { - iter := mapv.MapRange() + iter := mapRange(mapv) for iter.Next() { val := mapi.conv.valConv.PBValueOf(iter.Value()) if err := mapi.valFuncs.isInit(val); err != nil { @@ -356,7 +356,7 @@ func mergeMap(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { if dstm.IsNil() { dstm.Set(reflect.MakeMap(f.ft)) } - iter := srcm.MapRange() + iter := mapRange(srcm) for iter.Next() { dstm.SetMapIndex(iter.Key(), iter.Value()) } @@ -371,7 +371,7 @@ func mergeMapOfBytes(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { if dstm.IsNil() { dstm.Set(reflect.MakeMap(f.ft)) } - iter := srcm.MapRange() + iter := mapRange(srcm) for iter.Next() { dstm.SetMapIndex(iter.Key(), reflect.ValueOf(append(emptyBuf[:], iter.Value().Bytes()...))) } @@ -386,7 +386,7 @@ func mergeMapOfMessage(dst, src pointer, f *coderFieldInfo, opts mergeOptions) { if dstm.IsNil() { dstm.Set(reflect.MakeMap(f.ft)) } - iter := srcm.MapRange() + iter := mapRange(srcm) for iter.Next() { val := reflect.New(f.ft.Elem().Elem()) if f.mi != nil { diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go new file mode 100644 index 0000000000..4b15493f2f --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go @@ -0,0 +1,38 @@ +// Copyright 2019 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 !go1.12 +// +build !go1.12 + +package impl + +import "reflect" + +type mapIter struct { + v reflect.Value + keys []reflect.Value +} + +// mapRange provides a less-efficient equivalent to +// the Go 1.12 reflect.Value.MapRange method. +func mapRange(v reflect.Value) *mapIter { + return &mapIter{v: v} +} + +func (i *mapIter) Next() bool { + if i.keys == nil { + i.keys = i.v.MapKeys() + } else { + i.keys = i.keys[1:] + } + return len(i.keys) > 0 +} + +func (i *mapIter) Key() reflect.Value { + return i.keys[0] +} + +func (i *mapIter) Value() reflect.Value { + return i.v.MapIndex(i.keys[0]) +} diff --git a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go similarity index 54% rename from go-controller/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go rename to go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go index 5341e7f88d..0b31b66eaf 100644 --- a/go-controller/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go @@ -2,8 +2,11 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !linux && !netbsd && !openbsd && arm64 +//go:build go1.12 +// +build go1.12 -package cpu +package impl -func doinit() {} +import "reflect" + +func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() } diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_message.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_message.go index f78b57b046..78be9df342 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_message.go @@ -32,10 +32,6 @@ type coderMessageInfo struct { needsInitCheck bool isMessageSet bool numRequiredFields uint8 - - lazyOffset offset - presenceOffset offset - presenceSize presenceSize } type coderFieldInfo struct { @@ -49,19 +45,12 @@ type coderFieldInfo struct { tagsize int // size of the varint-encoded tag isPointer bool // true if IsNil may be called on the struct field isRequired bool // true if field is required - - isLazy bool - presenceIndex uint32 } -const noPresence = 0xffffffff - func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { mi.sizecacheOffset = invalidOffset mi.unknownOffset = invalidOffset mi.extensionOffset = invalidOffset - mi.lazyOffset = invalidOffset - mi.presenceOffset = si.presenceOffset if si.sizecacheOffset.IsValid() && si.sizecacheType == sizecacheType { mi.sizecacheOffset = si.sizecacheOffset @@ -118,9 +107,12 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { }, } case isOneof: - fieldOffset = offsetOf(fs) + fieldOffset = offsetOf(fs, mi.Exporter) + case fd.IsWeak(): + fieldOffset = si.weakOffset + funcs = makeWeakMessageFieldCoder(fd) default: - fieldOffset = offsetOf(fs) + fieldOffset = offsetOf(fs, mi.Exporter) childMessage, funcs = fieldCoder(fd, ft) } cf := &preallocFields[i] @@ -135,8 +127,6 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { validation: newFieldValidationInfo(mi, si, fd, ft), isPointer: fd.Cardinality() == protoreflect.Repeated || fd.HasPresence(), isRequired: fd.Cardinality() == protoreflect.Required, - - presenceIndex: noPresence, } mi.orderedCoderFields = append(mi.orderedCoderFields, cf) mi.coderFields[cf.num] = cf diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go deleted file mode 100644 index 41c1f74ef8..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2024 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 impl - -import ( - "fmt" - "reflect" - "sort" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/encoding/messageset" - "google.golang.org/protobuf/internal/order" - "google.golang.org/protobuf/reflect/protoreflect" - piface "google.golang.org/protobuf/runtime/protoiface" -) - -func (mi *MessageInfo) makeOpaqueCoderMethods(t reflect.Type, si opaqueStructInfo) { - mi.sizecacheOffset = si.sizecacheOffset - mi.unknownOffset = si.unknownOffset - mi.unknownPtrKind = si.unknownType.Kind() == reflect.Ptr - mi.extensionOffset = si.extensionOffset - mi.lazyOffset = si.lazyOffset - mi.presenceOffset = si.presenceOffset - - mi.coderFields = make(map[protowire.Number]*coderFieldInfo) - fields := mi.Desc.Fields() - for i := 0; i < fields.Len(); i++ { - fd := fields.Get(i) - - fs := si.fieldsByNumber[fd.Number()] - if fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic() { - fs = si.oneofsByName[fd.ContainingOneof().Name()] - } - ft := fs.Type - var wiretag uint64 - if !fd.IsPacked() { - wiretag = protowire.EncodeTag(fd.Number(), wireTypes[fd.Kind()]) - } else { - wiretag = protowire.EncodeTag(fd.Number(), protowire.BytesType) - } - var fieldOffset offset - var funcs pointerCoderFuncs - var childMessage *MessageInfo - switch { - case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): - fieldOffset = offsetOf(fs) - case fd.Message() != nil && !fd.IsMap(): - fieldOffset = offsetOf(fs) - if fd.IsList() { - childMessage, funcs = makeOpaqueRepeatedMessageFieldCoder(fd, ft) - } else { - childMessage, funcs = makeOpaqueMessageFieldCoder(fd, ft) - } - default: - fieldOffset = offsetOf(fs) - childMessage, funcs = fieldCoder(fd, ft) - } - cf := &coderFieldInfo{ - num: fd.Number(), - offset: fieldOffset, - wiretag: wiretag, - ft: ft, - tagsize: protowire.SizeVarint(wiretag), - funcs: funcs, - mi: childMessage, - validation: newFieldValidationInfo(mi, si.structInfo, fd, ft), - isPointer: (fd.Cardinality() == protoreflect.Repeated || - fd.Kind() == protoreflect.MessageKind || - fd.Kind() == protoreflect.GroupKind), - isRequired: fd.Cardinality() == protoreflect.Required, - presenceIndex: noPresence, - } - - // TODO: Use presence for all fields. - // - // In some cases, such as maps, presence means only "might be set" rather - // than "is definitely set", but every field should have a presence bit to - // permit us to skip over definitely-unset fields at marshal time. - - var hasPresence bool - hasPresence, cf.isLazy = usePresenceForField(si, fd) - - if hasPresence { - cf.presenceIndex, mi.presenceSize = presenceIndex(mi.Desc, fd) - } - - mi.orderedCoderFields = append(mi.orderedCoderFields, cf) - mi.coderFields[cf.num] = cf - } - for i, oneofs := 0, mi.Desc.Oneofs(); i < oneofs.Len(); i++ { - if od := oneofs.Get(i); !od.IsSynthetic() { - mi.initOneofFieldCoders(od, si.structInfo) - } - } - if messageset.IsMessageSet(mi.Desc) { - if !mi.extensionOffset.IsValid() { - panic(fmt.Sprintf("%v: MessageSet with no extensions field", mi.Desc.FullName())) - } - if !mi.unknownOffset.IsValid() { - panic(fmt.Sprintf("%v: MessageSet with no unknown field", mi.Desc.FullName())) - } - mi.isMessageSet = true - } - sort.Slice(mi.orderedCoderFields, func(i, j int) bool { - return mi.orderedCoderFields[i].num < mi.orderedCoderFields[j].num - }) - - var maxDense protoreflect.FieldNumber - for _, cf := range mi.orderedCoderFields { - if cf.num >= 16 && cf.num >= 2*maxDense { - break - } - maxDense = cf.num - } - mi.denseCoderFields = make([]*coderFieldInfo, maxDense+1) - for _, cf := range mi.orderedCoderFields { - if int(cf.num) > len(mi.denseCoderFields) { - break - } - mi.denseCoderFields[cf.num] = cf - } - - // To preserve compatibility with historic wire output, marshal oneofs last. - if mi.Desc.Oneofs().Len() > 0 { - sort.Slice(mi.orderedCoderFields, func(i, j int) bool { - fi := fields.ByNumber(mi.orderedCoderFields[i].num) - fj := fields.ByNumber(mi.orderedCoderFields[j].num) - return order.LegacyFieldOrder(fi, fj) - }) - } - - mi.needsInitCheck = needsInitCheck(mi.Desc) - if mi.methods.Marshal == nil && mi.methods.Size == nil { - mi.methods.Flags |= piface.SupportMarshalDeterministic - mi.methods.Marshal = mi.marshal - mi.methods.Size = mi.size - } - if mi.methods.Unmarshal == nil { - mi.methods.Flags |= piface.SupportUnmarshalDiscardUnknown - mi.methods.Unmarshal = mi.unmarshal - } - if mi.methods.CheckInitialized == nil { - mi.methods.CheckInitialized = mi.checkInitialized - } - if mi.methods.Merge == nil { - mi.methods.Merge = mi.merge - } - if mi.methods.Equal == nil { - mi.methods.Equal = equal - } -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/convert_map.go index e4580b3ac2..304244a651 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/convert_map.go @@ -101,7 +101,7 @@ func (ms *mapReflect) Mutable(k protoreflect.MapKey) protoreflect.Value { return v } func (ms *mapReflect) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - iter := ms.v.MapRange() + iter := mapRange(ms.v) for iter.Next() { k := ms.keyConv.PBValueOf(iter.Key()).MapKey() v := ms.valConv.PBValueOf(iter.Value()) diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/decode.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/decode.go index e0dd21fa5f..cda0520c27 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/decode.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/decode.go @@ -34,8 +34,6 @@ func (o unmarshalOptions) Options() proto.UnmarshalOptions { AllowPartial: true, DiscardUnknown: o.DiscardUnknown(), Resolver: o.resolver, - - NoLazyDecoding: o.NoLazyDecoding(), } } @@ -43,26 +41,13 @@ func (o unmarshalOptions) DiscardUnknown() bool { return o.flags&protoiface.UnmarshalDiscardUnknown != 0 } -func (o unmarshalOptions) AliasBuffer() bool { return o.flags&protoiface.UnmarshalAliasBuffer != 0 } -func (o unmarshalOptions) Validated() bool { return o.flags&protoiface.UnmarshalValidated != 0 } -func (o unmarshalOptions) NoLazyDecoding() bool { - return o.flags&protoiface.UnmarshalNoLazyDecoding != 0 -} - -func (o unmarshalOptions) CanBeLazy() bool { - if o.resolver != protoregistry.GlobalTypes { - return false - } - // We ignore the UnmarshalInvalidateSizeCache even though it's not in the default set - return (o.flags & ^(protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated | protoiface.UnmarshalCheckRequired)) == 0 +func (o unmarshalOptions) IsDefault() bool { + return o.flags == 0 && o.resolver == protoregistry.GlobalTypes } var lazyUnmarshalOptions = unmarshalOptions{ resolver: protoregistry.GlobalTypes, - - flags: protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated, - - depth: protowire.DefaultRecursionLimit, + depth: protowire.DefaultRecursionLimit, } type unmarshalOutput struct { @@ -109,30 +94,9 @@ func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire. if flags.ProtoLegacy && mi.isMessageSet { return unmarshalMessageSet(mi, b, p, opts) } - - lazyDecoding := LazyEnabled() // default - if opts.NoLazyDecoding() { - lazyDecoding = false // explicitly disabled - } - if mi.lazyOffset.IsValid() && lazyDecoding { - return mi.unmarshalPointerLazy(b, p, groupTag, opts) - } - return mi.unmarshalPointerEager(b, p, groupTag, opts) -} - -// unmarshalPointerEager is the message unmarshalling function for all messages that are not lazy. -// The corresponding function for Lazy is in google_lazy.go. -func (mi *MessageInfo) unmarshalPointerEager(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { - initialized := true var requiredMask uint64 var exts *map[int32]ExtensionField - - var presence presence - if mi.presenceOffset.IsValid() { - presence = p.Apply(mi.presenceOffset).PresenceInfo() - } - start := len(b) for len(b) > 0 { // Parse the tag (field number and wire type). @@ -190,11 +154,6 @@ func (mi *MessageInfo) unmarshalPointerEager(b []byte, p pointer, groupTag proto if f.funcs.isInit != nil && !o.initialized { initialized = false } - - if f.presenceIndex != noPresence { - presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) - } - default: // Possible extension. if exts == nil && mi.extensionOffset.IsValid() { @@ -263,7 +222,7 @@ func (mi *MessageInfo) unmarshalExtension(b []byte, num protowire.Number, wtyp p return out, errUnknown } if flags.LazyUnmarshalExtensions { - if opts.CanBeLazy() && x.canLazy(xt) { + if opts.IsDefault() && x.canLazy(xt) { out, valid := skipExtension(b, xi, num, wtyp, opts) switch valid { case ValidationValid: @@ -311,13 +270,6 @@ func skipExtension(b []byte, xi *extensionFieldInfo, num protowire.Number, wtyp if n < 0 { return out, ValidationUnknown } - - if opts.Validated() { - out.initialized = true - out.n = n - return out, ValidationValid - } - out, st := xi.validation.mi.validate(v, 0, opts) out.n = n return out, st diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/encode.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/encode.go index b2e212291d..6254f5de41 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/encode.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/encode.go @@ -10,7 +10,6 @@ import ( "sync/atomic" "google.golang.org/protobuf/internal/flags" - "google.golang.org/protobuf/internal/protolazy" "google.golang.org/protobuf/proto" piface "google.golang.org/protobuf/runtime/protoiface" ) @@ -72,39 +71,11 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int e := p.Apply(mi.extensionOffset).Extensions() size += mi.sizeExtensions(e, opts) } - - var lazy **protolazy.XXX_lazyUnmarshalInfo - var presence presence - if mi.presenceOffset.IsValid() { - presence = p.Apply(mi.presenceOffset).PresenceInfo() - if mi.lazyOffset.IsValid() { - lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() - } - } - for _, f := range mi.orderedCoderFields { if f.funcs.size == nil { continue } fptr := p.Apply(f.offset) - - if f.presenceIndex != noPresence { - if !presence.Present(f.presenceIndex) { - continue - } - - if f.isLazy && fptr.AtomicGetPointer().IsNil() { - if lazyFields(opts) { - size += (*lazy).SizeField(uint32(f.num)) - continue - } else { - mi.lazyUnmarshal(p, f.num) - } - } - size += f.funcs.size(fptr, f, opts) - continue - } - if f.isPointer && fptr.Elem().IsNil() { continue } @@ -163,52 +134,11 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt return b, err } } - - var lazy **protolazy.XXX_lazyUnmarshalInfo - var presence presence - if mi.presenceOffset.IsValid() { - presence = p.Apply(mi.presenceOffset).PresenceInfo() - if mi.lazyOffset.IsValid() { - lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() - } - } - for _, f := range mi.orderedCoderFields { if f.funcs.marshal == nil { continue } fptr := p.Apply(f.offset) - - if f.presenceIndex != noPresence { - if !presence.Present(f.presenceIndex) { - continue - } - if f.isLazy { - // Be careful, this field needs to be read atomically, like for a get - if f.isPointer && fptr.AtomicGetPointer().IsNil() { - if lazyFields(opts) { - b, _ = (*lazy).AppendField(b, uint32(f.num)) - continue - } else { - mi.lazyUnmarshal(p, f.num) - } - } - - b, err = f.funcs.marshal(b, fptr, f, opts) - if err != nil { - return b, err - } - continue - } else if f.isPointer && fptr.Elem().IsNil() { - continue - } - b, err = f.funcs.marshal(b, fptr, f, opts) - if err != nil { - return b, err - } - continue - } - if f.isPointer && fptr.Elem().IsNil() { continue } @@ -233,14 +163,6 @@ func fullyLazyExtensions(opts marshalOptions) bool { return opts.flags&piface.MarshalDeterministic == 0 } -// lazyFields returns true if we should attempt to keep fields lazy over size and marshal. -func lazyFields(opts marshalOptions) bool { - // When deterministic marshaling is requested, force an unmarshal for lazy - // fields to produce a deterministic result, instead of passing through - // bytes lazily that may or may not match what Go Protobuf would produce. - return opts.flags&piface.MarshalDeterministic == 0 -} - func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { if ext == nil { return 0 diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/lazy.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/lazy.go deleted file mode 100644 index c7de31e243..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/lazy.go +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright 2024 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 impl - -import ( - "fmt" - "math/bits" - "os" - "reflect" - "sort" - "sync/atomic" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/internal/protolazy" - "google.golang.org/protobuf/reflect/protoreflect" - preg "google.golang.org/protobuf/reflect/protoregistry" - piface "google.golang.org/protobuf/runtime/protoiface" -) - -var enableLazy int32 = func() int32 { - if os.Getenv("GOPROTODEBUG") == "nolazy" { - return 0 - } - return 1 -}() - -// EnableLazyUnmarshal enables lazy unmarshaling. -func EnableLazyUnmarshal(enable bool) { - if enable { - atomic.StoreInt32(&enableLazy, 1) - return - } - atomic.StoreInt32(&enableLazy, 0) -} - -// LazyEnabled reports whether lazy unmarshalling is currently enabled. -func LazyEnabled() bool { - return atomic.LoadInt32(&enableLazy) != 0 -} - -// UnmarshalField unmarshals a field in a message. -func UnmarshalField(m interface{}, num protowire.Number) { - switch m := m.(type) { - case *messageState: - m.messageInfo().lazyUnmarshal(m.pointer(), num) - case *messageReflectWrapper: - m.messageInfo().lazyUnmarshal(m.pointer(), num) - default: - panic(fmt.Sprintf("unsupported wrapper type %T", m)) - } -} - -func (mi *MessageInfo) lazyUnmarshal(p pointer, num protoreflect.FieldNumber) { - var f *coderFieldInfo - if int(num) < len(mi.denseCoderFields) { - f = mi.denseCoderFields[num] - } else { - f = mi.coderFields[num] - } - if f == nil { - panic(fmt.Sprintf("lazyUnmarshal: field info for %v.%v", mi.Desc.FullName(), num)) - } - lazy := *p.Apply(mi.lazyOffset).LazyInfoPtr() - start, end, found, _, multipleEntries := lazy.FindFieldInProto(uint32(num)) - if !found && multipleEntries == nil { - panic(fmt.Sprintf("lazyUnmarshal: can't find field data for %v.%v", mi.Desc.FullName(), num)) - } - // The actual pointer in the message can not be set until the whole struct is filled in, otherwise we will have races. - // Create another pointer and set it atomically, if we won the race and the pointer in the original message is still nil. - fp := pointerOfValue(reflect.New(f.ft)) - if multipleEntries != nil { - for _, entry := range multipleEntries { - mi.unmarshalField(lazy.Buffer()[entry.Start:entry.End], fp, f, lazy, lazy.UnmarshalFlags()) - } - } else { - mi.unmarshalField(lazy.Buffer()[start:end], fp, f, lazy, lazy.UnmarshalFlags()) - } - p.Apply(f.offset).AtomicSetPointerIfNil(fp.Elem()) -} - -func (mi *MessageInfo) unmarshalField(b []byte, p pointer, f *coderFieldInfo, lazyInfo *protolazy.XXX_lazyUnmarshalInfo, flags piface.UnmarshalInputFlags) error { - opts := lazyUnmarshalOptions - opts.flags |= flags - for len(b) > 0 { - // Parse the tag (field number and wire type). - var tag uint64 - if b[0] < 0x80 { - tag = uint64(b[0]) - b = b[1:] - } else if len(b) >= 2 && b[1] < 128 { - tag = uint64(b[0]&0x7f) + uint64(b[1])<<7 - b = b[2:] - } else { - var n int - tag, n = protowire.ConsumeVarint(b) - if n < 0 { - return errors.New("invalid wire data") - } - b = b[n:] - } - var num protowire.Number - if n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) { - return errors.New("invalid wire data") - } else { - num = protowire.Number(n) - } - wtyp := protowire.Type(tag & 7) - if num == f.num { - o, err := f.funcs.unmarshal(b, p, wtyp, f, opts) - if err == nil { - b = b[o.n:] - continue - } - if err != errUnknown { - return err - } - } - n := protowire.ConsumeFieldValue(num, wtyp, b) - if n < 0 { - return errors.New("invalid wire data") - } - b = b[n:] - } - return nil -} - -func (mi *MessageInfo) skipField(b []byte, f *coderFieldInfo, wtyp protowire.Type, opts unmarshalOptions) (out unmarshalOutput, _ ValidationStatus) { - fmi := f.validation.mi - if fmi == nil { - fd := mi.Desc.Fields().ByNumber(f.num) - if fd == nil { - return out, ValidationUnknown - } - messageName := fd.Message().FullName() - messageType, err := preg.GlobalTypes.FindMessageByName(messageName) - if err != nil { - return out, ValidationUnknown - } - var ok bool - fmi, ok = messageType.(*MessageInfo) - if !ok { - return out, ValidationUnknown - } - } - fmi.init() - switch f.validation.typ { - case validationTypeMessage: - if wtyp != protowire.BytesType { - return out, ValidationWrongWireType - } - v, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, ValidationInvalid - } - out, st := fmi.validate(v, 0, opts) - out.n = n - return out, st - case validationTypeGroup: - if wtyp != protowire.StartGroupType { - return out, ValidationWrongWireType - } - out, st := fmi.validate(b, f.num, opts) - return out, st - default: - return out, ValidationUnknown - } -} - -// unmarshalPointerLazy is similar to unmarshalPointerEager, but it -// specifically handles lazy unmarshalling. it expects lazyOffset and -// presenceOffset to both be valid. -func (mi *MessageInfo) unmarshalPointerLazy(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { - initialized := true - var requiredMask uint64 - var lazy **protolazy.XXX_lazyUnmarshalInfo - var presence presence - var lazyIndex []protolazy.IndexEntry - var lastNum protowire.Number - outOfOrder := false - lazyDecode := false - presence = p.Apply(mi.presenceOffset).PresenceInfo() - lazy = p.Apply(mi.lazyOffset).LazyInfoPtr() - if !presence.AnyPresent(mi.presenceSize) { - if opts.CanBeLazy() { - // If the message contains existing data, we need to merge into it. - // Lazy unmarshaling doesn't merge, so only enable it when the - // message is empty (has no presence bitmap). - lazyDecode = true - if *lazy == nil { - *lazy = &protolazy.XXX_lazyUnmarshalInfo{} - } - (*lazy).SetUnmarshalFlags(opts.flags) - if !opts.AliasBuffer() { - // Make a copy of the buffer for lazy unmarshaling. - // Set the AliasBuffer flag so recursive unmarshal - // operations reuse the copy. - b = append([]byte{}, b...) - opts.flags |= piface.UnmarshalAliasBuffer - } - (*lazy).SetBuffer(b) - } - } - // Track special handling of lazy fields. - // - // In the common case, all fields are lazyValidateOnly (and lazyFields remains nil). - // In the event that validation for a field fails, this map tracks handling of the field. - type lazyAction uint8 - const ( - lazyValidateOnly lazyAction = iota // validate the field only - lazyUnmarshalNow // eagerly unmarshal the field - lazyUnmarshalLater // unmarshal the field after the message is fully processed - ) - var lazyFields map[*coderFieldInfo]lazyAction - var exts *map[int32]ExtensionField - start := len(b) - pos := 0 - for len(b) > 0 { - // Parse the tag (field number and wire type). - var tag uint64 - if b[0] < 0x80 { - tag = uint64(b[0]) - b = b[1:] - } else if len(b) >= 2 && b[1] < 128 { - tag = uint64(b[0]&0x7f) + uint64(b[1])<<7 - b = b[2:] - } else { - var n int - tag, n = protowire.ConsumeVarint(b) - if n < 0 { - return out, errDecode - } - b = b[n:] - } - var num protowire.Number - if n := tag >> 3; n < uint64(protowire.MinValidNumber) || n > uint64(protowire.MaxValidNumber) { - return out, errors.New("invalid field number") - } else { - num = protowire.Number(n) - } - wtyp := protowire.Type(tag & 7) - - if wtyp == protowire.EndGroupType { - if num != groupTag { - return out, errors.New("mismatching end group marker") - } - groupTag = 0 - break - } - - var f *coderFieldInfo - if int(num) < len(mi.denseCoderFields) { - f = mi.denseCoderFields[num] - } else { - f = mi.coderFields[num] - } - var n int - err := errUnknown - discardUnknown := false - Field: - switch { - case f != nil: - if f.funcs.unmarshal == nil { - break - } - if f.isLazy && lazyDecode { - switch { - case lazyFields == nil || lazyFields[f] == lazyValidateOnly: - // Attempt to validate this field and leave it for later lazy unmarshaling. - o, valid := mi.skipField(b, f, wtyp, opts) - switch valid { - case ValidationValid: - // Skip over the valid field and continue. - err = nil - presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) - requiredMask |= f.validation.requiredBit - if !o.initialized { - initialized = false - } - n = o.n - break Field - case ValidationInvalid: - return out, errors.New("invalid proto wire format") - case ValidationWrongWireType: - break Field - case ValidationUnknown: - if lazyFields == nil { - lazyFields = make(map[*coderFieldInfo]lazyAction) - } - if presence.Present(f.presenceIndex) { - // We were unable to determine if the field is valid or not, - // and we've already skipped over at least one instance of this - // field. Clear the presence bit (so if we stop decoding early, - // we don't leave a partially-initialized field around) and flag - // the field for unmarshaling before we return. - presence.ClearPresent(f.presenceIndex) - lazyFields[f] = lazyUnmarshalLater - discardUnknown = true - break Field - } else { - // We were unable to determine if the field is valid or not, - // but this is the first time we've seen it. Flag it as needing - // eager unmarshaling and fall through to the eager unmarshal case below. - lazyFields[f] = lazyUnmarshalNow - } - } - case lazyFields[f] == lazyUnmarshalLater: - // This field will be unmarshaled in a separate pass below. - // Skip over it here. - discardUnknown = true - break Field - default: - // Eagerly unmarshal the field. - } - } - if f.isLazy && !lazyDecode && presence.Present(f.presenceIndex) { - if p.Apply(f.offset).AtomicGetPointer().IsNil() { - mi.lazyUnmarshal(p, f.num) - } - } - var o unmarshalOutput - o, err = f.funcs.unmarshal(b, p.Apply(f.offset), wtyp, f, opts) - n = o.n - if err != nil { - break - } - requiredMask |= f.validation.requiredBit - if f.funcs.isInit != nil && !o.initialized { - initialized = false - } - if f.presenceIndex != noPresence { - presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) - } - default: - // Possible extension. - if exts == nil && mi.extensionOffset.IsValid() { - exts = p.Apply(mi.extensionOffset).Extensions() - if *exts == nil { - *exts = make(map[int32]ExtensionField) - } - } - if exts == nil { - break - } - var o unmarshalOutput - o, err = mi.unmarshalExtension(b, num, wtyp, *exts, opts) - if err != nil { - break - } - n = o.n - if !o.initialized { - initialized = false - } - } - if err != nil { - if err != errUnknown { - return out, err - } - n = protowire.ConsumeFieldValue(num, wtyp, b) - if n < 0 { - return out, errDecode - } - if !discardUnknown && !opts.DiscardUnknown() && mi.unknownOffset.IsValid() { - u := mi.mutableUnknownBytes(p) - *u = protowire.AppendTag(*u, num, wtyp) - *u = append(*u, b[:n]...) - } - } - b = b[n:] - end := start - len(b) - if lazyDecode && f != nil && f.isLazy { - if num != lastNum { - lazyIndex = append(lazyIndex, protolazy.IndexEntry{ - FieldNum: uint32(num), - Start: uint32(pos), - End: uint32(end), - }) - } else { - i := len(lazyIndex) - 1 - lazyIndex[i].End = uint32(end) - lazyIndex[i].MultipleContiguous = true - } - } - if num < lastNum { - outOfOrder = true - } - pos = end - lastNum = num - } - if groupTag != 0 { - return out, errors.New("missing end group marker") - } - if lazyFields != nil { - // Some fields failed validation, and now need to be unmarshaled. - for f, action := range lazyFields { - if action != lazyUnmarshalLater { - continue - } - initialized = false - if *lazy == nil { - *lazy = &protolazy.XXX_lazyUnmarshalInfo{} - } - if err := mi.unmarshalField((*lazy).Buffer(), p.Apply(f.offset), f, *lazy, opts.flags); err != nil { - return out, err - } - presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) - } - } - if lazyDecode { - if outOfOrder { - sort.Slice(lazyIndex, func(i, j int) bool { - return lazyIndex[i].FieldNum < lazyIndex[j].FieldNum || - (lazyIndex[i].FieldNum == lazyIndex[j].FieldNum && - lazyIndex[i].Start < lazyIndex[j].Start) - }) - } - if *lazy == nil { - *lazy = &protolazy.XXX_lazyUnmarshalInfo{} - } - - (*lazy).SetIndex(lazyIndex) - } - if mi.numRequiredFields > 0 && bits.OnesCount64(requiredMask) != int(mi.numRequiredFields) { - initialized = false - } - if initialized { - out.initialized = true - } - out.n = start - len(b) - return out, nil -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go index a51dffbe29..bf0b6049b4 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go @@ -310,9 +310,12 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, fd.L0.Parent = md fd.L0.Index = n - if fd.L1.EditionFeatures.IsPacked { + if fd.L1.IsWeak || fd.L1.EditionFeatures.IsPacked { fd.L1.Options = func() protoreflect.ProtoMessage { opts := descopts.Field.ProtoReflect().New() + if fd.L1.IsWeak { + opts.Set(opts.Descriptor().Fields().ByName("weak"), protoreflect.ValueOfBool(true)) + } if fd.L1.EditionFeatures.IsPacked { opts.Set(opts.Descriptor().Fields().ByName("packed"), protoreflect.ValueOfBool(fd.L1.EditionFeatures.IsPacked)) } diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/merge.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/merge.go index 8ffdce67d3..7e65f64f28 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/merge.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/merge.go @@ -41,38 +41,11 @@ func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) { if src.IsNil() { return } - - var presenceSrc presence - var presenceDst presence - if mi.presenceOffset.IsValid() { - presenceSrc = src.Apply(mi.presenceOffset).PresenceInfo() - presenceDst = dst.Apply(mi.presenceOffset).PresenceInfo() - } - for _, f := range mi.orderedCoderFields { if f.funcs.merge == nil { continue } sfptr := src.Apply(f.offset) - - if f.presenceIndex != noPresence { - if !presenceSrc.Present(f.presenceIndex) { - continue - } - dfptr := dst.Apply(f.offset) - if f.isLazy { - if sfptr.AtomicGetPointer().IsNil() { - mi.lazyUnmarshal(src, f.num) - } - if presenceDst.Present(f.presenceIndex) && dfptr.AtomicGetPointer().IsNil() { - mi.lazyUnmarshal(dst, f.num) - } - } - f.funcs.merge(dst.Apply(f.offset), sfptr, f, opts) - presenceDst.SetPresentUnatomic(f.presenceIndex, mi.presenceSize) - continue - } - if f.isPointer && sfptr.Elem().IsNil() { continue } diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/message.go index d50423dcb7..741b5ed29c 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/message.go @@ -14,6 +14,7 @@ import ( "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" ) // MessageInfo provides protobuf related functionality for a given Go type @@ -78,9 +79,6 @@ func (mi *MessageInfo) initOnce() { if mi.initDone == 1 { return } - if opaqueInitHook(mi) { - return - } t := mi.GoReflectType if t.Kind() != reflect.Ptr && t.Elem().Kind() != reflect.Struct { @@ -119,6 +117,7 @@ type ( var ( sizecacheType = reflect.TypeOf(SizeCache(0)) + weakFieldsType = reflect.TypeOf(WeakFields(nil)) unknownFieldsAType = reflect.TypeOf(unknownFieldsA(nil)) unknownFieldsBType = reflect.TypeOf(unknownFieldsB(nil)) extensionFieldsType = reflect.TypeOf(ExtensionFields(nil)) @@ -127,14 +126,13 @@ var ( type structInfo struct { sizecacheOffset offset sizecacheType reflect.Type + weakOffset offset + weakType reflect.Type unknownOffset offset unknownType reflect.Type extensionOffset offset extensionType reflect.Type - lazyOffset offset - presenceOffset offset - fieldsByNumber map[protoreflect.FieldNumber]reflect.StructField oneofsByName map[protoreflect.Name]reflect.StructField oneofWrappersByType map[reflect.Type]protoreflect.FieldNumber @@ -144,10 +142,9 @@ type structInfo struct { func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo { si := structInfo{ sizecacheOffset: invalidOffset, + weakOffset: invalidOffset, unknownOffset: invalidOffset, extensionOffset: invalidOffset, - lazyOffset: invalidOffset, - presenceOffset: invalidOffset, fieldsByNumber: map[protoreflect.FieldNumber]reflect.StructField{}, oneofsByName: map[protoreflect.Name]reflect.StructField{}, @@ -160,23 +157,24 @@ fieldLoop: switch f := t.Field(i); f.Name { case genid.SizeCache_goname, genid.SizeCacheA_goname: if f.Type == sizecacheType { - si.sizecacheOffset = offsetOf(f) + si.sizecacheOffset = offsetOf(f, mi.Exporter) si.sizecacheType = f.Type } + case genid.WeakFields_goname, genid.WeakFieldsA_goname: + if f.Type == weakFieldsType { + si.weakOffset = offsetOf(f, mi.Exporter) + si.weakType = f.Type + } case genid.UnknownFields_goname, genid.UnknownFieldsA_goname: if f.Type == unknownFieldsAType || f.Type == unknownFieldsBType { - si.unknownOffset = offsetOf(f) + si.unknownOffset = offsetOf(f, mi.Exporter) si.unknownType = f.Type } case genid.ExtensionFields_goname, genid.ExtensionFieldsA_goname, genid.ExtensionFieldsB_goname: if f.Type == extensionFieldsType { - si.extensionOffset = offsetOf(f) + si.extensionOffset = offsetOf(f, mi.Exporter) si.extensionType = f.Type } - case "lazyFields", "XXX_lazyUnmarshalInfo": - si.lazyOffset = offsetOf(f) - case "XXX_presence": - si.presenceOffset = offsetOf(f) default: for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") { if len(s) > 0 && strings.Trim(s, "0123456789") == "" { @@ -246,6 +244,9 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType { mi.init() fd := mi.Desc.Fields().Get(i) switch { + case fd.IsWeak(): + mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName()) + return mt case fd.IsMap(): return mapEntryType{fd.Message(), mi.fieldTypes[fd.Number()]} default: diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go deleted file mode 100644 index dd55e8e009..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +++ /dev/null @@ -1,627 +0,0 @@ -// Copyright 2024 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 impl - -import ( - "fmt" - "math" - "reflect" - "strings" - "sync/atomic" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -type opaqueStructInfo struct { - structInfo -} - -// isOpaque determines whether a protobuf message type is on the Opaque API. It -// checks whether the type is a Go struct that protoc-gen-go would generate. -// -// This function only detects newly generated messages from the v2 -// implementation of protoc-gen-go. It is unable to classify generated messages -// that are too old or those that are generated by a different generator -// such as protoc-gen-gogo. -func isOpaque(t reflect.Type) bool { - // The current detection mechanism is to simply check the first field - // for a struct tag with the "protogen" key. - if t.Kind() == reflect.Struct && t.NumField() > 0 { - pgt := t.Field(0).Tag.Get("protogen") - return strings.HasPrefix(pgt, "opaque.") - } - return false -} - -func opaqueInitHook(mi *MessageInfo) bool { - mt := mi.GoReflectType.Elem() - si := opaqueStructInfo{ - structInfo: mi.makeStructInfo(mt), - } - - if !isOpaque(mt) { - return false - } - - defer atomic.StoreUint32(&mi.initDone, 1) - - mi.fields = map[protoreflect.FieldNumber]*fieldInfo{} - fds := mi.Desc.Fields() - for i := 0; i < fds.Len(); i++ { - fd := fds.Get(i) - fs := si.fieldsByNumber[fd.Number()] - var fi fieldInfo - usePresence, _ := usePresenceForField(si, fd) - - switch { - case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): - // Oneofs are no different for opaque. - fi = fieldInfoForOneof(fd, si.oneofsByName[fd.ContainingOneof().Name()], mi.Exporter, si.oneofWrappersByNumber[fd.Number()]) - case fd.IsMap(): - fi = mi.fieldInfoForMapOpaque(si, fd, fs) - case fd.IsList() && fd.Message() == nil && usePresence: - fi = mi.fieldInfoForScalarListOpaque(si, fd, fs) - case fd.IsList() && fd.Message() == nil: - // Proto3 lists without presence can use same access methods as open - fi = fieldInfoForList(fd, fs, mi.Exporter) - case fd.IsList() && usePresence: - fi = mi.fieldInfoForMessageListOpaque(si, fd, fs) - case fd.IsList(): - // Proto3 opaque messages that does not need presence bitmap. - // Different representation than open struct, but same logic - fi = mi.fieldInfoForMessageListOpaqueNoPresence(si, fd, fs) - case fd.Message() != nil && usePresence: - fi = mi.fieldInfoForMessageOpaque(si, fd, fs) - case fd.Message() != nil: - // Proto3 messages without presence can use same access methods as open - fi = fieldInfoForMessage(fd, fs, mi.Exporter) - default: - fi = mi.fieldInfoForScalarOpaque(si, fd, fs) - } - mi.fields[fd.Number()] = &fi - } - mi.oneofs = map[protoreflect.Name]*oneofInfo{} - for i := 0; i < mi.Desc.Oneofs().Len(); i++ { - od := mi.Desc.Oneofs().Get(i) - mi.oneofs[od.Name()] = makeOneofInfoOpaque(mi, od, si.structInfo, mi.Exporter) - } - - mi.denseFields = make([]*fieldInfo, fds.Len()*2) - for i := 0; i < fds.Len(); i++ { - if fd := fds.Get(i); int(fd.Number()) < len(mi.denseFields) { - mi.denseFields[fd.Number()] = mi.fields[fd.Number()] - } - } - - for i := 0; i < fds.Len(); { - fd := fds.Get(i) - if od := fd.ContainingOneof(); od != nil && !fd.ContainingOneof().IsSynthetic() { - mi.rangeInfos = append(mi.rangeInfos, mi.oneofs[od.Name()]) - i += od.Fields().Len() - } else { - mi.rangeInfos = append(mi.rangeInfos, mi.fields[fd.Number()]) - i++ - } - } - - mi.makeExtensionFieldsFunc(mt, si.structInfo) - mi.makeUnknownFieldsFunc(mt, si.structInfo) - mi.makeOpaqueCoderMethods(mt, si) - mi.makeFieldTypes(si.structInfo) - - return true -} - -func makeOneofInfoOpaque(mi *MessageInfo, od protoreflect.OneofDescriptor, si structInfo, x exporter) *oneofInfo { - oi := &oneofInfo{oneofDesc: od} - if od.IsSynthetic() { - fd := od.Fields().Get(0) - index, _ := presenceIndex(mi.Desc, fd) - oi.which = func(p pointer) protoreflect.FieldNumber { - if p.IsNil() { - return 0 - } - if !mi.present(p, index) { - return 0 - } - return od.Fields().Get(0).Number() - } - return oi - } - // Dispatch to non-opaque oneof implementation for non-synthetic oneofs. - return makeOneofInfo(od, si, x) -} - -func (mi *MessageInfo) fieldInfoForMapOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { - ft := fs.Type - if ft.Kind() != reflect.Map { - panic(fmt.Sprintf("invalid type: got %v, want map kind", ft)) - } - fieldOffset := offsetOf(fs) - conv := NewConverter(ft, fd) - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - // Don't bother checking presence bits, since we need to - // look at the map length even if the presence bit is set. - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - return rv.Len() > 0 - }, - clear: func(p pointer) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(reflect.Zero(rv.Type())) - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.Len() == 0 { - return conv.Zero() - } - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - pv := conv.GoValueOf(v) - if pv.IsNil() { - panic(fmt.Sprintf("invalid value: setting map field to read-only value")) - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(pv) - }, - mutable: func(p pointer) protoreflect.Value { - v := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if v.IsNil() { - v.Set(reflect.MakeMap(fs.Type)) - } - return conv.PBValueOf(v) - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -func (mi *MessageInfo) fieldInfoForScalarListOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { - ft := fs.Type - if ft.Kind() != reflect.Slice { - panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft)) - } - conv := NewConverter(reflect.PtrTo(ft), fd) - fieldOffset := offsetOf(fs) - index, _ := presenceIndex(mi.Desc, fd) - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - return rv.Len() > 0 - }, - clear: func(p pointer) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(reflect.Zero(rv.Type())) - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type) - if rv.Elem().Len() == 0 { - return conv.Zero() - } - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - pv := conv.GoValueOf(v) - if pv.IsNil() { - panic(fmt.Sprintf("invalid value: setting repeated field to read-only value")) - } - mi.setPresent(p, index) - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(pv.Elem()) - }, - mutable: func(p pointer) protoreflect.Value { - mi.setPresent(p, index) - return conv.PBValueOf(p.Apply(fieldOffset).AsValueOf(fs.Type)) - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -func (mi *MessageInfo) fieldInfoForMessageListOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { - ft := fs.Type - if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice { - panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft)) - } - conv := NewConverter(ft, fd) - fieldOffset := offsetOf(fs) - index, _ := presenceIndex(mi.Desc, fd) - fieldNumber := fd.Number() - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - if !mi.present(p, index) { - return false - } - sp := p.Apply(fieldOffset).AtomicGetPointer() - if sp.IsNil() { - // Lazily unmarshal this field. - mi.lazyUnmarshal(p, fieldNumber) - sp = p.Apply(fieldOffset).AtomicGetPointer() - } - rv := sp.AsValueOf(fs.Type.Elem()) - return rv.Elem().Len() > 0 - }, - clear: func(p pointer) { - fp := p.Apply(fieldOffset) - sp := fp.AtomicGetPointer() - if sp.IsNil() { - sp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem()))) - mi.setPresent(p, index) - } - rv := sp.AsValueOf(fs.Type.Elem()) - rv.Elem().Set(reflect.Zero(rv.Type().Elem())) - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - if !mi.present(p, index) { - return conv.Zero() - } - sp := p.Apply(fieldOffset).AtomicGetPointer() - if sp.IsNil() { - // Lazily unmarshal this field. - mi.lazyUnmarshal(p, fieldNumber) - sp = p.Apply(fieldOffset).AtomicGetPointer() - } - rv := sp.AsValueOf(fs.Type.Elem()) - if rv.Elem().Len() == 0 { - return conv.Zero() - } - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - fp := p.Apply(fieldOffset) - sp := fp.AtomicGetPointer() - if sp.IsNil() { - sp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem()))) - mi.setPresent(p, index) - } - rv := sp.AsValueOf(fs.Type.Elem()) - val := conv.GoValueOf(v) - if val.IsNil() { - panic(fmt.Sprintf("invalid value: setting repeated field to read-only value")) - } else { - rv.Elem().Set(val.Elem()) - } - }, - mutable: func(p pointer) protoreflect.Value { - fp := p.Apply(fieldOffset) - sp := fp.AtomicGetPointer() - if sp.IsNil() { - if mi.present(p, index) { - // Lazily unmarshal this field. - mi.lazyUnmarshal(p, fieldNumber) - sp = p.Apply(fieldOffset).AtomicGetPointer() - } else { - sp = fp.AtomicSetPointerIfNil(pointerOfValue(reflect.New(fs.Type.Elem()))) - mi.setPresent(p, index) - } - } - rv := sp.AsValueOf(fs.Type.Elem()) - return conv.PBValueOf(rv) - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -func (mi *MessageInfo) fieldInfoForMessageListOpaqueNoPresence(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { - ft := fs.Type - if ft.Kind() != reflect.Ptr || ft.Elem().Kind() != reflect.Slice { - panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft)) - } - conv := NewConverter(ft, fd) - fieldOffset := offsetOf(fs) - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - sp := p.Apply(fieldOffset).AtomicGetPointer() - if sp.IsNil() { - return false - } - rv := sp.AsValueOf(fs.Type.Elem()) - return rv.Elem().Len() > 0 - }, - clear: func(p pointer) { - sp := p.Apply(fieldOffset).AtomicGetPointer() - if !sp.IsNil() { - rv := sp.AsValueOf(fs.Type.Elem()) - rv.Elem().Set(reflect.Zero(rv.Type().Elem())) - } - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - sp := p.Apply(fieldOffset).AtomicGetPointer() - if sp.IsNil() { - return conv.Zero() - } - rv := sp.AsValueOf(fs.Type.Elem()) - if rv.Elem().Len() == 0 { - return conv.Zero() - } - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.IsNil() { - rv.Set(reflect.New(fs.Type.Elem())) - } - val := conv.GoValueOf(v) - if val.IsNil() { - panic(fmt.Sprintf("invalid value: setting repeated field to read-only value")) - } else { - rv.Elem().Set(val.Elem()) - } - }, - mutable: func(p pointer) protoreflect.Value { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if rv.IsNil() { - rv.Set(reflect.New(fs.Type.Elem())) - } - return conv.PBValueOf(rv) - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -func (mi *MessageInfo) fieldInfoForScalarOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { - ft := fs.Type - nullable := fd.HasPresence() - if oneof := fd.ContainingOneof(); oneof != nil && oneof.IsSynthetic() { - nullable = true - } - deref := false - if nullable && ft.Kind() == reflect.Ptr { - ft = ft.Elem() - deref = true - } - conv := NewConverter(ft, fd) - fieldOffset := offsetOf(fs) - index, _ := presenceIndex(mi.Desc, fd) - var getter func(p pointer) protoreflect.Value - if !nullable { - getter = getterForDirectScalar(fd, fs, conv, fieldOffset) - } else { - getter = getterForOpaqueNullableScalar(mi, index, fd, fs, conv, fieldOffset) - } - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - if nullable { - return mi.present(p, index) - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - switch rv.Kind() { - case reflect.Bool: - return rv.Bool() - case reflect.Int32, reflect.Int64: - return rv.Int() != 0 - case reflect.Uint32, reflect.Uint64: - return rv.Uint() != 0 - case reflect.Float32, reflect.Float64: - return rv.Float() != 0 || math.Signbit(rv.Float()) - case reflect.String, reflect.Slice: - return rv.Len() > 0 - default: - panic(fmt.Sprintf("invalid type: %v", rv.Type())) // should never happen - } - }, - clear: func(p pointer) { - if nullable { - mi.clearPresent(p, index) - } - // This is only valuable for bytes and strings, but we do it unconditionally. - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - rv.Set(reflect.Zero(rv.Type())) - }, - get: getter, - // TODO: Implement unsafe fast path for set? - set: func(p pointer, v protoreflect.Value) { - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - if deref { - if rv.IsNil() { - rv.Set(reflect.New(ft)) - } - rv = rv.Elem() - } - - rv.Set(conv.GoValueOf(v)) - if nullable && rv.Kind() == reflect.Slice && rv.IsNil() { - rv.Set(emptyBytes) - } - if nullable { - mi.setPresent(p, index) - } - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -func (mi *MessageInfo) fieldInfoForMessageOpaque(si opaqueStructInfo, fd protoreflect.FieldDescriptor, fs reflect.StructField) fieldInfo { - ft := fs.Type - conv := NewConverter(ft, fd) - fieldOffset := offsetOf(fs) - index, _ := presenceIndex(mi.Desc, fd) - fieldNumber := fd.Number() - elemType := fs.Type.Elem() - return fieldInfo{ - fieldDesc: fd, - has: func(p pointer) bool { - if p.IsNil() { - return false - } - return mi.present(p, index) - }, - clear: func(p pointer) { - mi.clearPresent(p, index) - p.Apply(fieldOffset).AtomicSetNilPointer() - }, - get: func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - fp := p.Apply(fieldOffset) - mp := fp.AtomicGetPointer() - if mp.IsNil() { - // Lazily unmarshal this field. - mi.lazyUnmarshal(p, fieldNumber) - mp = fp.AtomicGetPointer() - } - rv := mp.AsValueOf(elemType) - return conv.PBValueOf(rv) - }, - set: func(p pointer, v protoreflect.Value) { - val := pointerOfValue(conv.GoValueOf(v)) - if val.IsNil() { - panic("invalid nil pointer") - } - p.Apply(fieldOffset).AtomicSetPointer(val) - mi.setPresent(p, index) - }, - mutable: func(p pointer) protoreflect.Value { - fp := p.Apply(fieldOffset) - mp := fp.AtomicGetPointer() - if mp.IsNil() { - if mi.present(p, index) { - // Lazily unmarshal this field. - mi.lazyUnmarshal(p, fieldNumber) - mp = fp.AtomicGetPointer() - } else { - mp = pointerOfValue(conv.GoValueOf(conv.New())) - fp.AtomicSetPointer(mp) - mi.setPresent(p, index) - } - } - return conv.PBValueOf(mp.AsValueOf(fs.Type.Elem())) - }, - newMessage: func() protoreflect.Message { - return conv.New().Message() - }, - newField: func() protoreflect.Value { - return conv.New() - }, - } -} - -// A presenceList wraps a List, updating presence bits as necessary when the -// list contents change. -type presenceList struct { - pvalueList - setPresence func(bool) -} -type pvalueList interface { - protoreflect.List - //Unwrapper -} - -func (list presenceList) Append(v protoreflect.Value) { - list.pvalueList.Append(v) - list.setPresence(true) -} -func (list presenceList) Truncate(i int) { - list.pvalueList.Truncate(i) - list.setPresence(i > 0) -} - -// presenceIndex returns the index to pass to presence functions. -// -// TODO: field.Desc.Index() would be simpler, and would give space to record the presence of oneof fields. -func presenceIndex(md protoreflect.MessageDescriptor, fd protoreflect.FieldDescriptor) (uint32, presenceSize) { - found := false - var index, numIndices uint32 - for i := 0; i < md.Fields().Len(); i++ { - f := md.Fields().Get(i) - if f == fd { - found = true - index = numIndices - } - if f.ContainingOneof() == nil || isLastOneofField(f) { - numIndices++ - } - } - if !found { - panic(fmt.Sprintf("BUG: %v not in %v", fd.Name(), md.FullName())) - } - return index, presenceSize(numIndices) -} - -func isLastOneofField(fd protoreflect.FieldDescriptor) bool { - fields := fd.ContainingOneof().Fields() - return fields.Get(fields.Len()-1) == fd -} - -func (mi *MessageInfo) setPresent(p pointer, index uint32) { - p.Apply(mi.presenceOffset).PresenceInfo().SetPresent(index, mi.presenceSize) -} - -func (mi *MessageInfo) clearPresent(p pointer, index uint32) { - p.Apply(mi.presenceOffset).PresenceInfo().ClearPresent(index) -} - -func (mi *MessageInfo) present(p pointer, index uint32) bool { - return p.Apply(mi.presenceOffset).PresenceInfo().Present(index) -} - -// usePresenceForField implements the somewhat intricate logic of when -// the presence bitmap is used for a field. The main logic is that a -// field that is optional or that can be lazy will use the presence -// bit, but for proto2, also maps have a presence bit. It also records -// if the field can ever be lazy, which is true if we have a -// lazyOffset and the field is a message or a slice of messages. A -// field that is lazy will always need a presence bit. Oneofs are not -// lazy and do not use presence, unless they are a synthetic oneof, -// which is a proto3 optional field. For proto3 optionals, we use the -// presence and they can also be lazy when applicable (a message). -func usePresenceForField(si opaqueStructInfo, fd protoreflect.FieldDescriptor) (usePresence, canBeLazy bool) { - hasLazyField := fd.(interface{ IsLazy() bool }).IsLazy() - - // Non-oneof scalar fields with explicit field presence use the presence array. - usesPresenceArray := fd.HasPresence() && fd.Message() == nil && (fd.ContainingOneof() == nil || fd.ContainingOneof().IsSynthetic()) - switch { - case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): - return false, false - case fd.IsMap(): - return false, false - case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind: - return hasLazyField, hasLazyField - default: - return usesPresenceArray || (hasLazyField && fd.HasPresence()), false - } -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go deleted file mode 100644 index a69825699a..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_opaque_gen.go +++ /dev/null @@ -1,132 +0,0 @@ -// 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. - -// Code generated by generate-types. DO NOT EDIT. - -package impl - -import ( - "reflect" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -func getterForOpaqueNullableScalar(mi *MessageInfo, index uint32, fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value { - ft := fs.Type - if ft.Kind() == reflect.Ptr { - ft = ft.Elem() - } - if fd.Kind() == protoreflect.EnumKind { - // Enums for nullable opaque types. - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - return conv.PBValueOf(rv) - } - } - switch ft.Kind() { - case reflect.Bool: - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).Bool() - return protoreflect.ValueOfBool(*x) - } - case reflect.Int32: - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).Int32() - return protoreflect.ValueOfInt32(*x) - } - case reflect.Uint32: - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).Uint32() - return protoreflect.ValueOfUint32(*x) - } - case reflect.Int64: - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).Int64() - return protoreflect.ValueOfInt64(*x) - } - case reflect.Uint64: - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).Uint64() - return protoreflect.ValueOfUint64(*x) - } - case reflect.Float32: - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).Float32() - return protoreflect.ValueOfFloat32(*x) - } - case reflect.Float64: - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).Float64() - return protoreflect.ValueOfFloat64(*x) - } - case reflect.String: - if fd.Kind() == protoreflect.BytesKind { - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).StringPtr() - if *x == nil { - return conv.Zero() - } - if len(**x) == 0 { - return protoreflect.ValueOfBytes(nil) - } - return protoreflect.ValueOfBytes([]byte(**x)) - } - } - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).StringPtr() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfString(**x) - } - case reflect.Slice: - if fd.Kind() == protoreflect.StringKind { - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).Bytes() - return protoreflect.ValueOfString(string(*x)) - } - } - return func(p pointer) protoreflect.Value { - if p.IsNil() || !mi.present(p, index) { - return conv.Zero() - } - x := p.Apply(fieldOffset).Bytes() - return protoreflect.ValueOfBytes(*x) - } - } - panic("unexpected protobuf kind: " + ft.Kind().String()) -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go index 0d20132fa2..ecb4623d70 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go @@ -72,6 +72,8 @@ func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) { fi = fieldInfoForMap(fd, fs, mi.Exporter) case fd.IsList(): fi = fieldInfoForList(fd, fs, mi.Exporter) + case fd.IsWeak(): + fi = fieldInfoForWeakMessage(fd, si.weakOffset) case fd.Message() != nil: fi = fieldInfoForMessage(fd, fs, mi.Exporter) default: @@ -203,11 +205,6 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { case fd.IsList(): if fd.Enum() != nil || fd.Message() != nil { ft = fs.Type.Elem() - - if ft.Kind() == reflect.Slice { - ft = ft.Elem() - } - } isMessage = fd.Message() != nil case fd.Enum() != nil: @@ -217,6 +214,9 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { } case fd.Message() != nil: ft = fs.Type + if fd.IsWeak() { + ft = nil + } isMessage = true } if isMessage && ft != nil && ft.Kind() != reflect.Ptr { diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go index 68d4ae32ec..986322b195 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go @@ -8,8 +8,11 @@ import ( "fmt" "math" "reflect" + "sync" + "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" ) type fieldInfo struct { @@ -73,7 +76,7 @@ func fieldInfoForOneof(fd protoreflect.FieldDescriptor, fs reflect.StructField, isMessage := fd.Message() != nil // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs) + fieldOffset := offsetOf(fs, x) return fieldInfo{ // NOTE: The logic below intentionally assumes that oneof fields are // well-formatted. That is, the oneof interface never contains a @@ -149,7 +152,7 @@ func fieldInfoForMap(fd protoreflect.FieldDescriptor, fs reflect.StructField, x conv := NewConverter(ft, fd) // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs) + fieldOffset := offsetOf(fs, x) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { @@ -202,7 +205,7 @@ func fieldInfoForList(fd protoreflect.FieldDescriptor, fs reflect.StructField, x conv := NewConverter(reflect.PtrTo(ft), fd) // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs) + fieldOffset := offsetOf(fs, x) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { @@ -253,7 +256,6 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, ft := fs.Type nullable := fd.HasPresence() isBytes := ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 - var getter func(p pointer) protoreflect.Value if nullable { if ft.Kind() != reflect.Ptr && ft.Kind() != reflect.Slice { // This never occurs for generated message types. @@ -266,25 +268,19 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, } } conv := NewConverter(ft, fd) - fieldOffset := offsetOf(fs) - - // Generate specialized getter functions to avoid going through reflect.Value - if nullable { - getter = getterForNullableScalar(fd, fs, conv, fieldOffset) - } else { - getter = getterForDirectScalar(fd, fs, conv, fieldOffset) - } + // TODO: Implement unsafe fast path? + fieldOffset := offsetOf(fs, x) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { if p.IsNil() { return false } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if nullable { - return !p.Apply(fieldOffset).Elem().IsNil() + return !rv.IsNil() } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() switch rv.Kind() { case reflect.Bool: return rv.Bool() @@ -304,8 +300,21 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() rv.Set(reflect.Zero(rv.Type())) }, - get: getter, - // TODO: Implement unsafe fast path for set? + get: func(p pointer) protoreflect.Value { + if p.IsNil() { + return conv.Zero() + } + rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() + if nullable { + if rv.IsNil() { + return conv.Zero() + } + if rv.Kind() == reflect.Ptr { + rv = rv.Elem() + } + } + return conv.PBValueOf(rv) + }, set: func(p pointer, v protoreflect.Value) { rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if nullable && rv.Kind() == reflect.Ptr { @@ -329,12 +338,85 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, } } +func fieldInfoForWeakMessage(fd protoreflect.FieldDescriptor, weakOffset offset) fieldInfo { + if !flags.ProtoLegacy { + panic("no support for proto1 weak fields") + } + + var once sync.Once + var messageType protoreflect.MessageType + lazyInit := func() { + once.Do(func() { + messageName := fd.Message().FullName() + messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName) + if messageType == nil { + panic(fmt.Sprintf("weak message %v for field %v is not linked in", messageName, fd.FullName())) + } + }) + } + + num := fd.Number() + return fieldInfo{ + fieldDesc: fd, + has: func(p pointer) bool { + if p.IsNil() { + return false + } + _, ok := p.Apply(weakOffset).WeakFields().get(num) + return ok + }, + clear: func(p pointer) { + p.Apply(weakOffset).WeakFields().clear(num) + }, + get: func(p pointer) protoreflect.Value { + lazyInit() + if p.IsNil() { + return protoreflect.ValueOfMessage(messageType.Zero()) + } + m, ok := p.Apply(weakOffset).WeakFields().get(num) + if !ok { + return protoreflect.ValueOfMessage(messageType.Zero()) + } + return protoreflect.ValueOfMessage(m.ProtoReflect()) + }, + set: func(p pointer, v protoreflect.Value) { + lazyInit() + m := v.Message() + if m.Descriptor() != messageType.Descriptor() { + if got, want := m.Descriptor().FullName(), messageType.Descriptor().FullName(); got != want { + panic(fmt.Sprintf("field %v has mismatching message descriptor: got %v, want %v", fd.FullName(), got, want)) + } + panic(fmt.Sprintf("field %v has mismatching message descriptor: %v", fd.FullName(), m.Descriptor().FullName())) + } + p.Apply(weakOffset).WeakFields().set(num, m.Interface()) + }, + mutable: func(p pointer) protoreflect.Value { + lazyInit() + fs := p.Apply(weakOffset).WeakFields() + m, ok := fs.get(num) + if !ok { + m = messageType.New().Interface() + fs.set(num, m) + } + return protoreflect.ValueOfMessage(m.ProtoReflect()) + }, + newMessage: func() protoreflect.Message { + lazyInit() + return messageType.New() + }, + newField: func() protoreflect.Value { + lazyInit() + return protoreflect.ValueOfMessage(messageType.New()) + }, + } +} + func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { ft := fs.Type conv := NewConverter(ft, fd) // TODO: Implement unsafe fast path? - fieldOffset := offsetOf(fs) + fieldOffset := offsetOf(fs, x) return fieldInfo{ fieldDesc: fd, has: func(p pointer) bool { @@ -343,7 +425,7 @@ func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField } rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if fs.Type.Kind() != reflect.Ptr { - return !rv.IsZero() + return !isZero(rv) } return !rv.IsNil() }, @@ -390,7 +472,7 @@ func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) * oi := &oneofInfo{oneofDesc: od} if od.IsSynthetic() { fs := si.fieldsByNumber[od.Fields().Get(0).Number()] - fieldOffset := offsetOf(fs) + fieldOffset := offsetOf(fs, x) oi.which = func(p pointer) protoreflect.FieldNumber { if p.IsNil() { return 0 @@ -403,7 +485,7 @@ func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) * } } else { fs := si.oneofsByName[od.Name()] - fieldOffset := offsetOf(fs) + fieldOffset := offsetOf(fs, x) oi.which = func(p pointer) protoreflect.FieldNumber { if p.IsNil() { return 0 @@ -421,3 +503,41 @@ func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) * } return oi } + +// isZero is identical to reflect.Value.IsZero. +// TODO: Remove this when Go1.13 is the minimally supported Go version. +func isZero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return math.Float64bits(v.Float()) == 0 + case reflect.Complex64, reflect.Complex128: + c := v.Complex() + return math.Float64bits(real(c)) == 0 && math.Float64bits(imag(c)) == 0 + case reflect.Array: + for i := 0; i < v.Len(); i++ { + if !isZero(v.Index(i)) { + return false + } + } + return true + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer: + return v.IsNil() + case reflect.String: + return v.Len() == 0 + case reflect.Struct: + for i := 0; i < v.NumField(); i++ { + if !isZero(v.Field(i)) { + return false + } + } + return true + default: + panic(&reflect.ValueError{Method: "reflect.Value.IsZero", Kind: v.Kind()}) + } +} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go deleted file mode 100644 index af5e063a1e..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field_gen.go +++ /dev/null @@ -1,273 +0,0 @@ -// 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. - -// Code generated by generate-types. DO NOT EDIT. - -package impl - -import ( - "reflect" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -func getterForNullableScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value { - ft := fs.Type - if ft.Kind() == reflect.Ptr { - ft = ft.Elem() - } - if fd.Kind() == protoreflect.EnumKind { - elemType := fs.Type.Elem() - // Enums for nullable types. - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).Elem().AsValueOf(elemType) - if rv.IsNil() { - return conv.Zero() - } - return conv.PBValueOf(rv.Elem()) - } - } - switch ft.Kind() { - case reflect.Bool: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).BoolPtr() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfBool(**x) - } - case reflect.Int32: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Int32Ptr() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfInt32(**x) - } - case reflect.Uint32: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Uint32Ptr() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfUint32(**x) - } - case reflect.Int64: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Int64Ptr() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfInt64(**x) - } - case reflect.Uint64: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Uint64Ptr() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfUint64(**x) - } - case reflect.Float32: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Float32Ptr() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfFloat32(**x) - } - case reflect.Float64: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Float64Ptr() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfFloat64(**x) - } - case reflect.String: - if fd.Kind() == protoreflect.BytesKind { - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).StringPtr() - if *x == nil { - return conv.Zero() - } - if len(**x) == 0 { - return protoreflect.ValueOfBytes(nil) - } - return protoreflect.ValueOfBytes([]byte(**x)) - } - } - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).StringPtr() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfString(**x) - } - case reflect.Slice: - if fd.Kind() == protoreflect.StringKind { - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Bytes() - if len(*x) == 0 { - return conv.Zero() - } - return protoreflect.ValueOfString(string(*x)) - } - } - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Bytes() - if *x == nil { - return conv.Zero() - } - return protoreflect.ValueOfBytes(*x) - } - } - panic("unexpected protobuf kind: " + ft.Kind().String()) -} - -func getterForDirectScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, conv Converter, fieldOffset offset) func(p pointer) protoreflect.Value { - ft := fs.Type - if fd.Kind() == protoreflect.EnumKind { - // Enums for non nullable types. - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() - return conv.PBValueOf(rv) - } - } - switch ft.Kind() { - case reflect.Bool: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Bool() - return protoreflect.ValueOfBool(*x) - } - case reflect.Int32: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Int32() - return protoreflect.ValueOfInt32(*x) - } - case reflect.Uint32: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Uint32() - return protoreflect.ValueOfUint32(*x) - } - case reflect.Int64: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Int64() - return protoreflect.ValueOfInt64(*x) - } - case reflect.Uint64: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Uint64() - return protoreflect.ValueOfUint64(*x) - } - case reflect.Float32: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Float32() - return protoreflect.ValueOfFloat32(*x) - } - case reflect.Float64: - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Float64() - return protoreflect.ValueOfFloat64(*x) - } - case reflect.String: - if fd.Kind() == protoreflect.BytesKind { - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).String() - if len(*x) == 0 { - return protoreflect.ValueOfBytes(nil) - } - return protoreflect.ValueOfBytes([]byte(*x)) - } - } - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).String() - return protoreflect.ValueOfString(*x) - } - case reflect.Slice: - if fd.Kind() == protoreflect.StringKind { - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Bytes() - return protoreflect.ValueOfString(string(*x)) - } - } - return func(p pointer) protoreflect.Value { - if p.IsNil() { - return conv.Zero() - } - x := p.Apply(fieldOffset).Bytes() - return protoreflect.ValueOfBytes(*x) - } - } - panic("unexpected protobuf kind: " + ft.Kind().String()) -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index 62f8bf663e..79e186667b 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -8,8 +8,6 @@ import ( "reflect" "sync/atomic" "unsafe" - - "google.golang.org/protobuf/internal/protolazy" ) const UnsafeEnabled = true @@ -22,7 +20,7 @@ type Pointer unsafe.Pointer type offset uintptr // offsetOf returns a field offset for the struct field. -func offsetOf(f reflect.StructField) offset { +func offsetOf(f reflect.StructField, x exporter) offset { return offset(f.Offset) } @@ -111,14 +109,8 @@ func (p pointer) StringSlice() *[]string { return (*[]string)(p.p func (p pointer) Bytes() *[]byte { return (*[]byte)(p.p) } func (p pointer) BytesPtr() **[]byte { return (**[]byte)(p.p) } func (p pointer) BytesSlice() *[][]byte { return (*[][]byte)(p.p) } +func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.p) } func (p pointer) Extensions() *map[int32]ExtensionField { return (*map[int32]ExtensionField)(p.p) } -func (p pointer) LazyInfoPtr() **protolazy.XXX_lazyUnmarshalInfo { - return (**protolazy.XXX_lazyUnmarshalInfo)(p.p) -} - -func (p pointer) PresenceInfo() presence { - return presence{P: p.p} -} func (p pointer) Elem() pointer { return pointer{p: *(*unsafe.Pointer)(p.p)} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go deleted file mode 100644 index 38aa7b7dcf..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe_opaque.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2024 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 impl - -import ( - "sync/atomic" - "unsafe" -) - -func (p pointer) AtomicGetPointer() pointer { - return pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))} -} - -func (p pointer) AtomicSetPointer(v pointer) { - atomic.StorePointer((*unsafe.Pointer)(p.p), v.p) -} - -func (p pointer) AtomicSetNilPointer() { - atomic.StorePointer((*unsafe.Pointer)(p.p), unsafe.Pointer(nil)) -} - -func (p pointer) AtomicSetPointerIfNil(v pointer) pointer { - if atomic.CompareAndSwapPointer((*unsafe.Pointer)(p.p), unsafe.Pointer(nil), v.p) { - return v - } - return pointer{p: atomic.LoadPointer((*unsafe.Pointer)(p.p))} -} - -type atomicV1MessageInfo struct{ p Pointer } - -func (mi *atomicV1MessageInfo) Get() Pointer { - return Pointer(atomic.LoadPointer((*unsafe.Pointer)(&mi.p))) -} - -func (mi *atomicV1MessageInfo) SetIfNil(p Pointer) Pointer { - if atomic.CompareAndSwapPointer((*unsafe.Pointer)(&mi.p), nil, unsafe.Pointer(p)) { - return p - } - return mi.Get() -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/presence.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/presence.go deleted file mode 100644 index 914cb1deda..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/presence.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2024 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 impl - -import ( - "sync/atomic" - "unsafe" -) - -// presenceSize represents the size of a presence set, which should be the largest index of the set+1 -type presenceSize uint32 - -// presence is the internal representation of the bitmap array in a generated protobuf -type presence struct { - // This is a pointer to the beginning of an array of uint32 - P unsafe.Pointer -} - -func (p presence) toElem(num uint32) (ret *uint32) { - const ( - bitsPerByte = 8 - siz = unsafe.Sizeof(*ret) - ) - // p.P points to an array of uint32, num is the bit in this array that the - // caller wants to check/manipulate. Calculate the index in the array that - // contains this specific bit. E.g.: 76 / 32 = 2 (integer division). - offset := uintptr(num) / (siz * bitsPerByte) * siz - return (*uint32)(unsafe.Pointer(uintptr(p.P) + offset)) -} - -// Present checks for the presence of a specific field number in a presence set. -func (p presence) Present(num uint32) bool { - if p.P == nil { - return false - } - return Export{}.Present(p.toElem(num), num) -} - -// SetPresent adds presence for a specific field number in a presence set. -func (p presence) SetPresent(num uint32, size presenceSize) { - Export{}.SetPresent(p.toElem(num), num, uint32(size)) -} - -// SetPresentUnatomic adds presence for a specific field number in a presence set without using -// atomic operations. Only to be called during unmarshaling. -func (p presence) SetPresentUnatomic(num uint32, size presenceSize) { - Export{}.SetPresentNonAtomic(p.toElem(num), num, uint32(size)) -} - -// ClearPresent removes presence for a specific field number in a presence set. -func (p presence) ClearPresent(num uint32) { - Export{}.ClearPresent(p.toElem(num), num) -} - -// LoadPresenceCache (together with PresentInCache) allows for a -// cached version of checking for presence without re-reading the word -// for every field. It is optimized for efficiency and assumes no -// simltaneous mutation of the presence set (or at least does not have -// a problem with simultaneous mutation giving inconsistent results). -func (p presence) LoadPresenceCache() (current uint32) { - if p.P == nil { - return 0 - } - return atomic.LoadUint32((*uint32)(p.P)) -} - -// PresentInCache reads presence from a cached word in the presence -// bitmap. It caches up a new word if the bit is outside the -// word. This is for really fast iteration through bitmaps in cases -// where we either know that the bitmap will not be altered, or we -// don't care about inconsistencies caused by simultaneous writes. -func (p presence) PresentInCache(num uint32, cachedElement *uint32, current *uint32) bool { - if num/32 != *cachedElement { - o := uintptr(num/32) * unsafe.Sizeof(uint32(0)) - q := (*uint32)(unsafe.Pointer(uintptr(p.P) + o)) - *current = atomic.LoadUint32(q) - *cachedElement = num / 32 - } - return (*current & (1 << (num % 32))) > 0 -} - -// AnyPresent checks if any field is marked as present in the bitmap. -func (p presence) AnyPresent(size presenceSize) bool { - n := uintptr((size + 31) / 32) - for j := uintptr(0); j < n; j++ { - o := j * unsafe.Sizeof(uint32(0)) - q := (*uint32)(unsafe.Pointer(uintptr(p.P) + o)) - b := atomic.LoadUint32(q) - if b > 0 { - return true - } - } - return false -} - -// toRaceDetectData finds the preceding RaceDetectHookData in a -// message by using pointer arithmetic. As the type of the presence -// set (bitmap) varies with the number of fields in the protobuf, we -// can not have a struct type containing the array and the -// RaceDetectHookData. instead the RaceDetectHookData is placed -// immediately before the bitmap array, and we find it by walking -// backwards in the struct. -// -// This method is only called from the race-detect version of the code, -// so RaceDetectHookData is never an empty struct. -func (p presence) toRaceDetectData() *RaceDetectHookData { - var template struct { - d RaceDetectHookData - a [1]uint32 - } - o := (uintptr(unsafe.Pointer(&template.a)) - uintptr(unsafe.Pointer(&template.d))) - return (*RaceDetectHookData)(unsafe.Pointer(uintptr(p.P) - o)) -} - -func atomicLoadShadowPresence(p **[]byte) *[]byte { - return (*[]byte)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) -} -func atomicStoreShadowPresence(p **[]byte, v *[]byte) { - atomic.CompareAndSwapPointer((*unsafe.Pointer)(unsafe.Pointer(p)), nil, unsafe.Pointer(v)) -} - -// findPointerToRaceDetectData finds the preceding RaceDetectHookData -// in a message by using pointer arithmetic. For the methods called -// directy from generated code, we don't have a pointer to the -// beginning of the presence set, but a pointer inside the array. As -// we know the index of the bit we're manipulating (num), we can -// calculate which element of the array ptr is pointing to. With that -// information we find the preceding RaceDetectHookData and can -// manipulate the shadow bitmap. -// -// This method is only called from the race-detect version of the -// code, so RaceDetectHookData is never an empty struct. -func findPointerToRaceDetectData(ptr *uint32, num uint32) *RaceDetectHookData { - var template struct { - d RaceDetectHookData - a [1]uint32 - } - o := (uintptr(unsafe.Pointer(&template.a)) - uintptr(unsafe.Pointer(&template.d))) + uintptr(num/32)*unsafe.Sizeof(uint32(0)) - return (*RaceDetectHookData)(unsafe.Pointer(uintptr(unsafe.Pointer(ptr)) - o)) -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/validate.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/validate.go index 7b2995dde5..a24e6bbd7a 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/impl/validate.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/validate.go @@ -37,10 +37,6 @@ const ( // ValidationValid indicates that unmarshaling the message will succeed. ValidationValid - - // ValidationWrongWireType indicates that a validated field does not have - // the expected wire type. - ValidationWrongWireType ) func (v ValidationStatus) String() string { @@ -153,23 +149,11 @@ func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validat switch fd.Kind() { case protoreflect.MessageKind: vi.typ = validationTypeMessage - - if ft.Kind() == reflect.Ptr { - // Repeated opaque message fields are *[]*T. - ft = ft.Elem() - } - if ft.Kind() == reflect.Slice { vi.mi = getMessageInfo(ft.Elem()) } case protoreflect.GroupKind: vi.typ = validationTypeGroup - - if ft.Kind() == reflect.Ptr { - // Repeated opaque message fields are *[]*T. - ft = ft.Elem() - } - if ft.Kind() == reflect.Slice { vi.mi = getMessageInfo(ft.Elem()) } @@ -211,7 +195,9 @@ func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validat switch fd.Kind() { case protoreflect.MessageKind: vi.typ = validationTypeMessage - vi.mi = getMessageInfo(ft) + if !fd.IsWeak() { + vi.mi = getMessageInfo(ft) + } case protoreflect.GroupKind: vi.typ = validationTypeGroup vi.mi = getMessageInfo(ft) @@ -318,6 +304,26 @@ State: } if f != nil { vi = f.validation + if vi.typ == validationTypeMessage && vi.mi == nil { + // Probable weak field. + // + // TODO: Consider storing the results of this lookup somewhere + // rather than recomputing it on every validation. + fd := st.mi.Desc.Fields().ByNumber(num) + if fd == nil || !fd.IsWeak() { + break + } + messageName := fd.Message().FullName() + messageType, err := protoregistry.GlobalTypes.FindMessageByName(messageName) + switch err { + case nil: + vi.mi, _ = messageType.(*MessageInfo) + case protoregistry.NotFound: + vi.typ = validationTypeBytes + default: + return out, ValidationUnknown + } + } break } // Possible extension field. diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/impl/weak.go b/go-controller/vendor/google.golang.org/protobuf/internal/impl/weak.go new file mode 100644 index 0000000000..eb79a7ba94 --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/internal/impl/weak.go @@ -0,0 +1,74 @@ +// Copyright 2019 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 impl + +import ( + "fmt" + + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" +) + +// weakFields adds methods to the exported WeakFields type for internal use. +// +// The exported type is an alias to an unnamed type, so methods can't be +// defined directly on it. +type weakFields WeakFields + +func (w weakFields) get(num protoreflect.FieldNumber) (protoreflect.ProtoMessage, bool) { + m, ok := w[int32(num)] + return m, ok +} + +func (w *weakFields) set(num protoreflect.FieldNumber, m protoreflect.ProtoMessage) { + if *w == nil { + *w = make(weakFields) + } + (*w)[int32(num)] = m +} + +func (w *weakFields) clear(num protoreflect.FieldNumber) { + delete(*w, int32(num)) +} + +func (Export) HasWeak(w WeakFields, num protoreflect.FieldNumber) bool { + _, ok := w[int32(num)] + return ok +} + +func (Export) ClearWeak(w *WeakFields, num protoreflect.FieldNumber) { + delete(*w, int32(num)) +} + +func (Export) GetWeak(w WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName) protoreflect.ProtoMessage { + if m, ok := w[int32(num)]; ok { + return m + } + mt, _ := protoregistry.GlobalTypes.FindMessageByName(name) + if mt == nil { + panic(fmt.Sprintf("message %v for weak field is not linked in", name)) + } + return mt.Zero().Interface() +} + +func (Export) SetWeak(w *WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName, m protoreflect.ProtoMessage) { + if m != nil { + mt, _ := protoregistry.GlobalTypes.FindMessageByName(name) + if mt == nil { + panic(fmt.Sprintf("message %v for weak field is not linked in", name)) + } + if mt != m.ProtoReflect().Type() { + panic(fmt.Sprintf("invalid message type for weak field: got %T, want %T", m, mt.Zero().Interface())) + } + } + if m == nil || !m.ProtoReflect().IsValid() { + delete(*w, int32(num)) + return + } + if *w == nil { + *w = make(weakFields) + } + (*w)[int32(num)] = m +} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go b/go-controller/vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go deleted file mode 100644 index 82e5cab4aa..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/protolazy/bufferreader.go +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright 2024 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. - -// Helper code for parsing a protocol buffer - -package protolazy - -import ( - "errors" - "fmt" - "io" - - "google.golang.org/protobuf/encoding/protowire" -) - -// BufferReader is a structure encapsulating a protobuf and a current position -type BufferReader struct { - Buf []byte - Pos int -} - -// NewBufferReader creates a new BufferRead from a protobuf -func NewBufferReader(buf []byte) BufferReader { - return BufferReader{Buf: buf, Pos: 0} -} - -var errOutOfBounds = errors.New("protobuf decoding: out of bounds") -var errOverflow = errors.New("proto: integer overflow") - -func (b *BufferReader) DecodeVarintSlow() (x uint64, err error) { - i := b.Pos - l := len(b.Buf) - - for shift := uint(0); shift < 64; shift += 7 { - if i >= l { - err = io.ErrUnexpectedEOF - return - } - v := b.Buf[i] - i++ - x |= (uint64(v) & 0x7F) << shift - if v < 0x80 { - b.Pos = i - return - } - } - - // The number is too large to represent in a 64-bit value. - err = errOverflow - return -} - -// decodeVarint decodes a varint at the current position -func (b *BufferReader) DecodeVarint() (x uint64, err error) { - i := b.Pos - buf := b.Buf - - if i >= len(buf) { - return 0, io.ErrUnexpectedEOF - } else if buf[i] < 0x80 { - b.Pos++ - return uint64(buf[i]), nil - } else if len(buf)-i < 10 { - return b.DecodeVarintSlow() - } - - var v uint64 - // we already checked the first byte - x = uint64(buf[i]) & 127 - i++ - - v = uint64(buf[i]) - i++ - x |= (v & 127) << 7 - if v < 128 { - goto done - } - - v = uint64(buf[i]) - i++ - x |= (v & 127) << 14 - if v < 128 { - goto done - } - - v = uint64(buf[i]) - i++ - x |= (v & 127) << 21 - if v < 128 { - goto done - } - - v = uint64(buf[i]) - i++ - x |= (v & 127) << 28 - if v < 128 { - goto done - } - - v = uint64(buf[i]) - i++ - x |= (v & 127) << 35 - if v < 128 { - goto done - } - - v = uint64(buf[i]) - i++ - x |= (v & 127) << 42 - if v < 128 { - goto done - } - - v = uint64(buf[i]) - i++ - x |= (v & 127) << 49 - if v < 128 { - goto done - } - - v = uint64(buf[i]) - i++ - x |= (v & 127) << 56 - if v < 128 { - goto done - } - - v = uint64(buf[i]) - i++ - x |= (v & 127) << 63 - if v < 128 { - goto done - } - - return 0, errOverflow - -done: - b.Pos = i - return -} - -// decodeVarint32 decodes a varint32 at the current position -func (b *BufferReader) DecodeVarint32() (x uint32, err error) { - i := b.Pos - buf := b.Buf - - if i >= len(buf) { - return 0, io.ErrUnexpectedEOF - } else if buf[i] < 0x80 { - b.Pos++ - return uint32(buf[i]), nil - } else if len(buf)-i < 5 { - v, err := b.DecodeVarintSlow() - return uint32(v), err - } - - var v uint32 - // we already checked the first byte - x = uint32(buf[i]) & 127 - i++ - - v = uint32(buf[i]) - i++ - x |= (v & 127) << 7 - if v < 128 { - goto done - } - - v = uint32(buf[i]) - i++ - x |= (v & 127) << 14 - if v < 128 { - goto done - } - - v = uint32(buf[i]) - i++ - x |= (v & 127) << 21 - if v < 128 { - goto done - } - - v = uint32(buf[i]) - i++ - x |= (v & 127) << 28 - if v < 128 { - goto done - } - - return 0, errOverflow - -done: - b.Pos = i - return -} - -// skipValue skips a value in the protobuf, based on the specified tag -func (b *BufferReader) SkipValue(tag uint32) (err error) { - wireType := tag & 0x7 - switch protowire.Type(wireType) { - case protowire.VarintType: - err = b.SkipVarint() - case protowire.Fixed64Type: - err = b.SkipFixed64() - case protowire.BytesType: - var n uint32 - n, err = b.DecodeVarint32() - if err == nil { - err = b.Skip(int(n)) - } - case protowire.StartGroupType: - err = b.SkipGroup(tag) - case protowire.Fixed32Type: - err = b.SkipFixed32() - default: - err = fmt.Errorf("Unexpected wire type (%d)", wireType) - } - return -} - -// skipGroup skips a group with the specified tag. It executes efficiently using a tag stack -func (b *BufferReader) SkipGroup(tag uint32) (err error) { - tagStack := make([]uint32, 0, 16) - tagStack = append(tagStack, tag) - var n uint32 - for len(tagStack) > 0 { - tag, err = b.DecodeVarint32() - if err != nil { - return err - } - switch protowire.Type(tag & 0x7) { - case protowire.VarintType: - err = b.SkipVarint() - case protowire.Fixed64Type: - err = b.Skip(8) - case protowire.BytesType: - n, err = b.DecodeVarint32() - if err == nil { - err = b.Skip(int(n)) - } - case protowire.StartGroupType: - tagStack = append(tagStack, tag) - case protowire.Fixed32Type: - err = b.SkipFixed32() - case protowire.EndGroupType: - if protoFieldNumber(tagStack[len(tagStack)-1]) == protoFieldNumber(tag) { - tagStack = tagStack[:len(tagStack)-1] - } else { - err = fmt.Errorf("end group tag %d does not match begin group tag %d at pos %d", - protoFieldNumber(tag), protoFieldNumber(tagStack[len(tagStack)-1]), b.Pos) - } - } - if err != nil { - return err - } - } - return nil -} - -// skipVarint effiently skips a varint -func (b *BufferReader) SkipVarint() (err error) { - i := b.Pos - - if len(b.Buf)-i < 10 { - // Use DecodeVarintSlow() to check for buffer overflow, but ignore result - if _, err := b.DecodeVarintSlow(); err != nil { - return err - } - return nil - } - - if b.Buf[i] < 0x80 { - goto out - } - i++ - - if b.Buf[i] < 0x80 { - goto out - } - i++ - - if b.Buf[i] < 0x80 { - goto out - } - i++ - - if b.Buf[i] < 0x80 { - goto out - } - i++ - - if b.Buf[i] < 0x80 { - goto out - } - i++ - - if b.Buf[i] < 0x80 { - goto out - } - i++ - - if b.Buf[i] < 0x80 { - goto out - } - i++ - - if b.Buf[i] < 0x80 { - goto out - } - i++ - - if b.Buf[i] < 0x80 { - goto out - } - i++ - - if b.Buf[i] < 0x80 { - goto out - } - return errOverflow - -out: - b.Pos = i + 1 - return nil -} - -// skip skips the specified number of bytes -func (b *BufferReader) Skip(n int) (err error) { - if len(b.Buf) < b.Pos+n { - return io.ErrUnexpectedEOF - } - b.Pos += n - return -} - -// skipFixed64 skips a fixed64 -func (b *BufferReader) SkipFixed64() (err error) { - return b.Skip(8) -} - -// skipFixed32 skips a fixed32 -func (b *BufferReader) SkipFixed32() (err error) { - return b.Skip(4) -} - -// skipBytes skips a set of bytes -func (b *BufferReader) SkipBytes() (err error) { - n, err := b.DecodeVarint32() - if err != nil { - return err - } - return b.Skip(int(n)) -} - -// Done returns whether we are at the end of the protobuf -func (b *BufferReader) Done() bool { - return b.Pos == len(b.Buf) -} - -// Remaining returns how many bytes remain -func (b *BufferReader) Remaining() int { - return len(b.Buf) - b.Pos -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/protolazy/lazy.go b/go-controller/vendor/google.golang.org/protobuf/internal/protolazy/lazy.go deleted file mode 100644 index ff4d4834bb..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/protolazy/lazy.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright 2024 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 protolazy contains internal data structures for lazy message decoding. -package protolazy - -import ( - "fmt" - "sort" - - "google.golang.org/protobuf/encoding/protowire" - piface "google.golang.org/protobuf/runtime/protoiface" -) - -// IndexEntry is the structure for an index of the fields in a message of a -// proto (not descending to sub-messages) -type IndexEntry struct { - FieldNum uint32 - // first byte of this tag/field - Start uint32 - // first byte after a contiguous sequence of bytes for this tag/field, which could - // include a single encoding of the field, or multiple encodings for the field - End uint32 - // True if this protobuf segment includes multiple encodings of the field - MultipleContiguous bool -} - -// XXX_lazyUnmarshalInfo has information about a particular lazily decoded message -// -// Deprecated: Do not use. This will be deleted in the near future. -type XXX_lazyUnmarshalInfo struct { - // Index of fields and their positions in the protobuf for this - // message. Make index be a pointer to a slice so it can be updated - // atomically. The index pointer is only set once (lazily when/if - // the index is first needed), and must always be SET and LOADED - // ATOMICALLY. - index *[]IndexEntry - // The protobuf associated with this lazily decoded message. It is - // only set during proto.Unmarshal(). It doesn't need to be set and - // loaded atomically, since any simultaneous set (Unmarshal) and read - // (during a get) would already be a race in the app code. - Protobuf []byte - // The flags present when Unmarshal was originally called for this particular message - unmarshalFlags piface.UnmarshalInputFlags -} - -// The Buffer and SetBuffer methods let v2/internal/impl interact with -// XXX_lazyUnmarshalInfo via an interface, to avoid an import cycle. - -// Buffer returns the lazy unmarshal buffer. -// -// Deprecated: Do not use. This will be deleted in the near future. -func (lazy *XXX_lazyUnmarshalInfo) Buffer() []byte { - return lazy.Protobuf -} - -// SetBuffer sets the lazy unmarshal buffer. -// -// Deprecated: Do not use. This will be deleted in the near future. -func (lazy *XXX_lazyUnmarshalInfo) SetBuffer(b []byte) { - lazy.Protobuf = b -} - -// SetUnmarshalFlags is called to set a copy of the original unmarshalInputFlags. -// The flags should reflect how Unmarshal was called. -func (lazy *XXX_lazyUnmarshalInfo) SetUnmarshalFlags(f piface.UnmarshalInputFlags) { - lazy.unmarshalFlags = f -} - -// UnmarshalFlags returns the original unmarshalInputFlags. -func (lazy *XXX_lazyUnmarshalInfo) UnmarshalFlags() piface.UnmarshalInputFlags { - return lazy.unmarshalFlags -} - -// AllowedPartial returns true if the user originally unmarshalled this message with -// AllowPartial set to true -func (lazy *XXX_lazyUnmarshalInfo) AllowedPartial() bool { - return (lazy.unmarshalFlags & piface.UnmarshalCheckRequired) == 0 -} - -func protoFieldNumber(tag uint32) uint32 { - return tag >> 3 -} - -// buildIndex builds an index of the specified protobuf, return the index -// array and an error. -func buildIndex(buf []byte) ([]IndexEntry, error) { - index := make([]IndexEntry, 0, 16) - var lastProtoFieldNum uint32 - var outOfOrder bool - - var r BufferReader = NewBufferReader(buf) - - for !r.Done() { - var tag uint32 - var err error - var curPos = r.Pos - // INLINED: tag, err = r.DecodeVarint32() - { - i := r.Pos - buf := r.Buf - - if i >= len(buf) { - return nil, errOutOfBounds - } else if buf[i] < 0x80 { - r.Pos++ - tag = uint32(buf[i]) - } else if r.Remaining() < 5 { - var v uint64 - v, err = r.DecodeVarintSlow() - tag = uint32(v) - } else { - var v uint32 - // we already checked the first byte - tag = uint32(buf[i]) & 127 - i++ - - v = uint32(buf[i]) - i++ - tag |= (v & 127) << 7 - if v < 128 { - goto done - } - - v = uint32(buf[i]) - i++ - tag |= (v & 127) << 14 - if v < 128 { - goto done - } - - v = uint32(buf[i]) - i++ - tag |= (v & 127) << 21 - if v < 128 { - goto done - } - - v = uint32(buf[i]) - i++ - tag |= (v & 127) << 28 - if v < 128 { - goto done - } - - return nil, errOutOfBounds - - done: - r.Pos = i - } - } - // DONE: tag, err = r.DecodeVarint32() - - fieldNum := protoFieldNumber(tag) - if fieldNum < lastProtoFieldNum { - outOfOrder = true - } - - // Skip the current value -- will skip over an entire group as well. - // INLINED: err = r.SkipValue(tag) - wireType := tag & 0x7 - switch protowire.Type(wireType) { - case protowire.VarintType: - // INLINED: err = r.SkipVarint() - i := r.Pos - - if len(r.Buf)-i < 10 { - // Use DecodeVarintSlow() to skip while - // checking for buffer overflow, but ignore result - _, err = r.DecodeVarintSlow() - goto out2 - } - if r.Buf[i] < 0x80 { - goto out - } - i++ - - if r.Buf[i] < 0x80 { - goto out - } - i++ - - if r.Buf[i] < 0x80 { - goto out - } - i++ - - if r.Buf[i] < 0x80 { - goto out - } - i++ - - if r.Buf[i] < 0x80 { - goto out - } - i++ - - if r.Buf[i] < 0x80 { - goto out - } - i++ - - if r.Buf[i] < 0x80 { - goto out - } - i++ - - if r.Buf[i] < 0x80 { - goto out - } - i++ - - if r.Buf[i] < 0x80 { - goto out - } - i++ - - if r.Buf[i] < 0x80 { - goto out - } - return nil, errOverflow - out: - r.Pos = i + 1 - // DONE: err = r.SkipVarint() - case protowire.Fixed64Type: - err = r.SkipFixed64() - case protowire.BytesType: - var n uint32 - n, err = r.DecodeVarint32() - if err == nil { - err = r.Skip(int(n)) - } - case protowire.StartGroupType: - err = r.SkipGroup(tag) - case protowire.Fixed32Type: - err = r.SkipFixed32() - default: - err = fmt.Errorf("Unexpected wire type (%d)", wireType) - } - // DONE: err = r.SkipValue(tag) - - out2: - if err != nil { - return nil, err - } - if fieldNum != lastProtoFieldNum { - index = append(index, IndexEntry{FieldNum: fieldNum, - Start: uint32(curPos), - End: uint32(r.Pos)}, - ) - } else { - index[len(index)-1].End = uint32(r.Pos) - index[len(index)-1].MultipleContiguous = true - } - lastProtoFieldNum = fieldNum - } - if outOfOrder { - sort.Slice(index, func(i, j int) bool { - return index[i].FieldNum < index[j].FieldNum || - (index[i].FieldNum == index[j].FieldNum && - index[i].Start < index[j].Start) - }) - } - return index, nil -} - -func (lazy *XXX_lazyUnmarshalInfo) SizeField(num uint32) (size int) { - start, end, found, _, multipleEntries := lazy.FindFieldInProto(num) - if multipleEntries != nil { - for _, entry := range multipleEntries { - size += int(entry.End - entry.Start) - } - return size - } - if !found { - return 0 - } - return int(end - start) -} - -func (lazy *XXX_lazyUnmarshalInfo) AppendField(b []byte, num uint32) ([]byte, bool) { - start, end, found, _, multipleEntries := lazy.FindFieldInProto(num) - if multipleEntries != nil { - for _, entry := range multipleEntries { - b = append(b, lazy.Protobuf[entry.Start:entry.End]...) - } - return b, true - } - if !found { - return nil, false - } - b = append(b, lazy.Protobuf[start:end]...) - return b, true -} - -func (lazy *XXX_lazyUnmarshalInfo) SetIndex(index []IndexEntry) { - atomicStoreIndex(&lazy.index, &index) -} - -// FindFieldInProto looks for field fieldNum in lazyUnmarshalInfo information -// (including protobuf), returns startOffset/endOffset/found. -func (lazy *XXX_lazyUnmarshalInfo) FindFieldInProto(fieldNum uint32) (start, end uint32, found, multipleContiguous bool, multipleEntries []IndexEntry) { - if lazy.Protobuf == nil { - // There is no backing protobuf for this message -- it was made from a builder - return 0, 0, false, false, nil - } - index := atomicLoadIndex(&lazy.index) - if index == nil { - r, err := buildIndex(lazy.Protobuf) - if err != nil { - panic(fmt.Sprintf("findFieldInfo: error building index when looking for field %d: %v", fieldNum, err)) - } - // lazy.index is a pointer to the slice returned by BuildIndex - index = &r - atomicStoreIndex(&lazy.index, index) - } - return lookupField(index, fieldNum) -} - -// lookupField returns the offset at which the indicated field starts using -// the index, offset immediately after field ends (including all instances of -// a repeated field), and bools indicating if field was found and if there -// are multiple encodings of the field in the byte range. -// -// To hande the uncommon case where there are repeated encodings for the same -// field which are not consecutive in the protobuf (so we need to returns -// multiple start/end offsets), we also return a slice multipleEntries. If -// multipleEntries is non-nil, then multiple entries were found, and the -// values in the slice should be used, rather than start/end/found. -func lookupField(indexp *[]IndexEntry, fieldNum uint32) (start, end uint32, found bool, multipleContiguous bool, multipleEntries []IndexEntry) { - // The pointer indexp to the index was already loaded atomically. - // The slice is uniquely associated with the pointer, so it doesn't - // need to be loaded atomically. - index := *indexp - for i, entry := range index { - if fieldNum == entry.FieldNum { - if i < len(index)-1 && entry.FieldNum == index[i+1].FieldNum { - // Handle the uncommon case where there are - // repeated entries for the same field which - // are not contiguous in the protobuf. - multiple := make([]IndexEntry, 1, 2) - multiple[0] = IndexEntry{fieldNum, entry.Start, entry.End, entry.MultipleContiguous} - i++ - for i < len(index) && index[i].FieldNum == fieldNum { - multiple = append(multiple, IndexEntry{fieldNum, index[i].Start, index[i].End, index[i].MultipleContiguous}) - i++ - } - return 0, 0, false, false, multiple - - } - return entry.Start, entry.End, true, entry.MultipleContiguous, nil - } - if fieldNum < entry.FieldNum { - return 0, 0, false, false, nil - } - } - return 0, 0, false, false, nil -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go b/go-controller/vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go deleted file mode 100644 index dc2a64ca64..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2024 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 protolazy - -import ( - "sync/atomic" - "unsafe" -) - -func atomicLoadIndex(p **[]IndexEntry) *[]IndexEntry { - return (*[]IndexEntry)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) -} -func atomicStoreIndex(p **[]IndexEntry, v *[]IndexEntry) { - atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) -} diff --git a/go-controller/vendor/google.golang.org/protobuf/internal/version/version.go b/go-controller/vendor/google.golang.org/protobuf/internal/version/version.go index 01efc33030..fb8e15e8da 100644 --- a/go-controller/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/go-controller/vendor/google.golang.org/protobuf/internal/version/version.go @@ -51,8 +51,8 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 36 - Patch = 5 + Minor = 35 + Patch = 1 PreRelease = "" ) diff --git a/go-controller/vendor/google.golang.org/protobuf/proto/decode.go b/go-controller/vendor/google.golang.org/protobuf/proto/decode.go index 4cbf1aeaf7..d75a6534c1 100644 --- a/go-controller/vendor/google.golang.org/protobuf/proto/decode.go +++ b/go-controller/vendor/google.golang.org/protobuf/proto/decode.go @@ -8,6 +8,7 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/reflect/protoreflect" @@ -46,12 +47,6 @@ type UnmarshalOptions struct { // RecursionLimit limits how deeply messages may be nested. // If zero, a default limit is applied. RecursionLimit int - - // - // NoLazyDecoding turns off lazy decoding, which otherwise is enabled by - // default. Lazy decoding only affects submessages (annotated with [lazy = - // true] in the .proto file) within messages that use the Opaque API. - NoLazyDecoding bool } // Unmarshal parses the wire-format message in b and places the result in m. @@ -109,16 +104,6 @@ func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out proto if o.DiscardUnknown { in.Flags |= protoiface.UnmarshalDiscardUnknown } - - if !allowPartial { - // This does not affect how current unmarshal functions work, it just allows them - // to record this for lazy the decoding case. - in.Flags |= protoiface.UnmarshalCheckRequired - } - if o.NoLazyDecoding { - in.Flags |= protoiface.UnmarshalNoLazyDecoding - } - out, err = methods.Unmarshal(in) } else { o.RecursionLimit-- @@ -171,6 +156,10 @@ func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message) var err error if fd == nil { err = errUnknown + } else if flags.ProtoLegacy { + if fd.IsWeak() && fd.Message().IsPlaceholder() { + err = errUnknown // weak referent is not linked in + } } // Parse the field value. diff --git a/go-controller/vendor/google.golang.org/protobuf/proto/encode.go b/go-controller/vendor/google.golang.org/protobuf/proto/encode.go index f0473c5869..1f847bcc35 100644 --- a/go-controller/vendor/google.golang.org/protobuf/proto/encode.go +++ b/go-controller/vendor/google.golang.org/protobuf/proto/encode.go @@ -63,8 +63,7 @@ type MarshalOptions struct { // options (except for UseCachedSize itself). // // 2. The message and all its submessages have not changed in any - // way since the Size call. For lazily decoded messages, accessing - // a message results in decoding the message, which is a change. + // way since the Size call. // // If either of these invariants is violated, // the results are undefined and may include panics or corrupted output. diff --git a/go-controller/vendor/google.golang.org/protobuf/proto/size.go b/go-controller/vendor/google.golang.org/protobuf/proto/size.go index c8675806c6..052fb5ae31 100644 --- a/go-controller/vendor/google.golang.org/protobuf/proto/size.go +++ b/go-controller/vendor/google.golang.org/protobuf/proto/size.go @@ -12,19 +12,11 @@ import ( ) // Size returns the size in bytes of the wire-format encoding of m. -// -// Note that Size might return more bytes than Marshal will write in the case of -// lazily decoded messages that arrive in non-minimal wire format: see -// https://protobuf.dev/reference/go/size/ for more details. func Size(m Message) int { return MarshalOptions{}.Size(m) } // Size returns the size in bytes of the wire-format encoding of m. -// -// Note that Size might return more bytes than Marshal will write in the case of -// lazily decoded messages that arrive in non-minimal wire format: see -// https://protobuf.dev/reference/go/size/ for more details. func (o MarshalOptions) Size(m Message) int { // Treat a nil message interface as an empty message; nothing to output. if m == nil { diff --git a/go-controller/vendor/google.golang.org/protobuf/proto/wrapperopaque.go b/go-controller/vendor/google.golang.org/protobuf/proto/wrapperopaque.go deleted file mode 100644 index 267fd0f1f6..0000000000 --- a/go-controller/vendor/google.golang.org/protobuf/proto/wrapperopaque.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2024 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 proto - -// ValueOrNil returns nil if has is false, or a pointer to a new variable -// containing the value returned by the specified getter. -// -// This function is similar to the wrappers (proto.Int32(), proto.String(), -// etc.), but is generic (works for any field type) and works with the hasser -// and getter of a field, as opposed to a value. -// -// This is convenient when populating builder fields. -// -// Example: -// -// hop := attr.GetDirectHop() -// injectedRoute := ripb.InjectedRoute_builder{ -// Prefixes: route.GetPrefixes(), -// NextHop: proto.ValueOrNil(hop.HasAddress(), hop.GetAddress), -// } -func ValueOrNil[T any](has bool, getter func() T) *T { - if !has { - return nil - } - v := getter() - return &v -} - -// ValueOrDefault returns the protobuf message val if val is not nil, otherwise -// it returns a pointer to an empty val message. -// -// This function allows for translating code from the old Open Struct API to the -// new Opaque API. -// -// The old Open Struct API represented oneof fields with a wrapper struct: -// -// var signedImg *accountpb.SignedImage -// profile := &accountpb.Profile{ -// // The Avatar oneof will be set, with an empty SignedImage. -// Avatar: &accountpb.Profile_SignedImage{signedImg}, -// } -// -// The new Opaque API treats oneof fields like regular fields, there are no more -// wrapper structs: -// -// var signedImg *accountpb.SignedImage -// profile := &accountpb.Profile{} -// profile.SetSignedImage(signedImg) -// -// For convenience, the Opaque API also offers Builders, which allow for a -// direct translation of struct initialization. However, because Builders use -// nilness to represent field presence (but there is no non-nil wrapper struct -// anymore), Builders cannot distinguish between an unset oneof and a set oneof -// with nil message. The above code would need to be translated with help of the -// ValueOrDefault function to retain the same behavior: -// -// var signedImg *accountpb.SignedImage -// return &accountpb.Profile_builder{ -// SignedImage: proto.ValueOrDefault(signedImg), -// }.Build() -func ValueOrDefault[T interface { - *P - Message -}, P any](val T) T { - if val == nil { - return T(new(P)) - } - return val -} - -// ValueOrDefaultBytes is like ValueOrDefault but for working with fields of -// type []byte. -func ValueOrDefaultBytes(val []byte) []byte { - if val == nil { - return []byte{} - } - return val -} diff --git a/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go new file mode 100644 index 0000000000..8fbecb4f58 --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go @@ -0,0 +1,286 @@ +// 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. + +// Package protodesc provides functionality for converting +// FileDescriptorProto messages to/from [protoreflect.FileDescriptor] values. +// +// The google.protobuf.FileDescriptorProto is a protobuf message that describes +// the type information for a .proto file in a form that is easily serializable. +// The [protoreflect.FileDescriptor] is a more structured representation of +// the FileDescriptorProto message where references and remote dependencies +// can be directly followed. +package protodesc + +import ( + "google.golang.org/protobuf/internal/editionssupport" + "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/internal/filedesc" + "google.golang.org/protobuf/internal/pragma" + "google.golang.org/protobuf/internal/strs" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + + "google.golang.org/protobuf/types/descriptorpb" +) + +// Resolver is the resolver used by [NewFile] to resolve dependencies. +// The enums and messages provided must belong to some parent file, +// which is also registered. +// +// It is implemented by [protoregistry.Files]. +type Resolver interface { + FindFileByPath(string) (protoreflect.FileDescriptor, error) + FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error) +} + +// FileOptions configures the construction of file descriptors. +type FileOptions struct { + pragma.NoUnkeyedLiterals + + // AllowUnresolvable configures New to permissively allow unresolvable + // file, enum, or message dependencies. Unresolved dependencies are replaced + // by placeholder equivalents. + // + // The following dependencies may be left unresolved: + // • Resolving an imported file. + // • Resolving the type for a message field or extension field. + // If the kind of the field is unknown, then a placeholder is used for both + // the Enum and Message accessors on the protoreflect.FieldDescriptor. + // • Resolving an enum value set as the default for an optional enum field. + // If unresolvable, the protoreflect.FieldDescriptor.Default is set to the + // first value in the associated enum (or zero if the also enum dependency + // is also unresolvable). The protoreflect.FieldDescriptor.DefaultEnumValue + // is populated with a placeholder. + // • Resolving the extended message type for an extension field. + // • Resolving the input or output message type for a service method. + // + // If the unresolved dependency uses a relative name, + // then the placeholder will contain an invalid FullName with a "*." prefix, + // indicating that the starting prefix of the full name is unknown. + AllowUnresolvable bool +} + +// NewFile creates a new [protoreflect.FileDescriptor] from the provided +// file descriptor message. See [FileOptions.New] for more information. +func NewFile(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) { + return FileOptions{}.New(fd, r) +} + +// NewFiles creates a new [protoregistry.Files] from the provided +// FileDescriptorSet message. See [FileOptions.NewFiles] for more information. +func NewFiles(fd *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) { + return FileOptions{}.NewFiles(fd) +} + +// New creates a new [protoreflect.FileDescriptor] from the provided +// file descriptor message. The file must represent a valid proto file according +// to protobuf semantics. The returned descriptor is a deep copy of the input. +// +// Any imported files, enum types, or message types referenced in the file are +// resolved using the provided registry. When looking up an import file path, +// the path must be unique. The newly created file descriptor is not registered +// back into the provided file registry. +func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (protoreflect.FileDescriptor, error) { + if r == nil { + r = (*protoregistry.Files)(nil) // empty resolver + } + + // Handle the file descriptor content. + f := &filedesc.File{L2: &filedesc.FileL2{}} + switch fd.GetSyntax() { + case "proto2", "": + f.L1.Syntax = protoreflect.Proto2 + f.L1.Edition = filedesc.EditionProto2 + case "proto3": + f.L1.Syntax = protoreflect.Proto3 + f.L1.Edition = filedesc.EditionProto3 + case "editions": + f.L1.Syntax = protoreflect.Editions + f.L1.Edition = fromEditionProto(fd.GetEdition()) + default: + return nil, errors.New("invalid syntax: %q", fd.GetSyntax()) + } + if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) { + return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition()) + } + f.L1.Path = fd.GetName() + if f.L1.Path == "" { + return nil, errors.New("file path must be populated") + } + f.L1.Package = protoreflect.FullName(fd.GetPackage()) + if !f.L1.Package.IsValid() && f.L1.Package != "" { + return nil, errors.New("invalid package: %q", f.L1.Package) + } + if opts := fd.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.FileOptions) + f.L2.Options = func() protoreflect.ProtoMessage { return opts } + } + initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures()) + + f.L2.Imports = make(filedesc.FileImports, len(fd.GetDependency())) + for _, i := range fd.GetPublicDependency() { + if !(0 <= i && int(i) < len(f.L2.Imports)) || f.L2.Imports[i].IsPublic { + return nil, errors.New("invalid or duplicate public import index: %d", i) + } + f.L2.Imports[i].IsPublic = true + } + for _, i := range fd.GetWeakDependency() { + if !(0 <= i && int(i) < len(f.L2.Imports)) || f.L2.Imports[i].IsWeak { + return nil, errors.New("invalid or duplicate weak import index: %d", i) + } + f.L2.Imports[i].IsWeak = true + } + imps := importSet{f.Path(): true} + for i, path := range fd.GetDependency() { + imp := &f.L2.Imports[i] + f, err := r.FindFileByPath(path) + if err == protoregistry.NotFound && (o.AllowUnresolvable || imp.IsWeak) { + f = filedesc.PlaceholderFile(path) + } else if err != nil { + return nil, errors.New("could not resolve import %q: %v", path, err) + } + imp.FileDescriptor = f + + if imps[imp.Path()] { + return nil, errors.New("already imported %q", path) + } + imps[imp.Path()] = true + } + for i := range fd.GetDependency() { + imp := &f.L2.Imports[i] + imps.importPublic(imp.Imports()) + } + + // Handle source locations. + f.L2.Locations.File = f + for _, loc := range fd.GetSourceCodeInfo().GetLocation() { + var l protoreflect.SourceLocation + // TODO: Validate that the path points to an actual declaration? + l.Path = protoreflect.SourcePath(loc.GetPath()) + s := loc.GetSpan() + switch len(s) { + case 3: + l.StartLine, l.StartColumn, l.EndLine, l.EndColumn = int(s[0]), int(s[1]), int(s[0]), int(s[2]) + case 4: + l.StartLine, l.StartColumn, l.EndLine, l.EndColumn = int(s[0]), int(s[1]), int(s[2]), int(s[3]) + default: + return nil, errors.New("invalid span: %v", s) + } + // TODO: Validate that the span information is sensible? + // See https://github.com/protocolbuffers/protobuf/issues/6378. + if false && (l.EndLine < l.StartLine || l.StartLine < 0 || l.StartColumn < 0 || l.EndColumn < 0 || + (l.StartLine == l.EndLine && l.EndColumn <= l.StartColumn)) { + return nil, errors.New("invalid span: %v", s) + } + l.LeadingDetachedComments = loc.GetLeadingDetachedComments() + l.LeadingComments = loc.GetLeadingComments() + l.TrailingComments = loc.GetTrailingComments() + f.L2.Locations.List = append(f.L2.Locations.List, l) + } + + // Step 1: Allocate and derive the names for all declarations. + // This copies all fields from the descriptor proto except: + // google.protobuf.FieldDescriptorProto.type_name + // google.protobuf.FieldDescriptorProto.default_value + // google.protobuf.FieldDescriptorProto.oneof_index + // google.protobuf.FieldDescriptorProto.extendee + // google.protobuf.MethodDescriptorProto.input + // google.protobuf.MethodDescriptorProto.output + var err error + sb := new(strs.Builder) + r1 := make(descsByName) + if f.L1.Enums.List, err = r1.initEnumDeclarations(fd.GetEnumType(), f, sb); err != nil { + return nil, err + } + if f.L1.Messages.List, err = r1.initMessagesDeclarations(fd.GetMessageType(), f, sb); err != nil { + return nil, err + } + if f.L1.Extensions.List, err = r1.initExtensionDeclarations(fd.GetExtension(), f, sb); err != nil { + return nil, err + } + if f.L1.Services.List, err = r1.initServiceDeclarations(fd.GetService(), f, sb); err != nil { + return nil, err + } + + // Step 2: Resolve every dependency reference not handled by step 1. + r2 := &resolver{local: r1, remote: r, imports: imps, allowUnresolvable: o.AllowUnresolvable} + if err := r2.resolveMessageDependencies(f.L1.Messages.List, fd.GetMessageType()); err != nil { + return nil, err + } + if err := r2.resolveExtensionDependencies(f.L1.Extensions.List, fd.GetExtension()); err != nil { + return nil, err + } + if err := r2.resolveServiceDependencies(f.L1.Services.List, fd.GetService()); err != nil { + return nil, err + } + + // Step 3: Validate every enum, message, and extension declaration. + if err := validateEnumDeclarations(f.L1.Enums.List, fd.GetEnumType()); err != nil { + return nil, err + } + if err := validateMessageDeclarations(f, f.L1.Messages.List, fd.GetMessageType()); err != nil { + return nil, err + } + if err := validateExtensionDeclarations(f, f.L1.Extensions.List, fd.GetExtension()); err != nil { + return nil, err + } + + return f, nil +} + +type importSet map[string]bool + +func (is importSet) importPublic(imps protoreflect.FileImports) { + for i := 0; i < imps.Len(); i++ { + if imp := imps.Get(i); imp.IsPublic { + is[imp.Path()] = true + is.importPublic(imp.Imports()) + } + } +} + +// NewFiles creates a new [protoregistry.Files] from the provided +// FileDescriptorSet message. The descriptor set must include only +// valid files according to protobuf semantics. The returned descriptors +// are a deep copy of the input. +func (o FileOptions) NewFiles(fds *descriptorpb.FileDescriptorSet) (*protoregistry.Files, error) { + files := make(map[string]*descriptorpb.FileDescriptorProto) + for _, fd := range fds.File { + if _, ok := files[fd.GetName()]; ok { + return nil, errors.New("file appears multiple times: %q", fd.GetName()) + } + files[fd.GetName()] = fd + } + r := &protoregistry.Files{} + for _, fd := range files { + if err := o.addFileDeps(r, fd, files); err != nil { + return nil, err + } + } + return r, nil +} +func (o FileOptions) addFileDeps(r *protoregistry.Files, fd *descriptorpb.FileDescriptorProto, files map[string]*descriptorpb.FileDescriptorProto) error { + // Set the entry to nil while descending into a file's dependencies to detect cycles. + files[fd.GetName()] = nil + for _, dep := range fd.Dependency { + depfd, ok := files[dep] + if depfd == nil { + if ok { + return errors.New("import cycle in file: %q", dep) + } + continue + } + if err := o.addFileDeps(r, depfd, files); err != nil { + return err + } + } + // Delete the entry once dependencies are processed. + delete(files, fd.GetName()) + f, err := o.New(fd, r) + if err != nil { + return err + } + return r.RegisterFile(f) +} diff --git a/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go new file mode 100644 index 0000000000..ebcb4a8ab1 --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go @@ -0,0 +1,289 @@ +// Copyright 2019 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 protodesc + +import ( + "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/internal/filedesc" + "google.golang.org/protobuf/internal/strs" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "google.golang.org/protobuf/types/descriptorpb" +) + +type descsByName map[protoreflect.FullName]protoreflect.Descriptor + +func (r descsByName) initEnumDeclarations(eds []*descriptorpb.EnumDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (es []filedesc.Enum, err error) { + es = make([]filedesc.Enum, len(eds)) // allocate up-front to ensure stable pointers + for i, ed := range eds { + e := &es[i] + e.L2 = new(filedesc.EnumL2) + if e.L0, err = r.makeBase(e, parent, ed.GetName(), i, sb); err != nil { + return nil, err + } + if opts := ed.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.EnumOptions) + e.L2.Options = func() protoreflect.ProtoMessage { return opts } + } + e.L1.EditionFeatures = mergeEditionFeatures(parent, ed.GetOptions().GetFeatures()) + for _, s := range ed.GetReservedName() { + e.L2.ReservedNames.List = append(e.L2.ReservedNames.List, protoreflect.Name(s)) + } + for _, rr := range ed.GetReservedRange() { + e.L2.ReservedRanges.List = append(e.L2.ReservedRanges.List, [2]protoreflect.EnumNumber{ + protoreflect.EnumNumber(rr.GetStart()), + protoreflect.EnumNumber(rr.GetEnd()), + }) + } + if e.L2.Values.List, err = r.initEnumValuesFromDescriptorProto(ed.GetValue(), e, sb); err != nil { + return nil, err + } + } + return es, nil +} + +func (r descsByName) initEnumValuesFromDescriptorProto(vds []*descriptorpb.EnumValueDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (vs []filedesc.EnumValue, err error) { + vs = make([]filedesc.EnumValue, len(vds)) // allocate up-front to ensure stable pointers + for i, vd := range vds { + v := &vs[i] + if v.L0, err = r.makeBase(v, parent, vd.GetName(), i, sb); err != nil { + return nil, err + } + if opts := vd.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.EnumValueOptions) + v.L1.Options = func() protoreflect.ProtoMessage { return opts } + } + v.L1.Number = protoreflect.EnumNumber(vd.GetNumber()) + } + return vs, nil +} + +func (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ms []filedesc.Message, err error) { + ms = make([]filedesc.Message, len(mds)) // allocate up-front to ensure stable pointers + for i, md := range mds { + m := &ms[i] + m.L2 = new(filedesc.MessageL2) + if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil { + return nil, err + } + m.L1.EditionFeatures = mergeEditionFeatures(parent, md.GetOptions().GetFeatures()) + if opts := md.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.MessageOptions) + m.L2.Options = func() protoreflect.ProtoMessage { return opts } + m.L1.IsMapEntry = opts.GetMapEntry() + m.L1.IsMessageSet = opts.GetMessageSetWireFormat() + } + for _, s := range md.GetReservedName() { + m.L2.ReservedNames.List = append(m.L2.ReservedNames.List, protoreflect.Name(s)) + } + for _, rr := range md.GetReservedRange() { + m.L2.ReservedRanges.List = append(m.L2.ReservedRanges.List, [2]protoreflect.FieldNumber{ + protoreflect.FieldNumber(rr.GetStart()), + protoreflect.FieldNumber(rr.GetEnd()), + }) + } + for _, xr := range md.GetExtensionRange() { + m.L2.ExtensionRanges.List = append(m.L2.ExtensionRanges.List, [2]protoreflect.FieldNumber{ + protoreflect.FieldNumber(xr.GetStart()), + protoreflect.FieldNumber(xr.GetEnd()), + }) + var optsFunc func() protoreflect.ProtoMessage + if opts := xr.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.ExtensionRangeOptions) + optsFunc = func() protoreflect.ProtoMessage { return opts } + } + m.L2.ExtensionRangeOptions = append(m.L2.ExtensionRangeOptions, optsFunc) + } + if m.L2.Fields.List, err = r.initFieldsFromDescriptorProto(md.GetField(), m, sb); err != nil { + return nil, err + } + if m.L2.Oneofs.List, err = r.initOneofsFromDescriptorProto(md.GetOneofDecl(), m, sb); err != nil { + return nil, err + } + if m.L1.Enums.List, err = r.initEnumDeclarations(md.GetEnumType(), m, sb); err != nil { + return nil, err + } + if m.L1.Messages.List, err = r.initMessagesDeclarations(md.GetNestedType(), m, sb); err != nil { + return nil, err + } + if m.L1.Extensions.List, err = r.initExtensionDeclarations(md.GetExtension(), m, sb); err != nil { + return nil, err + } + } + return ms, nil +} + +// canBePacked returns whether the field can use packed encoding: +// https://protobuf.dev/programming-guides/encoding/#packed +func canBePacked(fd *descriptorpb.FieldDescriptorProto) bool { + if fd.GetLabel() != descriptorpb.FieldDescriptorProto_LABEL_REPEATED { + return false // not a repeated field + } + + switch protoreflect.Kind(fd.GetType()) { + case protoreflect.MessageKind, protoreflect.GroupKind: + return false // not a scalar type field + + case protoreflect.StringKind, protoreflect.BytesKind: + // string and bytes can explicitly not be declared as packed, + // see https://protobuf.dev/programming-guides/encoding/#packed + return false + + default: + return true + } +} + +func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (fs []filedesc.Field, err error) { + fs = make([]filedesc.Field, len(fds)) // allocate up-front to ensure stable pointers + for i, fd := range fds { + f := &fs[i] + if f.L0, err = r.makeBase(f, parent, fd.GetName(), i, sb); err != nil { + return nil, err + } + f.L1.EditionFeatures = mergeEditionFeatures(parent, fd.GetOptions().GetFeatures()) + f.L1.IsProto3Optional = fd.GetProto3Optional() + if opts := fd.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.FieldOptions) + f.L1.Options = func() protoreflect.ProtoMessage { return opts } + f.L1.IsWeak = opts.GetWeak() + f.L1.IsLazy = opts.GetLazy() + if opts.Packed != nil { + f.L1.EditionFeatures.IsPacked = opts.GetPacked() + } + } + f.L1.Number = protoreflect.FieldNumber(fd.GetNumber()) + f.L1.Cardinality = protoreflect.Cardinality(fd.GetLabel()) + if fd.Type != nil { + f.L1.Kind = protoreflect.Kind(fd.GetType()) + } + if fd.JsonName != nil { + f.L1.StringName.InitJSON(fd.GetJsonName()) + } + + if f.L1.EditionFeatures.IsLegacyRequired { + f.L1.Cardinality = protoreflect.Required + } + + if f.L1.Kind == protoreflect.MessageKind && f.L1.EditionFeatures.IsDelimitedEncoded { + f.L1.Kind = protoreflect.GroupKind + } + } + return fs, nil +} + +func (r descsByName) initOneofsFromDescriptorProto(ods []*descriptorpb.OneofDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (os []filedesc.Oneof, err error) { + os = make([]filedesc.Oneof, len(ods)) // allocate up-front to ensure stable pointers + for i, od := range ods { + o := &os[i] + if o.L0, err = r.makeBase(o, parent, od.GetName(), i, sb); err != nil { + return nil, err + } + o.L1.EditionFeatures = mergeEditionFeatures(parent, od.GetOptions().GetFeatures()) + if opts := od.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.OneofOptions) + o.L1.Options = func() protoreflect.ProtoMessage { return opts } + } + } + return os, nil +} + +func (r descsByName) initExtensionDeclarations(xds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (xs []filedesc.Extension, err error) { + xs = make([]filedesc.Extension, len(xds)) // allocate up-front to ensure stable pointers + for i, xd := range xds { + x := &xs[i] + x.L2 = new(filedesc.ExtensionL2) + if x.L0, err = r.makeBase(x, parent, xd.GetName(), i, sb); err != nil { + return nil, err + } + x.L1.EditionFeatures = mergeEditionFeatures(parent, xd.GetOptions().GetFeatures()) + if opts := xd.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.FieldOptions) + x.L2.Options = func() protoreflect.ProtoMessage { return opts } + if opts.Packed != nil { + x.L1.EditionFeatures.IsPacked = opts.GetPacked() + } + } + x.L1.Number = protoreflect.FieldNumber(xd.GetNumber()) + x.L1.Cardinality = protoreflect.Cardinality(xd.GetLabel()) + if xd.Type != nil { + x.L1.Kind = protoreflect.Kind(xd.GetType()) + } + if xd.JsonName != nil { + x.L2.StringName.InitJSON(xd.GetJsonName()) + } + if x.L1.Kind == protoreflect.MessageKind && x.L1.EditionFeatures.IsDelimitedEncoded { + x.L1.Kind = protoreflect.GroupKind + } + } + return xs, nil +} + +func (r descsByName) initServiceDeclarations(sds []*descriptorpb.ServiceDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ss []filedesc.Service, err error) { + ss = make([]filedesc.Service, len(sds)) // allocate up-front to ensure stable pointers + for i, sd := range sds { + s := &ss[i] + s.L2 = new(filedesc.ServiceL2) + if s.L0, err = r.makeBase(s, parent, sd.GetName(), i, sb); err != nil { + return nil, err + } + if opts := sd.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.ServiceOptions) + s.L2.Options = func() protoreflect.ProtoMessage { return opts } + } + if s.L2.Methods.List, err = r.initMethodsFromDescriptorProto(sd.GetMethod(), s, sb); err != nil { + return nil, err + } + } + return ss, nil +} + +func (r descsByName) initMethodsFromDescriptorProto(mds []*descriptorpb.MethodDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (ms []filedesc.Method, err error) { + ms = make([]filedesc.Method, len(mds)) // allocate up-front to ensure stable pointers + for i, md := range mds { + m := &ms[i] + if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil { + return nil, err + } + if opts := md.GetOptions(); opts != nil { + opts = proto.Clone(opts).(*descriptorpb.MethodOptions) + m.L1.Options = func() protoreflect.ProtoMessage { return opts } + } + m.L1.IsStreamingClient = md.GetClientStreaming() + m.L1.IsStreamingServer = md.GetServerStreaming() + } + return ms, nil +} + +func (r descsByName) makeBase(child, parent protoreflect.Descriptor, name string, idx int, sb *strs.Builder) (filedesc.BaseL0, error) { + if !protoreflect.Name(name).IsValid() { + return filedesc.BaseL0{}, errors.New("descriptor %q has an invalid nested name: %q", parent.FullName(), name) + } + + // Derive the full name of the child. + // Note that enum values are a sibling to the enum parent in the namespace. + var fullName protoreflect.FullName + if _, ok := parent.(protoreflect.EnumDescriptor); ok { + fullName = sb.AppendFullName(parent.FullName().Parent(), protoreflect.Name(name)) + } else { + fullName = sb.AppendFullName(parent.FullName(), protoreflect.Name(name)) + } + if _, ok := r[fullName]; ok { + return filedesc.BaseL0{}, errors.New("descriptor %q already declared", fullName) + } + r[fullName] = child + + // TODO: Verify that the full name does not already exist in the resolver? + // This is not as critical since most usages of NewFile will register + // the created file back into the registry, which will perform this check. + + return filedesc.BaseL0{ + FullName: fullName, + ParentFile: parent.ParentFile().(*filedesc.File), + Parent: parent, + Index: idx, + }, nil +} diff --git a/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go new file mode 100644 index 0000000000..f3cebab29c --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go @@ -0,0 +1,291 @@ +// Copyright 2019 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 protodesc + +import ( + "google.golang.org/protobuf/internal/encoding/defval" + "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/internal/filedesc" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + + "google.golang.org/protobuf/types/descriptorpb" +) + +// resolver is a wrapper around a local registry of declarations within the file +// and the remote resolver. The remote resolver is restricted to only return +// descriptors that have been imported. +type resolver struct { + local descsByName + remote Resolver + imports importSet + + allowUnresolvable bool +} + +func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) (err error) { + for i, md := range mds { + m := &ms[i] + for j, fd := range md.GetField() { + f := &m.L2.Fields.List[j] + if f.L1.Cardinality == protoreflect.Required { + m.L2.RequiredNumbers.List = append(m.L2.RequiredNumbers.List, f.L1.Number) + } + if fd.OneofIndex != nil { + k := int(fd.GetOneofIndex()) + if !(0 <= k && k < len(md.GetOneofDecl())) { + return errors.New("message field %q has an invalid oneof index: %d", f.FullName(), k) + } + o := &m.L2.Oneofs.List[k] + f.L1.ContainingOneof = o + o.L1.Fields.List = append(o.L1.Fields.List, f) + } + + if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil { + return errors.New("message field %q cannot resolve type: %v", f.FullName(), err) + } + if f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) { + // A map field might inherit delimited encoding from a file-wide default feature. + // But maps never actually use delimited encoding. (At least for now...) + f.L1.Kind = protoreflect.MessageKind + } + if fd.DefaultValue != nil { + v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable) + if err != nil { + return errors.New("message field %q has invalid default: %v", f.FullName(), err) + } + f.L1.Default = filedesc.DefaultValue(v, ev) + } + } + + if err := r.resolveMessageDependencies(m.L1.Messages.List, md.GetNestedType()); err != nil { + return err + } + if err := r.resolveExtensionDependencies(m.L1.Extensions.List, md.GetExtension()); err != nil { + return err + } + } + return nil +} + +func (r *resolver) resolveExtensionDependencies(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) (err error) { + for i, xd := range xds { + x := &xs[i] + if x.L1.Extendee, err = r.findMessageDescriptor(x.Parent().FullName(), partialName(xd.GetExtendee()), false); err != nil { + return errors.New("extension field %q cannot resolve extendee: %v", x.FullName(), err) + } + if x.L1.Kind, x.L2.Enum, x.L2.Message, err = r.findTarget(x.Kind(), x.Parent().FullName(), partialName(xd.GetTypeName()), false); err != nil { + return errors.New("extension field %q cannot resolve type: %v", x.FullName(), err) + } + if xd.DefaultValue != nil { + v, ev, err := unmarshalDefault(xd.GetDefaultValue(), x, r.allowUnresolvable) + if err != nil { + return errors.New("extension field %q has invalid default: %v", x.FullName(), err) + } + x.L2.Default = filedesc.DefaultValue(v, ev) + } + } + return nil +} + +func (r *resolver) resolveServiceDependencies(ss []filedesc.Service, sds []*descriptorpb.ServiceDescriptorProto) (err error) { + for i, sd := range sds { + s := &ss[i] + for j, md := range sd.GetMethod() { + m := &s.L2.Methods.List[j] + m.L1.Input, err = r.findMessageDescriptor(m.Parent().FullName(), partialName(md.GetInputType()), false) + if err != nil { + return errors.New("service method %q cannot resolve input: %v", m.FullName(), err) + } + m.L1.Output, err = r.findMessageDescriptor(s.FullName(), partialName(md.GetOutputType()), false) + if err != nil { + return errors.New("service method %q cannot resolve output: %v", m.FullName(), err) + } + } + } + return nil +} + +// findTarget finds an enum or message descriptor if k is an enum, message, +// group, or unknown. If unknown, and the name could be resolved, the kind +// returned kind is set based on the type of the resolved descriptor. +func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.Kind, protoreflect.EnumDescriptor, protoreflect.MessageDescriptor, error) { + switch k { + case protoreflect.EnumKind: + ed, err := r.findEnumDescriptor(scope, ref, isWeak) + if err != nil { + return 0, nil, nil, err + } + return k, ed, nil, nil + case protoreflect.MessageKind, protoreflect.GroupKind: + md, err := r.findMessageDescriptor(scope, ref, isWeak) + if err != nil { + return 0, nil, nil, err + } + return k, nil, md, nil + case 0: + // Handle unspecified kinds (possible with parsers that operate + // on a per-file basis without knowledge of dependencies). + d, err := r.findDescriptor(scope, ref) + if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { + return k, filedesc.PlaceholderEnum(ref.FullName()), filedesc.PlaceholderMessage(ref.FullName()), nil + } else if err == protoregistry.NotFound { + return 0, nil, nil, errors.New("%q not found", ref.FullName()) + } else if err != nil { + return 0, nil, nil, err + } + switch d := d.(type) { + case protoreflect.EnumDescriptor: + return protoreflect.EnumKind, d, nil, nil + case protoreflect.MessageDescriptor: + return protoreflect.MessageKind, nil, d, nil + default: + return 0, nil, nil, errors.New("unknown kind") + } + default: + if ref != "" { + return 0, nil, nil, errors.New("target name cannot be specified for %v", k) + } + if !k.IsValid() { + return 0, nil, nil, errors.New("invalid kind: %d", k) + } + return k, nil, nil, nil + } +} + +// findDescriptor finds the descriptor by name, +// which may be a relative name within some scope. +// +// Suppose the scope was "fizz.buzz" and the reference was "Foo.Bar", +// then the following full names are searched: +// - fizz.buzz.Foo.Bar +// - fizz.Foo.Bar +// - Foo.Bar +func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.Descriptor, error) { + if !ref.IsValid() { + return nil, errors.New("invalid name reference: %q", ref) + } + if ref.IsFull() { + scope, ref = "", ref[1:] + } + var foundButNotImported protoreflect.Descriptor + for { + // Derive the full name to search. + s := protoreflect.FullName(ref) + if scope != "" { + s = scope + "." + s + } + + // Check the current file for the descriptor. + if d, ok := r.local[s]; ok { + return d, nil + } + + // Check the remote registry for the descriptor. + d, err := r.remote.FindDescriptorByName(s) + if err == nil { + // Only allow descriptors covered by one of the imports. + if r.imports[d.ParentFile().Path()] { + return d, nil + } + foundButNotImported = d + } else if err != protoregistry.NotFound { + return nil, errors.Wrap(err, "%q", s) + } + + // Continue on at a higher level of scoping. + if scope == "" { + if d := foundButNotImported; d != nil { + return nil, errors.New("resolved %q, but %q is not imported", d.FullName(), d.ParentFile().Path()) + } + return nil, protoregistry.NotFound + } + scope = scope.Parent() + } +} + +func (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.EnumDescriptor, error) { + d, err := r.findDescriptor(scope, ref) + if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { + return filedesc.PlaceholderEnum(ref.FullName()), nil + } else if err == protoregistry.NotFound { + return nil, errors.New("%q not found", ref.FullName()) + } else if err != nil { + return nil, err + } + ed, ok := d.(protoreflect.EnumDescriptor) + if !ok { + return nil, errors.New("resolved %q, but it is not an enum", d.FullName()) + } + return ed, nil +} + +func (r *resolver) findMessageDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.MessageDescriptor, error) { + d, err := r.findDescriptor(scope, ref) + if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) { + return filedesc.PlaceholderMessage(ref.FullName()), nil + } else if err == protoregistry.NotFound { + return nil, errors.New("%q not found", ref.FullName()) + } else if err != nil { + return nil, err + } + md, ok := d.(protoreflect.MessageDescriptor) + if !ok { + return nil, errors.New("resolved %q, but it is not an message", d.FullName()) + } + return md, nil +} + +// partialName is the partial name. A leading dot means that the name is full, +// otherwise the name is relative to some current scope. +// See google.protobuf.FieldDescriptorProto.type_name. +type partialName string + +func (s partialName) IsFull() bool { + return len(s) > 0 && s[0] == '.' +} + +func (s partialName) IsValid() bool { + if s.IsFull() { + return protoreflect.FullName(s[1:]).IsValid() + } + return protoreflect.FullName(s).IsValid() +} + +const unknownPrefix = "*." + +// FullName converts the partial name to a full name on a best-effort basis. +// If relative, it creates an invalid full name, using a "*." prefix +// to indicate that the start of the full name is unknown. +func (s partialName) FullName() protoreflect.FullName { + if s.IsFull() { + return protoreflect.FullName(s[1:]) + } + return protoreflect.FullName(unknownPrefix + s) +} + +func unmarshalDefault(s string, fd protoreflect.FieldDescriptor, allowUnresolvable bool) (protoreflect.Value, protoreflect.EnumValueDescriptor, error) { + var evs protoreflect.EnumValueDescriptors + if fd.Enum() != nil { + evs = fd.Enum().Values() + } + v, ev, err := defval.Unmarshal(s, fd.Kind(), evs, defval.Descriptor) + if err != nil && allowUnresolvable && evs != nil && protoreflect.Name(s).IsValid() { + v = protoreflect.ValueOfEnum(0) + if evs.Len() > 0 { + v = protoreflect.ValueOfEnum(evs.Get(0).Number()) + } + ev = filedesc.PlaceholderEnumValue(fd.Enum().FullName().Parent().Append(protoreflect.Name(s))) + } else if err != nil { + return v, ev, err + } + if !fd.HasPresence() { + return v, ev, errors.New("cannot be specified with implicit field presence") + } + if fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind || fd.Cardinality() == protoreflect.Repeated { + return v, ev, errors.New("cannot be specified on composite types") + } + return v, ev, nil +} diff --git a/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go new file mode 100644 index 0000000000..6de31c2ebd --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go @@ -0,0 +1,371 @@ +// Copyright 2019 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 protodesc + +import ( + "strings" + "unicode" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/internal/filedesc" + "google.golang.org/protobuf/internal/flags" + "google.golang.org/protobuf/internal/genid" + "google.golang.org/protobuf/internal/strs" + "google.golang.org/protobuf/reflect/protoreflect" + + "google.golang.org/protobuf/types/descriptorpb" +) + +func validateEnumDeclarations(es []filedesc.Enum, eds []*descriptorpb.EnumDescriptorProto) error { + for i, ed := range eds { + e := &es[i] + if err := e.L2.ReservedNames.CheckValid(); err != nil { + return errors.New("enum %q reserved names has %v", e.FullName(), err) + } + if err := e.L2.ReservedRanges.CheckValid(); err != nil { + return errors.New("enum %q reserved ranges has %v", e.FullName(), err) + } + if len(ed.GetValue()) == 0 { + return errors.New("enum %q must contain at least one value declaration", e.FullName()) + } + allowAlias := ed.GetOptions().GetAllowAlias() + foundAlias := false + for i := 0; i < e.Values().Len(); i++ { + v1 := e.Values().Get(i) + if v2 := e.Values().ByNumber(v1.Number()); v1 != v2 { + foundAlias = true + if !allowAlias { + return errors.New("enum %q has conflicting non-aliased values on number %d: %q with %q", e.FullName(), v1.Number(), v1.Name(), v2.Name()) + } + } + } + if allowAlias && !foundAlias { + return errors.New("enum %q allows aliases, but none were found", e.FullName()) + } + if !e.IsClosed() { + if v := e.Values().Get(0); v.Number() != 0 { + return errors.New("enum %q using open semantics must have zero number for the first value", v.FullName()) + } + // Verify that value names in open enums do not conflict if the + // case-insensitive prefix is removed. + // See protoc v3.8.0: src/google/protobuf/descriptor.cc:4991-5055 + names := map[string]protoreflect.EnumValueDescriptor{} + prefix := strings.Replace(strings.ToLower(string(e.Name())), "_", "", -1) + for i := 0; i < e.Values().Len(); i++ { + v1 := e.Values().Get(i) + s := strs.EnumValueName(strs.TrimEnumPrefix(string(v1.Name()), prefix)) + if v2, ok := names[s]; ok && v1.Number() != v2.Number() { + return errors.New("enum %q using open semantics has conflict: %q with %q", e.FullName(), v1.Name(), v2.Name()) + } + names[s] = v1 + } + } + + for j, vd := range ed.GetValue() { + v := &e.L2.Values.List[j] + if vd.Number == nil { + return errors.New("enum value %q must have a specified number", v.FullName()) + } + if e.L2.ReservedNames.Has(v.Name()) { + return errors.New("enum value %q must not use reserved name", v.FullName()) + } + if e.L2.ReservedRanges.Has(v.Number()) { + return errors.New("enum value %q must not use reserved number %d", v.FullName(), v.Number()) + } + } + } + return nil +} + +func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds []*descriptorpb.DescriptorProto) error { + // There are a few limited exceptions only for proto3 + isProto3 := file.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3) + for i, md := range mds { + m := &ms[i] + + // Handle the message descriptor itself. + isMessageSet := md.GetOptions().GetMessageSetWireFormat() + if err := m.L2.ReservedNames.CheckValid(); err != nil { + return errors.New("message %q reserved names has %v", m.FullName(), err) + } + if err := m.L2.ReservedRanges.CheckValid(isMessageSet); err != nil { + return errors.New("message %q reserved ranges has %v", m.FullName(), err) + } + if err := m.L2.ExtensionRanges.CheckValid(isMessageSet); err != nil { + return errors.New("message %q extension ranges has %v", m.FullName(), err) + } + if err := (*filedesc.FieldRanges).CheckOverlap(&m.L2.ReservedRanges, &m.L2.ExtensionRanges); err != nil { + return errors.New("message %q reserved and extension ranges has %v", m.FullName(), err) + } + for i := 0; i < m.Fields().Len(); i++ { + f1 := m.Fields().Get(i) + if f2 := m.Fields().ByNumber(f1.Number()); f1 != f2 { + return errors.New("message %q has conflicting fields: %q with %q", m.FullName(), f1.Name(), f2.Name()) + } + } + if isMessageSet && !flags.ProtoLegacy { + return errors.New("message %q is a MessageSet, which is a legacy proto1 feature that is no longer supported", m.FullName()) + } + if isMessageSet && (isProto3 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) { + return errors.New("message %q is an invalid proto1 MessageSet", m.FullName()) + } + if isProto3 { + if m.ExtensionRanges().Len() > 0 { + return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName()) + } + } + + for j, fd := range md.GetField() { + f := &m.L2.Fields.List[j] + if m.L2.ReservedNames.Has(f.Name()) { + return errors.New("message field %q must not use reserved name", f.FullName()) + } + if !f.Number().IsValid() { + return errors.New("message field %q has an invalid number: %d", f.FullName(), f.Number()) + } + if !f.Cardinality().IsValid() { + return errors.New("message field %q has an invalid cardinality: %d", f.FullName(), f.Cardinality()) + } + if m.L2.ReservedRanges.Has(f.Number()) { + return errors.New("message field %q must not use reserved number %d", f.FullName(), f.Number()) + } + if m.L2.ExtensionRanges.Has(f.Number()) { + return errors.New("message field %q with number %d in extension range", f.FullName(), f.Number()) + } + if fd.Extendee != nil { + return errors.New("message field %q may not have extendee: %q", f.FullName(), fd.GetExtendee()) + } + if f.L1.IsProto3Optional { + if !isProto3 { + return errors.New("message field %q under proto3 optional semantics must be specified in the proto3 syntax", f.FullName()) + } + if f.Cardinality() != protoreflect.Optional { + return errors.New("message field %q under proto3 optional semantics must have optional cardinality", f.FullName()) + } + if f.ContainingOneof() != nil && f.ContainingOneof().Fields().Len() != 1 { + return errors.New("message field %q under proto3 optional semantics must be within a single element oneof", f.FullName()) + } + } + if f.IsWeak() && !flags.ProtoLegacy { + return errors.New("message field %q is a weak field, which is a legacy proto1 feature that is no longer supported", f.FullName()) + } + if f.IsWeak() && (!f.HasPresence() || !isOptionalMessage(f) || f.ContainingOneof() != nil) { + return errors.New("message field %q may only be weak for an optional message", f.FullName()) + } + if f.IsPacked() && !isPackable(f) { + return errors.New("message field %q is not packable", f.FullName()) + } + if err := checkValidGroup(file, f); err != nil { + return errors.New("message field %q is an invalid group: %v", f.FullName(), err) + } + if err := checkValidMap(f); err != nil { + return errors.New("message field %q is an invalid map: %v", f.FullName(), err) + } + if isProto3 { + if f.Cardinality() == protoreflect.Required { + return errors.New("message field %q using proto3 semantics cannot be required", f.FullName()) + } + if f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().IsClosed() { + return errors.New("message field %q using proto3 semantics may only depend on open enums", f.FullName()) + } + } + if f.Cardinality() == protoreflect.Optional && !f.HasPresence() && f.Enum() != nil && !f.Enum().IsPlaceholder() && f.Enum().IsClosed() { + return errors.New("message field %q with implicit presence may only use open enums", f.FullName()) + } + } + seenSynthetic := false // synthetic oneofs for proto3 optional must come after real oneofs + for j := range md.GetOneofDecl() { + o := &m.L2.Oneofs.List[j] + if o.Fields().Len() == 0 { + return errors.New("message oneof %q must contain at least one field declaration", o.FullName()) + } + if n := o.Fields().Len(); n-1 != (o.Fields().Get(n-1).Index() - o.Fields().Get(0).Index()) { + return errors.New("message oneof %q must have consecutively declared fields", o.FullName()) + } + + if o.IsSynthetic() { + seenSynthetic = true + continue + } + if !o.IsSynthetic() && seenSynthetic { + return errors.New("message oneof %q must be declared before synthetic oneofs", o.FullName()) + } + + for i := 0; i < o.Fields().Len(); i++ { + f := o.Fields().Get(i) + if f.Cardinality() != protoreflect.Optional { + return errors.New("message field %q belongs in a oneof and must be optional", f.FullName()) + } + if f.IsWeak() { + return errors.New("message field %q belongs in a oneof and must not be a weak reference", f.FullName()) + } + } + } + + if err := validateEnumDeclarations(m.L1.Enums.List, md.GetEnumType()); err != nil { + return err + } + if err := validateMessageDeclarations(file, m.L1.Messages.List, md.GetNestedType()); err != nil { + return err + } + if err := validateExtensionDeclarations(file, m.L1.Extensions.List, md.GetExtension()); err != nil { + return err + } + } + return nil +} + +func validateExtensionDeclarations(f *filedesc.File, xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) error { + for i, xd := range xds { + x := &xs[i] + // NOTE: Avoid using the IsValid method since extensions to MessageSet + // may have a field number higher than normal. This check only verifies + // that the number is not negative or reserved. We check again later + // if we know that the extendee is definitely not a MessageSet. + if n := x.Number(); n < 0 || (protowire.FirstReservedNumber <= n && n <= protowire.LastReservedNumber) { + return errors.New("extension field %q has an invalid number: %d", x.FullName(), x.Number()) + } + if !x.Cardinality().IsValid() || x.Cardinality() == protoreflect.Required { + return errors.New("extension field %q has an invalid cardinality: %d", x.FullName(), x.Cardinality()) + } + if xd.JsonName != nil { + // A bug in older versions of protoc would always populate the + // "json_name" option for extensions when it is meaningless. + // When it did so, it would always use the camel-cased field name. + if xd.GetJsonName() != strs.JSONCamelCase(string(x.Name())) { + return errors.New("extension field %q may not have an explicitly set JSON name: %q", x.FullName(), xd.GetJsonName()) + } + } + if xd.OneofIndex != nil { + return errors.New("extension field %q may not be part of a oneof", x.FullName()) + } + if md := x.ContainingMessage(); !md.IsPlaceholder() { + if !md.ExtensionRanges().Has(x.Number()) { + return errors.New("extension field %q extends %q with non-extension field number: %d", x.FullName(), md.FullName(), x.Number()) + } + isMessageSet := md.Options().(*descriptorpb.MessageOptions).GetMessageSetWireFormat() + if isMessageSet && !isOptionalMessage(x) { + return errors.New("extension field %q extends MessageSet and must be an optional message", x.FullName()) + } + if !isMessageSet && !x.Number().IsValid() { + return errors.New("extension field %q has an invalid number: %d", x.FullName(), x.Number()) + } + } + if xd.GetOptions().GetWeak() { + return errors.New("extension field %q cannot be a weak reference", x.FullName()) + } + if x.IsPacked() && !isPackable(x) { + return errors.New("extension field %q is not packable", x.FullName()) + } + if err := checkValidGroup(f, x); err != nil { + return errors.New("extension field %q is an invalid group: %v", x.FullName(), err) + } + if md := x.Message(); md != nil && md.IsMapEntry() { + return errors.New("extension field %q cannot be a map entry", x.FullName()) + } + if f.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3) { + switch x.ContainingMessage().FullName() { + case (*descriptorpb.FileOptions)(nil).ProtoReflect().Descriptor().FullName(): + case (*descriptorpb.EnumOptions)(nil).ProtoReflect().Descriptor().FullName(): + case (*descriptorpb.EnumValueOptions)(nil).ProtoReflect().Descriptor().FullName(): + case (*descriptorpb.MessageOptions)(nil).ProtoReflect().Descriptor().FullName(): + case (*descriptorpb.FieldOptions)(nil).ProtoReflect().Descriptor().FullName(): + case (*descriptorpb.OneofOptions)(nil).ProtoReflect().Descriptor().FullName(): + case (*descriptorpb.ExtensionRangeOptions)(nil).ProtoReflect().Descriptor().FullName(): + case (*descriptorpb.ServiceOptions)(nil).ProtoReflect().Descriptor().FullName(): + case (*descriptorpb.MethodOptions)(nil).ProtoReflect().Descriptor().FullName(): + default: + return errors.New("extension field %q cannot be declared in proto3 unless extended descriptor options", x.FullName()) + } + } + } + return nil +} + +// isOptionalMessage reports whether this is an optional message. +// If the kind is unknown, it is assumed to be a message. +func isOptionalMessage(fd protoreflect.FieldDescriptor) bool { + return (fd.Kind() == 0 || fd.Kind() == protoreflect.MessageKind) && fd.Cardinality() == protoreflect.Optional +} + +// isPackable checks whether the pack option can be specified. +func isPackable(fd protoreflect.FieldDescriptor) bool { + switch fd.Kind() { + case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: + return false + } + return fd.IsList() +} + +// checkValidGroup reports whether fd is a valid group according to the same +// rules that protoc imposes. +func checkValidGroup(f *filedesc.File, fd protoreflect.FieldDescriptor) error { + md := fd.Message() + switch { + case fd.Kind() != protoreflect.GroupKind: + return nil + case f.L1.Edition == fromEditionProto(descriptorpb.Edition_EDITION_PROTO3): + return errors.New("invalid under proto3 semantics") + case md == nil || md.IsPlaceholder(): + return errors.New("message must be resolvable") + } + if f.L1.Edition < fromEditionProto(descriptorpb.Edition_EDITION_2023) { + switch { + case fd.FullName().Parent() != md.FullName().Parent(): + return errors.New("message and field must be declared in the same scope") + case !unicode.IsUpper(rune(md.Name()[0])): + return errors.New("message name must start with an uppercase") + case fd.Name() != protoreflect.Name(strings.ToLower(string(md.Name()))): + return errors.New("field name must be lowercased form of the message name") + } + } + return nil +} + +// checkValidMap checks whether the field is a valid map according to the same +// rules that protoc imposes. +// See protoc v3.8.0: src/google/protobuf/descriptor.cc:6045-6115 +func checkValidMap(fd protoreflect.FieldDescriptor) error { + md := fd.Message() + switch { + case md == nil || !md.IsMapEntry(): + return nil + case fd.FullName().Parent() != md.FullName().Parent(): + return errors.New("message and field must be declared in the same scope") + case md.Name() != protoreflect.Name(strs.MapEntryName(string(fd.Name()))): + return errors.New("incorrect implicit map entry name") + case fd.Cardinality() != protoreflect.Repeated: + return errors.New("field must be repeated") + case md.Fields().Len() != 2: + return errors.New("message must have exactly two fields") + case md.ExtensionRanges().Len() > 0: + return errors.New("message must not have any extension ranges") + case md.Enums().Len()+md.Messages().Len()+md.Extensions().Len() > 0: + return errors.New("message must not have any nested declarations") + } + kf := md.Fields().Get(0) + vf := md.Fields().Get(1) + switch { + case kf.Name() != genid.MapEntry_Key_field_name || kf.Number() != genid.MapEntry_Key_field_number || kf.Cardinality() != protoreflect.Optional || kf.ContainingOneof() != nil || kf.HasDefault(): + return errors.New("invalid key field") + case vf.Name() != genid.MapEntry_Value_field_name || vf.Number() != genid.MapEntry_Value_field_number || vf.Cardinality() != protoreflect.Optional || vf.ContainingOneof() != nil || vf.HasDefault(): + return errors.New("invalid value field") + } + switch kf.Kind() { + case protoreflect.BoolKind: // bool + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: // int32 + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: // int64 + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: // uint32 + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: // uint64 + case protoreflect.StringKind: // string + default: + return errors.New("invalid key kind: %v", kf.Kind()) + } + if e := vf.Enum(); e != nil && e.Values().Len() > 0 && e.Values().Get(0).Number() != 0 { + return errors.New("map enum value must have zero number for the first value") + } + return nil +} diff --git a/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go new file mode 100644 index 0000000000..002e0047ae --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go @@ -0,0 +1,145 @@ +// Copyright 2019 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 protodesc + +import ( + "fmt" + "os" + "sync" + + "google.golang.org/protobuf/internal/editiondefaults" + "google.golang.org/protobuf/internal/filedesc" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/descriptorpb" + "google.golang.org/protobuf/types/gofeaturespb" +) + +var defaults = &descriptorpb.FeatureSetDefaults{} +var defaultsCacheMu sync.Mutex +var defaultsCache = make(map[filedesc.Edition]*descriptorpb.FeatureSet) + +func init() { + err := proto.Unmarshal(editiondefaults.Defaults, defaults) + if err != nil { + fmt.Fprintf(os.Stderr, "unmarshal editions defaults: %v\n", err) + os.Exit(1) + } +} + +func fromEditionProto(epb descriptorpb.Edition) filedesc.Edition { + return filedesc.Edition(epb) +} + +func toEditionProto(ed filedesc.Edition) descriptorpb.Edition { + switch ed { + case filedesc.EditionUnknown: + return descriptorpb.Edition_EDITION_UNKNOWN + case filedesc.EditionProto2: + return descriptorpb.Edition_EDITION_PROTO2 + case filedesc.EditionProto3: + return descriptorpb.Edition_EDITION_PROTO3 + case filedesc.Edition2023: + return descriptorpb.Edition_EDITION_2023 + default: + panic(fmt.Sprintf("unknown value for edition: %v", ed)) + } +} + +func getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet { + defaultsCacheMu.Lock() + defer defaultsCacheMu.Unlock() + if def, ok := defaultsCache[ed]; ok { + return def + } + edpb := toEditionProto(ed) + if defaults.GetMinimumEdition() > edpb || defaults.GetMaximumEdition() < edpb { + // This should never happen protodesc.(FileOptions).New would fail when + // initializing the file descriptor. + // This most likely means the embedded defaults were not updated. + fmt.Fprintf(os.Stderr, "internal error: unsupported edition %v (did you forget to update the embedded defaults (i.e. the bootstrap descriptor proto)?)\n", edpb) + os.Exit(1) + } + fsed := defaults.GetDefaults()[0] + // Using a linear search for now. + // Editions are guaranteed to be sorted and thus we could use a binary search. + // Given that there are only a handful of editions (with one more per year) + // there is not much reason to use a binary search. + for _, def := range defaults.GetDefaults() { + if def.GetEdition() <= edpb { + fsed = def + } else { + break + } + } + fs := proto.Clone(fsed.GetFixedFeatures()).(*descriptorpb.FeatureSet) + proto.Merge(fs, fsed.GetOverridableFeatures()) + defaultsCache[ed] = fs + return fs +} + +// mergeEditionFeatures merges the parent and child feature sets. This function +// should be used when initializing Go descriptors from descriptor protos which +// is why the parent is a filedesc.EditionsFeatures (Go representation) while +// the child is a descriptorproto.FeatureSet (protoc representation). +// Any feature set by the child overwrites what is set by the parent. +func mergeEditionFeatures(parentDesc protoreflect.Descriptor, child *descriptorpb.FeatureSet) filedesc.EditionFeatures { + var parentFS filedesc.EditionFeatures + switch p := parentDesc.(type) { + case *filedesc.File: + parentFS = p.L1.EditionFeatures + case *filedesc.Message: + parentFS = p.L1.EditionFeatures + default: + panic(fmt.Sprintf("unknown parent type %T", parentDesc)) + } + if child == nil { + return parentFS + } + if fp := child.FieldPresence; fp != nil { + parentFS.IsFieldPresence = *fp == descriptorpb.FeatureSet_LEGACY_REQUIRED || + *fp == descriptorpb.FeatureSet_EXPLICIT + parentFS.IsLegacyRequired = *fp == descriptorpb.FeatureSet_LEGACY_REQUIRED + } + if et := child.EnumType; et != nil { + parentFS.IsOpenEnum = *et == descriptorpb.FeatureSet_OPEN + } + + if rfe := child.RepeatedFieldEncoding; rfe != nil { + parentFS.IsPacked = *rfe == descriptorpb.FeatureSet_PACKED + } + + if utf8val := child.Utf8Validation; utf8val != nil { + parentFS.IsUTF8Validated = *utf8val == descriptorpb.FeatureSet_VERIFY + } + + if me := child.MessageEncoding; me != nil { + parentFS.IsDelimitedEncoded = *me == descriptorpb.FeatureSet_DELIMITED + } + + if jf := child.JsonFormat; jf != nil { + parentFS.IsJSONCompliant = *jf == descriptorpb.FeatureSet_ALLOW + } + + if goFeatures, ok := proto.GetExtension(child, gofeaturespb.E_Go).(*gofeaturespb.GoFeatures); ok && goFeatures != nil { + if luje := goFeatures.LegacyUnmarshalJsonEnum; luje != nil { + parentFS.GenerateLegacyUnmarshalJSON = *luje + } + } + + return parentFS +} + +// initFileDescFromFeatureSet initializes editions related fields in fd based +// on fs. If fs is nil it is assumed to be an empty featureset and all fields +// will be initialized with the appropriate default. fd.L1.Edition must be set +// before calling this function. +func initFileDescFromFeatureSet(fd *filedesc.File, fs *descriptorpb.FeatureSet) { + dfs := getFeatureSetFor(fd.L1.Edition) + // initialize the featureset with the defaults + fd.L1.EditionFeatures = mergeEditionFeatures(fd, dfs) + // overwrite any options explicitly specified + fd.L1.EditionFeatures = mergeEditionFeatures(fd, fs) +} diff --git a/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go new file mode 100644 index 0000000000..a5de8d4001 --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go @@ -0,0 +1,274 @@ +// Copyright 2019 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 protodesc + +import ( + "fmt" + "strings" + + "google.golang.org/protobuf/internal/encoding/defval" + "google.golang.org/protobuf/internal/strs" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "google.golang.org/protobuf/types/descriptorpb" +) + +// ToFileDescriptorProto copies a [protoreflect.FileDescriptor] into a +// google.protobuf.FileDescriptorProto message. +func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileDescriptorProto { + p := &descriptorpb.FileDescriptorProto{ + Name: proto.String(file.Path()), + Options: proto.Clone(file.Options()).(*descriptorpb.FileOptions), + } + if file.Package() != "" { + p.Package = proto.String(string(file.Package())) + } + for i, imports := 0, file.Imports(); i < imports.Len(); i++ { + imp := imports.Get(i) + p.Dependency = append(p.Dependency, imp.Path()) + if imp.IsPublic { + p.PublicDependency = append(p.PublicDependency, int32(i)) + } + if imp.IsWeak { + p.WeakDependency = append(p.WeakDependency, int32(i)) + } + } + for i, locs := 0, file.SourceLocations(); i < locs.Len(); i++ { + loc := locs.Get(i) + l := &descriptorpb.SourceCodeInfo_Location{} + l.Path = append(l.Path, loc.Path...) + if loc.StartLine == loc.EndLine { + l.Span = []int32{int32(loc.StartLine), int32(loc.StartColumn), int32(loc.EndColumn)} + } else { + l.Span = []int32{int32(loc.StartLine), int32(loc.StartColumn), int32(loc.EndLine), int32(loc.EndColumn)} + } + l.LeadingDetachedComments = append([]string(nil), loc.LeadingDetachedComments...) + if loc.LeadingComments != "" { + l.LeadingComments = proto.String(loc.LeadingComments) + } + if loc.TrailingComments != "" { + l.TrailingComments = proto.String(loc.TrailingComments) + } + if p.SourceCodeInfo == nil { + p.SourceCodeInfo = &descriptorpb.SourceCodeInfo{} + } + p.SourceCodeInfo.Location = append(p.SourceCodeInfo.Location, l) + + } + for i, messages := 0, file.Messages(); i < messages.Len(); i++ { + p.MessageType = append(p.MessageType, ToDescriptorProto(messages.Get(i))) + } + for i, enums := 0, file.Enums(); i < enums.Len(); i++ { + p.EnumType = append(p.EnumType, ToEnumDescriptorProto(enums.Get(i))) + } + for i, services := 0, file.Services(); i < services.Len(); i++ { + p.Service = append(p.Service, ToServiceDescriptorProto(services.Get(i))) + } + for i, exts := 0, file.Extensions(); i < exts.Len(); i++ { + p.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i))) + } + if syntax := file.Syntax(); syntax != protoreflect.Proto2 && syntax.IsValid() { + p.Syntax = proto.String(file.Syntax().String()) + } + if file.Syntax() == protoreflect.Editions { + desc := file + if fileImportDesc, ok := file.(protoreflect.FileImport); ok { + desc = fileImportDesc.FileDescriptor + } + + if editionsInterface, ok := desc.(interface{ Edition() int32 }); ok { + p.Edition = descriptorpb.Edition(editionsInterface.Edition()).Enum() + } + } + return p +} + +// ToDescriptorProto copies a [protoreflect.MessageDescriptor] into a +// google.protobuf.DescriptorProto message. +func ToDescriptorProto(message protoreflect.MessageDescriptor) *descriptorpb.DescriptorProto { + p := &descriptorpb.DescriptorProto{ + Name: proto.String(string(message.Name())), + Options: proto.Clone(message.Options()).(*descriptorpb.MessageOptions), + } + for i, fields := 0, message.Fields(); i < fields.Len(); i++ { + p.Field = append(p.Field, ToFieldDescriptorProto(fields.Get(i))) + } + for i, exts := 0, message.Extensions(); i < exts.Len(); i++ { + p.Extension = append(p.Extension, ToFieldDescriptorProto(exts.Get(i))) + } + for i, messages := 0, message.Messages(); i < messages.Len(); i++ { + p.NestedType = append(p.NestedType, ToDescriptorProto(messages.Get(i))) + } + for i, enums := 0, message.Enums(); i < enums.Len(); i++ { + p.EnumType = append(p.EnumType, ToEnumDescriptorProto(enums.Get(i))) + } + for i, xranges := 0, message.ExtensionRanges(); i < xranges.Len(); i++ { + xrange := xranges.Get(i) + p.ExtensionRange = append(p.ExtensionRange, &descriptorpb.DescriptorProto_ExtensionRange{ + Start: proto.Int32(int32(xrange[0])), + End: proto.Int32(int32(xrange[1])), + Options: proto.Clone(message.ExtensionRangeOptions(i)).(*descriptorpb.ExtensionRangeOptions), + }) + } + for i, oneofs := 0, message.Oneofs(); i < oneofs.Len(); i++ { + p.OneofDecl = append(p.OneofDecl, ToOneofDescriptorProto(oneofs.Get(i))) + } + for i, ranges := 0, message.ReservedRanges(); i < ranges.Len(); i++ { + rrange := ranges.Get(i) + p.ReservedRange = append(p.ReservedRange, &descriptorpb.DescriptorProto_ReservedRange{ + Start: proto.Int32(int32(rrange[0])), + End: proto.Int32(int32(rrange[1])), + }) + } + for i, names := 0, message.ReservedNames(); i < names.Len(); i++ { + p.ReservedName = append(p.ReservedName, string(names.Get(i))) + } + return p +} + +// ToFieldDescriptorProto copies a [protoreflect.FieldDescriptor] into a +// google.protobuf.FieldDescriptorProto message. +func ToFieldDescriptorProto(field protoreflect.FieldDescriptor) *descriptorpb.FieldDescriptorProto { + p := &descriptorpb.FieldDescriptorProto{ + Name: proto.String(string(field.Name())), + Number: proto.Int32(int32(field.Number())), + Label: descriptorpb.FieldDescriptorProto_Label(field.Cardinality()).Enum(), + Options: proto.Clone(field.Options()).(*descriptorpb.FieldOptions), + } + if field.IsExtension() { + p.Extendee = fullNameOf(field.ContainingMessage()) + } + if field.Kind().IsValid() { + p.Type = descriptorpb.FieldDescriptorProto_Type(field.Kind()).Enum() + } + if field.Enum() != nil { + p.TypeName = fullNameOf(field.Enum()) + } + if field.Message() != nil { + p.TypeName = fullNameOf(field.Message()) + } + if field.HasJSONName() { + // A bug in older versions of protoc would always populate the + // "json_name" option for extensions when it is meaningless. + // When it did so, it would always use the camel-cased field name. + if field.IsExtension() { + p.JsonName = proto.String(strs.JSONCamelCase(string(field.Name()))) + } else { + p.JsonName = proto.String(field.JSONName()) + } + } + if field.Syntax() == protoreflect.Proto3 && field.HasOptionalKeyword() { + p.Proto3Optional = proto.Bool(true) + } + if field.Syntax() == protoreflect.Editions { + // Editions have no group keyword, this type is only set so that downstream users continue + // treating this as delimited encoding. + if p.GetType() == descriptorpb.FieldDescriptorProto_TYPE_GROUP { + p.Type = descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum() + } + // Editions have no required keyword, this label is only set so that downstream users continue + // treating it as required. + if p.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REQUIRED { + p.Label = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum() + } + } + if field.HasDefault() { + def, err := defval.Marshal(field.Default(), field.DefaultEnumValue(), field.Kind(), defval.Descriptor) + if err != nil && field.DefaultEnumValue() != nil { + def = string(field.DefaultEnumValue().Name()) // occurs for unresolved enum values + } else if err != nil { + panic(fmt.Sprintf("%v: %v", field.FullName(), err)) + } + p.DefaultValue = proto.String(def) + } + if oneof := field.ContainingOneof(); oneof != nil { + p.OneofIndex = proto.Int32(int32(oneof.Index())) + } + return p +} + +// ToOneofDescriptorProto copies a [protoreflect.OneofDescriptor] into a +// google.protobuf.OneofDescriptorProto message. +func ToOneofDescriptorProto(oneof protoreflect.OneofDescriptor) *descriptorpb.OneofDescriptorProto { + return &descriptorpb.OneofDescriptorProto{ + Name: proto.String(string(oneof.Name())), + Options: proto.Clone(oneof.Options()).(*descriptorpb.OneofOptions), + } +} + +// ToEnumDescriptorProto copies a [protoreflect.EnumDescriptor] into a +// google.protobuf.EnumDescriptorProto message. +func ToEnumDescriptorProto(enum protoreflect.EnumDescriptor) *descriptorpb.EnumDescriptorProto { + p := &descriptorpb.EnumDescriptorProto{ + Name: proto.String(string(enum.Name())), + Options: proto.Clone(enum.Options()).(*descriptorpb.EnumOptions), + } + for i, values := 0, enum.Values(); i < values.Len(); i++ { + p.Value = append(p.Value, ToEnumValueDescriptorProto(values.Get(i))) + } + for i, ranges := 0, enum.ReservedRanges(); i < ranges.Len(); i++ { + rrange := ranges.Get(i) + p.ReservedRange = append(p.ReservedRange, &descriptorpb.EnumDescriptorProto_EnumReservedRange{ + Start: proto.Int32(int32(rrange[0])), + End: proto.Int32(int32(rrange[1])), + }) + } + for i, names := 0, enum.ReservedNames(); i < names.Len(); i++ { + p.ReservedName = append(p.ReservedName, string(names.Get(i))) + } + return p +} + +// ToEnumValueDescriptorProto copies a [protoreflect.EnumValueDescriptor] into a +// google.protobuf.EnumValueDescriptorProto message. +func ToEnumValueDescriptorProto(value protoreflect.EnumValueDescriptor) *descriptorpb.EnumValueDescriptorProto { + return &descriptorpb.EnumValueDescriptorProto{ + Name: proto.String(string(value.Name())), + Number: proto.Int32(int32(value.Number())), + Options: proto.Clone(value.Options()).(*descriptorpb.EnumValueOptions), + } +} + +// ToServiceDescriptorProto copies a [protoreflect.ServiceDescriptor] into a +// google.protobuf.ServiceDescriptorProto message. +func ToServiceDescriptorProto(service protoreflect.ServiceDescriptor) *descriptorpb.ServiceDescriptorProto { + p := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String(string(service.Name())), + Options: proto.Clone(service.Options()).(*descriptorpb.ServiceOptions), + } + for i, methods := 0, service.Methods(); i < methods.Len(); i++ { + p.Method = append(p.Method, ToMethodDescriptorProto(methods.Get(i))) + } + return p +} + +// ToMethodDescriptorProto copies a [protoreflect.MethodDescriptor] into a +// google.protobuf.MethodDescriptorProto message. +func ToMethodDescriptorProto(method protoreflect.MethodDescriptor) *descriptorpb.MethodDescriptorProto { + p := &descriptorpb.MethodDescriptorProto{ + Name: proto.String(string(method.Name())), + InputType: fullNameOf(method.Input()), + OutputType: fullNameOf(method.Output()), + Options: proto.Clone(method.Options()).(*descriptorpb.MethodOptions), + } + if method.IsStreamingClient() { + p.ClientStreaming = proto.Bool(true) + } + if method.IsStreamingServer() { + p.ServerStreaming = proto.Bool(true) + } + return p +} + +func fullNameOf(d protoreflect.Descriptor) *string { + if d == nil { + return nil + } + if strings.HasPrefix(string(d.FullName()), unknownPrefix) { + return proto.String(string(d.FullName()[len(unknownPrefix):])) + } + return proto.String("." + string(d.FullName())) +} diff --git a/go-controller/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/go-controller/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go index cd7fbc87a4..cd8fadbaf8 100644 --- a/go-controller/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +++ b/go-controller/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go @@ -68,7 +68,7 @@ type Descriptor interface { // dependency is not resolved, in which case only name information is known. // // Placeholder types may only be returned by the following accessors - // as a result of unresolved dependencies: + // as a result of unresolved dependencies or weak imports: // // ╔═══════════════════════════════════╤═════════════════════╗ // ║ Accessor │ Descriptor ║ @@ -168,7 +168,11 @@ type FileImport struct { // The current file and the imported file must be within proto package. IsPublic bool - // Deprecated: support for weak fields has been removed. + // IsWeak reports whether this is a weak import, which does not impose + // a direct dependency on the target file. + // + // Weak imports are a legacy proto1 feature. Equivalent behavior is + // achieved using proto2 extension fields or proto3 Any messages. IsWeak bool } @@ -321,7 +325,9 @@ type FieldDescriptor interface { // specified in the source .proto file. HasOptionalKeyword() bool - // Deprecated: support for weak fields has been removed. + // IsWeak reports whether this is a weak field, which does not impose a + // direct dependency on the target type. + // If true, then Message returns a placeholder type. IsWeak() bool // IsPacked reports whether repeated primitive numeric kinds should be diff --git a/go-controller/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go b/go-controller/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go index a4b78acef6..a7b0d06ff3 100644 --- a/go-controller/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go +++ b/go-controller/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go @@ -152,7 +152,7 @@ type Message interface { // This method may return nil. // // The returned methods type is identical to - // [google.golang.org/protobuf/runtime/protoiface.Methods]. + // google.golang.org/protobuf/runtime/protoiface.Methods. // Consult the protoiface package documentation for details. ProtoMethods() *methods } diff --git a/go-controller/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/go-controller/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go index 28e9e9f039..246156561c 100644 --- a/go-controller/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +++ b/go-controller/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go @@ -122,22 +122,6 @@ type UnmarshalInputFlags = uint8 const ( UnmarshalDiscardUnknown UnmarshalInputFlags = 1 << iota - - // UnmarshalAliasBuffer permits unmarshal operations to alias the input buffer. - // The unmarshaller must not modify the contents of the buffer. - UnmarshalAliasBuffer - - // UnmarshalValidated indicates that validation has already been - // performed on the input buffer. - UnmarshalValidated - - // UnmarshalCheckRequired is set if this unmarshal operation ultimately will care if required fields are - // initialized. - UnmarshalCheckRequired - - // UnmarshalNoLazyDecoding is set if this unmarshal operation should not use - // lazy decoding, even when otherwise available. - UnmarshalNoLazyDecoding ) // UnmarshalOutputFlags are output from the Unmarshal method. diff --git a/go-controller/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go b/go-controller/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go index 93df1b569b..4a1ab7fb3d 100644 --- a/go-controller/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go +++ b/go-controller/vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go @@ -15,7 +15,6 @@ import ( "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/filetype" "google.golang.org/protobuf/internal/impl" - "google.golang.org/protobuf/internal/protolazy" ) // UnsafeEnabled specifies whether package unsafe can be used. @@ -40,9 +39,6 @@ type ( ExtensionFieldV1 = impl.ExtensionField Pointer = impl.Pointer - - LazyUnmarshalInfo = *protolazy.XXX_lazyUnmarshalInfo - RaceDetectHookData = impl.RaceDetectHookData ) var X impl.Export diff --git a/go-controller/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/go-controller/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index a516337674..6dea75cd5b 100644 --- a/go-controller/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/go-controller/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -46,7 +46,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) // The full set of known editions. @@ -70,7 +69,7 @@ const ( Edition_EDITION_2023 Edition = 1000 Edition_EDITION_2024 Edition = 1001 // Placeholder editions for testing feature resolution. These should not be - // used or relied on outside of tests. + // used or relyed on outside of tests. Edition_EDITION_1_TEST_ONLY Edition = 1 Edition_EDITION_2_TEST_ONLY Edition = 2 Edition_EDITION_99997_TEST_ONLY Edition = 99997 @@ -578,6 +577,8 @@ func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { } // If set to RETENTION_SOURCE, the option will be omitted from the binary. +// Note: as of January 2023, support for this is in progress and does not yet +// have an effect (b/264593489). type FieldOptions_OptionRetention int32 const ( @@ -639,7 +640,8 @@ func (FieldOptions_OptionRetention) EnumDescriptor() ([]byte, []int) { // This indicates the types of entities that the field may apply to when used // as an option. If it is unset, then the field may be freely used as an -// option on any kind of entity. +// option on any kind of entity. Note: as of January 2023, support for this is +// in progress and does not yet have an effect (b/264593489). type FieldOptions_OptionTargetType int32 const ( @@ -1206,11 +1208,11 @@ func (GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) { // The protocol compiler can output a FileDescriptorSet containing the .proto // files it parses. type FileDescriptorSet struct { - state protoimpl.MessageState `protogen:"open.v1"` - File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` } func (x *FileDescriptorSet) Reset() { @@ -1252,9 +1254,12 @@ func (x *FileDescriptorSet) GetFile() []*FileDescriptorProto { // Describes a complete .proto file. type FileDescriptorProto struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // file name, relative to root of source tree - Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // file name, relative to root of source tree + Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. // Names of files imported by this file. Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` // Indexes of the public imported files in the dependency list above. @@ -1279,9 +1284,7 @@ type FileDescriptorProto struct { // If `edition` is present, this value must be "editions". Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` // The edition of the proto file. - Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` } func (x *FileDescriptorProto) Reset() { @@ -1407,7 +1410,10 @@ func (x *FileDescriptorProto) GetEdition() Edition { // Describes a message type. type DescriptorProto struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` @@ -1419,9 +1425,7 @@ type DescriptorProto struct { ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` // Reserved field names, which may not be used by fields in the same message. // A given name may only be reserved once. - ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` } func (x *DescriptorProto) Reset() { @@ -1525,7 +1529,11 @@ func (x *DescriptorProto) GetReservedName() []string { } type ExtensionRangeOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` // For external users: DO NOT USE. We are in the process of open sourcing @@ -1537,10 +1545,7 @@ type ExtensionRangeOptions struct { // The verification state of the range. // TODO: flip the default to DECLARATION once all empty ranges // are marked as UNVERIFIED. - Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"` } // Default values for ExtensionRangeOptions fields. @@ -1608,7 +1613,10 @@ func (x *ExtensionRangeOptions) GetVerification() ExtensionRangeOptions_Verifica // Describes a field within a message. type FieldDescriptorProto struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` @@ -1660,8 +1668,6 @@ type FieldDescriptorProto struct { // Proto2 optional fields do not set this flag, because they already indicate // optional with `LABEL_OPTIONAL`. Proto3Optional *bool `protobuf:"varint,17,opt,name=proto3_optional,json=proto3Optional" json:"proto3_optional,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *FieldDescriptorProto) Reset() { @@ -1773,11 +1779,12 @@ func (x *FieldDescriptorProto) GetProto3Optional() bool { // Describes a oneof. type OneofDescriptorProto struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` } func (x *OneofDescriptorProto) Reset() { @@ -1826,7 +1833,10 @@ func (x *OneofDescriptorProto) GetOptions() *OneofOptions { // Describes an enum type. type EnumDescriptorProto struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` @@ -1836,9 +1846,7 @@ type EnumDescriptorProto struct { ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` // Reserved enum value names, which may not be reused. A given name may only // be reserved once. - ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` } func (x *EnumDescriptorProto) Reset() { @@ -1908,12 +1916,13 @@ func (x *EnumDescriptorProto) GetReservedName() []string { // Describes a value within an enum. type EnumValueDescriptorProto struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` - Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` + Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` } func (x *EnumValueDescriptorProto) Reset() { @@ -1969,12 +1978,13 @@ func (x *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { // Describes a service. type ServiceDescriptorProto struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` - Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` + Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` } func (x *ServiceDescriptorProto) Reset() { @@ -2030,8 +2040,11 @@ func (x *ServiceDescriptorProto) GetOptions() *ServiceOptions { // Describes a method of a service. type MethodDescriptorProto struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Input and output type names. These are resolved in the same way as // FieldDescriptorProto.type_name, but must refer to a message type. InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` @@ -2041,8 +2054,6 @@ type MethodDescriptorProto struct { ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` // Identifies if server streams multiple server messages ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } // Default values for MethodDescriptorProto fields. @@ -2124,7 +2135,11 @@ func (x *MethodDescriptorProto) GetServerStreaming() bool { } type FileOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + // Sets the Java package where classes generated from this .proto will be // placed. By default, the proto package is used, but this is often // inappropriate because proto packages do not normally start with backwards @@ -2216,9 +2231,6 @@ type FileOptions struct { // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } // Default values for FileOptions fields. @@ -2412,7 +2424,11 @@ func (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption { } type MessageOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + // Set true to use the old proto1 MessageSet wire format for extensions. // This is provided for backwards-compatibility with the MessageSet wire // format. You should not use this for any other reason: It's less @@ -2485,9 +2501,6 @@ type MessageOptions struct { Features *FeatureSet `protobuf:"bytes,12,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } // Default values for MessageOptions fields. @@ -2578,14 +2591,17 @@ func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { } type FieldOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` - // NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + // The ctype option instructs the C++ code generator to use a different // representation of the field than it normally would. See the specific // options below. This option is only implemented to support use of // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - // type "bytes" in the open source release. - // TODO: make ctype actually deprecated. + // type "bytes" in the open source release -- sorry, we'll try to include + // other types in a future version! Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` // The packed option can be enabled for repeated primitive fields to enable // a more efficient representation on the wire. Rather than repeatedly @@ -2652,9 +2668,6 @@ type FieldOptions struct { FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,22,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } // Default values for FieldOptions fields. @@ -2797,14 +2810,15 @@ func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { } type OneofOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + // Any features defined in the specific edition. Features *FeatureSet `protobuf:"bytes,1,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *OneofOptions) Reset() { @@ -2852,7 +2866,11 @@ func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { } type EnumOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + // Set this option to true to allow mapping different tag names to the same // value. AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` @@ -2874,9 +2892,6 @@ type EnumOptions struct { Features *FeatureSet `protobuf:"bytes,7,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } // Default values for EnumOptions fields. @@ -2951,7 +2966,11 @@ func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { } type EnumValueOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + // Is this enum value deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the enum value, or it will be completely ignored; in the very least, @@ -2967,9 +2986,6 @@ type EnumValueOptions struct { FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,4,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } // Default values for EnumValueOptions fields. @@ -3044,7 +3060,11 @@ func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { } type ServiceOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + // Any features defined in the specific edition. Features *FeatureSet `protobuf:"bytes,34,opt,name=features" json:"features,omitempty"` // Is this service deprecated? @@ -3054,9 +3074,6 @@ type ServiceOptions struct { Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } // Default values for ServiceOptions fields. @@ -3116,7 +3133,11 @@ func (x *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { } type MethodOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + // Is this method deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the method, or it will be completely ignored; in the very least, @@ -3127,9 +3148,6 @@ type MethodOptions struct { Features *FeatureSet `protobuf:"bytes,35,opt,name=features" json:"features,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } // Default values for MethodOptions fields. @@ -3203,8 +3221,11 @@ func (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions // in them. type UninterpretedOption struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` // The value of the uninterpreted option, in whatever type the tokenizer // identified it as during parsing. Exactly one of these should be set. IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` @@ -3213,8 +3234,6 @@ type UninterpretedOption struct { DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *UninterpretedOption) Reset() { @@ -3303,16 +3322,17 @@ func (x *UninterpretedOption) GetAggregateValue() string { // be designed and implemented to handle this, hopefully before we ever hit a // conflict here. type FeatureSet struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + extensionFields protoimpl.ExtensionFields + FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"` EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"` RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"` Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"` MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"` JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *FeatureSet) Reset() { @@ -3392,7 +3412,10 @@ func (x *FeatureSet) GetJsonFormat() FeatureSet_JsonFormat { // feature resolution. The resolution with this object becomes a simple search // for the closest matching edition, followed by proto merges. type FeatureSetDefaults struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + Defaults []*FeatureSetDefaults_FeatureSetEditionDefault `protobuf:"bytes,1,rep,name=defaults" json:"defaults,omitempty"` // The minimum supported edition (inclusive) when this was constructed. // Editions before this will not have defaults. @@ -3400,8 +3423,6 @@ type FeatureSetDefaults struct { // The maximum known edition (inclusive) when this was constructed. Editions // after this will not have reliable defaults. MaximumEdition *Edition `protobuf:"varint,5,opt,name=maximum_edition,json=maximumEdition,enum=google.protobuf.Edition" json:"maximum_edition,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *FeatureSetDefaults) Reset() { @@ -3458,7 +3479,10 @@ func (x *FeatureSetDefaults) GetMaximumEdition() Edition { // Encapsulates information about the original source file from which a // FileDescriptorProto was generated. type SourceCodeInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // A Location identifies a piece of source code in a .proto file which // corresponds to a particular definition. This information is intended // to be useful to IDEs, code indexers, documentation generators, and similar @@ -3507,10 +3531,7 @@ type SourceCodeInfo struct { // - Code which tries to interpret locations should probably be designed to // ignore those that it doesn't understand, as more types of locations could // be recorded in the future. - Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` } func (x *SourceCodeInfo) Reset() { @@ -3554,12 +3575,13 @@ func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { // file. A GeneratedCodeInfo message is associated with only one generated // source file, but may contain references to different source .proto files. type GeneratedCodeInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // An Annotation connects some span of text in generated code to an element // of its generating .proto file. - Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` } func (x *GeneratedCodeInfo) Reset() { @@ -3600,12 +3622,13 @@ func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { } type DescriptorProto_ExtensionRange struct { - state protoimpl.MessageState `protogen:"open.v1"` - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. - Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. + Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` } func (x *DescriptorProto_ExtensionRange) Reset() { @@ -3663,11 +3686,12 @@ func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { // fields or extension ranges in the same message. Reserved ranges may // not overlap. type DescriptorProto_ReservedRange struct { - state protoimpl.MessageState `protogen:"open.v1"` - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. } func (x *DescriptorProto_ReservedRange) Reset() { @@ -3715,7 +3739,10 @@ func (x *DescriptorProto_ReservedRange) GetEnd() int32 { } type ExtensionRangeOptions_Declaration struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // The extension number declared within the extension range. Number *int32 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"` // The fully-qualified name of the extension field. There must be a leading @@ -3731,9 +3758,7 @@ type ExtensionRangeOptions_Declaration struct { Reserved *bool `protobuf:"varint,5,opt,name=reserved" json:"reserved,omitempty"` // If true, indicates that the extension must be defined as repeated. // Otherwise the extension must be defined as optional. - Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"` } func (x *ExtensionRangeOptions_Declaration) Reset() { @@ -3808,11 +3833,12 @@ func (x *ExtensionRangeOptions_Declaration) GetRepeated() bool { // is inclusive such that it can appropriately represent the entire int32 // domain. type EnumDescriptorProto_EnumReservedRange struct { - state protoimpl.MessageState `protogen:"open.v1"` - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Inclusive. - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Inclusive. } func (x *EnumDescriptorProto_EnumReservedRange) Reset() { @@ -3860,11 +3886,12 @@ func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { } type FieldOptions_EditionDefault struct { - state protoimpl.MessageState `protogen:"open.v1"` - Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value. - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value. } func (x *FieldOptions_EditionDefault) Reset() { @@ -3913,7 +3940,10 @@ func (x *FieldOptions_EditionDefault) GetValue() string { // Information about the support window of a feature. type FieldOptions_FeatureSupport struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // The edition that this feature was first available in. In editions // earlier than this one, the default assigned to EDITION_LEGACY will be // used, and proto files will not be able to override it. @@ -3928,8 +3958,6 @@ type FieldOptions_FeatureSupport struct { // this one, the last default assigned will be used, and proto files will // not be able to override it. EditionRemoved *Edition `protobuf:"varint,4,opt,name=edition_removed,json=editionRemoved,enum=google.protobuf.Edition" json:"edition_removed,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *FieldOptions_FeatureSupport) Reset() { @@ -3996,11 +4024,12 @@ func (x *FieldOptions_FeatureSupport) GetEditionRemoved() Edition { // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents // "foo.(bar.baz).moo". type UninterpretedOption_NamePart struct { - state protoimpl.MessageState `protogen:"open.v1"` - NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` - IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` + IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` } func (x *UninterpretedOption_NamePart) Reset() { @@ -4052,14 +4081,15 @@ func (x *UninterpretedOption_NamePart) GetIsExtension() bool { // the defaults at the closest matching edition ordered at or before it should // be used. This field must be in strict ascending order by edition. type FeatureSetDefaults_FeatureSetEditionDefault struct { - state protoimpl.MessageState `protogen:"open.v1"` - Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` // Defaults of features that can be overridden in this edition. OverridableFeatures *FeatureSet `protobuf:"bytes,4,opt,name=overridable_features,json=overridableFeatures" json:"overridable_features,omitempty"` // Defaults of features that can't be overridden in this edition. FixedFeatures *FeatureSet `protobuf:"bytes,5,opt,name=fixed_features,json=fixedFeatures" json:"fixed_features,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() { @@ -4114,7 +4144,10 @@ func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFixedFeatures() *Featur } type SourceCodeInfo_Location struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Identifies which part of the FileDescriptorProto was defined at this // location. // @@ -4206,8 +4239,6 @@ type SourceCodeInfo_Location struct { LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache } func (x *SourceCodeInfo_Location) Reset() { @@ -4276,7 +4307,10 @@ func (x *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { } type GeneratedCodeInfo_Annotation struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Identifies the element in the original source .proto file. This field // is formatted the same as SourceCodeInfo.Location.path. Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` @@ -4288,10 +4322,8 @@ type GeneratedCodeInfo_Annotation struct { // Identifies the ending offset in bytes in the generated code that // relates to the identified object. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). - End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` - Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` } func (x *GeneratedCodeInfo_Annotation) Reset() { @@ -4361,478 +4393,498 @@ func (x *GeneratedCodeInfo_Annotation) GetSemantic() GeneratedCodeInfo_Annotatio var File_google_protobuf_descriptor_proto protoreflect.FileDescriptor -var file_google_protobuf_descriptor_proto_rawDesc = string([]byte{ +var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x22, 0x5b, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x62, 0x75, 0x66, 0x22, 0x4d, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, - 0x6c, 0x65, 0x2a, 0x0c, 0x08, 0x80, 0xec, 0xca, 0xff, 0x01, 0x10, 0x81, 0xec, 0xca, 0xff, 0x01, - 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, - 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, - 0x6e, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, 0x77, 0x65, - 0x61, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x43, 0x0a, 0x0c, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x07, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, 0x0a, 0x0f, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6c, 0x65, 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, + 0x03, 0x28, 0x05, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x65, 0x70, 0x65, 0x6e, + 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, + 0x77, 0x65, 0x61, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x43, + 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, - 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, - 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, - 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, - 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, + 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, + 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, + 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, + 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x37, - 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x0b, 0x64, - 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, - 0x6d, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, - 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x42, 0x03, 0x88, 0x01, 0x02, - 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x94, - 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4a, - 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, - 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x55, - 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, + 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, + 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, + 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x15, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, + 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63, + 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x12, 0x6d, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x3a, 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x42, 0x03, 0x88, + 0x01, 0x02, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0x94, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, + 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, + 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, + 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, - 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, - 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, - 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, - 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, - 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, - 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, - 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, - 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, - 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, - 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, - 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, - 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, - 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, - 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, - 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, - 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, - 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, - 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, - 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, + 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, + 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, + 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, + 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, + 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, + 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, + 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, + 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, + 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, + 0x44, 0x36, 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, + 0x4e, 0x54, 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, + 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x41, 0x4c, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, + 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, + 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, + 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, + 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, + 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, - 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, - 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, - 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, - 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, - 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, - 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, - 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, - 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, - 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, - 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, - 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, - 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, - 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, - 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, - 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, - 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, - 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, - 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, - 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, - 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, - 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, - 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, - 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, - 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, - 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, - 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, - 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, - 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, 0x68, 0x70, - 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, - 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, - 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, - 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, - 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, - 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, - 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, - 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, - 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, - 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, + 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, + 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x30, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, + 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, + 0x76, 0x61, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, + 0x44, 0x0a, 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, + 0x64, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, + 0x1b, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, + 0x76, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, + 0x38, 0x12, 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, + 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, + 0x64, 0x65, 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, + 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, + 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, + 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, + 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, + 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, + 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, + 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, + 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, + 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, + 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, + 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, + 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, + 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, + 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, + 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, + 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, + 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, + 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, + 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, + 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, + 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, - 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, - 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, - 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, - 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, + 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, - 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, - 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x55, 0x0a, - 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x55, 0x0a, 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, + 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, + 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, + 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, + 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, + 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, + 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, + 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, + 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, + 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, + 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, + 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, + 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5a, - 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, 0x0e, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x47, 0x0a, - 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x72, - 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, - 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, - 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, - 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, - 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, - 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, - 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, - 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, - 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, - 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, - 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, - 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, - 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, - 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, - 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, - 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, - 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, - 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, - 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, @@ -4841,306 +4893,284 @@ var file_google_protobuf_descriptor_proto_rawDesc = string([]byte{ 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, - 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, - 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, - 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, 0x0a, 0x10, - 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, - 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, 0x66, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, + 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, - 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x99, - 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, - 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6d, 0x70, - 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, - 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, - 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, - 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, 0x12, - 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x2a, - 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, - 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, - 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, - 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, - 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, 0x01, 0x98, - 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, - 0x49, 0x54, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, - 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, - 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, 0x65, 0x6e, - 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, + 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, - 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, - 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x09, 0x12, - 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x08, - 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x2d, 0x88, - 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, - 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, - 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, 0x72, 0x65, - 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, - 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, + 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, + 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, + 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, + 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, + 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, + 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, + 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, + 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, + 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, + 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, + 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, + 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, + 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, + 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, + 0x09, 0x12, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, + 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, + 0x2d, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, + 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, + 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, + 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, + 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, + 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xb2, 0x01, + 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, + 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, + 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, + 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, + 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, + 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, + 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, + 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, + 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, + 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, + 0x02, 0x22, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, + 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, + 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, + 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, + 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, + 0x54, 0x46, 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, + 0x46, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, + 0x08, 0x01, 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, + 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, + 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, + 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, + 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, + 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, + 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, + 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, + 0x10, 0xe8, 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, - 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0x84, 0x07, 0xa2, - 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, - 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, - 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, 0x01, 0x98, - 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, - 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0x84, 0x07, 0xb2, 0x01, 0x03, 0x08, - 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, - 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, - 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, - 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x41, 0x4c, - 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, 0x6a, 0x73, - 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, - 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, - 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, - 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, - 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, - 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, - 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, - 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, - 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, - 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, - 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, - 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, 0x08, 0x01, - 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, - 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, - 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, - 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, - 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, - 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, - 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, - 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, - 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, - 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, - 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, - 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0d, - 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x04, 0x08, - 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x22, 0xb5, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, - 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x0c, 0x08, - 0x80, 0xec, 0xca, 0xff, 0x01, 0x10, 0x81, 0xec, 0xca, 0xff, 0x01, 0x22, 0xd0, 0x02, 0x0a, 0x11, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, - 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, - 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, - 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, - 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, - 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, - 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0xa7, - 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, - 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x47, 0x41, 0x43, - 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, 0xe7, 0x07, 0x12, 0x11, - 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, 0x33, 0x10, 0xe8, - 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, - 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x17, 0x0a, - 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, - 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, - 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, - 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, - 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, - 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, - 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, - 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, - 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, -}) + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, + 0x62, 0x6c, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, + 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, + 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, + 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, + 0x10, 0x02, 0x2a, 0xa7, 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, + 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, + 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, + 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, + 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, + 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, + 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, + 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, + 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, + 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, + 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, + 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, +} var ( file_google_protobuf_descriptor_proto_rawDescOnce sync.Once - file_google_protobuf_descriptor_proto_rawDescData []byte + file_google_protobuf_descriptor_proto_rawDescData = file_google_protobuf_descriptor_proto_rawDesc ) func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { file_google_protobuf_descriptor_proto_rawDescOnce.Do(func() { - file_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc))) + file_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_descriptor_proto_rawDescData) }) return file_google_protobuf_descriptor_proto_rawDescData } @@ -5293,7 +5323,7 @@ func file_google_protobuf_descriptor_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc)), + RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc, NumEnums: 17, NumMessages: 33, NumExtensions: 0, @@ -5305,6 +5335,7 @@ func file_google_protobuf_descriptor_proto_init() { MessageInfos: file_google_protobuf_descriptor_proto_msgTypes, }.Build() File_google_protobuf_descriptor_proto = out.File + file_google_protobuf_descriptor_proto_rawDesc = nil file_google_protobuf_descriptor_proto_goTypes = nil file_google_protobuf_descriptor_proto_depIdxs = nil } diff --git a/go-controller/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/go-controller/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go new file mode 100644 index 0000000000..c7e860fcd6 --- /dev/null +++ b/go-controller/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go @@ -0,0 +1,165 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2023 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd + +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/protobuf/go_features.proto + +package gofeaturespb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +type GoFeatures struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether or not to generate the deprecated UnmarshalJSON method for enums. + LegacyUnmarshalJsonEnum *bool `protobuf:"varint,1,opt,name=legacy_unmarshal_json_enum,json=legacyUnmarshalJsonEnum" json:"legacy_unmarshal_json_enum,omitempty"` +} + +func (x *GoFeatures) Reset() { + *x = GoFeatures{} + mi := &file_google_protobuf_go_features_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GoFeatures) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoFeatures) ProtoMessage() {} + +func (x *GoFeatures) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_go_features_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoFeatures.ProtoReflect.Descriptor instead. +func (*GoFeatures) Descriptor() ([]byte, []int) { + return file_google_protobuf_go_features_proto_rawDescGZIP(), []int{0} +} + +func (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool { + if x != nil && x.LegacyUnmarshalJsonEnum != nil { + return *x.LegacyUnmarshalJsonEnum + } + return false +} + +var file_google_protobuf_go_features_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FeatureSet)(nil), + ExtensionType: (*GoFeatures)(nil), + Field: 1002, + Name: "pb.go", + Tag: "bytes,1002,opt,name=go", + Filename: "google/protobuf/go_features.proto", + }, +} + +// Extension fields to descriptorpb.FeatureSet. +var ( + // optional pb.GoFeatures go = 1002; + E_Go = &file_google_protobuf_go_features_proto_extTypes[0] +) + +var File_google_protobuf_go_features_proto protoreflect.FileDescriptor + +var file_google_protobuf_go_features_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x47, 0x6f, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73, + 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x80, 0x01, + 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, + 0x75, 0x65, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, + 0xe7, 0x07, 0xb2, 0x01, 0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65, + 0x20, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, + 0x6c, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, + 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, + 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, + 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x62, +} + +var ( + file_google_protobuf_go_features_proto_rawDescOnce sync.Once + file_google_protobuf_go_features_proto_rawDescData = file_google_protobuf_go_features_proto_rawDesc +) + +func file_google_protobuf_go_features_proto_rawDescGZIP() []byte { + file_google_protobuf_go_features_proto_rawDescOnce.Do(func() { + file_google_protobuf_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_go_features_proto_rawDescData) + }) + return file_google_protobuf_go_features_proto_rawDescData +} + +var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_protobuf_go_features_proto_goTypes = []any{ + (*GoFeatures)(nil), // 0: pb.GoFeatures + (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet +} +var file_google_protobuf_go_features_proto_depIdxs = []int32{ + 1, // 0: pb.go:extendee -> google.protobuf.FeatureSet + 0, // 1: pb.go:type_name -> pb.GoFeatures + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 1, // [1:2] is the sub-list for extension type_name + 0, // [0:1] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_protobuf_go_features_proto_init() } +func file_google_protobuf_go_features_proto_init() { + if File_google_protobuf_go_features_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_protobuf_go_features_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 1, + NumServices: 0, + }, + GoTypes: file_google_protobuf_go_features_proto_goTypes, + DependencyIndexes: file_google_protobuf_go_features_proto_depIdxs, + MessageInfos: file_google_protobuf_go_features_proto_msgTypes, + ExtensionInfos: file_google_protobuf_go_features_proto_extTypes, + }.Build() + File_google_protobuf_go_features_proto = out.File + file_google_protobuf_go_features_proto_rawDesc = nil + file_google_protobuf_go_features_proto_goTypes = nil + file_google_protobuf_go_features_proto_depIdxs = nil +} diff --git a/go-controller/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/go-controller/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go index 497da66e91..87da199a38 100644 --- a/go-controller/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +++ b/go-controller/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go @@ -122,7 +122,6 @@ import ( reflect "reflect" strings "strings" sync "sync" - unsafe "unsafe" ) // `Any` contains an arbitrary serialized protocol buffer message along with a @@ -211,7 +210,10 @@ import ( // "value": "1.212s" // } type Any struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -242,9 +244,7 @@ type Any struct { // used with implementation specific semantics. TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // Must be a valid serialized protocol buffer of the above specified type. - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } // New marshals src into a new Any instance. @@ -412,7 +412,7 @@ func (x *Any) GetValue() []byte { var File_google_protobuf_any_proto protoreflect.FileDescriptor -var file_google_protobuf_any_proto_rawDesc = string([]byte{ +var file_google_protobuf_any_proto_rawDesc = []byte{ 0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x36, 0x0a, 0x03, @@ -428,16 +428,16 @@ var file_google_protobuf_any_proto_rawDesc = string([]byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -}) +} var ( file_google_protobuf_any_proto_rawDescOnce sync.Once - file_google_protobuf_any_proto_rawDescData []byte + file_google_protobuf_any_proto_rawDescData = file_google_protobuf_any_proto_rawDesc ) func file_google_protobuf_any_proto_rawDescGZIP() []byte { file_google_protobuf_any_proto_rawDescOnce.Do(func() { - file_google_protobuf_any_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_any_proto_rawDesc), len(file_google_protobuf_any_proto_rawDesc))) + file_google_protobuf_any_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_any_proto_rawDescData) }) return file_google_protobuf_any_proto_rawDescData } @@ -463,7 +463,7 @@ func file_google_protobuf_any_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_any_proto_rawDesc), len(file_google_protobuf_any_proto_rawDesc)), + RawDescriptor: file_google_protobuf_any_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -474,6 +474,7 @@ func file_google_protobuf_any_proto_init() { MessageInfos: file_google_protobuf_any_proto_msgTypes, }.Build() File_google_protobuf_any_proto = out.File + file_google_protobuf_any_proto_rawDesc = nil file_google_protobuf_any_proto_goTypes = nil file_google_protobuf_any_proto_depIdxs = nil } diff --git a/go-controller/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/go-controller/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go index 193880d181..b99d4d2410 100644 --- a/go-controller/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +++ b/go-controller/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go @@ -80,7 +80,6 @@ import ( reflect "reflect" sync "sync" time "time" - unsafe "unsafe" ) // A Duration represents a signed, fixed-length span of time represented @@ -142,7 +141,10 @@ import ( // be expressed in JSON format as "3.000000001s", and 3 seconds and 1 // microsecond should be expressed in JSON format as "3.000001s". type Duration struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years @@ -153,9 +155,7 @@ type Duration struct { // of one second or more, a non-zero value for the `nanos` field must be // of the same sign as the `seconds` field. Must be from -999,999,999 // to +999,999,999 inclusive. - Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` } // New constructs a new Duration from the provided time.Duration. @@ -289,7 +289,7 @@ func (x *Duration) GetNanos() int32 { var File_google_protobuf_duration_proto protoreflect.FileDescriptor -var file_google_protobuf_duration_proto_rawDesc = string([]byte{ +var file_google_protobuf_duration_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, @@ -306,16 +306,16 @@ var file_google_protobuf_duration_proto_rawDesc = string([]byte{ 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -}) +} var ( file_google_protobuf_duration_proto_rawDescOnce sync.Once - file_google_protobuf_duration_proto_rawDescData []byte + file_google_protobuf_duration_proto_rawDescData = file_google_protobuf_duration_proto_rawDesc ) func file_google_protobuf_duration_proto_rawDescGZIP() []byte { file_google_protobuf_duration_proto_rawDescOnce.Do(func() { - file_google_protobuf_duration_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_duration_proto_rawDesc), len(file_google_protobuf_duration_proto_rawDesc))) + file_google_protobuf_duration_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_duration_proto_rawDescData) }) return file_google_protobuf_duration_proto_rawDescData } @@ -341,7 +341,7 @@ func file_google_protobuf_duration_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_duration_proto_rawDesc), len(file_google_protobuf_duration_proto_rawDesc)), + RawDescriptor: file_google_protobuf_duration_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -352,6 +352,7 @@ func file_google_protobuf_duration_proto_init() { MessageInfos: file_google_protobuf_duration_proto_msgTypes, }.Build() File_google_protobuf_duration_proto = out.File + file_google_protobuf_duration_proto_rawDesc = nil file_google_protobuf_duration_proto_goTypes = nil file_google_protobuf_duration_proto_depIdxs = nil } diff --git a/go-controller/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/go-controller/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go index 00ac835c0b..0d20722d70 100644 --- a/go-controller/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +++ b/go-controller/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go @@ -78,7 +78,6 @@ import ( reflect "reflect" sync "sync" time "time" - unsafe "unsafe" ) // A Timestamp represents a point in time independent of any time zone or local @@ -171,7 +170,10 @@ import ( // http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() // ) to obtain a formatter capable of generating timestamps in this format. type Timestamp struct { - state protoimpl.MessageState `protogen:"open.v1"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. @@ -180,9 +182,7 @@ type Timestamp struct { // second values with fractions must still have non-negative nanos values // that count forward in time. Must be from 0 to 999,999,999 // inclusive. - Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` } // Now constructs a new Timestamp from the current time. @@ -298,7 +298,7 @@ func (x *Timestamp) GetNanos() int32 { var File_google_protobuf_timestamp_proto protoreflect.FileDescriptor -var file_google_protobuf_timestamp_proto_rawDesc = string([]byte{ +var file_google_protobuf_timestamp_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, @@ -315,16 +315,16 @@ var file_google_protobuf_timestamp_proto_rawDesc = string([]byte{ 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -}) +} var ( file_google_protobuf_timestamp_proto_rawDescOnce sync.Once - file_google_protobuf_timestamp_proto_rawDescData []byte + file_google_protobuf_timestamp_proto_rawDescData = file_google_protobuf_timestamp_proto_rawDesc ) func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte { file_google_protobuf_timestamp_proto_rawDescOnce.Do(func() { - file_google_protobuf_timestamp_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_timestamp_proto_rawDesc), len(file_google_protobuf_timestamp_proto_rawDesc))) + file_google_protobuf_timestamp_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_timestamp_proto_rawDescData) }) return file_google_protobuf_timestamp_proto_rawDescData } @@ -350,7 +350,7 @@ func file_google_protobuf_timestamp_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_timestamp_proto_rawDesc), len(file_google_protobuf_timestamp_proto_rawDesc)), + RawDescriptor: file_google_protobuf_timestamp_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -361,6 +361,7 @@ func file_google_protobuf_timestamp_proto_init() { MessageInfos: file_google_protobuf_timestamp_proto_msgTypes, }.Build() File_google_protobuf_timestamp_proto = out.File + file_google_protobuf_timestamp_proto_rawDesc = nil file_google_protobuf_timestamp_proto_goTypes = nil file_google_protobuf_timestamp_proto_depIdxs = nil } diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/LICENSE b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/LICENSE deleted file mode 100644 index 8f71f43fee..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - 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. - diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/NOTICE b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/NOTICE deleted file mode 100644 index 251a004bcb..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/NOTICE +++ /dev/null @@ -1,2 +0,0 @@ -Copyright 2016 Intel Corporation -Copyright 2021 Multus Authors diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/checkpoint/checkpoint.go b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/checkpoint/checkpoint.go deleted file mode 100644 index 2fc0de5a3d..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/checkpoint/checkpoint.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2018 Intel Corporation -// Copyright (c) 2021 Multus 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 checkpoint - -import ( - "encoding/json" - "os" - - "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging" - "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types" - v1 "k8s.io/api/core/v1" -) - -const ( - checkPointfile = "/var/lib/kubelet/device-plugins/kubelet_internal_checkpoint" -) - -// PodDevicesEntry maps PodUID, resource name and allocated device id -type PodDevicesEntry struct { - PodUID string - ContainerName string - ResourceName string - DeviceIDs map[int64][]string - AllocResp []byte -} - -type checkpointData struct { - PodDeviceEntries []PodDevicesEntry - RegisteredDevices map[string][]string -} - -type checkpointFileData struct { - Data checkpointData - Checksum uint64 -} - -type checkpoint struct { - fileName string - podEntires []PodDevicesEntry -} - -// GetCheckpoint returns an instance of Checkpoint -func GetCheckpoint() (types.ResourceClient, error) { - logging.Debugf("GetCheckpoint(): invoked") - return getCheckpoint(checkPointfile) -} - -func getCheckpoint(filePath string) (types.ResourceClient, error) { - cp := &checkpoint{fileName: filePath} - err := cp.getPodEntries() - if err != nil { - return nil, err - } - logging.Debugf("getCheckpoint: created checkpoint instance with file: %s", filePath) - return cp, nil -} - -// getPodEntries gets all Pod device allocation entries from checkpoint file -func (cp *checkpoint) getPodEntries() error { - - cpd := &checkpointFileData{} - rawBytes, err := os.ReadFile(cp.fileName) - if err != nil { - return logging.Errorf("getPodEntries: error reading file %s\n%v\n", checkPointfile, err) - } - - if err = json.Unmarshal(rawBytes, cpd); err != nil { - return logging.Errorf("getPodEntries: error unmarshalling raw bytes %v", err) - } - - cp.podEntires = cpd.Data.PodDeviceEntries - logging.Debugf("getPodEntries: podEntires %+v", cp.podEntires) - return nil -} - -// GetPodResourceMap returns an instance of a map of ResourceInfo -func (cp *checkpoint) GetPodResourceMap(pod *v1.Pod) (map[string]*types.ResourceInfo, error) { - podID := string(pod.UID) - resourceMap := make(map[string]*types.ResourceInfo) - - if podID == "" { - return nil, logging.Errorf("GetPodResourceMap: invalid Pod cannot be empty") - } - for _, pod := range cp.podEntires { - if pod.PodUID == podID { - entry, ok := resourceMap[pod.ResourceName] - if !ok { - // new entry - entry = &types.ResourceInfo{} - resourceMap[pod.ResourceName] = entry - } - for _, v := range pod.DeviceIDs { - // already exists; append to it - entry.DeviceIDs = append(entry.DeviceIDs, v...) - } - } - } - return resourceMap, nil -} diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/checkpoint/doc.go b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/checkpoint/doc.go deleted file mode 100644 index 879978fa94..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/checkpoint/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2022 Multus 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 checkpoint is the package that contains the libraries that manipulates kubelet's -// checkpoint API -package checkpoint diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/kubeletclient/doc.go b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/kubeletclient/doc.go deleted file mode 100644 index b2098a8529..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/kubeletclient/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2022 Multus 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 kubeletclient is the package that contains the kubelet's libraries that -// controls podresource API in kubelet -package kubeletclient diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/kubeletclient/kubeletclient.go b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/kubeletclient/kubeletclient.go deleted file mode 100644 index d0438f012f..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/kubeletclient/kubeletclient.go +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) 2019 Intel Corporation -// Copyright (c) 2021 Multus 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 kubeletclient - -import ( - "fmt" - "net" - "net/url" - "os" - "path/filepath" - "time" - - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - - "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/checkpoint" - "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging" - "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types" - v1 "k8s.io/api/core/v1" - podresourcesapi "k8s.io/kubelet/pkg/apis/podresources/v1" -) - -const ( - defaultKubeletSocket = "kubelet" // which is defined in k8s.io/kubernetes/pkg/kubelet/apis/podresources - kubeletConnectionTimeout = 10 * time.Second - defaultPodResourcesMaxSize = 1024 * 1024 * 16 // 16 Mb - defaultPodResourcesPath = "/var/lib/kubelet/pod-resources" - unixProtocol = "unix" -) - -// LocalEndpoint returns the full path to a unix socket at the given endpoint -// which is in k8s.io/kubernetes/pkg/kubelet/util -func localEndpoint(path string) *url.URL { - return &url.URL{ - Scheme: unixProtocol, - Path: path + ".sock", - } -} - -// GetResourceClient returns an instance of ResourceClient interface initialized with Pod resource information -func GetResourceClient(kubeletSocket string) (types.ResourceClient, error) { - kubeletSocketURL := localEndpoint(filepath.Join(defaultPodResourcesPath, defaultKubeletSocket)) - - if kubeletSocket != "" { - kubeletSocketURL = &url.URL{ - Scheme: unixProtocol, - Path: kubeletSocket, - } - } - // If Kubelet resource API endpoint exist use that by default - // Or else fallback with checkpoint file - if hasKubeletAPIEndpoint(kubeletSocketURL) { - logging.Debugf("GetResourceClient: using Kubelet resource API endpoint") - return getKubeletClient(kubeletSocketURL) - } - - logging.Debugf("GetResourceClient: using Kubelet device plugin checkpoint") - return checkpoint.GetCheckpoint() -} - -func dial(ctx context.Context, addr string) (net.Conn, error) { - return (&net.Dialer{}).DialContext(ctx, unixProtocol, addr) -} - -func getKubeletResourceClient(kubeletSocketURL *url.URL, timeout time.Duration) (podresourcesapi.PodResourcesListerClient, *grpc.ClientConn, error) { - ctx, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() - - conn, err := grpc.DialContext(ctx, kubeletSocketURL.Path, grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithContextDialer(dial), - grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(defaultPodResourcesMaxSize))) - if err != nil { - return nil, nil, fmt.Errorf("error dialing socket %s: %v", kubeletSocketURL.Path, err) - } - return podresourcesapi.NewPodResourcesListerClient(conn), conn, nil -} - -func getKubeletClient(kubeletSocketURL *url.URL) (types.ResourceClient, error) { - newClient := &kubeletClient{} - - client, conn, err := getKubeletResourceClient(kubeletSocketURL, 10*time.Second) - if err != nil { - return nil, logging.Errorf("getKubeletClient: error getting grpc client: %v\n", err) - } - defer conn.Close() - - if err := newClient.getPodResources(client); err != nil { - return nil, logging.Errorf("getKubeletClient: error getting pod resources from client: %v\n", err) - } - - return newClient, nil -} - -type kubeletClient struct { - resources []*podresourcesapi.PodResources -} - -func (rc *kubeletClient) getPodResources(client podresourcesapi.PodResourcesListerClient) error { - - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() - - resp, err := client.List(ctx, &podresourcesapi.ListPodResourcesRequest{}) - if err != nil { - return logging.Errorf("getPodResources: failed to list pod resources, %v.Get(_) = _, %v", client, err) - } - - rc.resources = resp.PodResources - return nil -} - -// GetPodResourceMap returns an instance of a map of Pod ResourceInfo given a (Pod name, namespace) tuple -func (rc *kubeletClient) GetPodResourceMap(pod *v1.Pod) (map[string]*types.ResourceInfo, error) { - resourceMap := make(map[string]*types.ResourceInfo) - - name := pod.Name - ns := pod.Namespace - - if name == "" || ns == "" { - return nil, logging.Errorf("GetPodResourceMap: Pod name or namespace cannot be empty") - } - - for _, pr := range rc.resources { - if pr.Name == name && pr.Namespace == ns { - for _, cnt := range pr.Containers { - for _, dev := range cnt.Devices { - if rInfo, ok := resourceMap[dev.ResourceName]; ok { - rInfo.DeviceIDs = append(rInfo.DeviceIDs, dev.DeviceIds...) - } else { - resourceMap[dev.ResourceName] = &types.ResourceInfo{DeviceIDs: dev.DeviceIds} - } - } - } - } - } - return resourceMap, nil -} - -func hasKubeletAPIEndpoint(url *url.URL) bool { - // Check for kubelet resource API socket file - if _, err := os.Stat(url.Path); err != nil { - logging.Debugf("hasKubeletAPIEndpoint: error looking up kubelet resource api socket file: %q", err) - return false - } - return true -} diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging/doc.go b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging/doc.go deleted file mode 100644 index 977b06a41d..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2022 Multus 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 logging is the package that contains logging library. -package logging diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging/logging.go b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging/logging.go deleted file mode 100644 index 4cf001e8dd..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging/logging.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) 2018 Intel Corporation -// Copyright (c) 2021 Multus 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 logging - -import ( - "errors" - "fmt" - "io" - "os" - "strings" - "time" - - lumberjack "gopkg.in/natefinch/lumberjack.v2" -) - -// Level type -type Level uint32 - -// PanicLevel...MaxLevel indicates the logging level -const ( - PanicLevel Level = iota - ErrorLevel - VerboseLevel - DebugLevel - MaxLevel - UnknownLevel -) - -var loggingStderr bool -var loggingW io.Writer -var loggingLevel Level -var logger *lumberjack.Logger - -const defaultTimestampFormat = time.RFC3339 - -// LogOptions specifies the configuration of the log -type LogOptions struct { - MaxAge *int `json:"maxAge,omitempty"` - MaxSize *int `json:"maxSize,omitempty"` - MaxBackups *int `json:"maxBackups,omitempty"` - Compress *bool `json:"compress,omitempty"` -} - -// SetLogOptions set the LoggingOptions of NetConf -func SetLogOptions(options *LogOptions) { - // give some default value - logger.MaxSize = 100 - logger.MaxAge = 5 - logger.MaxBackups = 5 - logger.Compress = true - if options != nil { - if options.MaxAge != nil { - logger.MaxAge = *options.MaxAge - } - if options.MaxSize != nil { - logger.MaxSize = *options.MaxSize - } - if options.MaxBackups != nil { - logger.MaxBackups = *options.MaxBackups - } - if options.Compress != nil { - logger.Compress = *options.Compress - } - } - loggingW = logger -} - -func (l Level) String() string { - switch l { - case PanicLevel: - return "panic" - case VerboseLevel: - return "verbose" - case ErrorLevel: - return "error" - case DebugLevel: - return "debug" - } - return "unknown" -} - -func printf(level Level, format string, a ...interface{}) { - header := "%s [%s] " - t := time.Now() - if level > loggingLevel { - return - } - - if loggingStderr { - fmt.Fprintf(os.Stderr, header, t.Format(defaultTimestampFormat), level) - fmt.Fprintf(os.Stderr, format, a...) - fmt.Fprintf(os.Stderr, "\n") - } - - if loggingW != nil { - fmt.Fprintf(loggingW, header, t.Format(defaultTimestampFormat), level) - fmt.Fprintf(loggingW, format, a...) - fmt.Fprintf(loggingW, "\n") - } -} - -// Debugf prints logging if logging level >= debug -func Debugf(format string, a ...interface{}) { - printf(DebugLevel, format, a...) -} - -// Verbosef prints logging if logging level >= verbose -func Verbosef(format string, a ...interface{}) { - printf(VerboseLevel, format, a...) -} - -// Errorf prints logging if logging level >= error -func Errorf(format string, a ...interface{}) error { - printf(ErrorLevel, format, a...) - return fmt.Errorf(format, a...) -} - -// Panicf prints logging plus stack trace. This should be used only for unrecoverable error -func Panicf(format string, a ...interface{}) { - printf(PanicLevel, format, a...) - printf(PanicLevel, "========= Stack trace output ========") - printf(PanicLevel, "%+v", errors.New("Multus Panic")) - printf(PanicLevel, "========= Stack trace output end ========") -} - -// GetLoggingLevel gets current logging level -func GetLoggingLevel() Level { - return loggingLevel -} - -func getLoggingLevel(levelStr string) Level { - switch strings.ToLower(levelStr) { - case "debug": - return DebugLevel - case "verbose": - return VerboseLevel - case "error": - return ErrorLevel - case "panic": - return PanicLevel - } - fmt.Fprintf(os.Stderr, "multus logging: cannot set logging level to %s\n", levelStr) - return UnknownLevel -} - -// SetLogLevel sets logging level -func SetLogLevel(levelStr string) { - level := getLoggingLevel(levelStr) - if level < MaxLevel { - loggingLevel = level - } -} - -// SetLogStderr sets flag for logging stderr output -func SetLogStderr(enable bool) { - loggingStderr = enable -} - -// SetLogFile sets logging file -func SetLogFile(filename string) { - if filename == "" { - return - } - - logger.Filename = filename - loggingW = logger - -} - -func init() { - loggingStderr = true - loggingW = nil - loggingLevel = PanicLevel - logger = &lumberjack.Logger{} -} diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types/conf.go b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types/conf.go deleted file mode 100644 index 36d8d6f9fe..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types/conf.go +++ /dev/null @@ -1,611 +0,0 @@ -// Copyright (c) 2018 Intel Corporation -// Copyright (c) 2021 Multus 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 types - -import ( - "encoding/json" - "fmt" - "net" - "os" - "strings" - "sync" - - "github.com/containernetworking/cni/libcni" - "github.com/containernetworking/cni/pkg/skel" - cni100 "github.com/containernetworking/cni/pkg/types/100" - "github.com/containernetworking/cni/pkg/version" - nadutils "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/utils" - "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging" -) - -const ( - defaultCNIDir = "/var/lib/cni/multus" - defaultConfDir = "/etc/cni/multus/net.d" - defaultBinDir = "/opt/cni/bin" - defaultReadinessIndicatorFile = "" - defaultMultusNamespace = "kube-system" - defaultNonIsolatedNamespace = "default" -) - -// ChrootMutex provides lock to access host filesystem -var ChrootMutex *sync.Mutex - -// LoadDelegateNetConfList reads DelegateNetConf from bytes -func LoadDelegateNetConfList(bytes []byte, delegateConf *DelegateNetConf) error { - logging.Debugf("LoadDelegateNetConfList: %s, %v", string(bytes), delegateConf) - - if err := json.Unmarshal(bytes, &delegateConf.ConfList); err != nil { - return logging.Errorf("LoadDelegateNetConfList: error unmarshalling delegate conflist: %v", err) - } - - if delegateConf.ConfList.Plugins == nil { - return logging.Errorf("LoadDelegateNetConfList: delegate must have the 'type' or 'plugin' field") - } - - if delegateConf.ConfList.Plugins[0].Type == "" { - return logging.Errorf("LoadDelegateNetConfList: a plugin delegate must have the 'type' field") - } - delegateConf.ConfListPlugin = true - delegateConf.Name = delegateConf.ConfList.Name - return nil -} - -// LoadDelegateNetConf converts raw CNI JSON into a DelegateNetConf structure -func LoadDelegateNetConf(bytes []byte, netElement *NetworkSelectionElement, deviceID string, resourceName string) (*DelegateNetConf, error) { - var err error - logging.Debugf("LoadDelegateNetConf: %s, %v, %s", string(bytes), netElement, deviceID) - - delegateConf := &DelegateNetConf{} - if err := json.Unmarshal(bytes, &delegateConf.Conf); err != nil { - return nil, logging.Errorf("LoadDelegateNetConf: error unmarshalling delegate config: %v", err) - } - delegateConf.Name = delegateConf.Conf.Name - - // Do some minimal validation - if delegateConf.Conf.Type == "" { - if err := LoadDelegateNetConfList(bytes, delegateConf); err != nil { - return nil, logging.Errorf("LoadDelegateNetConf: failed with: %v", err) - } - if deviceID != "" { - bytes, err = addDeviceIDInConfList(bytes, deviceID) - if err != nil { - return nil, logging.Errorf("LoadDelegateNetConf: failed to add deviceID in NetConfList bytes: %v", err) - } - delegateConf.ResourceName = resourceName - delegateConf.DeviceID = deviceID - } - if netElement != nil && netElement.CNIArgs != nil { - bytes, err = addCNIArgsInConfList(bytes, netElement.CNIArgs) - if err != nil { - return nil, logging.Errorf("LoadDelegateNetConf(): failed to add cni-args in NetConfList bytes: %v", err) - } - } - } else { - if deviceID != "" { - bytes, err = delegateAddDeviceID(bytes, deviceID) - if err != nil { - return nil, logging.Errorf("LoadDelegateNetConf: failed to add deviceID in NetConf bytes: %v", err) - } - // Save them for housekeeping - delegateConf.ResourceName = resourceName - delegateConf.DeviceID = deviceID - } - if netElement != nil && netElement.CNIArgs != nil { - bytes, err = addCNIArgsInConfig(bytes, netElement.CNIArgs) - if err != nil { - return nil, logging.Errorf("LoadDelegateNetConf(): failed to add cni-args in NetConfList bytes: %v", err) - } - } - } - - if netElement != nil { - if netElement.Name != "" { - // Overwrite CNI config name with net-attach-def name - delegateConf.Name = fmt.Sprintf("%s/%s", netElement.Namespace, netElement.Name) - } - if netElement.InterfaceRequest != "" { - delegateConf.IfnameRequest = netElement.InterfaceRequest - } - if netElement.MacRequest != "" { - delegateConf.MacRequest = netElement.MacRequest - } - if netElement.IPRequest != nil { - delegateConf.IPRequest = netElement.IPRequest - } - if netElement.BandwidthRequest != nil { - delegateConf.BandwidthRequest = netElement.BandwidthRequest - } - if netElement.PortMappingsRequest != nil { - delegateConf.PortMappingsRequest = netElement.PortMappingsRequest - } - if netElement.GatewayRequest != nil { - var list []net.IP - if delegateConf.GatewayRequest != nil { - list = append(*delegateConf.GatewayRequest, *netElement.GatewayRequest...) - } else { - list = *netElement.GatewayRequest - } - delegateConf.GatewayRequest = &list - } - if netElement.InfinibandGUIDRequest != "" { - delegateConf.InfinibandGUIDRequest = netElement.InfinibandGUIDRequest - } - if netElement.DeviceID != "" { - if deviceID != "" { - logging.Debugf("Warning: Both RuntimeConfig and ResourceMap provide deviceID. Ignoring RuntimeConfig") - } else { - delegateConf.DeviceID = netElement.DeviceID - } - } - } - - delegateConf.Bytes = bytes - - return delegateConf, nil -} - -// mergeCNIRuntimeConfig creates CNI runtimeconfig from delegate -func mergeCNIRuntimeConfig(runtimeConfig *RuntimeConfig, delegate *DelegateNetConf) *RuntimeConfig { - logging.Debugf("mergeCNIRuntimeConfig: %v %v", runtimeConfig, delegate) - var mergedRuntimeConfig RuntimeConfig - - if runtimeConfig == nil { - mergedRuntimeConfig = RuntimeConfig{} - } else { - mergedRuntimeConfig = *runtimeConfig - } - - // multus inject RuntimeConfig only in case of non MasterPlugin. - if delegate.MasterPlugin != true { - logging.Debugf("mergeCNIRuntimeConfig: add runtimeConfig for net-attach-def: %v", mergedRuntimeConfig) - if delegate.PortMappingsRequest != nil { - mergedRuntimeConfig.PortMaps = delegate.PortMappingsRequest - } - if delegate.BandwidthRequest != nil { - mergedRuntimeConfig.Bandwidth = delegate.BandwidthRequest - } - if delegate.IPRequest != nil { - mergedRuntimeConfig.IPs = delegate.IPRequest - } - if delegate.MacRequest != "" { - mergedRuntimeConfig.Mac = delegate.MacRequest - } - if delegate.InfinibandGUIDRequest != "" { - mergedRuntimeConfig.InfinibandGUID = delegate.InfinibandGUIDRequest - } - if delegate.DeviceID != "" { - mergedRuntimeConfig.DeviceID = delegate.DeviceID - } - logging.Debugf("mergeCNIRuntimeConfig: add runtimeConfig for net-attach-def: %v", mergedRuntimeConfig) - } - return &mergedRuntimeConfig -} - -// CreateCNIRuntimeConf create CNI RuntimeConf for a delegate. If delegate configuration -// exists, merge data with the runtime config. -func CreateCNIRuntimeConf(args *skel.CmdArgs, k8sArgs *K8sArgs, ifName string, rc *RuntimeConfig, delegate *DelegateNetConf) (*libcni.RuntimeConf, string) { - podName := string(k8sArgs.K8S_POD_NAME) - podNamespace := string(k8sArgs.K8S_POD_NAMESPACE) - podUID := string(k8sArgs.K8S_POD_UID) - sandboxID := string(k8sArgs.K8S_POD_INFRA_CONTAINER_ID) - return newCNIRuntimeConf(args.ContainerID, sandboxID, podName, podNamespace, podUID, args.Netns, ifName, rc, delegate) -} - -// newCNIRuntimeConf creates the CNI `RuntimeConf` for the given ADD / DEL request. -func newCNIRuntimeConf(containerID, sandboxID, podName, podNamespace, podUID, netNs, ifName string, rc *RuntimeConfig, delegate *DelegateNetConf) (*libcni.RuntimeConf, string) { - logging.Debugf("LoadCNIRuntimeConf: %s, %v %v", ifName, rc, delegate) - - delegateRc := delegateRuntimeConfig(containerID, delegate, rc, ifName) - // In part, adapted from K8s pkg/kubelet/dockershim/network/cni/cni.go#buildCNIRuntimeConf - rt := createRuntimeConf(netNs, podNamespace, podName, containerID, sandboxID, podUID, ifName) - - var cniDeviceInfoFile string - - // Populate rt.Args with CNI_ARGS if the rt.Args value is not set - cniArgs := os.Getenv("CNI_ARGS") - if cniArgs != "" { - logging.Debugf("ARGS: %s", cniArgs) - for _, arg := range strings.Split(cniArgs, ";") { - // SplitN to handle = within values, like BLAH=foo=bar - keyval := strings.SplitN(arg, "=", 2) - if len(keyval) != 2 { - logging.Errorf("CreateCNIRuntimeConf: CNI_ARGS %s %s %d is not recognized as CNI arg, skipped", arg, keyval, len(keyval)) - continue - } - - envKey := string(keyval[0]) - envVal := string(keyval[1]) - found := false - for i := range rt.Args { - // Update existing key if its value is empty - if rt.Args[i][0] == envKey && rt.Args[i][1] == "" && envVal != "" { - logging.Debugf("CreateCNIRuntimeConf: add new val: %s", arg) - rt.Args[i][1] = envVal - found = true - break - } - } - if !found { - // Add the new key if it didn't exist yet - rt.Args = append(rt.Args, [2]string{envKey, envVal}) - } - } - } - - if delegateRc != nil { - cniDeviceInfoFile = delegateRc.CNIDeviceInfoFile - capabilityArgs := map[string]interface{}{} - if len(delegateRc.PortMaps) != 0 { - capabilityArgs["portMappings"] = delegateRc.PortMaps - } - if delegateRc.Bandwidth != nil { - capabilityArgs["bandwidth"] = delegateRc.Bandwidth - } - if len(delegateRc.IPs) != 0 { - capabilityArgs["ips"] = delegateRc.IPs - } - if len(delegateRc.Mac) != 0 { - capabilityArgs["mac"] = delegateRc.Mac - } - if len(delegateRc.InfinibandGUID) != 0 { - capabilityArgs["infinibandGUID"] = delegateRc.InfinibandGUID - } - if delegateRc.DeviceID != "" { - capabilityArgs["deviceID"] = delegateRc.DeviceID - } - if delegateRc.CNIDeviceInfoFile != "" { - capabilityArgs["CNIDeviceInfoFile"] = delegateRc.CNIDeviceInfoFile - } - rt.CapabilityArgs = capabilityArgs - } - return rt, cniDeviceInfoFile -} - -// createRuntimeConf creates the CNI `RuntimeConf` for the given ADD / DEL request. -func createRuntimeConf(netNs, podNamespace, podName, containerID, sandboxID, podUID, ifName string) *libcni.RuntimeConf { - return &libcni.RuntimeConf{ - ContainerID: containerID, - NetNS: netNs, - IfName: ifName, - // NOTE: Verbose logging depends on this order, so please keep Args order. - Args: [][2]string{ - {"IgnoreUnknown", "true"}, - {"K8S_POD_NAMESPACE", podNamespace}, - {"K8S_POD_NAME", podName}, - {"K8S_POD_INFRA_CONTAINER_ID", sandboxID}, - {"K8S_POD_UID", podUID}, - }, - } -} - -// delegateRuntimeConfig creates the CNI `RuntimeConf` for the given ADD / DEL request. -func delegateRuntimeConfig(containerID string, delegate *DelegateNetConf, rc *RuntimeConfig, ifName string) *RuntimeConfig { - var delegateRc *RuntimeConfig - - if delegate != nil { - delegateRc = mergeCNIRuntimeConfig(rc, delegate) - if delegateRc.DeviceID != "" { - if delegateRc.CNIDeviceInfoFile != "" { - logging.Debugf("Warning: Existing value of CNIDeviceInfoFile will be overwritten %s", delegateRc.CNIDeviceInfoFile) - } - autoDeviceInfo := fmt.Sprintf("%s-%s_%s", delegate.Name, containerID, ifName) - delegateRc.CNIDeviceInfoFile = nadutils.GetCNIDeviceInfoPath(autoDeviceInfo) - logging.Debugf("Adding auto-generated CNIDeviceInfoFile: %s", delegateRc.CNIDeviceInfoFile) - } - } else { - delegateRc = rc - } - return delegateRc -} - -// GetGatewayFromResult retrieves gateway IP addresses from CNI result -func GetGatewayFromResult(result *cni100.Result) []net.IP { - var gateways []net.IP - - for _, route := range result.Routes { - if mask, _ := route.Dst.Mask.Size(); mask == 0 { - gateways = append(gateways, route.GW) - } - } - return gateways -} - -// GetDefaultNetConf returns NetConf with default variables -func GetDefaultNetConf() *NetConf { - // LogToStderr's default value set to true - return &NetConf{ - BinDir: defaultBinDir, - ConfDir: defaultConfDir, - CNIDir: defaultCNIDir, - LogToStderr: true, - MultusNamespace: defaultMultusNamespace, - NonIsolatedNamespaces: []string{defaultNonIsolatedNamespace}, - ReadinessIndicatorFile: defaultReadinessIndicatorFile, - SystemNamespaces: []string{"kube-system"}, - } - -} - -// LoadNetConf converts inputs (i.e. stdin) to NetConf -func LoadNetConf(bytes []byte) (*NetConf, error) { - netconf := GetDefaultNetConf() - - logging.Debugf("LoadNetConf: %s", string(bytes)) - if err := json.Unmarshal(bytes, netconf); err != nil { - return nil, logging.Errorf("LoadNetConf: failed to load netconf: %v", err) - } - - // Logging - logging.SetLogStderr(netconf.LogToStderr) - logging.SetLogOptions(netconf.LogOptions) - if netconf.LogFile != "" { - logging.SetLogFile(netconf.LogFile) - } - if netconf.LogLevel != "" { - logging.SetLogLevel(netconf.LogLevel) - } - - // Parse previous result - if netconf.RawPrevResult != nil { - resultBytes, err := json.Marshal(netconf.RawPrevResult) - if err != nil { - return nil, logging.Errorf("LoadNetConf: could not serialize prevResult: %v", err) - } - res, err := version.NewResult(netconf.CNIVersion, resultBytes) - if err != nil { - return nil, logging.Errorf("LoadNetConf: could not parse prevResult: %v", err) - } - netconf.RawPrevResult = nil - netconf.PrevResult, err = cni100.NewResultFromResult(res) - if err != nil { - return nil, logging.Errorf("LoadNetConf: could not convert result to current version: %v", err) - } - } - - // Delegates must always be set. If no kubeconfig is present, the - // delegates are executed in-order. If a kubeconfig is present, - // at least one delegate must be present and the first delegate is - // the master plugin. Kubernetes CRD delegates are then appended to - // the existing delegate list and all delegates executed in-order. - - if len(netconf.RawDelegates) == 0 && netconf.ClusterNetwork == "" { - return nil, logging.Errorf("LoadNetConf: at least one delegate/clusterNetwork must be specified") - } - - // setup namespace isolation - if netconf.RawNonIsolatedNamespaces != "" { - // Parse the comma separated list - nonisolated := strings.Split(netconf.RawNonIsolatedNamespaces, ",") - // Cleanup the whitespace - for i, nonv := range nonisolated { - nonisolated[i] = strings.TrimSpace(nonv) - } - netconf.NonIsolatedNamespaces = nonisolated - } - - // get RawDelegates and put delegates field - if netconf.ClusterNetwork == "" { - // for Delegates - if len(netconf.RawDelegates) == 0 { - return nil, logging.Errorf("LoadNetConf: at least one delegate must be specified") - } - for idx, rawConf := range netconf.RawDelegates { - bytes, err := json.Marshal(rawConf) - if err != nil { - return nil, logging.Errorf("LoadNetConf: error marshalling delegate %d config: %v", idx, err) - } - delegateConf, err := LoadDelegateNetConf(bytes, nil, "", "") - if err != nil { - return nil, logging.Errorf("LoadNetConf: failed to load delegate %d config: %v", idx, err) - } - netconf.Delegates = append(netconf.Delegates, delegateConf) - } - netconf.RawDelegates = nil - - // First delegate is always the master plugin - netconf.Delegates[0].MasterPlugin = true - } - - return netconf, nil -} - -// AddDelegates appends the new delegates to the delegates list -func (n *NetConf) AddDelegates(newDelegates []*DelegateNetConf) error { - logging.Debugf("AddDelegates: %v", newDelegates) - n.Delegates = append(n.Delegates, newDelegates...) - return nil -} - -// delegateAddDeviceID injects deviceID information in delegate bytes -func delegateAddDeviceID(inBytes []byte, deviceID string) ([]byte, error) { - var rawConfig map[string]interface{} - var err error - - err = json.Unmarshal(inBytes, &rawConfig) - if err != nil { - return nil, logging.Errorf("delegateAddDeviceID: failed to unmarshal inBytes: %v", err) - } - // Inject deviceID - rawConfig["deviceID"] = deviceID - rawConfig["pciBusID"] = deviceID - configBytes, err := json.Marshal(rawConfig) - if err != nil { - return nil, logging.Errorf("delegateAddDeviceID: failed to re-marshal Spec.Config: %v", err) - } - logging.Debugf("delegateAddDeviceID updated configBytes %s", string(configBytes)) - return configBytes, nil -} - -// addDeviceIDInConfList injects deviceID information in delegate bytes -func addDeviceIDInConfList(inBytes []byte, deviceID string) ([]byte, error) { - var rawConfig map[string]interface{} - var err error - - err = json.Unmarshal(inBytes, &rawConfig) - if err != nil { - return nil, logging.Errorf("addDeviceIDInConfList: failed to unmarshal inBytes: %v", err) - } - - pList, ok := rawConfig["plugins"] - if !ok { - return nil, logging.Errorf("addDeviceIDInConfList: unable to get plugin list") - } - - pMap, ok := pList.([]interface{}) - if !ok { - return nil, logging.Errorf("addDeviceIDInConfList: unable to typecast plugin list") - } - - for idx, plugin := range pMap { - currentPlugin, ok := plugin.(map[string]interface{}) - if !ok { - return nil, logging.Errorf("addDeviceIDInConfList: unable to typecast plugin #%d", idx) - } - // Inject deviceID - currentPlugin["deviceID"] = deviceID - currentPlugin["pciBusID"] = deviceID - } - - configBytes, err := json.Marshal(rawConfig) - if err != nil { - return nil, logging.Errorf("addDeviceIDInConfList: failed to re-marshal: %v", err) - } - logging.Debugf("addDeviceIDInConfList: updated configBytes %s", string(configBytes)) - return configBytes, nil -} - -// injectCNIArgs injects given args to cniConfig -func injectCNIArgs(cniConfig *map[string]interface{}, args *map[string]interface{}) error { - if argsval, ok := (*cniConfig)["args"]; ok { - argsvalmap := argsval.(map[string]interface{}) - if cnival, ok := argsvalmap["cni"]; ok { - cnivalmap := cnival.(map[string]interface{}) - // merge it if conf has args - for key, val := range *args { - cnivalmap[key] = val - } - } else { - argsvalmap["cni"] = *args - } - } else { - argsval := map[string]interface{}{} - argsval["cni"] = *args - (*cniConfig)["args"] = argsval - } - return nil -} - -// addCNIArgsInConfig injects given cniArgs to CNI config in inBytes -func addCNIArgsInConfig(inBytes []byte, cniArgs *map[string]interface{}) ([]byte, error) { - var rawConfig map[string]interface{} - var err error - - err = json.Unmarshal(inBytes, &rawConfig) - if err != nil { - return nil, logging.Errorf("addCNIArgsInConfig(): failed to unmarshal inBytes: %v", err) - } - - injectCNIArgs(&rawConfig, cniArgs) - - configBytes, err := json.Marshal(rawConfig) - if err != nil { - return nil, logging.Errorf("addCNIArgsInConfig(): failed to re-marshal: %v", err) - } - return configBytes, nil -} - -// addCNIArgsInConfList injects given cniArgs to CNI conflist in inBytes -func addCNIArgsInConfList(inBytes []byte, cniArgs *map[string]interface{}) ([]byte, error) { - var rawConfig map[string]interface{} - var err error - - err = json.Unmarshal(inBytes, &rawConfig) - if err != nil { - return nil, logging.Errorf("addCNIArgsInConfList(): failed to unmarshal inBytes: %v", err) - } - - pList, ok := rawConfig["plugins"] - if !ok { - return nil, logging.Errorf("addCNIArgsInConfList(): unable to get plugin list") - } - - pMap, ok := pList.([]interface{}) - if !ok { - return nil, logging.Errorf("addCNIArgsInConfList(): unable to typecast plugin list") - } - - for idx := range pMap { - valMap := pMap[idx].(map[string]interface{}) - injectCNIArgs(&valMap, cniArgs) - } - - configBytes, err := json.Marshal(rawConfig) - if err != nil { - return nil, logging.Errorf("addCNIArgsInConfList(): failed to re-marshal: %v", err) - } - return configBytes, nil -} - -// CheckGatewayConfig check gatewayRequest and mark IsFilter{V4,V6}Gateway flag if -// gw filtering is required -func CheckGatewayConfig(delegates []*DelegateNetConf) error { - - v4Gateways := 0 - v6Gateways := 0 - - // Check the gateway - for _, delegate := range delegates { - if delegate.GatewayRequest != nil { - for _, gw := range *delegate.GatewayRequest { - if gw.To4() != nil { - v4Gateways++ - } else { - v6Gateways++ - } - } - } - } - - if v4Gateways > 1 || v6Gateways > 1 { - return fmt.Errorf("multus does not support ECMP for default-route") - } - - // set filter flag for each delegate - for i, delegate := range delegates { - delegates[i].IsFilterV4Gateway = true - delegates[i].IsFilterV6Gateway = true - if delegate.GatewayRequest != nil { - for _, gw := range *delegate.GatewayRequest { - if gw.To4() != nil { - delegates[i].IsFilterV4Gateway = false - } else { - delegates[i].IsFilterV6Gateway = false - } - } - } - } - return nil -} - -// CheckSystemNamespaces checks whether given namespace is in systemNamespaces or not. -func CheckSystemNamespaces(namespace string, systemNamespaces []string) bool { - for _, nsname := range systemNamespaces { - if namespace == nsname { - return true - } - } - return false -} diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types/doc.go b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types/doc.go deleted file mode 100644 index fa4e51c5b2..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2022 Multus 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 types contains common types in the multus. -package types diff --git a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types/types.go b/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types/types.go deleted file mode 100644 index 1a410db595..0000000000 --- a/go-controller/vendor/gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/types/types.go +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) 2018 Intel Corporation -// Copyright (c) 2021 Multus 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 types - -import ( - "net" - - "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging" - - "github.com/containernetworking/cni/pkg/types" - cni100 "github.com/containernetworking/cni/pkg/types/100" - v1 "k8s.io/api/core/v1" -) - -// NetConf for cni config file written in json -type NetConf struct { - types.NetConf - - // support chaining for master interface and IP decisions - // occurring prior to running ipvlan plugin - RawPrevResult *map[string]interface{} `json:"prevResult"` - PrevResult *cni100.Result `json:"-"` - - ConfDir string `json:"confDir"` - CNIDir string `json:"cniDir"` - BinDir string `json:"binDir"` - // RawDelegates is private to the NetConf class; use Delegates instead - RawDelegates []map[string]interface{} `json:"delegates"` - // These parameters are exclusive in one config file: - // - Delegates (directly add delegate CNI config into multus CNI config) - // - ClusterNetwork+DefaultNetworks (add CNI config through CRD, directory or file) - Delegates []*DelegateNetConf `json:"-"` - ClusterNetwork string `json:"clusterNetwork"` - DefaultNetworks []string `json:"defaultNetworks"` - Kubeconfig string `json:"kubeconfig"` - LogFile string `json:"logFile"` - LogLevel string `json:"logLevel"` - LogToStderr bool `json:"logToStderr,omitempty"` - LogOptions *logging.LogOptions `json:"logOptions,omitempty"` - RuntimeConfig *RuntimeConfig `json:"runtimeConfig,omitempty"` - // Default network readiness options - ReadinessIndicatorFile string `json:"readinessindicatorfile"` - // Option to isolate the usage of CR's to the namespace in which a pod resides. - NamespaceIsolation bool `json:"namespaceIsolation"` - RawNonIsolatedNamespaces string `json:"globalNamespaces"` - NonIsolatedNamespaces []string `json:"-"` - - // Option to set system namespaces (to avoid to add defaultNetworks) - SystemNamespaces []string `json:"systemNamespaces"` - // Option to set the namespace that multus-cni uses (clusterNetwork/defaultNetworks) - MultusNamespace string `json:"multusNamespace"` - - // Retry delegate DEL message to next when some error - RetryDeleteOnError bool `json:"retryDeleteOnError"` -} - -// RuntimeConfig specifies CNI RuntimeConfig -type RuntimeConfig struct { - PortMaps []*PortMapEntry `json:"portMappings,omitempty"` - Bandwidth *BandwidthEntry `json:"bandwidth,omitempty"` - IPs []string `json:"ips,omitempty"` - Mac string `json:"mac,omitempty"` - InfinibandGUID string `json:"infinibandGUID,omitempty"` - DeviceID string `json:"deviceID,omitempty"` - CNIDeviceInfoFile string `json:"CNIDeviceInfoFile,omitempty"` -} - -// PortMapEntry for CNI PortMapEntry -type PortMapEntry struct { - HostPort int `json:"hostPort"` - ContainerPort int `json:"containerPort"` - Protocol string `json:"protocol,omitempty"` - HostIP string `json:"hostIP,omitempty"` -} - -// BandwidthEntry for CNI BandwidthEntry -type BandwidthEntry struct { - IngressRate int `json:"ingressRate"` - IngressBurst int `json:"ingressBurst"` - - EgressRate int `json:"egressRate"` - EgressBurst int `json:"egressBurst"` -} - -// DelegateNetConf for net-attach-def for pod -type DelegateNetConf struct { - Conf types.NetConf - ConfList types.NetConfList - Name string - IfnameRequest string `json:"ifnameRequest,omitempty"` - MacRequest string `json:"macRequest,omitempty"` - InfinibandGUIDRequest string `json:"infinibandGUIDRequest,omitempty"` - IPRequest []string `json:"ipRequest,omitempty"` - PortMappingsRequest []*PortMapEntry `json:"-"` - BandwidthRequest *BandwidthEntry `json:"-"` - GatewayRequest *[]net.IP `json:"default-route,omitempty"` - IsFilterV4Gateway bool - IsFilterV6Gateway bool - // MasterPlugin is only used internal housekeeping - MasterPlugin bool `json:"-"` - // Conflist plugin is only used internal housekeeping - ConfListPlugin bool `json:"-"` - // DeviceID is only used internal housekeeping - DeviceID string `json:"deviceID,omitempty"` - // ResourceName is only used internal housekeeping - ResourceName string `json:"resourceName,omitempty"` - - // Raw JSON - Bytes []byte -} - -// NetworkSelectionElement represents one element of the JSON format -// Network Attachment Selection Annotation as described in section 4.1.2 -// of the CRD specification. -type NetworkSelectionElement struct { - // Name contains the name of the Network object this element selects - Name string `json:"name"` - // Namespace contains the optional namespace that the network referenced - // by Name exists in - Namespace string `json:"namespace,omitempty"` - // IPRequest contains an optional requested IP address for this network - // attachment - IPRequest []string `json:"ips,omitempty"` - // MacRequest contains an optional requested MAC address for this - // network attachment - MacRequest string `json:"mac,omitempty"` - // InfinibandGUID request contains an optional requested Infiniband GUID address - // for this network attachment - InfinibandGUIDRequest string `json:"infiniband-guid,omitempty"` - // InterfaceRequest contains an optional requested name for the - // network interface this attachment will create in the container - InterfaceRequest string `json:"interface,omitempty"` - // DeprecatedInterfaceRequest is obsolated parameter at pre 3.2. - // This will be removed in 4.0 release. - DeprecatedInterfaceRequest string `json:"interfaceRequest,omitempty"` - // PortMappingsRequest contains an optional requested port mapping - // for the network - PortMappingsRequest []*PortMapEntry `json:"portMappings,omitempty"` - // BandwidthRequest contains an optional requested bandwidth for - // the network - BandwidthRequest *BandwidthEntry `json:"bandwidth,omitempty"` - // DeviceID contains an optional requested deviceID the network - DeviceID string `json:"deviceID,omitempty"` - // CNIArgs contains additional CNI arguments for the network interface - CNIArgs *map[string]interface{} `json:"cni-args"` - // GatewayRequest contains default route IP address for the pod - GatewayRequest *[]net.IP `json:"default-route,omitempty"` -} - -// K8sArgs is the valid CNI_ARGS used for Kubernetes -type K8sArgs struct { - types.CommonArgs - IP net.IP - K8S_POD_NAME types.UnmarshallableString //revive:disable-line - K8S_POD_NAMESPACE types.UnmarshallableString //revive:disable-line - K8S_POD_INFRA_CONTAINER_ID types.UnmarshallableString //revive:disable-line - K8S_POD_UID types.UnmarshallableString //revive:disable-line -} - -// ResourceInfo is struct to hold Pod device allocation information -type ResourceInfo struct { - Index int - DeviceIDs []string -} - -// ResourceClient provides a kubelet Pod resource handle -type ResourceClient interface { - // GetPodResourceMap returns an instance of a map of Pod ResourceInfo given a (Pod name, namespace) tuple - GetPodResourceMap(*v1.Pod) (map[string]*ResourceInfo, error) -} diff --git a/go-controller/vendor/k8s.io/api/admission/v1/doc.go b/go-controller/vendor/k8s.io/api/admission/v1/doc.go index cab6528214..e7df9f629c 100644 --- a/go-controller/vendor/k8s.io/api/admission/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/admission/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=admission.k8s.io -package v1 +package v1 // import "k8s.io/api/admission/v1" diff --git a/go-controller/vendor/k8s.io/api/admission/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/admission/v1beta1/doc.go index 447495684e..a5669022a0 100644 --- a/go-controller/vendor/k8s.io/api/admission/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/admission/v1beta1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=admission.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/admission/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/admissionregistration/v1/doc.go b/go-controller/vendor/k8s.io/api/admissionregistration/v1/doc.go index ec0ebb9c49..ca0086188a 100644 --- a/go-controller/vendor/k8s.io/api/admissionregistration/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/admissionregistration/v1/doc.go @@ -24,4 +24,4 @@ limitations under the License. // AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration // MutatingWebhookConfiguration and ValidatingWebhookConfiguration are for the // new dynamic admission controller configuration. -package v1 +package v1 // import "k8s.io/api/admissionregistration/v1" diff --git a/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go b/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go index 344af9ae09..98066211d8 100644 --- a/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go +++ b/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=admissionregistration.k8s.io // Package v1alpha1 is the v1alpha1 version of the API. -package v1alpha1 +package v1alpha1 // import "k8s.io/api/admissionregistration/v1alpha1" diff --git a/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto b/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto index d23f21cc84..88344ce87a 100644 --- a/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto +++ b/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto @@ -272,9 +272,9 @@ message MatchResources { // +optional optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 1; - // ObjectSelector decides whether to run the policy based on if the + // ObjectSelector decides whether to run the validation based on if the // object has matching labels. objectSelector is evaluated against both - // the oldObject and newObject that would be sent to the policy's expression (CEL), and + // the oldObject and newObject that would be sent to the cel validation, and // is considered to match if either object matches the selector. A null // object (oldObject in the case of create, or newObject in the case of // delete) or an object that cannot have labels (like a @@ -286,13 +286,13 @@ message MatchResources { // +optional optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector objectSelector = 2; - // ResourceRules describes what operations on what resources/subresources the admission policy matches. + // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. // The policy cares about an operation if it matches _any_ Rule. // +listType=atomic // +optional repeated NamedRuleWithOperations resourceRules = 3; - // ExcludeResourceRules describes what operations on what resources/subresources the policy should not care about. + // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) // +listType=atomic // +optional @@ -304,13 +304,12 @@ message MatchResources { // - Exact: match a request only if it exactly matches a specified rule. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, - // the admission policy does not consider requests to apps/v1beta1 or extensions/v1beta1 API groups. + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. // // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, - // the admission policy **does** consider requests made to apps/v1beta1 or extensions/v1beta1 - // API groups. The API server translates the request to a matched resource API if necessary. + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. // // Defaults to "Equivalent" // +optional diff --git a/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go b/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go index f183498a55..ee50fbe2d4 100644 --- a/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go +++ b/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go @@ -56,9 +56,9 @@ const ( type FailurePolicyType string const ( - // Ignore means that an error calling the admission webhook or admission policy is ignored. + // Ignore means that an error calling the webhook is ignored. Ignore FailurePolicyType = "Ignore" - // Fail means that an error calling the admission webhook or admission policy causes resource admission to fail. + // Fail means that an error calling the webhook causes the admission to fail. Fail FailurePolicyType = "Fail" ) @@ -67,11 +67,9 @@ const ( type MatchPolicyType string const ( - // Exact means requests should only be sent to the admission webhook or admission policy if they exactly match a given rule. + // Exact means requests should only be sent to the webhook if they exactly match a given rule. Exact MatchPolicyType = "Exact" - // Equivalent means requests should be sent to the admission webhook or admission policy if they modify a resource listed - // in rules via an equivalent API group or version. For example, `autoscaling/v1` and `autoscaling/v2` - // HorizontalPodAutoscalers are equivalent: the same set of resources appear via both APIs. + // Equivalent means requests should be sent to the webhook if they modify a resource listed in rules via another API group or version. Equivalent MatchPolicyType = "Equivalent" ) @@ -579,9 +577,9 @@ type MatchResources struct { // Default to the empty LabelSelector, which matches everything. // +optional NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,1,opt,name=namespaceSelector"` - // ObjectSelector decides whether to run the policy based on if the + // ObjectSelector decides whether to run the validation based on if the // object has matching labels. objectSelector is evaluated against both - // the oldObject and newObject that would be sent to the policy's expression (CEL), and + // the oldObject and newObject that would be sent to the cel validation, and // is considered to match if either object matches the selector. A null // object (oldObject in the case of create, or newObject in the case of // delete) or an object that cannot have labels (like a @@ -592,12 +590,12 @@ type MatchResources struct { // Default to the empty LabelSelector, which matches everything. // +optional ObjectSelector *metav1.LabelSelector `json:"objectSelector,omitempty" protobuf:"bytes,2,opt,name=objectSelector"` - // ResourceRules describes what operations on what resources/subresources the admission policy matches. + // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. // The policy cares about an operation if it matches _any_ Rule. // +listType=atomic // +optional ResourceRules []NamedRuleWithOperations `json:"resourceRules,omitempty" protobuf:"bytes,3,rep,name=resourceRules"` - // ExcludeResourceRules describes what operations on what resources/subresources the policy should not care about. + // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) // +listType=atomic // +optional @@ -608,13 +606,12 @@ type MatchResources struct { // - Exact: match a request only if it exactly matches a specified rule. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, - // the admission policy does not consider requests to apps/v1beta1 or extensions/v1beta1 API groups. + // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. // // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, - // the admission policy **does** consider requests made to apps/v1beta1 or extensions/v1beta1 - // API groups. The API server translates the request to a matched resource API if necessary. + // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. // // Defaults to "Equivalent" // +optional diff --git a/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go index 116e56e065..32222a81b8 100644 --- a/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go @@ -68,10 +68,10 @@ func (JSONPatch) SwaggerDoc() map[string]string { var map_MatchResources = map[string]string{ "": "MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", "namespaceSelector": "NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", - "objectSelector": "ObjectSelector decides whether to run the policy based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the policy's expression (CEL), and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", - "resourceRules": "ResourceRules describes what operations on what resources/subresources the admission policy matches. The policy cares about an operation if it matches _any_ Rule.", - "excludeResourceRules": "ExcludeResourceRules describes what operations on what resources/subresources the policy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", - "matchPolicy": "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, the admission policy does not consider requests to apps/v1beta1 or extensions/v1beta1 API groups.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, the admission policy **does** consider requests made to apps/v1beta1 or extensions/v1beta1 API groups. The API server translates the request to a matched resource API if necessary.\n\nDefaults to \"Equivalent\"", + "objectSelector": "ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + "resourceRules": "ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.", + "excludeResourceRules": "ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", + "matchPolicy": "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.\n\nDefaults to \"Equivalent\"", } func (MatchResources) SwaggerDoc() map[string]string { diff --git a/go-controller/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go index 40d8315738..0095cb257a 100644 --- a/go-controller/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go @@ -24,4 +24,4 @@ limitations under the License. // AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration // MutatingWebhookConfiguration and ValidatingWebhookConfiguration are for the // new dynamic admission controller configuration. -package v1beta1 +package v1beta1 // import "k8s.io/api/admissionregistration/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/apidiscovery/v2/doc.go b/go-controller/vendor/k8s.io/api/apidiscovery/v2/doc.go index f46d33e942..4f3ad5f139 100644 --- a/go-controller/vendor/k8s.io/api/apidiscovery/v2/doc.go +++ b/go-controller/vendor/k8s.io/api/apidiscovery/v2/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=apidiscovery.k8s.io -package v2 +package v2 // import "k8s.io/api/apidiscovery/v2" diff --git a/go-controller/vendor/k8s.io/api/apidiscovery/v2beta1/doc.go b/go-controller/vendor/k8s.io/api/apidiscovery/v2beta1/doc.go index d4fceab68d..e85da226e0 100644 --- a/go-controller/vendor/k8s.io/api/apidiscovery/v2beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/apidiscovery/v2beta1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=apidiscovery.k8s.io -package v2beta1 +package v2beta1 // import "k8s.io/api/apidiscovery/v2beta1" diff --git a/go-controller/vendor/k8s.io/api/apiserverinternal/v1alpha1/doc.go b/go-controller/vendor/k8s.io/api/apiserverinternal/v1alpha1/doc.go index 867d741651..a4da95d44d 100644 --- a/go-controller/vendor/k8s.io/api/apiserverinternal/v1alpha1/doc.go +++ b/go-controller/vendor/k8s.io/api/apiserverinternal/v1alpha1/doc.go @@ -22,4 +22,4 @@ limitations under the License. // Package v1alpha1 contains the v1alpha1 version of the API used by the // apiservers themselves. -package v1alpha1 +package v1alpha1 // import "k8s.io/api/apiserverinternal/v1alpha1" diff --git a/go-controller/vendor/k8s.io/api/apps/v1/doc.go b/go-controller/vendor/k8s.io/api/apps/v1/doc.go index 51fe12c53d..d189e860f2 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/apps/v1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1 +package v1 // import "k8s.io/api/apps/v1" diff --git a/go-controller/vendor/k8s.io/api/apps/v1/generated.pb.go b/go-controller/vendor/k8s.io/api/apps/v1/generated.pb.go index eacc25931b..ea62a099fe 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/apps/v1/generated.pb.go @@ -928,147 +928,145 @@ func init() { } var fileDescriptor_5b781835628d5338 = []byte{ - // 2225 bytes of a gzipped FileDescriptorProto + // 2194 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x52, 0xa4, 0x44, 0x0d, 0x2d, 0xc9, 0x1e, 0xa9, 0x12, 0x63, 0x37, 0xa4, 0xbb, 0x71, - 0x6d, 0x25, 0x8e, 0xc9, 0xda, 0x71, 0x82, 0xc0, 0x29, 0x12, 0x88, 0x54, 0x9a, 0xba, 0xd1, 0x57, - 0x87, 0x92, 0x03, 0xb8, 0x69, 0xd1, 0xd1, 0x72, 0x4c, 0x6d, 0xbc, 0x5f, 0xd8, 0x1d, 0x2a, 0x16, - 0x7a, 0x29, 0x0a, 0x14, 0xe8, 0x21, 0x87, 0xfe, 0x0d, 0xfd, 0x07, 0x8a, 0xa2, 0x68, 0x6e, 0x45, - 0x50, 0x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 0xd7, 0x25, 0x16, 0xdd, 0xec, 0x9b, 0x7b, 0xc4, 0xed, 0x68, - 0xfb, 0xa4, 0xdb, 0x37, 0x48, 0x97, 0xaf, 0x68, 0xa9, 0x55, 0x13, 0xbe, 0x2e, 0xb5, 0xa5, 0x5a, - 0x28, 0xc7, 0x1a, 0xfe, 0x00, 0x40, 0x8b, 0x37, 0x6d, 0xe8, 0x9e, 0x17, 0x62, 0x16, 0x38, 0x66, - 0x98, 0x80, 0x9b, 0x19, 0x0d, 0x24, 0xb1, 0x62, 0x3e, 0x76, 0x89, 0xa7, 0xbb, 0xa4, 0x9b, 0xf6, - 0x71, 0x32, 0xe9, 0xe3, 0x9a, 0x54, 0x0b, 0xe5, 0x58, 0xc3, 0x57, 0x41, 0xc5, 0xef, 0x8d, 0xcf, - 0xb9, 0x58, 0x9c, 0x05, 0x01, 0x56, 0xd9, 0x8c, 0x44, 0x28, 0xae, 0xc7, 0x86, 0x66, 0xef, 0x79, - 0xc4, 0x3d, 0x20, 0xdd, 0x77, 0x7c, 0x0e, 0xc0, 0x0a, 0x65, 0x89, 0x17, 0xca, 0x70, 0x68, 0x5b, - 0x19, 0x0d, 0x24, 0xb1, 0x62, 0x43, 0xf3, 0xa3, 0x26, 0x33, 0xb4, 0xa9, 0xe4, 0xd0, 0x76, 0xa5, - 0x5a, 0x28, 0xc7, 0x9a, 0xc5, 0x9e, 0xef, 0xf2, 0xea, 0x01, 0xd6, 0x0d, 0xbc, 0x67, 0x90, 0xea, - 0x74, 0x32, 0xf6, 0x36, 0x93, 0x62, 0x94, 0xd6, 0x87, 0xef, 0x80, 0x73, 0x7e, 0xd3, 0xae, 0x85, - 0x43, 0x90, 0x32, 0x07, 0x79, 0x4e, 0x80, 0x9c, 0xdb, 0x4c, 0x2b, 0xa0, 0xac, 0x0d, 0xbc, 0x05, - 0xe6, 0x34, 0xdb, 0x30, 0x78, 0x3c, 0xb6, 0xed, 0xbe, 0x45, 0xab, 0x33, 0x1c, 0x05, 0xb2, 0x1c, - 0x6a, 0x27, 0x24, 0x28, 0xa5, 0x09, 0xef, 0x02, 0xa0, 0x05, 0xe5, 0xc0, 0xab, 0x82, 0xfc, 0x42, - 0x9f, 0xad, 0x43, 0x51, 0x01, 0x0e, 0x9b, 0x3c, 0x14, 0x43, 0x53, 0x3f, 0x51, 0xc0, 0x72, 0x4e, - 0x8e, 0xc3, 0xb7, 0x12, 0x55, 0xef, 0x6a, 0xaa, 0xea, 0x5d, 0xc8, 0x31, 0x8b, 0x95, 0x3e, 0x0d, - 0xcc, 0x32, 0xde, 0xa1, 0x5b, 0x3d, 0x5f, 0x45, 0xec, 0x60, 0x2f, 0xc9, 0x7c, 0x47, 0x71, 0xc5, - 0x68, 0x1b, 0x3e, 0x37, 0x1c, 0xd4, 0x67, 0x13, 0x32, 0x94, 0xc4, 0x54, 0x7f, 0x51, 0x00, 0x60, - 0x8d, 0x38, 0x86, 0x7d, 0x68, 0x12, 0xeb, 0x34, 0x58, 0xcb, 0x5a, 0x82, 0xb5, 0xa8, 0xd2, 0x85, - 0x08, 0xfd, 0xc9, 0xa5, 0x2d, 0xeb, 0x29, 0xda, 0x72, 0x69, 0x04, 0xce, 0xd1, 0xbc, 0xe5, 0x6f, - 0x93, 0x60, 0x21, 0x52, 0x8e, 0x88, 0xcb, 0x1b, 0x89, 0x25, 0xbc, 0x92, 0x5a, 0xc2, 0x65, 0x89, - 0xc9, 0x53, 0x63, 0x2e, 0x1f, 0x80, 0x39, 0xc6, 0x2b, 0xfc, 0x55, 0xe3, 0xac, 0x65, 0xea, 0xd8, - 0xac, 0x25, 0xac, 0x3a, 0xeb, 0x09, 0x24, 0x94, 0x42, 0xce, 0x61, 0x49, 0xd3, 0x5f, 0x45, 0x96, - 0xf4, 0x7b, 0x05, 0xcc, 0x45, 0xcb, 0x74, 0x0a, 0x34, 0xa9, 0x9d, 0xa4, 0x49, 0xb5, 0xa3, 0xe3, - 0x32, 0x87, 0x27, 0xfd, 0xb5, 0x18, 0xf7, 0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5, 0x3b, 0x51, 0x12, 0xcb, 0xb4, 0x49, 0x24, 0x39, 0x02, + 0x82, 0x52, 0x52, 0x9b, 0xac, 0xa5, 0x01, 0x28, 0x6b, 0x03, 0x37, 0xc1, 0xe2, 0xc0, 0xca, 0x52, + 0xf9, 0xb1, 0x76, 0x41, 0x50, 0x2d, 0xee, 0x66, 0x21, 0x48, 0x66, 0x07, 0x7f, 0x92, 0x90, 0x2b, + 0xd3, 0x7c, 0x17, 0xb9, 0x72, 0x74, 0x3a, 0x4c, 0xac, 0x57, 0x24, 0x3a, 0xaa, 0x32, 0xa9, 0x8e, + 0x52, 0x3f, 0x54, 0x00, 0xcc, 0xa6, 0xe0, 0xd8, 0xc3, 0x7d, 0xc6, 0x22, 0x56, 0x22, 0x7b, 0x72, + 0x85, 0x73, 0x75, 0xbc, 0xc2, 0x89, 0x76, 0xd0, 0xc9, 0x24, 0x8e, 0x98, 0xde, 0xd3, 0xb9, 0x98, + 0x99, 0x40, 0xe2, 0x44, 0xfe, 0x3c, 0x99, 0xc4, 0x89, 0xf1, 0x1c, 0x2d, 0x71, 0xfe, 0x59, 0x00, + 0x8b, 0x11, 0x78, 0x62, 0x89, 0x23, 0x31, 0xf9, 0xe6, 0x72, 0x66, 0x32, 0xd9, 0x11, 0x4d, 0xdd, + 0xff, 0x89, 0xec, 0x88, 0x1c, 0xca, 0x91, 0x1d, 0xbf, 0x2f, 0xc4, 0xbd, 0x3e, 0xa6, 0xec, 0xf8, + 0x02, 0xae, 0x2a, 0xbe, 0x72, 0xca, 0x45, 0xfd, 0xa4, 0x08, 0xce, 0xa6, 0x53, 0x30, 0x51, 0x07, + 0x95, 0xb1, 0x75, 0x70, 0x07, 0x2c, 0xdd, 0x1b, 0x18, 0xc6, 0x21, 0x1f, 0x43, 0xac, 0x18, 0xfa, + 0x15, 0xf4, 0xdb, 0xc2, 0x72, 0xe9, 0x07, 0x12, 0x0c, 0x92, 0x5a, 0x66, 0xcb, 0x62, 0xe9, 0x49, + 0x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d, 0x48, 0xd6, 0x90, 0x61, 0x86, 0x33, 0xa4, 0xb2, 0x2f, 0x24, 0x48, 0xa1, + 0x9f, 0xe8, 0x23, 0xea, 0x7b, 0x92, 0x8f, 0xa8, 0xab, 0x63, 0xc2, 0x6c, 0xf2, 0x6b, 0x49, 0xe9, + 0xa1, 0xb3, 0x7a, 0xfc, 0x43, 0xa7, 0xfa, 0x17, 0x05, 0x3c, 0x93, 0xbb, 0x4d, 0xc1, 0xb5, 0x84, + 0x7a, 0xbc, 0x96, 0x52, 0x8f, 0xcf, 0xe6, 0x1a, 0xc6, 0x24, 0xa4, 0x29, 0xbf, 0xb1, 0xbc, 0x39, + 0xf6, 0xc6, 0x52, 0x72, 0x12, 0x19, 0x7f, 0x75, 0xd9, 0x7e, 0xf5, 0xe1, 0xa3, 0xfa, 0xd4, 0xa7, + 0x8f, 0xea, 0x53, 0x9f, 0x3d, 0xaa, 0x4f, 0xfd, 0x72, 0x54, 0x57, 0x1e, 0x8e, 0xea, 0xca, 0xa7, + 0xa3, 0xba, 0xf2, 0xd9, 0xa8, 0xae, 0xfc, 0x7d, 0x54, 0x57, 0x7e, 0xfb, 0x79, 0x7d, 0xea, 0x2e, + 0xcc, 0xfe, 0x2b, 0xf3, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xfa, 0xed, 0x70, 0xaa, 0x29, + 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { @@ -1750,11 +1748,6 @@ func (m *DeploymentStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TerminatingReplicas != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TerminatingReplicas)) - i-- - dAtA[i] = 0x48 - } if m.CollisionCount != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount)) i-- @@ -2061,11 +2054,6 @@ func (m *ReplicaSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TerminatingReplicas != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TerminatingReplicas)) - i-- - dAtA[i] = 0x38 - } if len(m.Conditions) > 0 { for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { { @@ -2927,9 +2915,6 @@ func (m *DeploymentStatus) Size() (n int) { if m.CollisionCount != nil { n += 1 + sovGenerated(uint64(*m.CollisionCount)) } - if m.TerminatingReplicas != nil { - n += 1 + sovGenerated(uint64(*m.TerminatingReplicas)) - } return n } @@ -3035,9 +3020,6 @@ func (m *ReplicaSetStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - if m.TerminatingReplicas != nil { - n += 1 + sovGenerated(uint64(*m.TerminatingReplicas)) - } return n } @@ -3453,7 +3435,6 @@ func (this *DeploymentStatus) String() string { `Conditions:` + repeatedStringForConditions + `,`, `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`, - `TerminatingReplicas:` + valueToStringGenerated(this.TerminatingReplicas) + `,`, `}`, }, "") return s @@ -3540,7 +3521,6 @@ func (this *ReplicaSetStatus) String() string { `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`, `Conditions:` + repeatedStringForConditions + `,`, - `TerminatingReplicas:` + valueToStringGenerated(this.TerminatingReplicas) + `,`, `}`, }, "") return s @@ -5961,26 +5941,6 @@ func (m *DeploymentStatus) Unmarshal(dAtA []byte) error { } } m.CollisionCount = &v - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TerminatingReplicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TerminatingReplicas = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -6913,26 +6873,6 @@ func (m *ReplicaSetStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TerminatingReplicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TerminatingReplicas = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/go-controller/vendor/k8s.io/api/apps/v1/generated.proto b/go-controller/vendor/k8s.io/api/apps/v1/generated.proto index 38c8997e99..388e638f4d 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1/generated.proto +++ b/go-controller/vendor/k8s.io/api/apps/v1/generated.proto @@ -318,19 +318,19 @@ message DeploymentStatus { // +optional optional int64 observedGeneration = 1; - // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + // Total number of non-terminated pods targeted by this deployment (their labels match the selector). // +optional optional int32 replicas = 2; - // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + // Total number of non-terminated pods targeted by this deployment that have the desired template spec. // +optional optional int32 updatedReplicas = 3; - // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + // readyReplicas is the number of pods targeted by this Deployment with a Ready Condition. // +optional optional int32 readyReplicas = 7; - // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. // +optional optional int32 availableReplicas = 4; @@ -340,13 +340,6 @@ message DeploymentStatus { // +optional optional int32 unavailableReplicas = 5; - // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null - // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - optional int32 terminatingReplicas = 9; - // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge @@ -428,16 +421,16 @@ message ReplicaSetList { optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of ReplicaSets. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller repeated ReplicaSet items = 2; } // ReplicaSetSpec is the specification of a ReplicaSet. message ReplicaSetSpec { - // Replicas is the number of desired pods. + // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller // +optional optional int32 replicas = 1; @@ -455,36 +448,29 @@ message ReplicaSetSpec { // Template is the object that describes the pod that will be created if // insufficient replicas are detected. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template // +optional optional .k8s.io.api.core.v1.PodTemplateSpec template = 3; } // ReplicaSetStatus represents the current status of a ReplicaSet. message ReplicaSetStatus { - // Replicas is the most recently observed number of non-terminating pods. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // Replicas is the most recently observed number of replicas. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller optional int32 replicas = 1; - // The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset. + // The number of pods that have labels matching the labels of the pod template of the replicaset. // +optional optional int32 fullyLabeledReplicas = 2; - // The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition. + // readyReplicas is the number of pods targeted by this ReplicaSet with a Ready Condition. // +optional optional int32 readyReplicas = 4; - // The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set. + // The number of available replicas (ready for at least minReadySeconds) for this replica set. // +optional optional int32 availableReplicas = 5; - // The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp - // and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - optional int32 terminatingReplicas = 7; - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. // +optional optional int64 observedGeneration = 3; @@ -716,7 +702,6 @@ message StatefulSetSpec { // the network identity of the set. Pods get DNS/hostnames that follow the // pattern: pod-specific-string.serviceName.default.svc.cluster.local // where "pod-specific-string" is managed by the StatefulSet controller. - // +optional optional string serviceName = 5; // podManagementPolicy controls how pods are created during initial scale up, diff --git a/go-controller/vendor/k8s.io/api/apps/v1/types.go b/go-controller/vendor/k8s.io/api/apps/v1/types.go index 1362d875d8..a68690b447 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1/types.go +++ b/go-controller/vendor/k8s.io/api/apps/v1/types.go @@ -220,7 +220,6 @@ type StatefulSetSpec struct { // the network identity of the set. Pods get DNS/hostnames that follow the // pattern: pod-specific-string.serviceName.default.svc.cluster.local // where "pod-specific-string" is managed by the StatefulSet controller. - // +optional ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"` // podManagementPolicy controls how pods are created during initial scale up, @@ -487,19 +486,19 @@ type DeploymentStatus struct { // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` - // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + // Total number of non-terminated pods targeted by this deployment (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` - // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + // Total number of non-terminated pods targeted by this deployment that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"` - // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + // readyReplicas is the number of pods targeted by this Deployment with a Ready Condition. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"` - // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"` @@ -509,13 +508,6 @@ type DeploymentStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` - // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null - // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty" protobuf:"varint,9,opt,name=terminatingReplicas"` - // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge @@ -847,16 +839,16 @@ type ReplicaSetList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ReplicaSets. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"` } // ReplicaSetSpec is the specification of a ReplicaSet. type ReplicaSetSpec struct { - // Replicas is the number of desired pods. + // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` @@ -874,36 +866,29 @@ type ReplicaSetSpec struct { // Template is the object that describes the pod that will be created if // insufficient replicas are detected. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template // +optional Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` } // ReplicaSetStatus represents the current status of a ReplicaSet. type ReplicaSetStatus struct { - // Replicas is the most recently observed number of non-terminating pods. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // Replicas is the most recently observed number of replicas. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` - // The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset. + // The number of pods that have labels matching the labels of the pod template of the replicaset. // +optional FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"` - // The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition. + // readyReplicas is the number of pods targeted by this ReplicaSet with a Ready Condition. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"` - // The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set. + // The number of available replicas (ready for at least minReadySeconds) for this replica set. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"` - // The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp - // and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty" protobuf:"varint,7,opt,name=terminatingReplicas"` - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` diff --git a/go-controller/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go index f44ba7bc33..341ecdadb2 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go @@ -177,12 +177,11 @@ func (DeploymentSpec) SwaggerDoc() map[string]string { var map_DeploymentStatus = map[string]string{ "": "DeploymentStatus is the most recently observed status of the Deployment.", "observedGeneration": "The generation observed by the deployment controller.", - "replicas": "Total number of non-terminating pods targeted by this deployment (their labels match the selector).", - "updatedReplicas": "Total number of non-terminating pods targeted by this deployment that have the desired template spec.", - "readyReplicas": "Total number of non-terminating pods targeted by this Deployment with a Ready Condition.", - "availableReplicas": "Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment.", + "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "readyReplicas": "readyReplicas is the number of pods targeted by this Deployment with a Ready Condition.", + "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", "unavailableReplicas": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - "terminatingReplicas": "Total number of terminating pods targeted by this deployment. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.\n\nThis is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.", "conditions": "Represents the latest available observations of a deployment's current state.", "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", } @@ -228,7 +227,7 @@ func (ReplicaSetCondition) SwaggerDoc() map[string]string { var map_ReplicaSetList = map[string]string{ "": "ReplicaSetList is a collection of ReplicaSets.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset", + "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", } func (ReplicaSetList) SwaggerDoc() map[string]string { @@ -237,10 +236,10 @@ func (ReplicaSetList) SwaggerDoc() map[string]string { var map_ReplicaSetSpec = map[string]string{ "": "ReplicaSetSpec is the specification of a ReplicaSet.", - "replicas": "Replicas is the number of desired pods. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset", + "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", "selector": "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template", + "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", } func (ReplicaSetSpec) SwaggerDoc() map[string]string { @@ -249,11 +248,10 @@ func (ReplicaSetSpec) SwaggerDoc() map[string]string { var map_ReplicaSetStatus = map[string]string{ "": "ReplicaSetStatus represents the current status of a ReplicaSet.", - "replicas": "Replicas is the most recently observed number of non-terminating pods. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset", - "fullyLabeledReplicas": "The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset.", - "readyReplicas": "The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition.", - "availableReplicas": "The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set.", - "terminatingReplicas": "The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.\n\nThis is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.", + "replicas": "Replicas is the most recently observed number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.", + "readyReplicas": "readyReplicas is the number of pods targeted by this ReplicaSet with a Ready Condition.", + "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replica set.", "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", "conditions": "Represents the latest available observations of a replica set's current state.", } diff --git a/go-controller/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go index 9e67658ba6..6912986ac3 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go @@ -363,11 +363,6 @@ func (in *DeploymentSpec) DeepCopy() *DeploymentSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { *out = *in - if in.TerminatingReplicas != nil { - in, out := &in.TerminatingReplicas, &out.TerminatingReplicas - *out = new(int32) - **out = **in - } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]DeploymentCondition, len(*in)) @@ -522,11 +517,6 @@ func (in *ReplicaSetSpec) DeepCopy() *ReplicaSetSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus) { *out = *in - if in.TerminatingReplicas != nil { - in, out := &in.TerminatingReplicas, &out.TerminatingReplicas - *out = new(int32) - **out = **in - } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ReplicaSetCondition, len(*in)) diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/apps/v1beta1/doc.go index 7770fab5d2..38a358551a 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/apps/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta1/generated.pb.go b/go-controller/vendor/k8s.io/api/apps/v1beta1/generated.pb.go index ae84aaf487..76e755b4a3 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta1/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta1/generated.pb.go @@ -728,135 +728,134 @@ func init() { } var fileDescriptor_2747f709ac7c95e7 = []byte{ - // 2041 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xdd, 0x6f, 0x1b, 0xc7, - 0x11, 0xd7, 0x51, 0xa2, 0x44, 0x8d, 0x22, 0xca, 0x5e, 0xa9, 0x16, 0xa3, 0xb4, 0x92, 0x70, 0x31, - 0x62, 0x25, 0xb1, 0x8f, 0xb1, 0x92, 0x06, 0x89, 0xdd, 0xba, 0x10, 0x25, 0x37, 0x56, 0x20, 0x45, - 0xca, 0x4a, 0xb2, 0xd1, 0xf4, 0x03, 0x59, 0x91, 0x6b, 0xea, 0xa2, 0xfb, 0xc2, 0xdd, 0x52, 0x31, - 0xd1, 0x97, 0xfe, 0x01, 0x2d, 0xd2, 0xe7, 0xfe, 0x15, 0xed, 0x53, 0x8b, 0x16, 0x7d, 0x2d, 0xfc, - 0x18, 0xf4, 0xa5, 0x79, 0x22, 0x6a, 0xe6, 0xb5, 0x7d, 0x6b, 0x5f, 0x0c, 0x14, 0x28, 0x76, 0x6f, - 0xef, 0xfb, 0x4e, 0x3a, 0x16, 0xb0, 0x80, 0xe6, 0x8d, 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, 0x28, 0x50, 0x8f, 0x8e, 0xe9, 0x12, 0x72, 0xf5, - 0x41, 0x32, 0x57, 0x5f, 0x2d, 0x11, 0x9c, 0x05, 0x39, 0xfa, 0x8f, 0x0a, 0xa0, 0x88, 0x09, 0xdb, - 0x86, 0x71, 0x4c, 0xda, 0xa7, 0x68, 0x15, 0x26, 0x2c, 0x62, 0x06, 0x31, 0x19, 0x26, 0xc8, 0x47, - 0xc4, 0xa4, 0x58, 0x50, 0xd0, 0x17, 0x0a, 0xa0, 0x9e, 0x38, 0xcd, 0xce, 0x86, 0x65, 0xd9, 0x8c, - 0x70, 0x07, 0x07, 0x06, 0x6d, 0x96, 0x30, 0x28, 0xd0, 0xa5, 0x1d, 0x65, 0x50, 0xee, 0x5b, 0xcc, - 0xed, 0x47, 0x07, 0x9b, 0x65, 0xc0, 0x39, 0xaa, 0xd1, 0x8f, 0x01, 0x5c, 0x89, 0x79, 0x68, 0xcb, - 0xb4, 0x2d, 0xae, 0x01, 0x81, 0xfa, 0x4d, 0xdb, 0x7a, 0xac, 0x77, 0xa3, 0xc2, 0x82, 0x43, 0x08, - 0x1c, 0x83, 0x5b, 0xba, 0x0f, 0x8b, 0x05, 0x76, 0xa2, 0x2b, 0x30, 0x7e, 0x4a, 0xfb, 0xbe, 0xab, - 0x30, 0xff, 0x89, 0x16, 0xa0, 0x7a, 0x46, 0x8c, 0x1e, 0xf5, 0x73, 0x12, 0xfb, 0x1f, 0x77, 0x2a, - 0xef, 0x29, 0xea, 0x6f, 0xab, 0xf1, 0x48, 0xe1, 0xf5, 0x06, 0xad, 0xf1, 0xeb, 0xc1, 0x31, 0xf4, - 0x36, 0xf1, 0x04, 0x46, 0xb5, 0xf5, 0x92, 0x7f, 0x35, 0xf8, 0x6b, 0x38, 0xa4, 0xa2, 0x9f, 0x42, - 0xcd, 0xa3, 0x06, 0x6d, 0x33, 0xdb, 0x95, 0x25, 0xee, 0xed, 0x92, 0x31, 0x45, 0x8e, 0xa9, 0x71, - 0x20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, 0xfa, 0x8e, 0x43, 0x1f, 0x02, 0xb2, 0x8f, 0x3d, 0xea, - 0x9e, 0xd1, 0xce, 0x07, 0x7e, 0xe3, 0xc6, 0xbb, 0x1b, 0x45, 0x74, 0x37, 0x61, 0xde, 0xee, 0x65, - 0x38, 0x70, 0x8e, 0x94, 0xdf, 0x1f, 0xc9, 0x04, 0xa8, 0x08, 0x43, 0x63, 0xfd, 0x51, 0x26, 0x09, - 0x36, 0x60, 0x4e, 0xe6, 0x7e, 0x40, 0x14, 0xc1, 0x1a, 0x3b, 0xf7, 0xa3, 0x24, 0x19, 0xa7, 0xf9, - 0xd1, 0x5d, 0x98, 0x75, 0x79, 0x1c, 0x84, 0x00, 0x53, 0x02, 0xe0, 0x5b, 0x12, 0x60, 0x16, 0xc7, - 0x89, 0x38, 0xc9, 0x8b, 0x3e, 0x80, 0xab, 0xe4, 0x8c, 0xe8, 0x06, 0x39, 0x36, 0x68, 0x08, 0x30, - 0x21, 0x00, 0x5e, 0x96, 0x00, 0x57, 0x37, 0xd2, 0x0c, 0x38, 0x2b, 0x83, 0x76, 0x61, 0xbe, 0x67, - 0x65, 0xa1, 0xfc, 0x20, 0x7e, 0x45, 0x42, 0xcd, 0x1f, 0x65, 0x59, 0x70, 0x9e, 0x1c, 0xda, 0x86, - 0x79, 0x46, 0x5d, 0x53, 0xb7, 0x08, 0xd3, 0xad, 0x6e, 0x08, 0xe7, 0x9f, 0xfc, 0x22, 0x87, 0x3a, - 0xcc, 0x92, 0x71, 0x9e, 0x0c, 0xfa, 0x14, 0xa0, 0x1d, 0x34, 0x08, 0x5e, 0x63, 0x52, 0x54, 0xf4, - 0x9b, 0x25, 0xf2, 0x36, 0xec, 0x2a, 0xa2, 0x6a, 0x1a, 0x2e, 0x79, 0x38, 0x86, 0x89, 0xee, 0x40, - 0xbd, 0x6d, 0x1b, 0x86, 0x48, 0xa2, 0x4d, 0xbb, 0x67, 0x31, 0x91, 0x07, 0xd5, 0x16, 0xe2, 0x7d, - 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x23, 0x92, 0x78, 0x4d, 0x00, 0x51, 0x47, 0x6f, 0x95, 0x89, 0xb3, - 0xf2, 0xcf, 0x09, 0xb9, 0x6f, 0x32, 0x33, 0xa3, 0xbf, 0xc9, 0xa8, 0x7f, 0x55, 0xe0, 0xe5, 0xc2, - 0x8a, 0x85, 0x36, 0x12, 0x2d, 0xe5, 0xad, 0x54, 0x4b, 0xf9, 0x9d, 0x42, 0xc1, 0x58, 0x5f, 0xe9, - 0xe6, 0xbf, 0x34, 0xbc, 0x5f, 0xee, 0xa5, 0x21, 0x67, 0x0a, 0xbe, 0xf8, 0xc9, 0xa1, 0xf5, 0xfd, - 0xa7, 0xcf, 0x96, 0xc7, 0xbe, 0x7c, 0xb6, 0x3c, 0xf6, 0xd5, 0xb3, 0xe5, 0xb1, 0x5f, 0x0c, 0x97, - 0x95, 0xa7, 0xc3, 0x65, 0xe5, 0xcb, 0xe1, 0xb2, 0xf2, 0xd5, 0x70, 0x59, 0xf9, 0xfb, 0x70, 0x59, - 0xf9, 0xf5, 0xd7, 0xcb, 0x63, 0x9f, 0x2c, 0x16, 0xfc, 0xb1, 0xfd, 0xdf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x40, 0xa4, 0x4b, 0xb9, 0xf2, 0x1e, 0x00, 0x00, + // 2018 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xf7, 0x52, 0xa2, 0x44, 0x3d, 0x45, 0x94, 0x3d, 0x52, 0x2d, 0x46, 0x69, 0x25, 0x61, 0x63, + 0xc4, 0x4a, 0x62, 0x2f, 0x63, 0x25, 0x0d, 0x12, 0xbb, 0x75, 0x21, 0x4a, 0x6e, 0xec, 0x40, 0x8a, + 0x94, 0x91, 0x64, 0xa3, 0xe9, 0x07, 0x32, 0x22, 0xc7, 0xd4, 0x46, 0xfb, 0x85, 0xdd,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21, 0xc7, 0xc5, 0x34, 0x3f, 0x6f, 0x5a, 0x7d, 0xd4, 0x10, 0x61, 0x3a, + 0xd9, 0xb4, 0x1e, 0x25, 0xa8, 0x38, 0xc5, 0x9d, 0x33, 0xaf, 0xcf, 0x94, 0x9d, 0xd7, 0x11, 0x49, + 0xbc, 0x26, 0x80, 0xa8, 0xa3, 0x37, 0xcb, 0xc4, 0x59, 0xf9, 0xe7, 0x84, 0xdc, 0x87, 0x94, 0xd9, + 0xf1, 0x1f, 0x52, 0xd4, 0xbf, 0x2a, 0xf0, 0x72, 0x61, 0xc5, 0x42, 0x9b, 0x89, 0x96, 0xf2, 0x66, + 0xaa, 0xa5, 0xfc, 0x4e, 0xa1, 0x60, 0xac, 0xaf, 0x74, 0xf3, 0x5f, 0x1a, 0xde, 0x2f, 0xf7, 0xd2, + 0x90, 0x33, 0x05, 0x9f, 0xff, 0xe4, 0xd0, 0xfa, 0xfe, 0xd3, 0x67, 0x2b, 0x97, 0xbe, 0x7c, 0xb6, + 0x72, 0xe9, 0xab, 0x67, 0x2b, 0x97, 0x7e, 0x31, 0x5a, 0x51, 0x9e, 0x8e, 0x56, 0x94, 0x2f, 0x47, + 0x2b, 0xca, 0x57, 0xa3, 0x15, 0xe5, 0xef, 0xa3, 0x15, 0xe5, 0x57, 0x5f, 0xaf, 0x5c, 0xfa, 0x64, + 0xa9, 0xe0, 0xdf, 0xe8, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xc9, 0xe6, 0x8c, 0xa7, 0x1e, + 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { @@ -1290,11 +1289,6 @@ func (m *DeploymentStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TerminatingReplicas != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TerminatingReplicas)) - i-- - dAtA[i] = 0x48 - } if m.CollisionCount != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount)) i-- @@ -2231,9 +2225,6 @@ func (m *DeploymentStatus) Size() (n int) { if m.CollisionCount != nil { n += 1 + sovGenerated(uint64(*m.CollisionCount)) } - if m.TerminatingReplicas != nil { - n += 1 + sovGenerated(uint64(*m.TerminatingReplicas)) - } return n } @@ -2636,7 +2627,6 @@ func (this *DeploymentStatus) String() string { `Conditions:` + repeatedStringForConditions + `,`, `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`, - `TerminatingReplicas:` + valueToStringGenerated(this.TerminatingReplicas) + `,`, `}`, }, "") return s @@ -4347,26 +4337,6 @@ func (m *DeploymentStatus) Unmarshal(dAtA []byte) error { } } m.CollisionCount = &v - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TerminatingReplicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TerminatingReplicas = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta1/generated.proto b/go-controller/vendor/k8s.io/api/apps/v1beta1/generated.proto index 0601efc3c4..46d7bfdf92 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta1/generated.proto +++ b/go-controller/vendor/k8s.io/api/apps/v1beta1/generated.proto @@ -179,40 +179,33 @@ message DeploymentSpec { // DeploymentStatus is the most recently observed status of the Deployment. message DeploymentStatus { - // The generation observed by the deployment controller. + // observedGeneration is the generation observed by the deployment controller. // +optional optional int64 observedGeneration = 1; - // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + // replicas is the total number of non-terminated pods targeted by this deployment (their labels match the selector). // +optional optional int32 replicas = 2; - // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + // updatedReplicas is the total number of non-terminated pods targeted by this deployment that have the desired template spec. // +optional optional int32 updatedReplicas = 3; - // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + // readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition. // +optional optional int32 readyReplicas = 7; - // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. // +optional optional int32 availableReplicas = 4; - // Total number of unavailable pods targeted by this deployment. This is the total number of + // unavailableReplicas is the total number of unavailable pods targeted by this deployment. This is the total number of // pods that are still required for the deployment to have 100% available capacity. They may // either be pods that are running but not yet available or pods that still have not been created. // +optional optional int32 unavailableReplicas = 5; - // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null - // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - optional int32 terminatingReplicas = 9; - - // Represents the latest available observations of a deployment's current state. + // Conditions represent the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge // +listType=map @@ -462,7 +455,6 @@ message StatefulSetSpec { // the network identity of the set. Pods get DNS/hostnames that follow the // pattern: pod-specific-string.serviceName.default.svc.cluster.local // where "pod-specific-string" is managed by the StatefulSet controller. - // +optional optional string serviceName = 5; // podManagementPolicy controls how pods are created during initial scale up, diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta1/types.go b/go-controller/vendor/k8s.io/api/apps/v1beta1/types.go index 5530c990da..bc48519578 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta1/types.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta1/types.go @@ -259,7 +259,6 @@ type StatefulSetSpec struct { // the network identity of the set. Pods get DNS/hostnames that follow the // pattern: pod-specific-string.serviceName.default.svc.cluster.local // where "pod-specific-string" is managed by the StatefulSet controller. - // +optional ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"` // podManagementPolicy controls how pods are created during initial scale up, @@ -549,40 +548,33 @@ type RollingUpdateDeployment struct { // DeploymentStatus is the most recently observed status of the Deployment. type DeploymentStatus struct { - // The generation observed by the deployment controller. + // observedGeneration is the generation observed by the deployment controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` - // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + // replicas is the total number of non-terminated pods targeted by this deployment (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` - // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + // updatedReplicas is the total number of non-terminated pods targeted by this deployment that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"` - // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + // readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"` - // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"` - // Total number of unavailable pods targeted by this deployment. This is the total number of + // unavailableReplicas is the total number of unavailable pods targeted by this deployment. This is the total number of // pods that are still required for the deployment to have 100% available capacity. They may // either be pods that are running but not yet available or pods that still have not been created. // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` - // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null - // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty" protobuf:"varint,9,opt,name=terminatingReplicas"` - - // Represents the latest available observations of a deployment's current state. + // Conditions represent the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge // +listType=map diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go index 02ea5f7f26..1381d75dc0 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go @@ -113,14 +113,13 @@ func (DeploymentSpec) SwaggerDoc() map[string]string { var map_DeploymentStatus = map[string]string{ "": "DeploymentStatus is the most recently observed status of the Deployment.", - "observedGeneration": "The generation observed by the deployment controller.", - "replicas": "Total number of non-terminating pods targeted by this deployment (their labels match the selector).", - "updatedReplicas": "Total number of non-terminating pods targeted by this deployment that have the desired template spec.", - "readyReplicas": "Total number of non-terminating pods targeted by this Deployment with a Ready Condition.", - "availableReplicas": "Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment.", - "unavailableReplicas": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - "terminatingReplicas": "Total number of terminating pods targeted by this deployment. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.\n\nThis is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.", - "conditions": "Represents the latest available observations of a deployment's current state.", + "observedGeneration": "observedGeneration is the generation observed by the deployment controller.", + "replicas": "replicas is the total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "updatedReplicas": "updatedReplicas is the total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "readyReplicas": "readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition.", + "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + "unavailableReplicas": "unavailableReplicas is the total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", + "conditions": "Conditions represent the latest available observations of a deployment's current state.", "collisionCount": "collisionCount is the count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", } diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go index e8594766c7..dd73f1a5a9 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go @@ -246,11 +246,6 @@ func (in *DeploymentSpec) DeepCopy() *DeploymentSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { *out = *in - if in.TerminatingReplicas != nil { - in, out := &in.TerminatingReplicas, &out.TerminatingReplicas - *out = new(int32) - **out = **in - } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]DeploymentCondition, len(*in)) diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta2/doc.go b/go-controller/vendor/k8s.io/api/apps/v1beta2/doc.go index 7d28fe42df..ac91fddfd5 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta2/doc.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta2/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1beta2 +package v1beta2 // import "k8s.io/api/apps/v1beta2" diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta2/generated.pb.go b/go-controller/vendor/k8s.io/api/apps/v1beta2/generated.pb.go index 9fcba6feb1..1c3d3be5bc 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta2/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta2/generated.pb.go @@ -1017,155 +1017,153 @@ func init() { } var fileDescriptor_c423c016abf485d4 = []byte{ - // 2359 bytes of a gzipped FileDescriptorProto + // 2328 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xf7, 0x92, 0xa2, 0x44, 0x0e, 0x2d, 0xc9, 0x1e, 0xa9, 0x22, 0x63, 0xb7, 0xa4, 0xb1, 0x36, - 0x6c, 0x25, 0xb6, 0x49, 0x5b, 0xf9, 0x40, 0x62, 0xb7, 0x09, 0x44, 0x29, 0xb5, 0x1d, 0x48, 0x32, - 0x33, 0xb4, 0x1c, 0x34, 0xe8, 0x87, 0x47, 0xe4, 0x98, 0xda, 0x78, 0xbf, 0xb0, 0x3b, 0x54, 0x4c, - 0xf4, 0xd2, 0x6b, 0x81, 0x16, 0x6d, 0xae, 0xfd, 0x27, 0x8a, 0x5e, 0x8a, 0xa2, 0x41, 0x6f, 0x41, - 0xe1, 0x63, 0xd0, 0x4b, 0x72, 0x22, 0x6a, 0xe6, 0x54, 0x14, 0xbd, 0xb5, 0x17, 0x03, 0x05, 0x8a, - 0x99, 0x9d, 0xfd, 0xde, 0x35, 0x97, 0x8a, 0xad, 0x34, 0x41, 0x6e, 0xdc, 0x79, 0xef, 0xfd, 0xe6, - 0xcd, 0xcc, 0x7b, 0xf3, 0x7e, 0xfb, 0xb8, 0xe0, 0xc2, 0x83, 0xd7, 0xed, 0x86, 0x62, 0x34, 0xb1, - 0xa9, 0x34, 0xb1, 0x69, 0xda, 0xcd, 0x83, 0xab, 0x7b, 0x84, 0xe2, 0xb5, 0x66, 0x9f, 0xe8, 0xc4, - 0xc2, 0x94, 0xf4, 0x1a, 0xa6, 0x65, 0x50, 0x03, 0x56, 0x1c, 0xc5, 0x06, 0x36, 0x95, 0x06, 0x53, - 0x6c, 0x08, 0xc5, 0x53, 0x97, 0xfb, 0x0a, 0xdd, 0x1f, 0xec, 0x35, 0xba, 0x86, 0xd6, 0xec, 0x1b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, 0x67, 0x36, 0x31, 0xc5, 0x88, 0x03, 0xc1, 0x4b, 0xa0, 0x68, 0x09, 0xf7, 0xab, - 0xf9, 0x33, 0xd2, 0x6a, 0xbe, 0x75, 0x42, 0x68, 0x15, 0xdd, 0x65, 0x21, 0x4f, 0x43, 0x7e, 0x24, - 0x81, 0x95, 0xf8, 0xba, 0xb7, 0x14, 0x9b, 0xc2, 0x1f, 0xc7, 0xd6, 0xde, 0xc8, 0xb6, 0x76, 0x66, - 0xcd, 0x57, 0xee, 0x4d, 0xec, 0x8e, 0x04, 0xd6, 0xdd, 0x06, 0x05, 0x85, 0x12, 0xcd, 0xae, 0xe6, - 0xce, 0xe4, 0x57, 0xcb, 0x6b, 0x17, 0x1b, 0x29, 0x01, 0xdc, 0x88, 0x7b, 0xd7, 0x9a, 0x17, 0xb8, - 0x85, 0x5b, 0x0c, 0x01, 0x39, 0x40, 0xf2, 0x2f, 0x73, 0xa0, 0xb4, 0x89, 0x89, 0x66, 0xe8, 0x1d, - 0x42, 0x8f, 0xe0, 0xe4, 0x6e, 0x82, 0x19, 0xdb, 0x24, 0x5d, 0x71, 0x72, 0xe7, 0x53, 0x17, 0xe0, - 0xf9, 0xd4, 0x31, 0x49, 0xd7, 0x3f, 0x32, 0xf6, 0x84, 0x38, 0x02, 0x6c, 0x83, 0x59, 0x9b, 0x62, - 0x3a, 0xb0, 0xf9, 0x81, 0x95, 0xd7, 0x56, 0x33, 0x60, 0x71, 0xfd, 0xd6, 0x82, 0x40, 0x9b, 0x75, - 0x9e, 0x91, 0xc0, 0x91, 0xff, 0x91, 0x03, 0xd0, 0xd3, 0xdd, 0x30, 0xf4, 0x9e, 0x42, 0x59, 0x38, - 0x5f, 0x03, 0x33, 0x74, 0x68, 0x12, 0xbe, 0x21, 0xa5, 0xd6, 0x79, 0xd7, 0x95, 0x3b, 0x43, 0x93, - 0x3c, 0x19, 0xd5, 0x57, 0xe2, 0x16, 0x4c, 0x82, 0xb8, 0x0d, 0xdc, 0xf2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x45, 0x27, 0xee, 0x02, 0x9c, 0x9a, 0x78, 0x7a, 0x3c, - 0xaa, 0x57, 0xda, 0xc9, 0x2a, 0x28, 0xcd, 0x56, 0xfe, 0x75, 0x01, 0x9c, 0x88, 0xde, 0x8d, 0x29, - 0x34, 0x45, 0x3a, 0x14, 0x4d, 0xb9, 0x14, 0x88, 0x53, 0x87, 0xc3, 0x05, 0x5a, 0x05, 0xb1, 0x58, - 0x5d, 0x07, 0x8b, 0x82, 0x96, 0xb8, 0x42, 0x41, 0xd4, 0xbc, 0xe3, 0xd9, 0x0d, 0x8b, 0x51, 0x54, - 0x1f, 0x5e, 0x07, 0xf3, 0x16, 0x67, 0x5e, 0x2e, 0x80, 0xc3, 0x5e, 0xbe, 0x23, 0x00, 0xe6, 0x51, - 0x50, 0x88, 0xc2, 0xba, 0x8c, 0xb9, 0xf8, 0x84, 0xc4, 0x05, 0x98, 0x09, 0x33, 0x97, 0xf5, 0xa8, - 0x02, 0x8a, 0xdb, 0xc0, 0x6d, 0xb0, 0x34, 0xd0, 0xe3, 0x50, 0x4e, 0xac, 0x9d, 0x16, 0x50, 0x4b, - 0xbb, 0x71, 0x15, 0x94, 0x64, 0x07, 0x6f, 0x81, 0x25, 0x4a, 0x2c, 0x4d, 0xd1, 0x31, 0x55, 0xf4, - 0xbe, 0x07, 0xe7, 0x9c, 0x7c, 0x85, 0x41, 0xdd, 0x89, 0x8b, 0x51, 0x92, 0x0d, 0xbc, 0x17, 0xe2, - 0x45, 0xb3, 0xfc, 0x6a, 0xba, 0x94, 0x21, 0xbd, 0x32, 0x13, 0xa3, 0x04, 0xd6, 0x56, 0xcc, 0xca, - 0xda, 0xe4, 0x8f, 0x25, 0x00, 0xe3, 0x29, 0x3d, 0xb1, 0xa9, 0x10, 0xb3, 0x08, 0x14, 0x5f, 0x25, - 0x99, 0x4a, 0x5d, 0xc9, 0x48, 0xa5, 0xfc, 0xbb, 0x39, 0x1b, 0x97, 0x12, 0x1b, 0x7d, 0x34, 0x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e9, 0x1a, 0x7a, 0xcf, 0xe6, 0xa1, 0x54, 0x6c, 0x2d, 0x0b, 0x80, 0xf9, 0xad, 0xb0, 0x18, + 0x45, 0xf5, 0xe1, 0x26, 0x58, 0x74, 0x37, 0xe0, 0x5b, 0x8a, 0x4d, 0x0d, 0x6b, 0xb8, 0xa9, 0x68, + 0x0a, 0xad, 0xce, 0x70, 0x9c, 0xea, 0x78, 0x54, 0x5f, 0x44, 0x09, 0x72, 0x94, 0x68, 0x25, 0xff, + 0x76, 0x06, 0xcc, 0x47, 0xf6, 0x05, 0x78, 0x17, 0x2c, 0x75, 0x07, 0x96, 0x45, 0x74, 0xba, 0x3d, + 0xd0, 0xf6, 0x88, 0xd5, 0xe9, 0xee, 0x93, 0xde, 0x40, 0x25, 0x3d, 0xbe, 0xac, 0xc5, 0x56, 0x4d, + 0xf8, 0xba, 0xb4, 0x9e, 0xa8, 0x85, 0x52, 0xac, 0xe1, 0x3b, 0x00, 0xea, 0xbc, 0x69, 0x4b, 0xb1, + 0x6d, 0x0f, 0x33, 0xc7, 0x31, 0xbd, 0x54, 0xdc, 0x8e, 0x69, 0xa0, 0x04, 0x2b, 0xe6, 0x63, 0x8f, + 0xd8, 0x8a, 0x45, 0x7a, 0x51, 0x1f, 0xf3, 0x61, 0x1f, 0x37, 0x12, 0xb5, 0x50, 0x8a, 0x35, 0x7c, + 0x15, 0x54, 0x9c, 0xde, 0xf8, 0x9c, 0x8b, 0xc5, 0x59, 0x10, 0x60, 0x95, 0x6d, 0x5f, 0x84, 0x82, + 0x7a, 0x6c, 0x68, 0xc6, 0x9e, 0x4d, 0xac, 0x03, 0xd2, 0xbb, 0xe9, 0x90, 0x03, 0x56, 0x41, 0x8b, + 0xbc, 0x82, 0x7a, 0x43, 0xdb, 0x89, 0x69, 0xa0, 0x04, 0x2b, 0x36, 0x34, 0x27, 0x6a, 0x62, 0x43, + 0x9b, 0x09, 0x0f, 0x6d, 0x37, 0x51, 0x0b, 0xa5, 0x58, 0xb3, 0xd8, 0x73, 0x5c, 0x5e, 0x3b, 0xc0, + 0x8a, 0x8a, 0xf7, 0x54, 0x52, 0x3d, 0x1e, 0x8e, 0xbd, 0xed, 0xb0, 0x18, 0x45, 0xf5, 0xe1, 0x4d, + 0x70, 0xca, 0x69, 0xda, 0xd5, 0xb1, 0x07, 0x52, 0xe2, 0x20, 0x2f, 0x08, 0x90, 0x53, 0xdb, 0x51, + 0x05, 0x14, 0xb7, 0x81, 0xd7, 0xc1, 0x5c, 0xd7, 0x50, 0x55, 0x1e, 0x8f, 0xeb, 0xc6, 0x40, 0xa7, + 0xd5, 0x32, 0x47, 0x81, 0x2c, 0x87, 0xd6, 0x43, 0x12, 0x14, 0xd1, 0x84, 0x3f, 0x03, 0xa0, 0xeb, + 0x16, 0x06, 0xbb, 0x0a, 0x26, 0x30, 0x80, 0x78, 0x59, 0xf2, 0x2b, 0xb3, 0xd7, 0x64, 0xa3, 0x00, + 0xa4, 0xfc, 0xb1, 0x04, 0x96, 0x53, 0x12, 0x1d, 0xbe, 0x15, 0x2a, 0x82, 0x97, 0x22, 0x45, 0xf0, + 0x4c, 0x8a, 0x59, 0xa0, 0x12, 0xee, 0x83, 0x59, 0x46, 0x48, 0x14, 0xbd, 0xef, 0xa8, 0x88, 0xbd, + 0xac, 0x99, 0x3a, 0x00, 0x14, 0xd4, 0xf6, 0x77, 0xe5, 0x53, 0xe3, 0x51, 0x7d, 0x36, 0x24, 0x43, + 0x61, 0x60, 0xf9, 0x57, 0x39, 0x00, 0x36, 0x88, 0xa9, 0x1a, 0x43, 0x8d, 0xe8, 0x47, 0xc1, 0x69, + 0x6e, 0x87, 0x38, 0xcd, 0xc5, 0xf4, 0x25, 0xf1, 0x9c, 0x4a, 0x25, 0x35, 0xef, 0x46, 0x48, 0xcd, + 0x8b, 0x59, 0xc0, 0x9e, 0xce, 0x6a, 0x3e, 0xcb, 0x83, 0x05, 0x5f, 0xd9, 0xa7, 0x35, 0x37, 0x42, + 0x2b, 0x7a, 0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 0x1d, 0x0e, 0x17, 0xb8, 0x2a, 0x88, 0xc5, + 0xea, 0x1a, 0x98, 0x17, 0xb4, 0xc4, 0x15, 0x0a, 0xa2, 0xe6, 0x2d, 0xcf, 0x6e, 0x58, 0x8c, 0xa2, + 0xfa, 0xf0, 0x06, 0x98, 0xb5, 0x38, 0xf3, 0x72, 0x01, 0x1c, 0xf6, 0xf2, 0x1d, 0x01, 0x30, 0x8b, + 0x82, 0x42, 0x14, 0xd6, 0x65, 0xcc, 0xc5, 0x27, 0x24, 0x2e, 0x40, 0x21, 0xcc, 0x5c, 0xd6, 0xa2, + 0x0a, 0x28, 0x6e, 0x03, 0xb7, 0xc0, 0xc2, 0x40, 0x8f, 0x43, 0x39, 0xb1, 0x76, 0x46, 0x40, 0x2d, + 0xec, 0xc6, 0x55, 0x50, 0x92, 0x1d, 0xbc, 0x17, 0x22, 0x33, 0x33, 0x7c, 0x3f, 0xb9, 0x9c, 0x21, + 0x27, 0x32, 0xb3, 0x99, 0x04, 0xaa, 0x55, 0xca, 0x4a, 0xb5, 0xe4, 0x8f, 0x24, 0x00, 0xe3, 0x79, + 0x38, 0xf1, 0x26, 0x20, 0x66, 0x11, 0xa8, 0x98, 0x4a, 0x32, 0xff, 0xb9, 0x9a, 0x91, 0xff, 0xf8, + 0x1b, 0x6a, 0x36, 0x02, 0x24, 0x26, 0xfa, 0x68, 0x2e, 0x75, 0xb2, 0x12, 0x20, 0xdf, 0xa9, 0x67, + 0x40, 0x80, 0x02, 0x60, 0x4f, 0x27, 0x40, 0xff, 0xcc, 0x81, 0x05, 0x5f, 0x39, 0x33, 0x01, 0x4a, + 0x30, 0xf9, 0xf6, 0x62, 0x27, 0x1b, 0x29, 0xf1, 0xa7, 0xee, 0xff, 0x89, 0x94, 0xf8, 0x5e, 0xa5, + 0x90, 0x92, 0xdf, 0xe7, 0x82, 0xae, 0x4f, 0x49, 0x4a, 0x9e, 0xc1, 0x0d, 0xc7, 0xd7, 0x8e, 0xd7, + 0xc8,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x7a, 0xf6, 0xc7, 0x09, 0xcf, 0xfe, 0x57, 0xb2, 0xc4, 0x5a, + 0xf6, 0xab, 0xf2, 0xc4, 0x4b, 0x8f, 0xca, 0xf4, 0x97, 0x1e, 0xf2, 0xdf, 0x24, 0xf0, 0x42, 0xea, + 0xae, 0x05, 0xd7, 0x42, 0xb4, 0xf2, 0x4a, 0x84, 0x56, 0x7e, 0x2f, 0xd5, 0x30, 0xc0, 0x2d, 0xad, + 0xe4, 0x5b, 0xf4, 0x37, 0xb2, 0xdd, 0xa2, 0x27, 0x9c, 0x84, 0x27, 0x5f, 0xa7, 0xb7, 0x7e, 0xf0, + 0xe8, 0x71, 0xed, 0xd8, 0xa7, 0x8f, 0x6b, 0xc7, 0x3e, 0x7f, 0x5c, 0x3b, 0xf6, 0x8b, 0x71, 0x4d, + 0x7a, 0x34, 0xae, 0x49, 0x9f, 0x8e, 0x6b, 0xd2, 0xe7, 0xe3, 0x9a, 0xf4, 0xf7, 0x71, 0x4d, 0xfa, + 0xcd, 0x17, 0xb5, 0x63, 0xef, 0x2f, 0xa7, 0xfc, 0xe9, 0xf8, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xa4, 0x79, 0xcd, 0x52, 0x8e, 0x2c, 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { @@ -1847,11 +1845,6 @@ func (m *DeploymentStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TerminatingReplicas != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TerminatingReplicas)) - i-- - dAtA[i] = 0x48 - } if m.CollisionCount != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount)) i-- @@ -2158,11 +2151,6 @@ func (m *ReplicaSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TerminatingReplicas != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TerminatingReplicas)) - i-- - dAtA[i] = 0x38 - } if len(m.Conditions) > 0 { for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { { @@ -3158,9 +3146,6 @@ func (m *DeploymentStatus) Size() (n int) { if m.CollisionCount != nil { n += 1 + sovGenerated(uint64(*m.CollisionCount)) } - if m.TerminatingReplicas != nil { - n += 1 + sovGenerated(uint64(*m.TerminatingReplicas)) - } return n } @@ -3266,9 +3251,6 @@ func (m *ReplicaSetStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - if m.TerminatingReplicas != nil { - n += 1 + sovGenerated(uint64(*m.TerminatingReplicas)) - } return n } @@ -3729,7 +3711,6 @@ func (this *DeploymentStatus) String() string { `Conditions:` + repeatedStringForConditions + `,`, `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`, - `TerminatingReplicas:` + valueToStringGenerated(this.TerminatingReplicas) + `,`, `}`, }, "") return s @@ -3816,7 +3797,6 @@ func (this *ReplicaSetStatus) String() string { `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`, `Conditions:` + repeatedStringForConditions + `,`, - `TerminatingReplicas:` + valueToStringGenerated(this.TerminatingReplicas) + `,`, `}`, }, "") return s @@ -6281,26 +6261,6 @@ func (m *DeploymentStatus) Unmarshal(dAtA []byte) error { } } m.CollisionCount = &v - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TerminatingReplicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TerminatingReplicas = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -7233,26 +7193,6 @@ func (m *ReplicaSetStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TerminatingReplicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TerminatingReplicas = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta2/generated.proto b/go-controller/vendor/k8s.io/api/apps/v1beta2/generated.proto index 68c463e257..c08a4c78bc 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta2/generated.proto +++ b/go-controller/vendor/k8s.io/api/apps/v1beta2/generated.proto @@ -323,19 +323,19 @@ message DeploymentStatus { // +optional optional int64 observedGeneration = 1; - // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + // Total number of non-terminated pods targeted by this deployment (their labels match the selector). // +optional optional int32 replicas = 2; - // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + // Total number of non-terminated pods targeted by this deployment that have the desired template spec. // +optional optional int32 updatedReplicas = 3; - // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + // readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition. // +optional optional int32 readyReplicas = 7; - // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. // +optional optional int32 availableReplicas = 4; @@ -345,13 +345,6 @@ message DeploymentStatus { // +optional optional int32 unavailableReplicas = 5; - // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null - // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - optional int32 terminatingReplicas = 9; - // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge @@ -434,16 +427,16 @@ message ReplicaSetList { optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of ReplicaSets. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller repeated ReplicaSet items = 2; } // ReplicaSetSpec is the specification of a ReplicaSet. message ReplicaSetSpec { - // Replicas is the number of desired pods. + // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller // +optional optional int32 replicas = 1; @@ -461,36 +454,29 @@ message ReplicaSetSpec { // Template is the object that describes the pod that will be created if // insufficient replicas are detected. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template // +optional optional .k8s.io.api.core.v1.PodTemplateSpec template = 3; } // ReplicaSetStatus represents the current status of a ReplicaSet. message ReplicaSetStatus { - // Replicas is the most recently observed number of non-terminating pods. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // Replicas is the most recently observed number of replicas. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller optional int32 replicas = 1; - // The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset. + // The number of pods that have labels matching the labels of the pod template of the replicaset. // +optional optional int32 fullyLabeledReplicas = 2; - // The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition. + // readyReplicas is the number of pods targeted by this ReplicaSet controller with a Ready Condition. // +optional optional int32 readyReplicas = 4; - // The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set. + // The number of available replicas (ready for at least minReadySeconds) for this replica set. // +optional optional int32 availableReplicas = 5; - // The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp - // and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - optional int32 terminatingReplicas = 7; - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. // +optional optional int64 observedGeneration = 3; @@ -761,7 +747,6 @@ message StatefulSetSpec { // the network identity of the set. Pods get DNS/hostnames that follow the // pattern: pod-specific-string.serviceName.default.svc.cluster.local // where "pod-specific-string" is managed by the StatefulSet controller. - // +optional optional string serviceName = 5; // podManagementPolicy controls how pods are created during initial scale up, diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta2/types.go b/go-controller/vendor/k8s.io/api/apps/v1beta2/types.go index 491afc59f5..c2624a941d 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta2/types.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta2/types.go @@ -269,7 +269,6 @@ type StatefulSetSpec struct { // the network identity of the set. Pods get DNS/hostnames that follow the // pattern: pod-specific-string.serviceName.default.svc.cluster.local // where "pod-specific-string" is managed by the StatefulSet controller. - // +optional ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"` // podManagementPolicy controls how pods are created during initial scale up, @@ -531,19 +530,19 @@ type DeploymentStatus struct { // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` - // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + // Total number of non-terminated pods targeted by this deployment (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` - // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + // Total number of non-terminated pods targeted by this deployment that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"` - // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + // readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"` - // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"` @@ -553,13 +552,6 @@ type DeploymentStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` - // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null - // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty" protobuf:"varint,9,opt,name=terminatingReplicas"` - // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge @@ -905,16 +897,16 @@ type ReplicaSetList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ReplicaSets. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"` } // ReplicaSetSpec is the specification of a ReplicaSet. type ReplicaSetSpec struct { - // Replicas is the number of desired pods. + // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` @@ -932,36 +924,29 @@ type ReplicaSetSpec struct { // Template is the object that describes the pod that will be created if // insufficient replicas are detected. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template // +optional Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` } // ReplicaSetStatus represents the current status of a ReplicaSet. type ReplicaSetStatus struct { - // Replicas is the most recently observed number of non-terminating pods. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // Replicas is the most recently observed number of replicas. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` - // The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset. + // The number of pods that have labels matching the labels of the pod template of the replicaset. // +optional FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"` - // The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition. + // readyReplicas is the number of pods targeted by this ReplicaSet controller with a Ready Condition. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"` - // The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set. + // The number of available replicas (ready for at least minReadySeconds) for this replica set. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"` - // The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp - // and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty" protobuf:"varint,7,opt,name=terminatingReplicas"` - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go index 4089434151..beec4b7555 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go @@ -177,12 +177,11 @@ func (DeploymentSpec) SwaggerDoc() map[string]string { var map_DeploymentStatus = map[string]string{ "": "DeploymentStatus is the most recently observed status of the Deployment.", "observedGeneration": "The generation observed by the deployment controller.", - "replicas": "Total number of non-terminating pods targeted by this deployment (their labels match the selector).", - "updatedReplicas": "Total number of non-terminating pods targeted by this deployment that have the desired template spec.", - "readyReplicas": "Total number of non-terminating pods targeted by this Deployment with a Ready Condition.", - "availableReplicas": "Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment.", + "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "readyReplicas": "readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition.", + "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", "unavailableReplicas": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - "terminatingReplicas": "Total number of terminating pods targeted by this deployment. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.\n\nThis is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.", "conditions": "Represents the latest available observations of a deployment's current state.", "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", } @@ -228,7 +227,7 @@ func (ReplicaSetCondition) SwaggerDoc() map[string]string { var map_ReplicaSetList = map[string]string{ "": "ReplicaSetList is a collection of ReplicaSets.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset", + "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", } func (ReplicaSetList) SwaggerDoc() map[string]string { @@ -237,10 +236,10 @@ func (ReplicaSetList) SwaggerDoc() map[string]string { var map_ReplicaSetSpec = map[string]string{ "": "ReplicaSetSpec is the specification of a ReplicaSet.", - "replicas": "Replicas is the number of desired pods. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset", + "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", "selector": "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template", + "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", } func (ReplicaSetSpec) SwaggerDoc() map[string]string { @@ -249,11 +248,10 @@ func (ReplicaSetSpec) SwaggerDoc() map[string]string { var map_ReplicaSetStatus = map[string]string{ "": "ReplicaSetStatus represents the current status of a ReplicaSet.", - "replicas": "Replicas is the most recently observed number of non-terminating pods. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset", - "fullyLabeledReplicas": "The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset.", - "readyReplicas": "The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition.", - "availableReplicas": "The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set.", - "terminatingReplicas": "The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.\n\nThis is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.", + "replicas": "Replicas is the most recently observed number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.", + "readyReplicas": "readyReplicas is the number of pods targeted by this ReplicaSet controller with a Ready Condition.", + "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replica set.", "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", "conditions": "Represents the latest available observations of a replica set's current state.", } diff --git a/go-controller/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go index 917ad4a22f..cd92792db5 100644 --- a/go-controller/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go @@ -363,11 +363,6 @@ func (in *DeploymentSpec) DeepCopy() *DeploymentSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { *out = *in - if in.TerminatingReplicas != nil { - in, out := &in.TerminatingReplicas, &out.TerminatingReplicas - *out = new(int32) - **out = **in - } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]DeploymentCondition, len(*in)) @@ -522,11 +517,6 @@ func (in *ReplicaSetSpec) DeepCopy() *ReplicaSetSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus) { *out = *in - if in.TerminatingReplicas != nil { - in, out := &in.TerminatingReplicas, &out.TerminatingReplicas - *out = new(int32) - **out = **in - } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ReplicaSetCondition, len(*in)) diff --git a/go-controller/vendor/k8s.io/api/authentication/v1/doc.go b/go-controller/vendor/k8s.io/api/authentication/v1/doc.go index dc3aed4e4f..3bdc89badc 100644 --- a/go-controller/vendor/k8s.io/api/authentication/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/authentication/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1 +package v1 // import "k8s.io/api/authentication/v1" diff --git a/go-controller/vendor/k8s.io/api/authentication/v1alpha1/doc.go b/go-controller/vendor/k8s.io/api/authentication/v1alpha1/doc.go index c199ccd499..eb32def904 100644 --- a/go-controller/vendor/k8s.io/api/authentication/v1alpha1/doc.go +++ b/go-controller/vendor/k8s.io/api/authentication/v1alpha1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1alpha1 +package v1alpha1 // import "k8s.io/api/authentication/v1alpha1" diff --git a/go-controller/vendor/k8s.io/api/authentication/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/authentication/v1beta1/doc.go index af63dc845b..2a2b176e43 100644 --- a/go-controller/vendor/k8s.io/api/authentication/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/authentication/v1beta1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/authentication/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/authorization/v1/doc.go b/go-controller/vendor/k8s.io/api/authorization/v1/doc.go index 40bf8006e0..77e5a19c4c 100644 --- a/go-controller/vendor/k8s.io/api/authorization/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/authorization/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=authorization.k8s.io -package v1 +package v1 // import "k8s.io/api/authorization/v1" diff --git a/go-controller/vendor/k8s.io/api/authorization/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/authorization/v1beta1/doc.go index 9f7332d493..c996e35ccc 100644 --- a/go-controller/vendor/k8s.io/api/authorization/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/authorization/v1beta1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=authorization.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/authorization/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/autoscaling/v1/doc.go b/go-controller/vendor/k8s.io/api/autoscaling/v1/doc.go index 4ee085e165..d64c9cbc1a 100644 --- a/go-controller/vendor/k8s.io/api/autoscaling/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/autoscaling/v1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1 +package v1 // import "k8s.io/api/autoscaling/v1" diff --git a/go-controller/vendor/k8s.io/api/autoscaling/v2/doc.go b/go-controller/vendor/k8s.io/api/autoscaling/v2/doc.go index 8dea6339df..aafa2d4de2 100644 --- a/go-controller/vendor/k8s.io/api/autoscaling/v2/doc.go +++ b/go-controller/vendor/k8s.io/api/autoscaling/v2/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v2 +package v2 // import "k8s.io/api/autoscaling/v2" diff --git a/go-controller/vendor/k8s.io/api/autoscaling/v2/generated.pb.go b/go-controller/vendor/k8s.io/api/autoscaling/v2/generated.pb.go index 40b60ebeca..ece6dedadb 100644 --- a/go-controller/vendor/k8s.io/api/autoscaling/v2/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/autoscaling/v2/generated.pb.go @@ -751,116 +751,115 @@ func init() { } var fileDescriptor_4d5f2c8767749221 = []byte{ - // 1742 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xc9, 0x8f, 0x1b, 0x4b, - 0x19, 0x9f, 0xb6, 0x3d, 0x5b, 0x79, 0xd6, 0xca, 0xe6, 0x4c, 0x14, 0x7b, 0xd4, 0x04, 0xb2, 0x40, - 0xda, 0xc4, 0x84, 0x28, 0x22, 0x07, 0x34, 0x3d, 0x01, 0x32, 0xca, 0x0c, 0xe3, 0x94, 0x27, 0x19, - 0x76, 0xa5, 0xdc, 0x5d, 0xe3, 0x29, 0xc6, 0xee, 0xb6, 0xba, 0xdb, 0x4e, 0x26, 0x12, 0x12, 0x17, - 0xee, 0x08, 0x14, 0xf1, 0x4f, 0x44, 0x9c, 0x40, 0xe1, 0x00, 0x12, 0x12, 0x1c, 0x72, 0x41, 0xca, - 0x81, 0x43, 0x4e, 0x16, 0x31, 0xd2, 0x3b, 0xbe, 0xe3, 0x3b, 0xe4, 0xf4, 0x54, 0x4b, 0xaf, 0xde, - 0xc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 0x7b, 0xa5, 0x5f, 0xae, 0x76, 0x3b, 0x85, 0xb9, 0x4a, 0x64, 0xff, 0x43, - 0xa7, 0x70, 0x26, 0xe6, 0x18, 0x71, 0x88, 0x62, 0xcc, 0xf0, 0xa7, 0x60, 0xa6, 0xc9, 0x7e, 0x51, - 0xe2, 0xe6, 0x52, 0xab, 0xe9, 0x11, 0x11, 0x92, 0xf4, 0xb5, 0xbe, 0x24, 0xbd, 0x34, 0x53, 0x96, - 0x20, 0x28, 0x80, 0x83, 0x3f, 0x07, 0xb3, 0x9e, 0x5d, 0x27, 0x0e, 0xb6, 0x0c, 0x92, 0xcb, 0xf0, - 0x38, 0xd1, 0x22, 0xd8, 0x41, 0x43, 0xd0, 0x9a, 0x07, 0x35, 0x2e, 0xcc, 0xef, 0x56, 0xda, 0xa3, - 0x16, 0xb6, 0x3c, 0xea, 0x1d, 0xea, 0xf3, 0xac, 0x8e, 0xec, 0xf8, 0x20, 0x28, 0xc4, 0x53, 0x5f, - 0xa7, 0xc0, 0x85, 0x07, 0xb6, 0x43, 0x5f, 0xb0, 0xca, 0x52, 0x2f, 0xdb, 0xe6, 0x9a, 0xd4, 0x94, - 0x38, 0xf0, 0x29, 0x98, 0x61, 0x1d, 0xcc, 0xc4, 0x1e, 0x96, 0x51, 0xff, 0xed, 0x61, 0x72, 0x5d, - 0x8d, 0x51, 0x6b, 0xed, 0x5b, 0x9a, 0x28, 0x46, 0x5b, 0xc4, 0xc3, 0x61, 0xbd, 0x08, 0xf7, 0x50, - 0x80, 0x0a, 0x7f, 0x02, 0x32, 0x6e, 0x93, 0x18, 0x32, 0xfa, 0xef, 0x0c, 0xf3, 0x58, 0x7f, 0x1d, - 0x2b, 0x4d, 0x62, 0x84, 0xb5, 0x8b, 0xad, 0x10, 0x47, 0x84, 0x4f, 0xc1, 0x94, 0xcb, 0xb3, 0x84, - 0x07, 0x4a, 0xb6, 0x74, 0xf7, 0x23, 0xb0, 0x45, 0x96, 0x05, 0xc9, 0x2b, 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c4, 0x8f, 0xc1, 0xbc, 0x13, 0x00, 0xe9, 0x80, 0x35, 0x06, 0x59, 0xa7, 0x24, 0x10, - 0xdc, 0x00, 0x99, 0xa6, 0x6d, 0xfa, 0x53, 0xca, 0xb0, 0x99, 0xb1, 0x6c, 0x9b, 0x6e, 0x0c, 0x6e, - 0x86, 0x69, 0xcc, 0x76, 0x11, 0x87, 0x60, 0x23, 0xa8, 0x3f, 0xf9, 0xc9, 0x31, 0xb1, 0x38, 0x04, - 0xae, 0xdf, 0xd7, 0x00, 0xe1, 0x3d, 0xff, 0x04, 0x05, 0x70, 0xf0, 0x37, 0x60, 0xd9, 0x48, 0xbe, - 0xae, 0x73, 0xd3, 0x23, 0x07, 0xab, 0xa1, 0x9f, 0x1e, 0xf4, 0x73, 0xdd, 0x4e, 0x61, 0xb9, 0x87, - 0x04, 0xf5, 0x4a, 0x62, 0x96, 0x11, 0xf9, 0x28, 0x93, 0x75, 0x6e, 0x98, 0x65, 0xfd, 0x9e, 0x9f, - 0xc2, 0x32, 0xff, 0x04, 0x05, 0x70, 0xea, 0x9f, 0x32, 0x60, 0x2e, 0xf6, 0xd0, 0x3b, 0xe1, 0xc8, - 0x10, 0xc9, 0x7c, 0x6c, 0x91, 0x21, 0xe0, 0x8e, 0x35, 0x32, 0x04, 0xe4, 0x09, 0x45, 0x86, 0x10, - 0x76, 0x42, 0x91, 0x11, 0xb1, 0xac, 0x4f, 0x64, 0xfc, 0x2b, 0xe5, 0x47, 0x86, 0x18, 0x16, 0x8e, - 0x16, 0x19, 0x82, 0x36, 0x12, 0x19, 0xdb, 0xd1, 0xb7, 0xf3, 0xf8, 0x2f, 0xb7, 0xd9, 0x9e, 0x77, - 0xb6, 0x09, 0xe6, 0x70, 0x9b, 0x38, 0xb8, 0x46, 0xf8, 0xb6, 0x8c, 0x8f, 0x71, 0x71, 0x97, 0xd8, - 0x33, 0x77, 0x2d, 0x82, 0x83, 0x62, 0xa8, 0xac, 0xa5, 0xcb, 0xf5, 0x63, 0x2f, 0x78, 0x3f, 0xcb, - 0x2e, 0xc7, 0x5b, 0xfa, 0x5a, 0xcf, 0x29, 0xea, 0xc3, 0xa1, 0xfe, 0x21, 0x05, 0x96, 0x7b, 0xbe, - 0x5c, 0x84, 0x4e, 0x51, 0x3e, 0x91, 0x53, 0x52, 0x27, 0xe8, 0x94, 0xf4, 0xd8, 0x4e, 0xf9, 0x6b, - 0x0a, 0xc0, 0xde, 0xfe, 0x00, 0x0f, 0xf9, 0x58, 0x61, 0x38, 0xb4, 0x4a, 0x4c, 0x71, 0xfc, 0x15, - 0x67, 0xe0, 0xe8, 0x38, 0x12, 0x85, 0x45, 0x49, 0x39, 0xc7, 0xff, 0x05, 0x37, 0xfc, 0x5e, 0x96, - 0x3e, 0xb6, 0xef, 0x65, 0xea, 0x3f, 0x92, 0x7e, 0x3b, 0x85, 0xdf, 0xe6, 0xfa, 0xdd, 0x72, 0xfa, - 0x64, 0x6e, 0x59, 0xfd, 0x9b, 0x02, 0x96, 0x92, 0x63, 0xc4, 0x29, 0xf9, 0x30, 0xfb, 0xcf, 0xb8, - 0xea, 0xa7, 0xf1, 0xa3, 0xec, 0x2b, 0x05, 0x9c, 0x3d, 0x3d, 0xff, 0xc1, 0xa8, 0x7f, 0xe9, 0x55, - 0xf7, 0x14, 0xfc, 0x93, 0xa2, 0x7f, 0xff, 0xcd, 0xfb, 0xfc, 0xc4, 0xdb, 0xf7, 0xf9, 0x89, 0x77, - 0xef, 0xf3, 0x13, 0xbf, 0xed, 0xe6, 0x95, 0x37, 0xdd, 0xbc, 0xf2, 0xb6, 0x9b, 0x57, 0xde, 0x75, - 0xf3, 0xca, 0xff, 0xba, 0x79, 0xe5, 0xf7, 0xff, 0xcf, 0x4f, 0xfc, 0xec, 0xe2, 0xc0, 0xbf, 0x21, - 0xbf, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x23, 0xae, 0x54, 0xa2, 0x1c, 0x00, 0x00, + // 1722 bytes of a gzipped FileDescriptor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0xf5, 0x6f, + 0x0a, 0x58, 0x4a, 0x0e, 0xa9, 0xc1, 0x7b, 0x40, 0x19, 0xf8, 0x1e, 0xf8, 0x1d, 0x98, 0x11, 0x33, + 0x8f, 0xed, 0xc8, 0x6b, 0xff, 0xd1, 0x21, 0xcb, 0x1a, 0xae, 0x92, 0x7a, 0x45, 0xb2, 0x8a, 0x20, + 0xf6, 0x57, 0x28, 0x80, 0x54, 0x5f, 0x64, 0x00, 0x08, 0x73, 0x0a, 0xde, 0x8c, 0xf5, 0xb1, 0xd5, + 0x44, 0x1f, 0x5b, 0x8a, 0x3e, 0x2e, 0x22, 0x3d, 0xeb, 0x01, 0x98, 0xb2, 0x79, 0x99, 0x91, 0x1a, + 0x5e, 0x1f, 0xe2, 0xc7, 0x60, 0xde, 0x09, 0x80, 0x74, 0xc0, 0x1a, 0x83, 0xac, 0x53, 0x12, 0x08, + 0x6e, 0x80, 0x4c, 0xd3, 0x36, 0xfd, 0x29, 0x65, 0xd8, 0x58, 0x57, 0xb6, 0x4d, 0x37, 0x06, 0x37, + 0xc3, 0x34, 0x66, 0xbb, 0x88, 0x43, 0xb0, 0x29, 0xd1, 0xff, 0x94, 0xc0, 0xc3, 0x31, 0x5b, 0x2a, + 0x0e, 0x81, 0xeb, 0xf7, 0x60, 0x17, 0xde, 0xf3, 0x4f, 0x50, 0x00, 0x07, 0xff, 0x08, 0x96, 0x8d, + 0xe4, 0x03, 0x38, 0x37, 0x3d, 0x72, 0xb0, 0x1a, 0xfa, 0x75, 0x40, 0x3f, 0xd3, 0xed, 0x14, 0x96, + 0x7b, 0x48, 0x50, 0xaf, 0x24, 0x66, 0x19, 0x91, 0xef, 0x26, 0x59, 0xe7, 0x86, 0x59, 0xd6, 0xef, + 0x85, 0x28, 0x2c, 0xf3, 0x4f, 0x50, 0x00, 0xa7, 0xfe, 0x3d, 0x03, 0xe6, 0x62, 0x6f, 0xb1, 0x63, + 0x8e, 0x0c, 0x91, 0xcc, 0x47, 0x16, 0x19, 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xf1, 0xbb, + 0xe9, 0x4b, 0x05, 0x9c, 0x3e, 0x39, 0x7f, 0x93, 0xa8, 0xff, 0xea, 0x55, 0xf7, 0x04, 0xfc, 0xd9, + 0xa1, 0xff, 0xf4, 0xf5, 0xbb, 0xfc, 0xc4, 0x9b, 0x77, 0xf9, 0x89, 0xb7, 0xef, 0xf2, 0x13, 0x7f, + 0xea, 0xe6, 0x95, 0xd7, 0xdd, 0xbc, 0xf2, 0xa6, 0x9b, 0x57, 0xde, 0x76, 0xf3, 0xca, 0x17, 0xdd, + 0xbc, 0xf2, 0x97, 0x2f, 0xf3, 0x13, 0xbf, 0x39, 0x3f, 0xf0, 0x9f, 0xc2, 0x6f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xca, 0x8b, 0x47, 0xba, 0x45, 0x1c, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { @@ -1127,18 +1126,6 @@ func (m *HPAScalingRules) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Tolerance != nil { - { - size, err := m.Tolerance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } if m.StabilizationWindowSeconds != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.StabilizationWindowSeconds)) i-- @@ -2216,10 +2203,6 @@ func (m *HPAScalingRules) Size() (n int) { if m.StabilizationWindowSeconds != nil { n += 1 + sovGenerated(uint64(*m.StabilizationWindowSeconds)) } - if m.Tolerance != nil { - l = m.Tolerance.Size() - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -2636,7 +2619,6 @@ func (this *HPAScalingRules) String() string { `SelectPolicy:` + valueToStringGenerated(this.SelectPolicy) + `,`, `Policies:` + repeatedStringForPolicies + `,`, `StabilizationWindowSeconds:` + valueToStringGenerated(this.StabilizationWindowSeconds) + `,`, - `Tolerance:` + strings.Replace(fmt.Sprintf("%v", this.Tolerance), "Quantity", "resource.Quantity", 1) + `,`, `}`, }, "") return s @@ -3788,42 +3770,6 @@ func (m *HPAScalingRules) Unmarshal(dAtA []byte) error { } } m.StabilizationWindowSeconds = &v - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tolerance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tolerance == nil { - m.Tolerance = &resource.Quantity{} - } - if err := m.Tolerance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/go-controller/vendor/k8s.io/api/autoscaling/v2/generated.proto b/go-controller/vendor/k8s.io/api/autoscaling/v2/generated.proto index 04c34d6e16..4e6dc0592a 100644 --- a/go-controller/vendor/k8s.io/api/autoscaling/v2/generated.proto +++ b/go-controller/vendor/k8s.io/api/autoscaling/v2/generated.proto @@ -112,18 +112,12 @@ message HPAScalingPolicy { optional int32 periodSeconds = 3; } -// HPAScalingRules configures the scaling behavior for one direction via -// scaling Policy Rules and a configurable metric tolerance. -// -// Scaling Policy Rules are applied after calculating DesiredReplicas from metrics for the HPA. +// HPAScalingRules configures the scaling behavior for one direction. +// These Rules are applied after calculating DesiredReplicas from metrics for the HPA. // They can limit the scaling velocity by specifying scaling policies. // They can prevent flapping by specifying the stabilization window, so that the // number of replicas is not set instantly, instead, the safest value from the stabilization // window is chosen. -// -// The tolerance is applied to the metric values and prevents scaling too -// eagerly for small metric variations. (Note that setting a tolerance requires -// enabling the alpha HPAConfigurableTolerance feature gate.) message HPAScalingRules { // stabilizationWindowSeconds is the number of seconds for which past recommendations should be // considered while scaling up or scaling down. @@ -140,28 +134,10 @@ message HPAScalingRules { optional string selectPolicy = 1; // policies is a list of potential scaling polices which can be used during scaling. - // If not set, use the default values: - // - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - // - For scale down: allow all pods to be removed in a 15s window. + // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid // +listType=atomic // +optional repeated HPAScalingPolicy policies = 2; - - // tolerance is the tolerance on the ratio between the current and desired - // metric value under which no updates are made to the desired number of - // replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not - // set, the default cluster-wide tolerance is applied (by default 10%). - // - // For example, if autoscaling is configured with a memory consumption target of 100Mi, - // and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be - // triggered when the actual consumption falls below 95Mi or exceeds 101Mi. - // - // This is an alpha field and requires enabling the HPAConfigurableTolerance - // feature gate. - // - // +featureGate=HPAConfigurableTolerance - // +optional - optional .k8s.io.apimachinery.pkg.api.resource.Quantity tolerance = 4; } // HorizontalPodAutoscaler is the configuration for a horizontal pod diff --git a/go-controller/vendor/k8s.io/api/autoscaling/v2/types.go b/go-controller/vendor/k8s.io/api/autoscaling/v2/types.go index 9ce69b1edc..99e8db09dc 100644 --- a/go-controller/vendor/k8s.io/api/autoscaling/v2/types.go +++ b/go-controller/vendor/k8s.io/api/autoscaling/v2/types.go @@ -171,18 +171,12 @@ const ( DisabledPolicySelect ScalingPolicySelect = "Disabled" ) -// HPAScalingRules configures the scaling behavior for one direction via -// scaling Policy Rules and a configurable metric tolerance. -// -// Scaling Policy Rules are applied after calculating DesiredReplicas from metrics for the HPA. +// HPAScalingRules configures the scaling behavior for one direction. +// These Rules are applied after calculating DesiredReplicas from metrics for the HPA. // They can limit the scaling velocity by specifying scaling policies. // They can prevent flapping by specifying the stabilization window, so that the // number of replicas is not set instantly, instead, the safest value from the stabilization // window is chosen. -// -// The tolerance is applied to the metric values and prevents scaling too -// eagerly for small metric variations. (Note that setting a tolerance requires -// enabling the alpha HPAConfigurableTolerance feature gate.) type HPAScalingRules struct { // stabilizationWindowSeconds is the number of seconds for which past recommendations should be // considered while scaling up or scaling down. @@ -199,28 +193,10 @@ type HPAScalingRules struct { SelectPolicy *ScalingPolicySelect `json:"selectPolicy,omitempty" protobuf:"bytes,1,opt,name=selectPolicy"` // policies is a list of potential scaling polices which can be used during scaling. - // If not set, use the default values: - // - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - // - For scale down: allow all pods to be removed in a 15s window. + // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid // +listType=atomic // +optional Policies []HPAScalingPolicy `json:"policies,omitempty" listType:"atomic" protobuf:"bytes,2,rep,name=policies"` - - // tolerance is the tolerance on the ratio between the current and desired - // metric value under which no updates are made to the desired number of - // replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not - // set, the default cluster-wide tolerance is applied (by default 10%). - // - // For example, if autoscaling is configured with a memory consumption target of 100Mi, - // and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be - // triggered when the actual consumption falls below 95Mi or exceeds 101Mi. - // - // This is an alpha field and requires enabling the HPAConfigurableTolerance - // feature gate. - // - // +featureGate=HPAConfigurableTolerance - // +optional - Tolerance *resource.Quantity `json:"tolerance,omitempty" protobuf:"bytes,4,opt,name=tolerance"` } // HPAScalingPolicyType is the type of the policy which could be used while making scaling decisions. diff --git a/go-controller/vendor/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go index 017fefcde7..649cd04a03 100644 --- a/go-controller/vendor/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go @@ -92,11 +92,10 @@ func (HPAScalingPolicy) SwaggerDoc() map[string]string { } var map_HPAScalingRules = map[string]string{ - "": "HPAScalingRules configures the scaling behavior for one direction via scaling Policy Rules and a configurable metric tolerance.\n\nScaling Policy Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.\n\nThe tolerance is applied to the metric values and prevents scaling too eagerly for small metric variations. (Note that setting a tolerance requires enabling the alpha HPAConfigurableTolerance feature gate.)", + "": "HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.", "stabilizationWindowSeconds": "stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).", "selectPolicy": "selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.", - "policies": "policies is a list of potential scaling polices which can be used during scaling. If not set, use the default values: - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - For scale down: allow all pods to be removed in a 15s window.", - "tolerance": "tolerance is the tolerance on the ratio between the current and desired metric value under which no updates are made to the desired number of replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not set, the default cluster-wide tolerance is applied (by default 10%).\n\nFor example, if autoscaling is configured with a memory consumption target of 100Mi, and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be triggered when the actual consumption falls below 95Mi or exceeds 101Mi.\n\nThis is an alpha field and requires enabling the HPAConfigurableTolerance feature gate.", + "policies": "policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid", } func (HPAScalingRules) SwaggerDoc() map[string]string { diff --git a/go-controller/vendor/k8s.io/api/autoscaling/v2/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/autoscaling/v2/zz_generated.deepcopy.go index 5fbcf9f807..125708d6fd 100644 --- a/go-controller/vendor/k8s.io/api/autoscaling/v2/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/autoscaling/v2/zz_generated.deepcopy.go @@ -146,11 +146,6 @@ func (in *HPAScalingRules) DeepCopyInto(out *HPAScalingRules) { *out = make([]HPAScalingPolicy, len(*in)) copy(*out, *in) } - if in.Tolerance != nil { - in, out := &in.Tolerance, &out.Tolerance - x := (*in).DeepCopy() - *out = &x - } return } diff --git a/go-controller/vendor/k8s.io/api/autoscaling/v2beta1/doc.go b/go-controller/vendor/k8s.io/api/autoscaling/v2beta1/doc.go index eac92e86e8..25ca507bba 100644 --- a/go-controller/vendor/k8s.io/api/autoscaling/v2beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/autoscaling/v2beta1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v2beta1 +package v2beta1 // import "k8s.io/api/autoscaling/v2beta1" diff --git a/go-controller/vendor/k8s.io/api/autoscaling/v2beta2/doc.go b/go-controller/vendor/k8s.io/api/autoscaling/v2beta2/doc.go index 1500372978..76fb0aff87 100644 --- a/go-controller/vendor/k8s.io/api/autoscaling/v2beta2/doc.go +++ b/go-controller/vendor/k8s.io/api/autoscaling/v2beta2/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v2beta2 +package v2beta2 // import "k8s.io/api/autoscaling/v2beta2" diff --git a/go-controller/vendor/k8s.io/api/batch/v1/doc.go b/go-controller/vendor/k8s.io/api/batch/v1/doc.go index 69088e2c5b..cb5cbb6002 100644 --- a/go-controller/vendor/k8s.io/api/batch/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/batch/v1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1 +package v1 // import "k8s.io/api/batch/v1" diff --git a/go-controller/vendor/k8s.io/api/batch/v1/generated.proto b/go-controller/vendor/k8s.io/api/batch/v1/generated.proto index d3aeae0adb..361ebdca12 100644 --- a/go-controller/vendor/k8s.io/api/batch/v1/generated.proto +++ b/go-controller/vendor/k8s.io/api/batch/v1/generated.proto @@ -222,6 +222,8 @@ message JobSpec { // When the field is specified, it must be immutable and works only for the Indexed Jobs. // Once the Job meets the SuccessPolicy, the lingering pods are terminated. // + // This field is beta-level. To use this field, you must enable the + // `JobSuccessPolicy` feature gate (enabled by default). // +optional optional SuccessPolicy successPolicy = 16; @@ -236,6 +238,8 @@ message JobSpec { // batch.kubernetes.io/job-index-failure-count annotation. It can only // be set when Job's completionMode=Indexed, and the Pod's restart // policy is Never. The field is immutable. + // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` + // feature gate is enabled (enabled by default). // +optional optional int32 backoffLimitPerIndex = 12; @@ -247,6 +251,8 @@ message JobSpec { // It can only be specified when backoffLimitPerIndex is set. // It can be null or up to completions. It is required and must be // less than or equal to 10^4 when is completions greater than 10^5. + // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` + // feature gate is enabled (enabled by default). // +optional optional int32 maxFailedIndexes = 13; @@ -436,6 +442,8 @@ message JobStatus { // represented as "1,3-5,7". // The set of failed indexes cannot overlap with the set of completed indexes. // + // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` + // feature gate is enabled (enabled by default). // +optional optional string failedIndexes = 10; @@ -546,6 +554,8 @@ message PodFailurePolicyRule { // running pods are terminated. // - FailIndex: indicates that the pod's index is marked as Failed and will // not be restarted. + // This value is beta-level. It can be used when the + // `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). // - Ignore: indicates that the counter towards the .backoffLimit is not // incremented and a replacement pod is created. // - Count: indicates that the pod is handled in the default way - the diff --git a/go-controller/vendor/k8s.io/api/batch/v1/types.go b/go-controller/vendor/k8s.io/api/batch/v1/types.go index 6c0007c21e..8e9a761b95 100644 --- a/go-controller/vendor/k8s.io/api/batch/v1/types.go +++ b/go-controller/vendor/k8s.io/api/batch/v1/types.go @@ -128,6 +128,7 @@ const ( // This is an action which might be taken on a pod failure - mark the // Job's index as failed to avoid restarts within this index. This action // can only be used when backoffLimitPerIndex is set. + // This value is beta-level. PodFailurePolicyActionFailIndex PodFailurePolicyAction = "FailIndex" // This is an action which might be taken on a pod failure - the counter towards @@ -222,6 +223,8 @@ type PodFailurePolicyRule struct { // running pods are terminated. // - FailIndex: indicates that the pod's index is marked as Failed and will // not be restarted. + // This value is beta-level. It can be used when the + // `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). // - Ignore: indicates that the counter towards the .backoffLimit is not // incremented and a replacement pod is created. // - Count: indicates that the pod is handled in the default way - the @@ -343,6 +346,8 @@ type JobSpec struct { // When the field is specified, it must be immutable and works only for the Indexed Jobs. // Once the Job meets the SuccessPolicy, the lingering pods are terminated. // + // This field is beta-level. To use this field, you must enable the + // `JobSuccessPolicy` feature gate (enabled by default). // +optional SuccessPolicy *SuccessPolicy `json:"successPolicy,omitempty" protobuf:"bytes,16,opt,name=successPolicy"` @@ -357,6 +362,8 @@ type JobSpec struct { // batch.kubernetes.io/job-index-failure-count annotation. It can only // be set when Job's completionMode=Indexed, and the Pod's restart // policy is Never. The field is immutable. + // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` + // feature gate is enabled (enabled by default). // +optional BackoffLimitPerIndex *int32 `json:"backoffLimitPerIndex,omitempty" protobuf:"varint,12,opt,name=backoffLimitPerIndex"` @@ -368,6 +375,8 @@ type JobSpec struct { // It can only be specified when backoffLimitPerIndex is set. // It can be null or up to completions. It is required and must be // less than or equal to 10^4 when is completions greater than 10^5. + // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` + // feature gate is enabled (enabled by default). // +optional MaxFailedIndexes *int32 `json:"maxFailedIndexes,omitempty" protobuf:"varint,13,opt,name=maxFailedIndexes"` @@ -562,6 +571,8 @@ type JobStatus struct { // represented as "1,3-5,7". // The set of failed indexes cannot overlap with the set of completed indexes. // + // This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` + // feature gate is enabled (enabled by default). // +optional FailedIndexes *string `json:"failedIndexes,omitempty" protobuf:"bytes,10,opt,name=failedIndexes"` @@ -636,9 +647,13 @@ const ( JobReasonFailedIndexes string = "FailedIndexes" // JobReasonSuccessPolicy reason indicates a SuccessCriteriaMet condition is added due to // a Job met successPolicy. + // https://kep.k8s.io/3998 + // This is currently a beta field. JobReasonSuccessPolicy string = "SuccessPolicy" // JobReasonCompletionsReached reason indicates a SuccessCriteriaMet condition is added due to // a number of succeeded Job pods met completions. + // - https://kep.k8s.io/3998 + // This is currently a beta field. JobReasonCompletionsReached string = "CompletionsReached" ) diff --git a/go-controller/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go index ffd4e4f5fe..893f3371f0 100644 --- a/go-controller/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go @@ -116,10 +116,10 @@ var map_JobSpec = map[string]string{ "completions": "Specifies the desired number of successfully finished pods the job should be run with. Setting to null means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", "activeDeadlineSeconds": "Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.", "podFailurePolicy": "Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure.", - "successPolicy": "successPolicy specifies the policy when the Job can be declared as succeeded. If empty, the default behavior applies - the Job is declared as succeeded only when the number of succeeded pods equals to the completions. When the field is specified, it must be immutable and works only for the Indexed Jobs. Once the Job meets the SuccessPolicy, the lingering pods are terminated.", + "successPolicy": "successPolicy specifies the policy when the Job can be declared as succeeded. If empty, the default behavior applies - the Job is declared as succeeded only when the number of succeeded pods equals to the completions. When the field is specified, it must be immutable and works only for the Indexed Jobs. Once the Job meets the SuccessPolicy, the lingering pods are terminated.\n\nThis field is beta-level. To use this field, you must enable the `JobSuccessPolicy` feature gate (enabled by default).", "backoffLimit": "Specifies the number of retries before marking this job failed. Defaults to 6", - "backoffLimitPerIndex": "Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable.", - "maxFailedIndexes": "Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5.", + "backoffLimitPerIndex": "Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", + "maxFailedIndexes": "Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", "selector": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", "manualSelector": "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", "template": "Describes the pod that will be created when executing a job. The only allowed template.spec.restartPolicy values are \"Never\" or \"OnFailure\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", @@ -144,7 +144,7 @@ var map_JobStatus = map[string]string{ "failed": "The number of pods which reached phase Failed. The value increases monotonically.", "terminating": "The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp).\n\nThis field is beta-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (enabled by default).", "completedIndexes": "completedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", - "failedIndexes": "FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". The set of failed indexes cannot overlap with the set of completed indexes.", + "failedIndexes": "FailedIndexes holds the failed indexes when spec.backoffLimitPerIndex is set. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". The set of failed indexes cannot overlap with the set of completed indexes.\n\nThis field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).", "uncountedTerminatedPods": "uncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status:\n\n1. Add the pod UID to the arrays in this field. 2. Remove the pod finalizer. 3. Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nOld jobs might not be tracked using this field, in which case the field remains null. The structure is empty for finished jobs.", "ready": "The number of active pods which have a Ready condition and are not terminating (without a deletionTimestamp).", } @@ -195,7 +195,7 @@ func (PodFailurePolicyOnPodConditionsPattern) SwaggerDoc() map[string]string { var map_PodFailurePolicyRule = map[string]string{ "": "PodFailurePolicyRule describes how a pod failure is handled when the requirements are met. One of onExitCodes and onPodConditions, but not both, can be used in each rule.", - "action": "Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:\n\n- FailJob: indicates that the pod's job is marked as Failed and all\n running pods are terminated.\n- FailIndex: indicates that the pod's index is marked as Failed and will\n not be restarted.\n- Ignore: indicates that the counter towards the .backoffLimit is not\n incremented and a replacement pod is created.\n- Count: indicates that the pod is handled in the default way - the\n counter towards the .backoffLimit is incremented.\nAdditional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.", + "action": "Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:\n\n- FailJob: indicates that the pod's job is marked as Failed and all\n running pods are terminated.\n- FailIndex: indicates that the pod's index is marked as Failed and will\n not be restarted.\n This value is beta-level. It can be used when the\n `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).\n- Ignore: indicates that the counter towards the .backoffLimit is not\n incremented and a replacement pod is created.\n- Count: indicates that the pod is handled in the default way - the\n counter towards the .backoffLimit is incremented.\nAdditional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.", "onExitCodes": "Represents the requirement on the container exit codes.", "onPodConditions": "Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed.", } diff --git a/go-controller/vendor/k8s.io/api/batch/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/batch/v1beta1/doc.go index 3430d6939d..cb2572f5da 100644 --- a/go-controller/vendor/k8s.io/api/batch/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/batch/v1beta1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/batch/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/certificates/v1/doc.go b/go-controller/vendor/k8s.io/api/certificates/v1/doc.go index 6c16fc29b8..78434478e8 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/certificates/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=certificates.k8s.io -package v1 +package v1 // import "k8s.io/api/certificates/v1" diff --git a/go-controller/vendor/k8s.io/api/certificates/v1alpha1/doc.go b/go-controller/vendor/k8s.io/api/certificates/v1alpha1/doc.go index 01481df8e5..d83d0e8207 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1alpha1/doc.go +++ b/go-controller/vendor/k8s.io/api/certificates/v1alpha1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=certificates.k8s.io -package v1alpha1 +package v1alpha1 // import "k8s.io/api/certificates/v1alpha1" diff --git a/go-controller/vendor/k8s.io/api/certificates/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/certificates/v1beta1/doc.go index 81608a554c..1165518c67 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/certificates/v1beta1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=certificates.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/certificates/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go b/go-controller/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go index 199a54496a..b6d8ab3f59 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go @@ -186,94 +186,10 @@ func (m *CertificateSigningRequestStatus) XXX_DiscardUnknown() { var xxx_messageInfo_CertificateSigningRequestStatus proto.InternalMessageInfo -func (m *ClusterTrustBundle) Reset() { *m = ClusterTrustBundle{} } -func (*ClusterTrustBundle) ProtoMessage() {} -func (*ClusterTrustBundle) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{5} -} -func (m *ClusterTrustBundle) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundle) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundle.Merge(m, src) -} -func (m *ClusterTrustBundle) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundle) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundle.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterTrustBundle proto.InternalMessageInfo - -func (m *ClusterTrustBundleList) Reset() { *m = ClusterTrustBundleList{} } -func (*ClusterTrustBundleList) ProtoMessage() {} -func (*ClusterTrustBundleList) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{6} -} -func (m *ClusterTrustBundleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundleList.Merge(m, src) -} -func (m *ClusterTrustBundleList) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundleList) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundleList.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterTrustBundleList proto.InternalMessageInfo - -func (m *ClusterTrustBundleSpec) Reset() { *m = ClusterTrustBundleSpec{} } -func (*ClusterTrustBundleSpec) ProtoMessage() {} -func (*ClusterTrustBundleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{7} -} -func (m *ClusterTrustBundleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClusterTrustBundleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ClusterTrustBundleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterTrustBundleSpec.Merge(m, src) -} -func (m *ClusterTrustBundleSpec) XXX_Size() int { - return m.Size() -} -func (m *ClusterTrustBundleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterTrustBundleSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterTrustBundleSpec proto.InternalMessageInfo - func (m *ExtraValue) Reset() { *m = ExtraValue{} } func (*ExtraValue) ProtoMessage() {} func (*ExtraValue) Descriptor() ([]byte, []int) { - return fileDescriptor_6529c11a462c48a5, []int{8} + return fileDescriptor_6529c11a462c48a5, []int{5} } func (m *ExtraValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -305,9 +221,6 @@ func init() { proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestSpec") proto.RegisterMapType((map[string]ExtraValue)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestSpec.ExtraEntry") proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.api.certificates.v1beta1.CertificateSigningRequestStatus") - proto.RegisterType((*ClusterTrustBundle)(nil), "k8s.io.api.certificates.v1beta1.ClusterTrustBundle") - proto.RegisterType((*ClusterTrustBundleList)(nil), "k8s.io.api.certificates.v1beta1.ClusterTrustBundleList") - proto.RegisterType((*ClusterTrustBundleSpec)(nil), "k8s.io.api.certificates.v1beta1.ClusterTrustBundleSpec") proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.certificates.v1beta1.ExtraValue") } @@ -316,69 +229,64 @@ func init() { } var fileDescriptor_6529c11a462c48a5 = []byte{ - // 991 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x9b, 0x3f, 0x4d, 0x26, 0xa5, 0xbb, 0x3b, 0x40, 0x65, 0x22, 0x6d, 0x1c, 0x59, 0x80, - 0xca, 0x3f, 0x9b, 0x96, 0x85, 0xad, 0x7a, 0x40, 0xe0, 0x50, 0xa1, 0x8a, 0x2e, 0x48, 0xd3, 0x16, - 0x01, 0x42, 0x62, 0xa7, 0xce, 0x5b, 0xd7, 0xdb, 0xc6, 0x36, 0x9e, 0x71, 0xd8, 0xdc, 0x56, 0xe2, - 0x0b, 0x70, 0xe4, 0xc8, 0x77, 0xe0, 0x4b, 0x94, 0x03, 0x52, 0xb9, 0xed, 0x01, 0x45, 0x34, 0xfb, - 0x2d, 0x7a, 0x42, 0x33, 0x9e, 0x38, 0x4e, 0xd2, 0x90, 0xa5, 0x2b, 0xed, 0x2d, 0xf3, 0xe6, 0xfd, - 0x7e, 0xbf, 0xf7, 0x9e, 0xdf, 0x7b, 0x13, 0x64, 0x9f, 0x6c, 0x31, 0xcb, 0x0f, 0x6d, 0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0xe2, 0x84, 0x71, 0x27, 0x09, 0x3a, 0xa7, 0xf0, 0x02, 0x5e, 0xc4, 0x6f, 0x27, - 0x5e, 0xc4, 0xbb, 0x8b, 0xcb, 0x33, 0x13, 0xe4, 0xbc, 0xa7, 0xd0, 0x3c, 0xd7, 0xd0, 0xda, 0xac, - 0xfb, 0x0b, 0xd8, 0x59, 0xdf, 0x4c, 0xee, 0xac, 0x0f, 0xae, 0x91, 0xd4, 0x9c, 0x65, 0xf5, 0xf3, - 0x95, 0x29, 0xc9, 0x2d, 0xb5, 0x39, 0xb1, 0x7e, 0xd2, 0xd7, 0x36, 0x2b, 0xfd, 0x9c, 0x15, 0xf4, - 0x21, 0xaa, 0xf3, 0x31, 0x8d, 0x5a, 0x08, 0x2f, 0x2b, 0x50, 0x3d, 0xa7, 0x40, 0xf2, 0x7e, 0xe6, - 0x5d, 0x35, 0x63, 0x72, 0x2a, 0xb0, 0x31, 0xca, 0x56, 0x93, 0x4b, 0xa0, 0x36, 0x1d, 0xf4, 0x76, - 0xf5, 0xd7, 0xdf, 0x8c, 0xc2, 0xe3, 0xbf, 0x5b, 0x05, 0x67, 0xe7, 0xec, 0xa2, 0x59, 0x38, 0xbf, - 0x68, 0x16, 0x9e, 0x5c, 0x34, 0x0b, 0x8f, 0x87, 0x4d, 0xed, 0x6c, 0xd8, 0xd4, 0xce, 0x87, 0x4d, - 0xed, 0xc9, 0xb0, 0xa9, 0xfd, 0x33, 0x6c, 0x6a, 0xbf, 0x3c, 0x6d, 0x16, 0xbe, 0x33, 0x16, 0xfc, - 0xd1, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x17, 0xbe, 0xe3, 0x02, 0x0a, 0x0b, 0x00, 0x00, + // 901 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0xc6, 0x1f, 0xb1, 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89, 0xbf, 0x44, 0xf5, 0x01, 0x7b, + 0x9c, 0x83, 0x79, 0x82, 0x3f, 0x5c, 0x9a, 0x8f, 0x56, 0xfb, 0x5e, 0x51, 0x68, 0xc1, 0xdc, 0x5e, + 0xd9, 0xb2, 0xdc, 0xbf, 0x2c, 0xe4, 0x2c, 0x79, 0x38, 0xf1, 0x2f, 0x08, 0x05, 0x93, 0xc7, 0x48, + 0xd8, 0x96, 0x3e, 0xff, 0xce, 0xab, 0x9f, 0xbf, 0x7c, 0xd8, 0xa6, 0xbf, 0x31, 0x25, 0x24, 0xe8, + 0x8c, 0x15, 0xde, 0x44, 0xed, 0x19, 0x69, 0x7d, 0xd2, 0x35, 0xff, 0xc6, 0x78, 0xe4, 0xb4, 0x67, + 0xc4, 0xe9, 0x6c, 0x8c, 0xfb, 0x99, 0x29, 0x9b, 0x3e, 0x28, 0x76, 0x26, 0x43, 0x67, 0xe9, 0x7b, + 0x6d, 0xcd, 0x0f, 0xcd, 0x76, 0xf3, 0xb7, 0xdf, 0x9d, 0xca, 0xd3, 0xbf, 0x7b, 0x15, 0x7f, 0xf7, + 0xec, 0xbc, 0x5b, 0x79, 0x76, 0xde, 0xad, 0x3c, 0x3f, 0xef, 0x56, 0x9e, 0x8e, 0xbb, 0xd6, 0xd9, + 0xb8, 0x6b, 0x3d, 0x1b, 0x77, 0xad, 0xe7, 0xe3, 0xae, 0xf5, 0xcf, 0xb8, 0x6b, 0xfd, 0xfa, 0xa2, + 0x5b, 0xf9, 0xc1, 0x59, 0xf2, 0xdf, 0xe5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0x2f, 0x11, + 0xe8, 0xdd, 0x08, 0x00, 0x00, } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { @@ -687,129 +595,6 @@ func (m *CertificateSigningRequestStatus) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } -func (m *ClusterTrustBundle) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterTrustBundle) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterTrustBundle) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterTrustBundleList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterTrustBundleList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterTrustBundleList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterTrustBundleSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterTrustBundleSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterTrustBundleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.TrustBundle) - copy(dAtA[i:], m.TrustBundle) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.TrustBundle))) - i-- - dAtA[i] = 0x12 - i -= len(m.SignerName) - copy(dAtA[i:], m.SignerName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SignerName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m ExtraValue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -970,49 +755,6 @@ func (m *CertificateSigningRequestStatus) Size() (n int) { return n } -func (m *ClusterTrustBundle) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ClusterTrustBundleList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ClusterTrustBundleSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SignerName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.TrustBundle) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - func (m ExtraValue) Size() (n int) { if m == nil { return 0 @@ -1120,44 +862,6 @@ func (this *CertificateSigningRequestStatus) String() string { }, "") return s } -func (this *ClusterTrustBundle) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ClusterTrustBundle{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterTrustBundleSpec", "ClusterTrustBundleSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ClusterTrustBundleList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ClusterTrustBundle{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ClusterTrustBundle", "ClusterTrustBundle", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ClusterTrustBundleList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ClusterTrustBundleSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ClusterTrustBundleSpec{`, - `SignerName:` + fmt.Sprintf("%v", this.SignerName) + `,`, - `TrustBundle:` + fmt.Sprintf("%v", this.TrustBundle) + `,`, - `}`, - }, "") - return s -} func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -2188,353 +1892,6 @@ func (m *CertificateSigningRequestStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ClusterTrustBundle) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterTrustBundle: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterTrustBundle: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterTrustBundleList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterTrustBundleList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterTrustBundleList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ClusterTrustBundle{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterTrustBundleSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterTrustBundleSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterTrustBundleSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerName", 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.SignerName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrustBundle", 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.TrustBundle = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ExtraValue) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go-controller/vendor/k8s.io/api/certificates/v1beta1/generated.proto b/go-controller/vendor/k8s.io/api/certificates/v1beta1/generated.proto index 7c48270f65..f3ec4c06e4 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1beta1/generated.proto +++ b/go-controller/vendor/k8s.io/api/certificates/v1beta1/generated.proto @@ -190,79 +190,6 @@ message CertificateSigningRequestStatus { optional bytes certificate = 2; } -// ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors -// (root certificates). -// -// ClusterTrustBundle objects are considered to be readable by any authenticated -// user in the cluster, because they can be mounted by pods using the -// `clusterTrustBundle` projection. All service accounts have read access to -// ClusterTrustBundles by default. Users who only have namespace-level access -// to a cluster can read ClusterTrustBundles by impersonating a serviceaccount -// that they have access to. -// -// It can be optionally associated with a particular assigner, in which case it -// contains one valid set of trust anchors for that signer. Signers may have -// multiple associated ClusterTrustBundles; each is an independent set of trust -// anchors for that signer. Admission control is used to enforce that only users -// with permissions on the signer can create or modify the corresponding bundle. -message ClusterTrustBundle { - // metadata contains the object metadata. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec contains the signer (if any) and trust anchors. - optional ClusterTrustBundleSpec spec = 2; -} - -// ClusterTrustBundleList is a collection of ClusterTrustBundle objects -message ClusterTrustBundleList { - // metadata contains the list metadata. - // - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a collection of ClusterTrustBundle objects - repeated ClusterTrustBundle items = 2; -} - -// ClusterTrustBundleSpec contains the signer and trust anchors. -message ClusterTrustBundleSpec { - // signerName indicates the associated signer, if any. - // - // In order to create or update a ClusterTrustBundle that sets signerName, - // you must have the following cluster-scoped permission: - // group=certificates.k8s.io resource=signers resourceName= - // verb=attest. - // - // If signerName is not empty, then the ClusterTrustBundle object must be - // named with the signer name as a prefix (translating slashes to colons). - // For example, for the signer name `example.com/foo`, valid - // ClusterTrustBundle object names include `example.com:foo:abc` and - // `example.com:foo:v1`. - // - // If signerName is empty, then the ClusterTrustBundle object's name must - // not have such a prefix. - // - // List/watch requests for ClusterTrustBundles can filter on this field - // using a `spec.signerName=NAME` field selector. - // - // +optional - optional string signerName = 1; - - // trustBundle contains the individual X.509 trust anchors for this - // bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates. - // - // The data must consist only of PEM certificate blocks that parse as valid - // X.509 certificates. Each certificate must include a basic constraints - // extension with the CA bit set. The API server will reject objects that - // contain duplicate certificates, or that use PEM block headers. - // - // Users of ClusterTrustBundles, including Kubelet, are free to reorder and - // deduplicate certificate blocks in this file according to their own logic, - // as well as to drop PEM block headers and inter-block data. - optional string trustBundle = 2; -} - // ExtraValue masks the value so protobuf can generate // +protobuf.nullable=true // +protobuf.options.(gogoproto.goproto_stringer)=false diff --git a/go-controller/vendor/k8s.io/api/certificates/v1beta1/register.go b/go-controller/vendor/k8s.io/api/certificates/v1beta1/register.go index 800dccd07d..b4f3af9b9c 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1beta1/register.go +++ b/go-controller/vendor/k8s.io/api/certificates/v1beta1/register.go @@ -51,8 +51,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CertificateSigningRequest{}, &CertificateSigningRequestList{}, - &ClusterTrustBundle{}, - &ClusterTrustBundleList{}, ) // Add the watch version that applies diff --git a/go-controller/vendor/k8s.io/api/certificates/v1beta1/types.go b/go-controller/vendor/k8s.io/api/certificates/v1beta1/types.go index 1ce104807d..7e5a5c198a 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1beta1/types.go +++ b/go-controller/vendor/k8s.io/api/certificates/v1beta1/types.go @@ -262,88 +262,3 @@ const ( UsageMicrosoftSGC KeyUsage = "microsoft sgc" UsageNetscapeSGC KeyUsage = "netscape sgc" ) - -// +genclient -// +genclient:nonNamespaced -// +k8s:prerelease-lifecycle-gen:introduced=1.33 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors -// (root certificates). -// -// ClusterTrustBundle objects are considered to be readable by any authenticated -// user in the cluster, because they can be mounted by pods using the -// `clusterTrustBundle` projection. All service accounts have read access to -// ClusterTrustBundles by default. Users who only have namespace-level access -// to a cluster can read ClusterTrustBundles by impersonating a serviceaccount -// that they have access to. -// -// It can be optionally associated with a particular assigner, in which case it -// contains one valid set of trust anchors for that signer. Signers may have -// multiple associated ClusterTrustBundles; each is an independent set of trust -// anchors for that signer. Admission control is used to enforce that only users -// with permissions on the signer can create or modify the corresponding bundle. -type ClusterTrustBundle struct { - metav1.TypeMeta `json:",inline"` - - // metadata contains the object metadata. - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec contains the signer (if any) and trust anchors. - Spec ClusterTrustBundleSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` -} - -// ClusterTrustBundleSpec contains the signer and trust anchors. -type ClusterTrustBundleSpec struct { - // signerName indicates the associated signer, if any. - // - // In order to create or update a ClusterTrustBundle that sets signerName, - // you must have the following cluster-scoped permission: - // group=certificates.k8s.io resource=signers resourceName= - // verb=attest. - // - // If signerName is not empty, then the ClusterTrustBundle object must be - // named with the signer name as a prefix (translating slashes to colons). - // For example, for the signer name `example.com/foo`, valid - // ClusterTrustBundle object names include `example.com:foo:abc` and - // `example.com:foo:v1`. - // - // If signerName is empty, then the ClusterTrustBundle object's name must - // not have such a prefix. - // - // List/watch requests for ClusterTrustBundles can filter on this field - // using a `spec.signerName=NAME` field selector. - // - // +optional - SignerName string `json:"signerName,omitempty" protobuf:"bytes,1,opt,name=signerName"` - - // trustBundle contains the individual X.509 trust anchors for this - // bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates. - // - // The data must consist only of PEM certificate blocks that parse as valid - // X.509 certificates. Each certificate must include a basic constraints - // extension with the CA bit set. The API server will reject objects that - // contain duplicate certificates, or that use PEM block headers. - // - // Users of ClusterTrustBundles, including Kubelet, are free to reorder and - // deduplicate certificate blocks in this file according to their own logic, - // as well as to drop PEM block headers and inter-block data. - TrustBundle string `json:"trustBundle" protobuf:"bytes,2,opt,name=trustBundle"` -} - -// +k8s:prerelease-lifecycle-gen:introduced=1.33 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterTrustBundleList is a collection of ClusterTrustBundle objects -type ClusterTrustBundleList struct { - metav1.TypeMeta `json:",inline"` - - // metadata contains the list metadata. - // - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a collection of ClusterTrustBundle objects - Items []ClusterTrustBundle `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/go-controller/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go index 58c69e54d3..f9ab1f13de 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go @@ -75,34 +75,4 @@ func (CertificateSigningRequestStatus) SwaggerDoc() map[string]string { return map_CertificateSigningRequestStatus } -var map_ClusterTrustBundle = map[string]string{ - "": "ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors (root certificates).\n\nClusterTrustBundle objects are considered to be readable by any authenticated user in the cluster, because they can be mounted by pods using the `clusterTrustBundle` projection. All service accounts have read access to ClusterTrustBundles by default. Users who only have namespace-level access to a cluster can read ClusterTrustBundles by impersonating a serviceaccount that they have access to.\n\nIt can be optionally associated with a particular assigner, in which case it contains one valid set of trust anchors for that signer. Signers may have multiple associated ClusterTrustBundles; each is an independent set of trust anchors for that signer. Admission control is used to enforce that only users with permissions on the signer can create or modify the corresponding bundle.", - "metadata": "metadata contains the object metadata.", - "spec": "spec contains the signer (if any) and trust anchors.", -} - -func (ClusterTrustBundle) SwaggerDoc() map[string]string { - return map_ClusterTrustBundle -} - -var map_ClusterTrustBundleList = map[string]string{ - "": "ClusterTrustBundleList is a collection of ClusterTrustBundle objects", - "metadata": "metadata contains the list metadata.", - "items": "items is a collection of ClusterTrustBundle objects", -} - -func (ClusterTrustBundleList) SwaggerDoc() map[string]string { - return map_ClusterTrustBundleList -} - -var map_ClusterTrustBundleSpec = map[string]string{ - "": "ClusterTrustBundleSpec contains the signer and trust anchors.", - "signerName": "signerName indicates the associated signer, if any.\n\nIn order to create or update a ClusterTrustBundle that sets signerName, you must have the following cluster-scoped permission: group=certificates.k8s.io resource=signers resourceName= verb=attest.\n\nIf signerName is not empty, then the ClusterTrustBundle object must be named with the signer name as a prefix (translating slashes to colons). For example, for the signer name `example.com/foo`, valid ClusterTrustBundle object names include `example.com:foo:abc` and `example.com:foo:v1`.\n\nIf signerName is empty, then the ClusterTrustBundle object's name must not have such a prefix.\n\nList/watch requests for ClusterTrustBundles can filter on this field using a `spec.signerName=NAME` field selector.", - "trustBundle": "trustBundle contains the individual X.509 trust anchors for this bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates.\n\nThe data must consist only of PEM certificate blocks that parse as valid X.509 certificates. Each certificate must include a basic constraints extension with the CA bit set. The API server will reject objects that contain duplicate certificates, or that use PEM block headers.\n\nUsers of ClusterTrustBundles, including Kubelet, are free to reorder and deduplicate certificate blocks in this file according to their own logic, as well as to drop PEM block headers and inter-block data.", -} - -func (ClusterTrustBundleSpec) SwaggerDoc() map[string]string { - return map_ClusterTrustBundleSpec -} - // AUTO-GENERATED FUNCTIONS END HERE diff --git a/go-controller/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go index 854e834739..a315e2ac60 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go @@ -188,82 +188,6 @@ func (in *CertificateSigningRequestStatus) DeepCopy() *CertificateSigningRequest return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterTrustBundle) DeepCopyInto(out *ClusterTrustBundle) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTrustBundle. -func (in *ClusterTrustBundle) DeepCopy() *ClusterTrustBundle { - if in == nil { - return nil - } - out := new(ClusterTrustBundle) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterTrustBundle) 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 *ClusterTrustBundleList) DeepCopyInto(out *ClusterTrustBundleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterTrustBundle, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTrustBundleList. -func (in *ClusterTrustBundleList) DeepCopy() *ClusterTrustBundleList { - if in == nil { - return nil - } - out := new(ClusterTrustBundleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterTrustBundleList) 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 *ClusterTrustBundleSpec) DeepCopyInto(out *ClusterTrustBundleSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTrustBundleSpec. -func (in *ClusterTrustBundleSpec) DeepCopy() *ClusterTrustBundleSpec { - if in == nil { - return nil - } - out := new(ClusterTrustBundleSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in ExtraValue) DeepCopyInto(out *ExtraValue) { { diff --git a/go-controller/vendor/k8s.io/api/certificates/v1beta1/zz_generated.prerelease-lifecycle.go b/go-controller/vendor/k8s.io/api/certificates/v1beta1/zz_generated.prerelease-lifecycle.go index 062b46f164..480a329361 100644 --- a/go-controller/vendor/k8s.io/api/certificates/v1beta1/zz_generated.prerelease-lifecycle.go +++ b/go-controller/vendor/k8s.io/api/certificates/v1beta1/zz_generated.prerelease-lifecycle.go @@ -72,39 +72,3 @@ func (in *CertificateSigningRequestList) APILifecycleReplacement() schema.GroupV func (in *CertificateSigningRequestList) APILifecycleRemoved() (major, minor int) { return 1, 22 } - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *ClusterTrustBundle) APILifecycleIntroduced() (major, minor int) { - return 1, 33 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *ClusterTrustBundle) APILifecycleDeprecated() (major, minor int) { - return 1, 36 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *ClusterTrustBundle) APILifecycleRemoved() (major, minor int) { - return 1, 39 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *ClusterTrustBundleList) APILifecycleIntroduced() (major, minor int) { - return 1, 33 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *ClusterTrustBundleList) APILifecycleDeprecated() (major, minor int) { - return 1, 36 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *ClusterTrustBundleList) APILifecycleRemoved() (major, minor int) { - return 1, 39 -} diff --git a/go-controller/vendor/k8s.io/api/coordination/v1/doc.go b/go-controller/vendor/k8s.io/api/coordination/v1/doc.go index 82ae6340c7..9b2fbbda3a 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=coordination.k8s.io -package v1 +package v1 // import "k8s.io/api/coordination/v1" diff --git a/go-controller/vendor/k8s.io/api/coordination/v1alpha2/doc.go b/go-controller/vendor/k8s.io/api/coordination/v1alpha2/doc.go index dff7df47fc..5e6d655302 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1alpha2/doc.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1alpha2/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=coordination.k8s.io -package v1alpha2 +package v1alpha2 // import "k8s.io/api/coordination/v1alpha2" diff --git a/go-controller/vendor/k8s.io/api/coordination/v1alpha2/generated.proto b/go-controller/vendor/k8s.io/api/coordination/v1alpha2/generated.proto index 250c6113ec..7e56cd7f96 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1alpha2/generated.proto +++ b/go-controller/vendor/k8s.io/api/coordination/v1alpha2/generated.proto @@ -92,6 +92,8 @@ message LeaseCandidateSpec { // If multiple candidates for the same Lease return different strategies, the strategy provided // by the candidate with the latest BinaryVersion will be used. If there is still conflict, // this is a user error and coordinated leader election will not operate the Lease until resolved. + // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. + // +featureGate=CoordinatedLeaderElection // +required optional string strategy = 6; } diff --git a/go-controller/vendor/k8s.io/api/coordination/v1alpha2/types.go b/go-controller/vendor/k8s.io/api/coordination/v1alpha2/types.go index 13e1deb067..2f53b097a2 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1alpha2/types.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1alpha2/types.go @@ -73,6 +73,8 @@ type LeaseCandidateSpec struct { // If multiple candidates for the same Lease return different strategies, the strategy provided // by the candidate with the latest BinaryVersion will be used. If there is still conflict, // this is a user error and coordinated leader election will not operate the Lease until resolved. + // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. + // +featureGate=CoordinatedLeaderElection // +required Strategy v1.CoordinatedLeaseStrategy `json:"strategy,omitempty" protobuf:"bytes,6,opt,name=strategy"` } diff --git a/go-controller/vendor/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go index f7e29849e4..39534e6adb 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go @@ -54,7 +54,7 @@ var map_LeaseCandidateSpec = map[string]string{ "renewTime": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.", "binaryVersion": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", "emulationVersion": "EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\"", - "strategy": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved.", + "strategy": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", } func (LeaseCandidateSpec) SwaggerDoc() map[string]string { diff --git a/go-controller/vendor/k8s.io/api/coordination/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/coordination/v1beta1/doc.go index cab8becf67..e733411aa9 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1beta1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=coordination.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/coordination/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go b/go-controller/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go index 52fd4167fa..bea9b8146a 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go @@ -74,94 +74,10 @@ func (m *Lease) XXX_DiscardUnknown() { var xxx_messageInfo_Lease proto.InternalMessageInfo -func (m *LeaseCandidate) Reset() { *m = LeaseCandidate{} } -func (*LeaseCandidate) ProtoMessage() {} -func (*LeaseCandidate) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{1} -} -func (m *LeaseCandidate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCandidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseCandidate) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCandidate.Merge(m, src) -} -func (m *LeaseCandidate) XXX_Size() int { - return m.Size() -} -func (m *LeaseCandidate) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCandidate.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCandidate proto.InternalMessageInfo - -func (m *LeaseCandidateList) Reset() { *m = LeaseCandidateList{} } -func (*LeaseCandidateList) ProtoMessage() {} -func (*LeaseCandidateList) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{2} -} -func (m *LeaseCandidateList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCandidateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseCandidateList) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCandidateList.Merge(m, src) -} -func (m *LeaseCandidateList) XXX_Size() int { - return m.Size() -} -func (m *LeaseCandidateList) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCandidateList.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCandidateList proto.InternalMessageInfo - -func (m *LeaseCandidateSpec) Reset() { *m = LeaseCandidateSpec{} } -func (*LeaseCandidateSpec) ProtoMessage() {} -func (*LeaseCandidateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{3} -} -func (m *LeaseCandidateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LeaseCandidateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *LeaseCandidateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseCandidateSpec.Merge(m, src) -} -func (m *LeaseCandidateSpec) XXX_Size() int { - return m.Size() -} -func (m *LeaseCandidateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseCandidateSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaseCandidateSpec proto.InternalMessageInfo - func (m *LeaseList) Reset() { *m = LeaseList{} } func (*LeaseList) ProtoMessage() {} func (*LeaseList) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{4} + return fileDescriptor_8d4e223b8bb23da3, []int{1} } func (m *LeaseList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +105,7 @@ var xxx_messageInfo_LeaseList proto.InternalMessageInfo func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } func (*LeaseSpec) ProtoMessage() {} func (*LeaseSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_8d4e223b8bb23da3, []int{5} + return fileDescriptor_8d4e223b8bb23da3, []int{2} } func (m *LeaseSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -216,9 +132,6 @@ var xxx_messageInfo_LeaseSpec proto.InternalMessageInfo func init() { proto.RegisterType((*Lease)(nil), "k8s.io.api.coordination.v1beta1.Lease") - proto.RegisterType((*LeaseCandidate)(nil), "k8s.io.api.coordination.v1beta1.LeaseCandidate") - proto.RegisterType((*LeaseCandidateList)(nil), "k8s.io.api.coordination.v1beta1.LeaseCandidateList") - proto.RegisterType((*LeaseCandidateSpec)(nil), "k8s.io.api.coordination.v1beta1.LeaseCandidateSpec") proto.RegisterType((*LeaseList)(nil), "k8s.io.api.coordination.v1beta1.LeaseList") proto.RegisterType((*LeaseSpec)(nil), "k8s.io.api.coordination.v1beta1.LeaseSpec") } @@ -228,54 +141,45 @@ func init() { } var fileDescriptor_8d4e223b8bb23da3 = []byte{ - // 750 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x4e, 0x1b, 0x39, - 0x18, 0xcd, 0x40, 0xb2, 0x9b, 0x38, 0x04, 0xb2, 0x5e, 0x56, 0x1a, 0x71, 0x31, 0x83, 0x72, 0xb1, - 0x42, 0x48, 0xeb, 0x59, 0x60, 0xb5, 0x5a, 0x6d, 0x55, 0xa9, 0x1d, 0x40, 0x2d, 0x6a, 0x68, 0x91, - 0xa1, 0x95, 0x5a, 0x21, 0xb5, 0xce, 0x8c, 0x99, 0xb8, 0x30, 0x3f, 0xf5, 0x38, 0x54, 0xb9, 0xeb, - 0x23, 0xf4, 0x69, 0x5a, 0xf5, 0x0d, 0xd2, 0x3b, 0x2e, 0xb9, 0x8a, 0xca, 0x54, 0xea, 0x43, 0xf4, - 0xaa, 0xb2, 0x33, 0xf9, 0x27, 0x22, 0x6d, 0x11, 0x77, 0xf1, 0xf7, 0x9d, 0x73, 0xfc, 0x1d, 0xfb, - 0x38, 0x1a, 0x60, 0x1d, 0xff, 0x17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d2, 0x5b, 0xac, 0xd2, 0x9b, 0xb3, - 0x17, 0x65, 0x72, 0xab, 0x23, 0x3d, 0x3c, 0x86, 0x86, 0xcf, 0xc7, 0x92, 0xbb, 0x79, 0xad, 0xa9, - 0x85, 0xb7, 0xc1, 0x42, 0xc4, 0xe9, 0x11, 0xe5, 0x9c, 0xba, 0x9d, 0xdb, 0xd5, 0x7f, 0x55, 0xfb, - 0xfc, 0x9e, 0xb4, 0xcd, 0x85, 0xbd, 0xe1, 0x16, 0x1e, 0xc5, 0xda, 0xdb, 0xad, 0x0b, 0x23, 0x73, - 0x76, 0x61, 0x64, 0xce, 0x2f, 0x8c, 0xcc, 0x9b, 0xc4, 0xd0, 0x5a, 0x89, 0xa1, 0x9d, 0x25, 0x86, - 0x76, 0x9e, 0x18, 0xda, 0xa7, 0xc4, 0xd0, 0xde, 0x7e, 0x36, 0x32, 0xcf, 0xcc, 0x2b, 0x3e, 0x50, - 0xbe, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x56, 0x51, 0x57, 0xc2, 0x08, 0x00, 0x00, + // 600 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xdf, 0x4e, 0xd4, 0x4e, + 0x14, 0xc7, 0xb7, 0xb0, 0xfb, 0xfb, 0xb1, 0xb3, 0xf2, 0x27, 0x23, 0x17, 0x0d, 0x17, 0x2d, 0xe1, + 0xc2, 0x10, 0x12, 0xa7, 0x82, 0xc6, 0x18, 0x13, 0x13, 0x2d, 0x9a, 0x48, 0x2c, 0xd1, 0x14, 0xae, + 0x0c, 0x89, 0xce, 0xb6, 0x87, 0xee, 0x08, 0xed, 0xd4, 0x99, 0x59, 0x0c, 0x77, 0x3e, 0x82, 0x4f, + 0xa3, 0xf1, 0x0d, 0xb8, 0xe4, 0x92, 0xab, 0x46, 0xc6, 0xb7, 0xf0, 0xca, 0xcc, 0x6c, 0x61, 0x61,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x62, 0x3b, + 0x34, 0xff, 0xad, 0xc3, 0xb4, 0xae, 0xfc, 0x76, 0x7c, 0x46, 0x89, 0x87, 0x40, 0xfc, 0x1c, 0xcd, + 0xd9, 0x9b, 0x6d, 0x0b, 0x5a, 0x48, 0x66, 0xee, 0x26, 0xdd, 0x96, 0x9d, 0xc5, 0xbc, 0xae, 0xfc, + 0xb9, 0x68, 0x24, 0x17, 0x5f, 0xa9, 0xc6, 0x1f, 0xd0, 0x94, 0x54, 0xe6, 0x7d, 0x64, 0x87, 0xee, + 0x7f, 0x76, 0x0f, 0xeb, 0xe6, 0x2f, 0xb1, 0x55, 0xc7, 0xfe, 0x54, 0xfe, 0xc3, 0x9b, 0xdf, 0x3e, + 0x59, 0x3f, 0x3b, 0x43, 0x3a, 0x58, 0x70, 0x2d, 0x8b, 0xcf, 0xa1, 0xf8, 0x19, 0x9a, 0x2d, 0x05, + 0xec, 0x82, 0x10, 0x90, 0x0e, 0xb6, 0xeb, 0xfe, 0x6f, 0xfb, 0xdc, 0xd5, 0x95, 0x3f, 0xfb, 0xee, + 0x72, 0x2a, 0x1e, 0xad, 0x0d, 0x5f, 0x1d, 0x9d, 0x7a, 0x8d, 0xe3, 0x53, 0xaf, 0x71, 0x72, 0xea, + 0x35, 0xbe, 0x6a, 0xcf, 0x39, 0xd2, 0x9e, 0x73, 0xac, 0x3d, 0xe7, 0x44, 0x7b, 0xce, 0x2f, 0xed, + 0x39, 0xdf, 0x7e, 0x7b, 0x8d, 0xf7, 0xfe, 0x2d, 0x1f, 0xc8, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x57, 0x93, 0xf3, 0xef, 0x42, 0x05, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { @@ -321,163 +225,6 @@ func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *LeaseCandidate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseCandidate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseCandidate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LeaseCandidateList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseCandidateList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseCandidateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LeaseCandidateSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LeaseCandidateSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LeaseCandidateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Strategy) - copy(dAtA[i:], m.Strategy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strategy))) - i-- - dAtA[i] = 0x32 - i -= len(m.EmulationVersion) - copy(dAtA[i:], m.EmulationVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EmulationVersion))) - i-- - dAtA[i] = 0x2a - i -= len(m.BinaryVersion) - copy(dAtA[i:], m.BinaryVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.BinaryVersion))) - i-- - dAtA[i] = 0x22 - if m.RenewTime != nil { - { - size, err := m.RenewTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.PingTime != nil { - { - size, err := m.PingTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.LeaseName) - copy(dAtA[i:], m.LeaseName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.LeaseName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *LeaseList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -627,61 +374,6 @@ func (m *Lease) Size() (n int) { return n } -func (m *LeaseCandidate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *LeaseCandidateList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *LeaseCandidateSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.LeaseName) - n += 1 + l + sovGenerated(uint64(l)) - if m.PingTime != nil { - l = m.PingTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.RenewTime != nil { - l = m.RenewTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.BinaryVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.EmulationVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Strategy) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - func (m *LeaseList) Size() (n int) { if m == nil { return 0 @@ -751,48 +443,6 @@ func (this *Lease) String() string { }, "") return s } -func (this *LeaseCandidate) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LeaseCandidate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LeaseCandidateSpec", "LeaseCandidateSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *LeaseCandidateList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]LeaseCandidate{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "LeaseCandidate", "LeaseCandidate", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&LeaseCandidateList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *LeaseCandidateSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LeaseCandidateSpec{`, - `LeaseName:` + fmt.Sprintf("%v", this.LeaseName) + `,`, - `PingTime:` + strings.Replace(fmt.Sprintf("%v", this.PingTime), "MicroTime", "v1.MicroTime", 1) + `,`, - `RenewTime:` + strings.Replace(fmt.Sprintf("%v", this.RenewTime), "MicroTime", "v1.MicroTime", 1) + `,`, - `BinaryVersion:` + fmt.Sprintf("%v", this.BinaryVersion) + `,`, - `EmulationVersion:` + fmt.Sprintf("%v", this.EmulationVersion) + `,`, - `Strategy:` + fmt.Sprintf("%v", this.Strategy) + `,`, - `}`, - }, "") - return s -} func (this *LeaseList) String() string { if this == nil { return "nil" @@ -949,489 +599,6 @@ func (m *Lease) Unmarshal(dAtA []byte) error { } return nil } -func (m *LeaseCandidate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseCandidate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseCandidate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseCandidateList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseCandidateList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseCandidateList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, LeaseCandidate{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LeaseCandidateSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LeaseCandidateSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LeaseCandidateSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeaseName", 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.LeaseName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PingTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PingTime == nil { - m.PingTime = &v1.MicroTime{} - } - if err := m.PingTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RenewTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RenewTime == nil { - m.RenewTime = &v1.MicroTime{} - } - if err := m.RenewTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BinaryVersion", 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.BinaryVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EmulationVersion", 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.EmulationVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strategy", 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.Strategy = k8s_io_api_coordination_v1.CoordinatedLeaseStrategy(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *LeaseList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go-controller/vendor/k8s.io/api/coordination/v1beta1/generated.proto b/go-controller/vendor/k8s.io/api/coordination/v1beta1/generated.proto index 7ca043f528..088811a74b 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1beta1/generated.proto +++ b/go-controller/vendor/k8s.io/api/coordination/v1beta1/generated.proto @@ -41,75 +41,6 @@ message Lease { optional LeaseSpec spec = 2; } -// LeaseCandidate defines a candidate for a Lease object. -// Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. -message LeaseCandidate { - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec contains the specification of the Lease. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional LeaseCandidateSpec spec = 2; -} - -// LeaseCandidateList is a list of Lease objects. -message LeaseCandidateList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of schema objects. - repeated LeaseCandidate items = 2; -} - -// LeaseCandidateSpec is a specification of a Lease. -message LeaseCandidateSpec { - // LeaseName is the name of the lease for which this candidate is contending. - // The limits on this field are the same as on Lease.name. Multiple lease candidates - // may reference the same Lease.name. - // This field is immutable. - // +required - optional string leaseName = 1; - - // PingTime is the last time that the server has requested the LeaseCandidate - // to renew. It is only done during leader election to check if any - // LeaseCandidates have become ineligible. When PingTime is updated, the - // LeaseCandidate will respond by updating RenewTime. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime pingTime = 2; - - // RenewTime is the time that the LeaseCandidate was last updated. - // Any time a Lease needs to do leader election, the PingTime field - // is updated to signal to the LeaseCandidate that they should update - // the RenewTime. - // Old LeaseCandidate objects are also garbage collected if it has been hours - // since the last renew. The PingTime field is updated regularly to prevent - // garbage collection for still active LeaseCandidates. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime renewTime = 3; - - // BinaryVersion is the binary version. It must be in a semver format without leading `v`. - // This field is required. - // +required - optional string binaryVersion = 4; - - // EmulationVersion is the emulation version. It must be in a semver format without leading `v`. - // EmulationVersion must be less than or equal to BinaryVersion. - // This field is required when strategy is "OldestEmulationVersion" - // +optional - optional string emulationVersion = 5; - - // Strategy is the strategy that coordinated leader election will use for picking the leader. - // If multiple candidates for the same Lease return different strategies, the strategy provided - // by the candidate with the latest BinaryVersion will be used. If there is still conflict, - // this is a user error and coordinated leader election will not operate the Lease until resolved. - // +required - optional string strategy = 6; -} - // LeaseList is a list of Lease objects. message LeaseList { // Standard list metadata. diff --git a/go-controller/vendor/k8s.io/api/coordination/v1beta1/register.go b/go-controller/vendor/k8s.io/api/coordination/v1beta1/register.go index bd00164233..85efaa64e7 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1beta1/register.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1beta1/register.go @@ -46,8 +46,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Lease{}, &LeaseList{}, - &LeaseCandidate{}, - &LeaseCandidateList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/go-controller/vendor/k8s.io/api/coordination/v1beta1/types.go b/go-controller/vendor/k8s.io/api/coordination/v1beta1/types.go index 781d29efce..d63fc30a9e 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1beta1/types.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1beta1/types.go @@ -91,76 +91,3 @@ type LeaseList struct { // items is a list of schema objects. Items []Lease `json:"items" protobuf:"bytes,2,rep,name=items"` } - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.33 - -// LeaseCandidate defines a candidate for a Lease object. -// Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. -type LeaseCandidate struct { - metav1.TypeMeta `json:",inline"` - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec contains the specification of the Lease. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec LeaseCandidateSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` -} - -// LeaseCandidateSpec is a specification of a Lease. -type LeaseCandidateSpec struct { - // LeaseName is the name of the lease for which this candidate is contending. - // The limits on this field are the same as on Lease.name. Multiple lease candidates - // may reference the same Lease.name. - // This field is immutable. - // +required - LeaseName string `json:"leaseName" protobuf:"bytes,1,name=leaseName"` - // PingTime is the last time that the server has requested the LeaseCandidate - // to renew. It is only done during leader election to check if any - // LeaseCandidates have become ineligible. When PingTime is updated, the - // LeaseCandidate will respond by updating RenewTime. - // +optional - PingTime *metav1.MicroTime `json:"pingTime,omitempty" protobuf:"bytes,2,opt,name=pingTime"` - // RenewTime is the time that the LeaseCandidate was last updated. - // Any time a Lease needs to do leader election, the PingTime field - // is updated to signal to the LeaseCandidate that they should update - // the RenewTime. - // Old LeaseCandidate objects are also garbage collected if it has been hours - // since the last renew. The PingTime field is updated regularly to prevent - // garbage collection for still active LeaseCandidates. - // +optional - RenewTime *metav1.MicroTime `json:"renewTime,omitempty" protobuf:"bytes,3,opt,name=renewTime"` - // BinaryVersion is the binary version. It must be in a semver format without leading `v`. - // This field is required. - // +required - BinaryVersion string `json:"binaryVersion" protobuf:"bytes,4,name=binaryVersion"` - // EmulationVersion is the emulation version. It must be in a semver format without leading `v`. - // EmulationVersion must be less than or equal to BinaryVersion. - // This field is required when strategy is "OldestEmulationVersion" - // +optional - EmulationVersion string `json:"emulationVersion,omitempty" protobuf:"bytes,5,opt,name=emulationVersion"` - // Strategy is the strategy that coordinated leader election will use for picking the leader. - // If multiple candidates for the same Lease return different strategies, the strategy provided - // by the candidate with the latest BinaryVersion will be used. If there is still conflict, - // this is a user error and coordinated leader election will not operate the Lease until resolved. - // +required - Strategy v1.CoordinatedLeaseStrategy `json:"strategy,omitempty" protobuf:"bytes,6,opt,name=strategy"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.33 - -// LeaseCandidateList is a list of Lease objects. -type LeaseCandidateList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of schema objects. - Items []LeaseCandidate `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/go-controller/vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go index 35812b77f3..50fe8ea189 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go @@ -37,40 +37,6 @@ func (Lease) SwaggerDoc() map[string]string { return map_Lease } -var map_LeaseCandidate = map[string]string{ - "": "LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.", - "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", -} - -func (LeaseCandidate) SwaggerDoc() map[string]string { - return map_LeaseCandidate -} - -var map_LeaseCandidateList = map[string]string{ - "": "LeaseCandidateList is a list of Lease objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of schema objects.", -} - -func (LeaseCandidateList) SwaggerDoc() map[string]string { - return map_LeaseCandidateList -} - -var map_LeaseCandidateSpec = map[string]string{ - "": "LeaseCandidateSpec is a specification of a Lease.", - "leaseName": "LeaseName is the name of the lease for which this candidate is contending. The limits on this field are the same as on Lease.name. Multiple lease candidates may reference the same Lease.name. This field is immutable.", - "pingTime": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.", - "renewTime": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.", - "binaryVersion": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", - "emulationVersion": "EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\"", - "strategy": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved.", -} - -func (LeaseCandidateSpec) SwaggerDoc() map[string]string { - return map_LeaseCandidateSpec -} - var map_LeaseList = map[string]string{ "": "LeaseList is a list of Lease objects.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", diff --git a/go-controller/vendor/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go index b990ee247f..dcef1e346a 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go @@ -53,90 +53,6 @@ func (in *Lease) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LeaseCandidate) DeepCopyInto(out *LeaseCandidate) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidate. -func (in *LeaseCandidate) DeepCopy() *LeaseCandidate { - if in == nil { - return nil - } - out := new(LeaseCandidate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LeaseCandidate) 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 *LeaseCandidateList) DeepCopyInto(out *LeaseCandidateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]LeaseCandidate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidateList. -func (in *LeaseCandidateList) DeepCopy() *LeaseCandidateList { - if in == nil { - return nil - } - out := new(LeaseCandidateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LeaseCandidateList) 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 *LeaseCandidateSpec) DeepCopyInto(out *LeaseCandidateSpec) { - *out = *in - if in.PingTime != nil { - in, out := &in.PingTime, &out.PingTime - *out = (*in).DeepCopy() - } - if in.RenewTime != nil { - in, out := &in.RenewTime, &out.RenewTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidateSpec. -func (in *LeaseCandidateSpec) DeepCopy() *LeaseCandidateSpec { - if in == nil { - return nil - } - out := new(LeaseCandidateSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaseList) DeepCopyInto(out *LeaseList) { *out = *in diff --git a/go-controller/vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go b/go-controller/vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go index 73636edfa3..18926aa108 100644 --- a/go-controller/vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go +++ b/go-controller/vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go @@ -49,42 +49,6 @@ func (in *Lease) APILifecycleRemoved() (major, minor int) { return 1, 22 } -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *LeaseCandidate) APILifecycleIntroduced() (major, minor int) { - return 1, 33 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *LeaseCandidate) APILifecycleDeprecated() (major, minor int) { - return 1, 36 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *LeaseCandidate) APILifecycleRemoved() (major, minor int) { - return 1, 39 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *LeaseCandidateList) APILifecycleIntroduced() (major, minor int) { - return 1, 33 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *LeaseCandidateList) APILifecycleDeprecated() (major, minor int) { - return 1, 36 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *LeaseCandidateList) APILifecycleRemoved() (major, minor int) { - return 1, 39 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *LeaseList) APILifecycleIntroduced() (major, minor int) { diff --git a/go-controller/vendor/k8s.io/api/core/v1/doc.go b/go-controller/vendor/k8s.io/api/core/v1/doc.go index e4e9196aeb..bc0041b331 100644 --- a/go-controller/vendor/k8s.io/api/core/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/core/v1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName= // Package v1 is the v1 version of the core API. -package v1 +package v1 // import "k8s.io/api/core/v1" diff --git a/go-controller/vendor/k8s.io/api/core/v1/generated.pb.go b/go-controller/vendor/k8s.io/api/core/v1/generated.pb.go index a4b8f58429..9d466c6d79 100644 --- a/go-controller/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/core/v1/generated.pb.go @@ -3213,38 +3213,10 @@ func (m *NodeStatus) XXX_DiscardUnknown() { var xxx_messageInfo_NodeStatus proto.InternalMessageInfo -func (m *NodeSwapStatus) Reset() { *m = NodeSwapStatus{} } -func (*NodeSwapStatus) ProtoMessage() {} -func (*NodeSwapStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{113} -} -func (m *NodeSwapStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeSwapStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NodeSwapStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeSwapStatus.Merge(m, src) -} -func (m *NodeSwapStatus) XXX_Size() int { - return m.Size() -} -func (m *NodeSwapStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NodeSwapStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeSwapStatus proto.InternalMessageInfo - func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } func (*NodeSystemInfo) ProtoMessage() {} func (*NodeSystemInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{114} + return fileDescriptor_6c07b07c062484ab, []int{113} } func (m *NodeSystemInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3272,7 +3244,7 @@ var xxx_messageInfo_NodeSystemInfo proto.InternalMessageInfo func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } func (*ObjectFieldSelector) ProtoMessage() {} func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{115} + return fileDescriptor_6c07b07c062484ab, []int{114} } func (m *ObjectFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3300,7 +3272,7 @@ var xxx_messageInfo_ObjectFieldSelector proto.InternalMessageInfo func (m *ObjectReference) Reset() { *m = ObjectReference{} } func (*ObjectReference) ProtoMessage() {} func (*ObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{116} + return fileDescriptor_6c07b07c062484ab, []int{115} } func (m *ObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3328,7 +3300,7 @@ var xxx_messageInfo_ObjectReference proto.InternalMessageInfo func (m *PersistentVolume) Reset() { *m = PersistentVolume{} } func (*PersistentVolume) ProtoMessage() {} func (*PersistentVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{117} + return fileDescriptor_6c07b07c062484ab, []int{116} } func (m *PersistentVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3356,7 +3328,7 @@ var xxx_messageInfo_PersistentVolume proto.InternalMessageInfo func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } func (*PersistentVolumeClaim) ProtoMessage() {} func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{118} + return fileDescriptor_6c07b07c062484ab, []int{117} } func (m *PersistentVolumeClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3384,7 +3356,7 @@ var xxx_messageInfo_PersistentVolumeClaim proto.InternalMessageInfo func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } func (*PersistentVolumeClaimCondition) ProtoMessage() {} func (*PersistentVolumeClaimCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{119} + return fileDescriptor_6c07b07c062484ab, []int{118} } func (m *PersistentVolumeClaimCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3412,7 +3384,7 @@ var xxx_messageInfo_PersistentVolumeClaimCondition proto.InternalMessageInfo func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} } func (*PersistentVolumeClaimList) ProtoMessage() {} func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{120} + return fileDescriptor_6c07b07c062484ab, []int{119} } func (m *PersistentVolumeClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3440,7 +3412,7 @@ var xxx_messageInfo_PersistentVolumeClaimList proto.InternalMessageInfo func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} } func (*PersistentVolumeClaimSpec) ProtoMessage() {} func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{121} + return fileDescriptor_6c07b07c062484ab, []int{120} } func (m *PersistentVolumeClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3468,7 +3440,7 @@ var xxx_messageInfo_PersistentVolumeClaimSpec proto.InternalMessageInfo func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} } func (*PersistentVolumeClaimStatus) ProtoMessage() {} func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{122} + return fileDescriptor_6c07b07c062484ab, []int{121} } func (m *PersistentVolumeClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3496,7 +3468,7 @@ var xxx_messageInfo_PersistentVolumeClaimStatus proto.InternalMessageInfo func (m *PersistentVolumeClaimTemplate) Reset() { *m = PersistentVolumeClaimTemplate{} } func (*PersistentVolumeClaimTemplate) ProtoMessage() {} func (*PersistentVolumeClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{123} + return fileDescriptor_6c07b07c062484ab, []int{122} } func (m *PersistentVolumeClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3524,7 +3496,7 @@ var xxx_messageInfo_PersistentVolumeClaimTemplate proto.InternalMessageInfo func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} } func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {} func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{124} + return fileDescriptor_6c07b07c062484ab, []int{123} } func (m *PersistentVolumeClaimVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3552,7 +3524,7 @@ var xxx_messageInfo_PersistentVolumeClaimVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} } func (*PersistentVolumeList) ProtoMessage() {} func (*PersistentVolumeList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{125} + return fileDescriptor_6c07b07c062484ab, []int{124} } func (m *PersistentVolumeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3580,7 +3552,7 @@ var xxx_messageInfo_PersistentVolumeList proto.InternalMessageInfo func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} } func (*PersistentVolumeSource) ProtoMessage() {} func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{126} + return fileDescriptor_6c07b07c062484ab, []int{125} } func (m *PersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3608,7 +3580,7 @@ var xxx_messageInfo_PersistentVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} } func (*PersistentVolumeSpec) ProtoMessage() {} func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{127} + return fileDescriptor_6c07b07c062484ab, []int{126} } func (m *PersistentVolumeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3636,7 +3608,7 @@ var xxx_messageInfo_PersistentVolumeSpec proto.InternalMessageInfo func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} } func (*PersistentVolumeStatus) ProtoMessage() {} func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{128} + return fileDescriptor_6c07b07c062484ab, []int{127} } func (m *PersistentVolumeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3664,7 +3636,7 @@ var xxx_messageInfo_PersistentVolumeStatus proto.InternalMessageInfo func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} } func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {} func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{129} + return fileDescriptor_6c07b07c062484ab, []int{128} } func (m *PhotonPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3692,7 +3664,7 @@ var xxx_messageInfo_PhotonPersistentDiskVolumeSource proto.InternalMessageInfo func (m *Pod) Reset() { *m = Pod{} } func (*Pod) ProtoMessage() {} func (*Pod) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{130} + return fileDescriptor_6c07b07c062484ab, []int{129} } func (m *Pod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3720,7 +3692,7 @@ var xxx_messageInfo_Pod proto.InternalMessageInfo func (m *PodAffinity) Reset() { *m = PodAffinity{} } func (*PodAffinity) ProtoMessage() {} func (*PodAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{131} + return fileDescriptor_6c07b07c062484ab, []int{130} } func (m *PodAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3748,7 +3720,7 @@ var xxx_messageInfo_PodAffinity proto.InternalMessageInfo func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} } func (*PodAffinityTerm) ProtoMessage() {} func (*PodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{132} + return fileDescriptor_6c07b07c062484ab, []int{131} } func (m *PodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3776,7 +3748,7 @@ var xxx_messageInfo_PodAffinityTerm proto.InternalMessageInfo func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} } func (*PodAntiAffinity) ProtoMessage() {} func (*PodAntiAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{133} + return fileDescriptor_6c07b07c062484ab, []int{132} } func (m *PodAntiAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3804,7 +3776,7 @@ var xxx_messageInfo_PodAntiAffinity proto.InternalMessageInfo func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} } func (*PodAttachOptions) ProtoMessage() {} func (*PodAttachOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{134} + return fileDescriptor_6c07b07c062484ab, []int{133} } func (m *PodAttachOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3832,7 +3804,7 @@ var xxx_messageInfo_PodAttachOptions proto.InternalMessageInfo func (m *PodCondition) Reset() { *m = PodCondition{} } func (*PodCondition) ProtoMessage() {} func (*PodCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{135} + return fileDescriptor_6c07b07c062484ab, []int{134} } func (m *PodCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3860,7 +3832,7 @@ var xxx_messageInfo_PodCondition proto.InternalMessageInfo func (m *PodDNSConfig) Reset() { *m = PodDNSConfig{} } func (*PodDNSConfig) ProtoMessage() {} func (*PodDNSConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{136} + return fileDescriptor_6c07b07c062484ab, []int{135} } func (m *PodDNSConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3888,7 +3860,7 @@ var xxx_messageInfo_PodDNSConfig proto.InternalMessageInfo func (m *PodDNSConfigOption) Reset() { *m = PodDNSConfigOption{} } func (*PodDNSConfigOption) ProtoMessage() {} func (*PodDNSConfigOption) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{137} + return fileDescriptor_6c07b07c062484ab, []int{136} } func (m *PodDNSConfigOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3916,7 +3888,7 @@ var xxx_messageInfo_PodDNSConfigOption proto.InternalMessageInfo func (m *PodExecOptions) Reset() { *m = PodExecOptions{} } func (*PodExecOptions) ProtoMessage() {} func (*PodExecOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{138} + return fileDescriptor_6c07b07c062484ab, []int{137} } func (m *PodExecOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3944,7 +3916,7 @@ var xxx_messageInfo_PodExecOptions proto.InternalMessageInfo func (m *PodIP) Reset() { *m = PodIP{} } func (*PodIP) ProtoMessage() {} func (*PodIP) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{139} + return fileDescriptor_6c07b07c062484ab, []int{138} } func (m *PodIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3972,7 +3944,7 @@ var xxx_messageInfo_PodIP proto.InternalMessageInfo func (m *PodList) Reset() { *m = PodList{} } func (*PodList) ProtoMessage() {} func (*PodList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{140} + return fileDescriptor_6c07b07c062484ab, []int{139} } func (m *PodList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4000,7 +3972,7 @@ var xxx_messageInfo_PodList proto.InternalMessageInfo func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} func (*PodLogOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{141} + return fileDescriptor_6c07b07c062484ab, []int{140} } func (m *PodLogOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4028,7 +4000,7 @@ var xxx_messageInfo_PodLogOptions proto.InternalMessageInfo func (m *PodOS) Reset() { *m = PodOS{} } func (*PodOS) ProtoMessage() {} func (*PodOS) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{142} + return fileDescriptor_6c07b07c062484ab, []int{141} } func (m *PodOS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4056,7 +4028,7 @@ var xxx_messageInfo_PodOS proto.InternalMessageInfo func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } func (*PodPortForwardOptions) ProtoMessage() {} func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{143} + return fileDescriptor_6c07b07c062484ab, []int{142} } func (m *PodPortForwardOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4084,7 +4056,7 @@ var xxx_messageInfo_PodPortForwardOptions proto.InternalMessageInfo func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} func (*PodProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{144} + return fileDescriptor_6c07b07c062484ab, []int{143} } func (m *PodProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4112,7 +4084,7 @@ var xxx_messageInfo_PodProxyOptions proto.InternalMessageInfo func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} } func (*PodReadinessGate) ProtoMessage() {} func (*PodReadinessGate) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{145} + return fileDescriptor_6c07b07c062484ab, []int{144} } func (m *PodReadinessGate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4140,7 +4112,7 @@ var xxx_messageInfo_PodReadinessGate proto.InternalMessageInfo func (m *PodResourceClaim) Reset() { *m = PodResourceClaim{} } func (*PodResourceClaim) ProtoMessage() {} func (*PodResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{146} + return fileDescriptor_6c07b07c062484ab, []int{145} } func (m *PodResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4168,7 +4140,7 @@ var xxx_messageInfo_PodResourceClaim proto.InternalMessageInfo func (m *PodResourceClaimStatus) Reset() { *m = PodResourceClaimStatus{} } func (*PodResourceClaimStatus) ProtoMessage() {} func (*PodResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{147} + return fileDescriptor_6c07b07c062484ab, []int{146} } func (m *PodResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4196,7 +4168,7 @@ var xxx_messageInfo_PodResourceClaimStatus proto.InternalMessageInfo func (m *PodSchedulingGate) Reset() { *m = PodSchedulingGate{} } func (*PodSchedulingGate) ProtoMessage() {} func (*PodSchedulingGate) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{148} + return fileDescriptor_6c07b07c062484ab, []int{147} } func (m *PodSchedulingGate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4224,7 +4196,7 @@ var xxx_messageInfo_PodSchedulingGate proto.InternalMessageInfo func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} func (*PodSecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{149} + return fileDescriptor_6c07b07c062484ab, []int{148} } func (m *PodSecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4252,7 +4224,7 @@ var xxx_messageInfo_PodSecurityContext proto.InternalMessageInfo func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} func (*PodSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{150} + return fileDescriptor_6c07b07c062484ab, []int{149} } func (m *PodSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4280,7 +4252,7 @@ var xxx_messageInfo_PodSignature proto.InternalMessageInfo func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} func (*PodSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{151} + return fileDescriptor_6c07b07c062484ab, []int{150} } func (m *PodSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4308,7 +4280,7 @@ var xxx_messageInfo_PodSpec proto.InternalMessageInfo func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} func (*PodStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{152} + return fileDescriptor_6c07b07c062484ab, []int{151} } func (m *PodStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4336,7 +4308,7 @@ var xxx_messageInfo_PodStatus proto.InternalMessageInfo func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} func (*PodStatusResult) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{153} + return fileDescriptor_6c07b07c062484ab, []int{152} } func (m *PodStatusResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4364,7 +4336,7 @@ var xxx_messageInfo_PodStatusResult proto.InternalMessageInfo func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} func (*PodTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{154} + return fileDescriptor_6c07b07c062484ab, []int{153} } func (m *PodTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4392,7 +4364,7 @@ var xxx_messageInfo_PodTemplate proto.InternalMessageInfo func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} func (*PodTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{155} + return fileDescriptor_6c07b07c062484ab, []int{154} } func (m *PodTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4420,7 +4392,7 @@ var xxx_messageInfo_PodTemplateList proto.InternalMessageInfo func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} func (*PodTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{156} + return fileDescriptor_6c07b07c062484ab, []int{155} } func (m *PodTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4448,7 +4420,7 @@ var xxx_messageInfo_PodTemplateSpec proto.InternalMessageInfo func (m *PortStatus) Reset() { *m = PortStatus{} } func (*PortStatus) ProtoMessage() {} func (*PortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{157} + return fileDescriptor_6c07b07c062484ab, []int{156} } func (m *PortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4476,7 +4448,7 @@ var xxx_messageInfo_PortStatus proto.InternalMessageInfo func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } func (*PortworxVolumeSource) ProtoMessage() {} func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{158} + return fileDescriptor_6c07b07c062484ab, []int{157} } func (m *PortworxVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4504,7 +4476,7 @@ var xxx_messageInfo_PortworxVolumeSource proto.InternalMessageInfo func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{159} + return fileDescriptor_6c07b07c062484ab, []int{158} } func (m *Preconditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4532,7 +4504,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{160} + return fileDescriptor_6c07b07c062484ab, []int{159} } func (m *PreferAvoidPodsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4560,7 +4532,7 @@ var xxx_messageInfo_PreferAvoidPodsEntry proto.InternalMessageInfo func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{161} + return fileDescriptor_6c07b07c062484ab, []int{160} } func (m *PreferredSchedulingTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4588,7 +4560,7 @@ var xxx_messageInfo_PreferredSchedulingTerm proto.InternalMessageInfo func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} func (*Probe) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{162} + return fileDescriptor_6c07b07c062484ab, []int{161} } func (m *Probe) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4616,7 +4588,7 @@ var xxx_messageInfo_Probe proto.InternalMessageInfo func (m *ProbeHandler) Reset() { *m = ProbeHandler{} } func (*ProbeHandler) ProtoMessage() {} func (*ProbeHandler) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{163} + return fileDescriptor_6c07b07c062484ab, []int{162} } func (m *ProbeHandler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4644,7 +4616,7 @@ var xxx_messageInfo_ProbeHandler proto.InternalMessageInfo func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } func (*ProjectedVolumeSource) ProtoMessage() {} func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{164} + return fileDescriptor_6c07b07c062484ab, []int{163} } func (m *ProjectedVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4672,7 +4644,7 @@ var xxx_messageInfo_ProjectedVolumeSource proto.InternalMessageInfo func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{165} + return fileDescriptor_6c07b07c062484ab, []int{164} } func (m *QuobyteVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4700,7 +4672,7 @@ var xxx_messageInfo_QuobyteVolumeSource proto.InternalMessageInfo func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} } func (*RBDPersistentVolumeSource) ProtoMessage() {} func (*RBDPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{166} + return fileDescriptor_6c07b07c062484ab, []int{165} } func (m *RBDPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4728,7 +4700,7 @@ var xxx_messageInfo_RBDPersistentVolumeSource proto.InternalMessageInfo func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} func (*RBDVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{167} + return fileDescriptor_6c07b07c062484ab, []int{166} } func (m *RBDVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4756,7 +4728,7 @@ var xxx_messageInfo_RBDVolumeSource proto.InternalMessageInfo func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} func (*RangeAllocation) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{168} + return fileDescriptor_6c07b07c062484ab, []int{167} } func (m *RangeAllocation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4784,7 +4756,7 @@ var xxx_messageInfo_RangeAllocation proto.InternalMessageInfo func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} func (*ReplicationController) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{169} + return fileDescriptor_6c07b07c062484ab, []int{168} } func (m *ReplicationController) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4812,7 +4784,7 @@ var xxx_messageInfo_ReplicationController proto.InternalMessageInfo func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{170} + return fileDescriptor_6c07b07c062484ab, []int{169} } func (m *ReplicationControllerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4840,7 +4812,7 @@ var xxx_messageInfo_ReplicationControllerCondition proto.InternalMessageInfo func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{171} + return fileDescriptor_6c07b07c062484ab, []int{170} } func (m *ReplicationControllerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4868,7 +4840,7 @@ var xxx_messageInfo_ReplicationControllerList proto.InternalMessageInfo func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{172} + return fileDescriptor_6c07b07c062484ab, []int{171} } func (m *ReplicationControllerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4896,7 +4868,7 @@ var xxx_messageInfo_ReplicationControllerSpec proto.InternalMessageInfo func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{173} + return fileDescriptor_6c07b07c062484ab, []int{172} } func (m *ReplicationControllerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4924,7 +4896,7 @@ var xxx_messageInfo_ReplicationControllerStatus proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{174} + return fileDescriptor_6c07b07c062484ab, []int{173} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4952,7 +4924,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{175} + return fileDescriptor_6c07b07c062484ab, []int{174} } func (m *ResourceFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4980,7 +4952,7 @@ var xxx_messageInfo_ResourceFieldSelector proto.InternalMessageInfo func (m *ResourceHealth) Reset() { *m = ResourceHealth{} } func (*ResourceHealth) ProtoMessage() {} func (*ResourceHealth) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{176} + return fileDescriptor_6c07b07c062484ab, []int{175} } func (m *ResourceHealth) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5008,7 +4980,7 @@ var xxx_messageInfo_ResourceHealth proto.InternalMessageInfo func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} func (*ResourceQuota) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{177} + return fileDescriptor_6c07b07c062484ab, []int{176} } func (m *ResourceQuota) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5036,7 +5008,7 @@ var xxx_messageInfo_ResourceQuota proto.InternalMessageInfo func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} func (*ResourceQuotaList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{178} + return fileDescriptor_6c07b07c062484ab, []int{177} } func (m *ResourceQuotaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5064,7 +5036,7 @@ var xxx_messageInfo_ResourceQuotaList proto.InternalMessageInfo func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{179} + return fileDescriptor_6c07b07c062484ab, []int{178} } func (m *ResourceQuotaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5092,7 +5064,7 @@ var xxx_messageInfo_ResourceQuotaSpec proto.InternalMessageInfo func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{180} + return fileDescriptor_6c07b07c062484ab, []int{179} } func (m *ResourceQuotaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5120,7 +5092,7 @@ var xxx_messageInfo_ResourceQuotaStatus proto.InternalMessageInfo func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} func (*ResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{181} + return fileDescriptor_6c07b07c062484ab, []int{180} } func (m *ResourceRequirements) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5148,7 +5120,7 @@ var xxx_messageInfo_ResourceRequirements proto.InternalMessageInfo func (m *ResourceStatus) Reset() { *m = ResourceStatus{} } func (*ResourceStatus) ProtoMessage() {} func (*ResourceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{182} + return fileDescriptor_6c07b07c062484ab, []int{181} } func (m *ResourceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5176,7 +5148,7 @@ var xxx_messageInfo_ResourceStatus proto.InternalMessageInfo func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} func (*SELinuxOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{183} + return fileDescriptor_6c07b07c062484ab, []int{182} } func (m *SELinuxOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5204,7 +5176,7 @@ var xxx_messageInfo_SELinuxOptions proto.InternalMessageInfo func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} } func (*ScaleIOPersistentVolumeSource) ProtoMessage() {} func (*ScaleIOPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{184} + return fileDescriptor_6c07b07c062484ab, []int{183} } func (m *ScaleIOPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5232,7 +5204,7 @@ var xxx_messageInfo_ScaleIOPersistentVolumeSource proto.InternalMessageInfo func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } func (*ScaleIOVolumeSource) ProtoMessage() {} func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{185} + return fileDescriptor_6c07b07c062484ab, []int{184} } func (m *ScaleIOVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5260,7 +5232,7 @@ var xxx_messageInfo_ScaleIOVolumeSource proto.InternalMessageInfo func (m *ScopeSelector) Reset() { *m = ScopeSelector{} } func (*ScopeSelector) ProtoMessage() {} func (*ScopeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{186} + return fileDescriptor_6c07b07c062484ab, []int{185} } func (m *ScopeSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5288,7 +5260,7 @@ var xxx_messageInfo_ScopeSelector proto.InternalMessageInfo func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} } func (*ScopedResourceSelectorRequirement) ProtoMessage() {} func (*ScopedResourceSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{187} + return fileDescriptor_6c07b07c062484ab, []int{186} } func (m *ScopedResourceSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5316,7 +5288,7 @@ var xxx_messageInfo_ScopedResourceSelectorRequirement proto.InternalMessageInfo func (m *SeccompProfile) Reset() { *m = SeccompProfile{} } func (*SeccompProfile) ProtoMessage() {} func (*SeccompProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{188} + return fileDescriptor_6c07b07c062484ab, []int{187} } func (m *SeccompProfile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5344,7 +5316,7 @@ var xxx_messageInfo_SeccompProfile proto.InternalMessageInfo func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{189} + return fileDescriptor_6c07b07c062484ab, []int{188} } func (m *Secret) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5372,7 +5344,7 @@ var xxx_messageInfo_Secret proto.InternalMessageInfo func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } func (*SecretEnvSource) ProtoMessage() {} func (*SecretEnvSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{190} + return fileDescriptor_6c07b07c062484ab, []int{189} } func (m *SecretEnvSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5400,7 +5372,7 @@ var xxx_messageInfo_SecretEnvSource proto.InternalMessageInfo func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} func (*SecretKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{191} + return fileDescriptor_6c07b07c062484ab, []int{190} } func (m *SecretKeySelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5428,7 +5400,7 @@ var xxx_messageInfo_SecretKeySelector proto.InternalMessageInfo func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} func (*SecretList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{192} + return fileDescriptor_6c07b07c062484ab, []int{191} } func (m *SecretList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5456,7 +5428,7 @@ var xxx_messageInfo_SecretList proto.InternalMessageInfo func (m *SecretProjection) Reset() { *m = SecretProjection{} } func (*SecretProjection) ProtoMessage() {} func (*SecretProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{193} + return fileDescriptor_6c07b07c062484ab, []int{192} } func (m *SecretProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5484,7 +5456,7 @@ var xxx_messageInfo_SecretProjection proto.InternalMessageInfo func (m *SecretReference) Reset() { *m = SecretReference{} } func (*SecretReference) ProtoMessage() {} func (*SecretReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{194} + return fileDescriptor_6c07b07c062484ab, []int{193} } func (m *SecretReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5512,7 +5484,7 @@ var xxx_messageInfo_SecretReference proto.InternalMessageInfo func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} func (*SecretVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{195} + return fileDescriptor_6c07b07c062484ab, []int{194} } func (m *SecretVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5540,7 +5512,7 @@ var xxx_messageInfo_SecretVolumeSource proto.InternalMessageInfo func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} func (*SecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{196} + return fileDescriptor_6c07b07c062484ab, []int{195} } func (m *SecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5568,7 +5540,7 @@ var xxx_messageInfo_SecurityContext proto.InternalMessageInfo func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} func (*SerializedReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{197} + return fileDescriptor_6c07b07c062484ab, []int{196} } func (m *SerializedReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5596,7 +5568,7 @@ var xxx_messageInfo_SerializedReference proto.InternalMessageInfo func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{198} + return fileDescriptor_6c07b07c062484ab, []int{197} } func (m *Service) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5624,7 +5596,7 @@ var xxx_messageInfo_Service proto.InternalMessageInfo func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} func (*ServiceAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{199} + return fileDescriptor_6c07b07c062484ab, []int{198} } func (m *ServiceAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5652,7 +5624,7 @@ var xxx_messageInfo_ServiceAccount proto.InternalMessageInfo func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} func (*ServiceAccountList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{200} + return fileDescriptor_6c07b07c062484ab, []int{199} } func (m *ServiceAccountList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5680,7 +5652,7 @@ var xxx_messageInfo_ServiceAccountList proto.InternalMessageInfo func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} } func (*ServiceAccountTokenProjection) ProtoMessage() {} func (*ServiceAccountTokenProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{201} + return fileDescriptor_6c07b07c062484ab, []int{200} } func (m *ServiceAccountTokenProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5708,7 +5680,7 @@ var xxx_messageInfo_ServiceAccountTokenProjection proto.InternalMessageInfo func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} func (*ServiceList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{202} + return fileDescriptor_6c07b07c062484ab, []int{201} } func (m *ServiceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5736,7 +5708,7 @@ var xxx_messageInfo_ServiceList proto.InternalMessageInfo func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} func (*ServicePort) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{203} + return fileDescriptor_6c07b07c062484ab, []int{202} } func (m *ServicePort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5764,7 +5736,7 @@ var xxx_messageInfo_ServicePort proto.InternalMessageInfo func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{204} + return fileDescriptor_6c07b07c062484ab, []int{203} } func (m *ServiceProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5792,7 +5764,7 @@ var xxx_messageInfo_ServiceProxyOptions proto.InternalMessageInfo func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} func (*ServiceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{205} + return fileDescriptor_6c07b07c062484ab, []int{204} } func (m *ServiceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5820,7 +5792,7 @@ var xxx_messageInfo_ServiceSpec proto.InternalMessageInfo func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} func (*ServiceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{206} + return fileDescriptor_6c07b07c062484ab, []int{205} } func (m *ServiceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5848,7 +5820,7 @@ var xxx_messageInfo_ServiceStatus proto.InternalMessageInfo func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } func (*SessionAffinityConfig) ProtoMessage() {} func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{207} + return fileDescriptor_6c07b07c062484ab, []int{206} } func (m *SessionAffinityConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5876,7 +5848,7 @@ var xxx_messageInfo_SessionAffinityConfig proto.InternalMessageInfo func (m *SleepAction) Reset() { *m = SleepAction{} } func (*SleepAction) ProtoMessage() {} func (*SleepAction) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{208} + return fileDescriptor_6c07b07c062484ab, []int{207} } func (m *SleepAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5904,7 +5876,7 @@ var xxx_messageInfo_SleepAction proto.InternalMessageInfo func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } func (*StorageOSPersistentVolumeSource) ProtoMessage() {} func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{209} + return fileDescriptor_6c07b07c062484ab, []int{208} } func (m *StorageOSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5932,7 +5904,7 @@ var xxx_messageInfo_StorageOSPersistentVolumeSource proto.InternalMessageInfo func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } func (*StorageOSVolumeSource) ProtoMessage() {} func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{210} + return fileDescriptor_6c07b07c062484ab, []int{209} } func (m *StorageOSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5960,7 +5932,7 @@ var xxx_messageInfo_StorageOSVolumeSource proto.InternalMessageInfo func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} func (*Sysctl) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{211} + return fileDescriptor_6c07b07c062484ab, []int{210} } func (m *Sysctl) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5988,7 +5960,7 @@ var xxx_messageInfo_Sysctl proto.InternalMessageInfo func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} func (*TCPSocketAction) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{212} + return fileDescriptor_6c07b07c062484ab, []int{211} } func (m *TCPSocketAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6016,7 +5988,7 @@ var xxx_messageInfo_TCPSocketAction proto.InternalMessageInfo func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} func (*Taint) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{213} + return fileDescriptor_6c07b07c062484ab, []int{212} } func (m *Taint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6044,7 +6016,7 @@ var xxx_messageInfo_Taint proto.InternalMessageInfo func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} func (*Toleration) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{214} + return fileDescriptor_6c07b07c062484ab, []int{213} } func (m *Toleration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6072,7 +6044,7 @@ var xxx_messageInfo_Toleration proto.InternalMessageInfo func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} } func (*TopologySelectorLabelRequirement) ProtoMessage() {} func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{215} + return fileDescriptor_6c07b07c062484ab, []int{214} } func (m *TopologySelectorLabelRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6100,7 +6072,7 @@ var xxx_messageInfo_TopologySelectorLabelRequirement proto.InternalMessageInfo func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } func (*TopologySelectorTerm) ProtoMessage() {} func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{216} + return fileDescriptor_6c07b07c062484ab, []int{215} } func (m *TopologySelectorTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6128,7 +6100,7 @@ var xxx_messageInfo_TopologySelectorTerm proto.InternalMessageInfo func (m *TopologySpreadConstraint) Reset() { *m = TopologySpreadConstraint{} } func (*TopologySpreadConstraint) ProtoMessage() {} func (*TopologySpreadConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{217} + return fileDescriptor_6c07b07c062484ab, []int{216} } func (m *TopologySpreadConstraint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6156,7 +6128,7 @@ var xxx_messageInfo_TopologySpreadConstraint proto.InternalMessageInfo func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} } func (*TypedLocalObjectReference) ProtoMessage() {} func (*TypedLocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{218} + return fileDescriptor_6c07b07c062484ab, []int{217} } func (m *TypedLocalObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6184,7 +6156,7 @@ var xxx_messageInfo_TypedLocalObjectReference proto.InternalMessageInfo func (m *TypedObjectReference) Reset() { *m = TypedObjectReference{} } func (*TypedObjectReference) ProtoMessage() {} func (*TypedObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{219} + return fileDescriptor_6c07b07c062484ab, []int{218} } func (m *TypedObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6212,7 +6184,7 @@ var xxx_messageInfo_TypedObjectReference proto.InternalMessageInfo func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{220} + return fileDescriptor_6c07b07c062484ab, []int{219} } func (m *Volume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6240,7 +6212,7 @@ var xxx_messageInfo_Volume proto.InternalMessageInfo func (m *VolumeDevice) Reset() { *m = VolumeDevice{} } func (*VolumeDevice) ProtoMessage() {} func (*VolumeDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{221} + return fileDescriptor_6c07b07c062484ab, []int{220} } func (m *VolumeDevice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6268,7 +6240,7 @@ var xxx_messageInfo_VolumeDevice proto.InternalMessageInfo func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} func (*VolumeMount) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{222} + return fileDescriptor_6c07b07c062484ab, []int{221} } func (m *VolumeMount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6296,7 +6268,7 @@ var xxx_messageInfo_VolumeMount proto.InternalMessageInfo func (m *VolumeMountStatus) Reset() { *m = VolumeMountStatus{} } func (*VolumeMountStatus) ProtoMessage() {} func (*VolumeMountStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{223} + return fileDescriptor_6c07b07c062484ab, []int{222} } func (m *VolumeMountStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6324,7 +6296,7 @@ var xxx_messageInfo_VolumeMountStatus proto.InternalMessageInfo func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} } func (*VolumeNodeAffinity) ProtoMessage() {} func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{224} + return fileDescriptor_6c07b07c062484ab, []int{223} } func (m *VolumeNodeAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6352,7 +6324,7 @@ var xxx_messageInfo_VolumeNodeAffinity proto.InternalMessageInfo func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } func (*VolumeProjection) ProtoMessage() {} func (*VolumeProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{225} + return fileDescriptor_6c07b07c062484ab, []int{224} } func (m *VolumeProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6380,7 +6352,7 @@ var xxx_messageInfo_VolumeProjection proto.InternalMessageInfo func (m *VolumeResourceRequirements) Reset() { *m = VolumeResourceRequirements{} } func (*VolumeResourceRequirements) ProtoMessage() {} func (*VolumeResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{226} + return fileDescriptor_6c07b07c062484ab, []int{225} } func (m *VolumeResourceRequirements) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6408,7 +6380,7 @@ var xxx_messageInfo_VolumeResourceRequirements proto.InternalMessageInfo func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} func (*VolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{227} + return fileDescriptor_6c07b07c062484ab, []int{226} } func (m *VolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6436,7 +6408,7 @@ var xxx_messageInfo_VolumeSource proto.InternalMessageInfo func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{228} + return fileDescriptor_6c07b07c062484ab, []int{227} } func (m *VsphereVirtualDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6464,7 +6436,7 @@ var xxx_messageInfo_VsphereVirtualDiskVolumeSource proto.InternalMessageInfo func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{229} + return fileDescriptor_6c07b07c062484ab, []int{228} } func (m *WeightedPodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6492,7 +6464,7 @@ var xxx_messageInfo_WeightedPodAffinityTerm proto.InternalMessageInfo func (m *WindowsSecurityContextOptions) Reset() { *m = WindowsSecurityContextOptions{} } func (*WindowsSecurityContextOptions) ProtoMessage() {} func (*WindowsSecurityContextOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_6c07b07c062484ab, []int{230} + return fileDescriptor_6c07b07c062484ab, []int{229} } func (m *WindowsSecurityContextOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -6645,7 +6617,6 @@ func init() { proto.RegisterType((*NodeStatus)(nil), "k8s.io.api.core.v1.NodeStatus") proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.NodeStatus.AllocatableEntry") proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.NodeStatus.CapacityEntry") - proto.RegisterType((*NodeSwapStatus)(nil), "k8s.io.api.core.v1.NodeSwapStatus") proto.RegisterType((*NodeSystemInfo)(nil), "k8s.io.api.core.v1.NodeSystemInfo") proto.RegisterType((*ObjectFieldSelector)(nil), "k8s.io.api.core.v1.ObjectFieldSelector") proto.RegisterType((*ObjectReference)(nil), "k8s.io.api.core.v1.ObjectReference") @@ -6787,1020 +6758,1015 @@ func init() { } var fileDescriptor_6c07b07c062484ab = []byte{ - // 16206 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x69, 0x90, 0x1c, 0xc9, - 0x75, 0x30, 0xc6, 0xea, 0x9e, 0xf3, 0xcd, 0x9d, 0xb8, 0x06, 0xb3, 0x00, 0x1a, 0x5b, 0xbb, 0x8b, - 0xc5, 0x5e, 0x03, 0x62, 0x0f, 0x2e, 0xb8, 0xbb, 0x5c, 0xed, 0x9c, 0x40, 0x2f, 0x30, 0x83, 0xde, - 0xec, 0x01, 0x40, 0x2e, 0x97, 0x14, 0x0b, 0xdd, 0x39, 0x33, 0xc5, 0xe9, 0xae, 0xea, 0xad, 0xaa,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9a, 0xae, 0xe7, 0xd0, 0x43, 0x4c, 0x3c, 0x09, 0x99, 0x66, 0x7c, 0x8c, 0xad, - 0xae, 0x33, 0x62, 0x36, 0x8e, 0xaf, 0x65, 0x62, 0xe1, 0x9c, 0xda, 0xe8, 0x2e, 0x4c, 0x67, 0x40, - 0xf8, 0xba, 0x3d, 0xca, 0x28, 0xbf, 0x26, 0x28, 0x4f, 0xaf, 0xe5, 0xe0, 0xed, 0x77, 0x80, 0xe1, - 0x5c, 0xea, 0xe8, 0x3a, 0x4c, 0xb0, 0x93, 0xb3, 0xd2, 0x6e, 0x34, 0x44, 0x83, 0xe3, 0xac, 0xc1, - 0x27, 0x24, 0x1f, 0x51, 0x36, 0xc1, 0xfb, 0xbb, 0x25, 0x88, 0xff, 0xe1, 0x64, 0x6d, 0x74, 0x9b, - 0x29, 0x61, 0xdb, 0x81, 0x1b, 0xed, 0xd0, 0x5d, 0x45, 0xee, 0x46, 0xd3, 0x13, 0x1d, 0x05, 0x52, - 0x3a, 0xaa, 0xd2, 0xd4, 0xea, 0x85, 0x38, 0x49, 0x90, 0x5e, 0x05, 0x61, 0x54, 0x77, 0xbd, 0xe9, - 0x49, 0xfe, 0x9e, 0x92, 0x27, 0x69, 0x95, 0x16, 0x62, 0x0e, 0x63, 0x0a, 0x58, 0xfa, 0xe3, 0x3a, - 0xbd, 0x71, 0xa7, 0x18, 0x62, 0xac, 0x80, 0x95, 0x00, 0x1c, 0xe3, 0x50, 0x26, 0x38, 0x8a, 0x76, - 0xa6, 0x11, 0x43, 0x55, 0x07, 0xe2, 0xda, 0xda, 0x27, 0x30, 0x2d, 0xb7, 0x6f, 0xc3, 0xb8, 0x3a, - 0x26, 0xd8, 0x98, 0xa0, 0x12, 0xf4, 0x33, 0xb6, 0x4f, 0x88, 0x4f, 0x87, 0x69, 0x17, 0x18, 0x4b, - 0x88, 0x79, 0x39, 0xeb, 0x82, 0x7b, 0x8f, 0xcc, 0xef, 0x44, 0x84, 0xcb, 0x22, 0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 0xd5, 0x8c, 0xfd, 0xfb, - 0x43, 0xd0, 0xbf, 0xb4, 0x4d, 0xbc, 0xe8, 0x10, 0x9e, 0x36, 0x35, 0x18, 0x77, 0xbd, 0x6d, 0xbf, - 0xb1, 0x4d, 0xea, 0x1c, 0x7e, 0x90, 0x17, 0xf8, 0x71, 0x41, 0x7a, 0xbc, 0x6c, 0x90, 0xc0, 0x09, - 0x92, 0x0f, 0x43, 0xbb, 0x74, 0x19, 0x06, 0xf8, 0xe5, 0x23, 0x54, 0x4b, 0x99, 0x67, 0x36, 0x1b, - 0x44, 0x71, 0xa5, 0xc6, 0x9a, 0x2f, 0x7e, 0xb9, 0x89, 0xea, 0xe8, 0xb3, 0x30, 0xbe, 0xee, 0x06, - 0x61, 0xb4, 0xe6, 0x36, 0xe9, 0xd5, 0xd0, 0x6c, 0xdd, 0x87, 0x36, 0x49, 0x8d, 0xc3, 0xb2, 0x41, - 0x09, 0x27, 0x28, 0xa3, 0x0d, 0x18, 0x6b, 0x38, 0x7a, 0x53, 0x83, 0x07, 0x6e, 0x4a, 0xdd, 0x0e, - 0xd7, 0x74, 0x42, 0xd8, 0xa4, 0x4b, 0xb7, 0x53, 0x8d, 0x29, 0x44, 0x86, 0x98, 0x38, 0x43, 0x6d, - 0x27, 0xae, 0x09, 0xe1, 0x30, 0xca, 0xa0, 0x31, 0x47, 0x85, 0x61, 0x93, 0x41, 0xd3, 0xdc, 0x11, - 0x3e, 0x03, 0xc3, 0x84, 0x0e, 0x21, 0x25, 0x2c, 0x2e, 0x98, 0x0b, 0xbd, 0xf5, 0x75, 0xc5, 0xad, - 0x05, 0xbe, 0xa9, 0xc7, 0x5b, 0x92, 0x94, 0x70, 0x4c, 0x14, 0x2d, 0xc0, 0x40, 0x48, 0x02, 0x57, - 0xe9, 0x0a, 0x3a, 0x4c, 0x23, 0x43, 0xe3, 0xce, 0x90, 0xfc, 0x37, 0x16, 0x55, 0xe9, 0xf2, 0x72, - 0x98, 0x28, 0x96, 0x5d,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 0xbf, 0xf1, 0xec, - 0x7f, 0xec, 0x83, 0x47, 0xca, 0xd5, 0xfc, 0xa8, 0x56, 0x97, 0x60, 0x94, 0xb3, 0x8b, 0x74, 0x69, - 0x38, 0x0d, 0xd1, 0xae, 0x92, 0x80, 0xae, 0x69, 0x30, 0x6c, 0x60, 0xa2, 0xd3, 0x50, 0x74, 0xdf, - 0xf5, 0x92, 0xae, 0x99, 0xe5, 0xb7, 0x56, 0x31, 0x2d, 0xa7, 0x60, 0xca, 0x79, 0xf2, 0x23, 0x5d, - 0x81, 0x15, 0xf7, 0xf9, 0x3a, 0x8c, 0xbb, 0x61, 0x2d, 0x74, 0xcb, 0x1e, 0xdd, 0xa7, 0xda, 0x4e, - 0x57, 0x32, 0x07, 0xda, 0x69, 0x05, 0xc5, 0x09, 0x6c, 0xed, 0x7e, 0xe9, 0xef, 0x99, 0x7b, 0xed, - 0x1a, 0x53, 0x83, 0x1e, 0xff, 0x2d, 0xf6, 0x75, 0x21, 0x13, 0xc1, 0x8b, 0xe3, 0x9f, 0x7f, 0x70, - 0x88, 0x25, 0x8c, 0x3e, 0xe8, 0x6a, 0x9b, 0x4e, 0x6b, 0xae, 0x1d, 0x6d, 0x2e, 0xba, 0x61, 0xcd, - 0xdf, 0x26, 0xc1, 0x0e, 0x7b, 0x8b, 0x0f, 0xc5, 0x0f, 0x3a, 0x05, 0x58, 0xb8, 0x32, 0x57, 0xa1, - 0x98, 0x38, 0x5d, 0x07, 0xcd, 0xc1, 0x84, 0x2c, 0xac, 0x92, 0x90, 0x5d, 0x01, 0x23, 0x8c, 0x8c, - 0x72, 0x96, 0x14, 0xc5, 0x8a, 0x48, 0x12, 0xdf, 0x64, 0x70, 0xe1, 0x41, 0x30, 0xb8, 0x2f, 0xc3, - 0x98, 0xeb, 0xb9, 0x91, 0xeb, 0x44, 0x3e, 0xd7, 0x1f, 0xf1, 0x67, 0x37, 0x13, 0x30, 0x97, 0x75, - 0x00, 0x36, 0xf1, 0xec, 0xff, 0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- 0xab, 0xaa, 0x63, 0x93, 0x5a, 0x6f, 0xe1, 0xba, 0x3f, 0x07, 0x2c, 0x17, 0x8a, 0x19, 0xcd, 0x20, - 0x44, 0x04, 0x26, 0x44, 0xdc, 0x53, 0x59, 0x26, 0xc6, 0x2e, 0xf3, 0xf9, 0x6d, 0xd6, 0x8e, 0x35, - 0x40, 0x57, 0x4d, 0x12, 0x38, 0x49, 0xd3, 0xde, 0xe4, 0x87, 0xf0, 0x32, 0x71, 0xa2, 0x76, 0x40, - 0x42, 0xf4, 0x71, 0x98, 0x4e, 0xbf, 0x8c, 0x85, 0x22, 0xc5, 0x62, 0xdc, 0xf3, 0xa9, 0xbd, 0xdd, - 0xd2, 0x74, 0x35, 0x07, 0x07, 0xe7, 0xd6, 0xb6, 0x7f, 0xcd, 0x02, 0xe6, 0x43, 0x7e, 0x08, 0x9c, - 0xcf, 0xc7, 0x4c, 0xce, 0x67, 0x3a, 0x6f, 0x3a, 0x73, 0x98, 0x9e, 0x17, 0xf9, 0x1a, 0xae, 0x04, - 0xfe, 0xdd, 0x1d, 0x61, 0xf5, 0xd5, 0xfd, 0x19, 0x67, 0x7f, 0xd9, 0x02, 0x96, 0x38, 0x08, 0xf3, - 0x57, 0xbb, 0x54, 0x70, 0x74, 0x37, 0x68, 0xf8, 0x38, 0x0c, 0xad, 0x8b, 0xe1, 0xcf, 0x10, 0x3a, - 0x19, 0x1d, 0x36, 0x69, 0xcb, 0x49, 0x13, 0xbe, 0xa0, 0xe2, 0x1f, 0x56, 0xd4, 0xec, 0xff, 0xd2, - 0x82, 0x99, 0xfc, 0x6a, 0xe8, 0x06, 0x9c, 0x08, 0x48, 0xad, 0x1d, 0x84, 0x74, 0x4b, 0x88, 0x07, - 0x90, 0x70, 0xa7, 0xe2, 0x53, 0xfd, 0xc8, 0xde, 0x6e, 0xe9, 0x04, 0xce, 0x46, 0xc1, 0x79, 0x75, - 0xd1, 0x2b, 0x30, 0xde, 0x0e, 0x39, 0xe7, 0xc7, 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x03, 0x76, 0x1b, 0xf1, 0x12, 0x2c, 0xea, 0x23, - 0x17, 0x26, 0x02, 0x83, 0xbd, 0x90, 0x21, 0xde, 0xce, 0xf5, 0xc6, 0xc4, 0x68, 0xc9, 0x03, 0x4c, - 0x32, 0x38, 0x49, 0x17, 0xbd, 0xa9, 0x31, 0x4a, 0x63, 0x9d, 0x5f, 0xfe, 0xdd, 0x58, 0xa3, 0x99, - 0x2d, 0x18, 0x33, 0x0e, 0x9b, 0x87, 0xaa, 0x82, 0xf4, 0x60, 0x32, 0x79, 0xb2, 0x3c, 0x54, 0xcd, - 0xe3, 0x2b, 0x30, 0xce, 0x36, 0xc2, 0x1d, 0xa7, 0x25, 0x8e, 0xe2, 0xf3, 0xc6, 0x51, 0x6c, 0x9d, - 0x2f, 0xf2, 0x81, 0x91, 0x43, 0x10, 0x1f, 0x9c, 0xf6, 0xaf, 0xf4, 0x8b, 0xca, 0x6a, 0x17, 0xa1, - 0x0b, 0x30, 0x2c, 0x3a, 0xa0, 0x32, 0x70, 0xa9, 0x83, 0x61, 0x45, 0x02, 0x70, 0x8c, 0xc3, 0x12, - 0xaf, 0xb1, 0xea, 0x9a, 0x87, 0x42, 0x9c, 0x78, 0x4d, 0x41, 0xb0, 0x86, 0x45, 0x1f, 0xbf, 0xb7, - 0x7d, 0x3f, 0x52, 0x77, 0xb0, 0xda, 0x6a, 0xf3, 0xac, 0x14, 0x0b, 0x28, 0xbd, 0x7b, 0xb7, 0x48, - 0xe0, 0x91, 0x86, 0x99, 0x82, 0x42, 0xdd, 0xbd, 0x57, 0x75, 0x20, 0x36, 0x71, 0x29, 0x07, 0xe1, - 0x87, 0x6c, 0xef, 0x8a, 0x27, 0x76, 0xec, 0xf1, 0x51, 0xe5, 0xb1, 0x2b, 0x24, 0x1c, 0x7d, 0x02, - 0x4e, 0xa8, 0x70, 0x8f, 0x62, 0x65, 0xca, 0x16, 0x07, 0x0c, 0x89, 0xd8, 0x89, 0x85, 0x6c, 0x34, - 0x9c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8, 0x64, 0x35, 0x49, 0x11, 0xa7, - 0x1b, 0x41, 0xaf, 0xc0, 0x38, 0xb3, 0x9d, 0x66, 0xf5, 0xaf, 0x92, 0x1d, 0x19, 0xa9, 0x99, 0x71, - 0xd8, 0x2b, 0x06, 0x04, 0x27, 0x30, 0xd1, 0x02, 0x4c, 0x35, 0xdd, 0x30, 0x51, 0x7d, 0x80, 0x55, - 0x67, 0x1d, 0x58, 0x49, 0x02, 0x71, 0x1a, 0xdf, 0xfe, 0x75, 0x31, 0xc7, 0x5e, 0xe4, 0x7e, 0xb0, - 0x1d, 0xdf, 0xdf, 0xdb, 0xf1, 0x9b, 0x16, 0x4c, 0xd2, 0xd6, 0x99, 0x41, 0xa8, 0x64, 0xa4, 0x54, - 0x2e, 0x0f, 0xab, 0x43, 0x2e, 0x8f, 0x73, 0xf4, 0xd8, 0xae, 0xfb, 0xed, 0x48, 0x48, 0x47, 0xb5, - 0x73, 0x99, 0x96, 0x62, 0x01, 0x15, 0x78, 0x24, 0x08, 0x84, 0xd7, 0xbd, 0x8e, 0x47, 0x82, 0x00, - 0x0b, 0xa8, 0x4c, 0xf5, 0xd1, 0x97, 0x9d, 0xea, 0x83, 0x47, 0x6c, 0x17, 0x76, 0x74, 0x82, 0xa5, - 0xd5, 0x22, 0xb6, 0x4b, 0x03, 0xbb, 0x18, 0xc7, 0xfe, 0x76, 0x11, 0x46, 0x2b, 0x7e, 0x3d, 0x36, - 0xec, 0x78, 0xd1, 0x30, 0xec, 0x38, 0x9b, 0x30, 0xec, 0x98, 0xd4, 0x71, 0x35, 0x33, 0x8e, 0x37, - 0x01, 0xf9, 0x22, 0x90, 0xfc, 0x65, 0xe2, 0x31, 0xbb, 0x37, 0x61, 0xa8, 0x57, 0x8c, 0xcd, 0x1e, - 0xae, 0xa7, 0x30, 0x70, 0x46, 0xad, 0x0f, 0x4c, 0x42, 0x0e, 0xd7, 0x24, 0xe4, 0x4f, 0x2c, 0xb6, - 0x02, 0x16, 0x57, 0xab,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70, - 0x98, 0x8d, 0x92, 0xcb, 0x6e, 0x23, 0x8d, 0xa9, 0x7d, 0x74, 0x6f, 0xb7, 0x74, 0x7a, 0xad, 0x13, - 0x22, 0xee, 0x4c, 0x07, 0x5d, 0x87, 0x63, 0x3c, 0x16, 0xcd, 0x22, 0x71, 0xea, 0x0d, 0xd7, 0x53, - 0x5c, 0x33, 0x3f, 0xbb, 0x4e, 0xee, 0xed, 0x96, 0x8e, 0xcd, 0x65, 0x21, 0xe0, 0xec, 0x7a, 0xe8, - 0x35, 0x18, 0xae, 0x7b, 0xf2, 0x94, 0x1d, 0x30, 0x32, 0xe1, 0x0e, 0x2f, 0xae, 0x56, 0xd5, 0xf7, - 0xc7, 0x7f, 0x70, 0x5c, 0x01, 0x6d, 0x70, 0x15, 0x98, 0x92, 0x5b, 0x0e, 0xa6, 0x42, 0x94, 0x26, - 0x45, 0xfb, 0x46, 0x70, 0x07, 0xae, 0xfb, 0x55, 0x0e, 0x80, 0x46, 0xdc, 0x07, 0x83, 0x30, 0x7a, - 0x13, 0x90, 0xc8, 0xb8, 0x34, 0x57, 0x63, 0x09, 0x02, 0x35, 0xbb, 0x54, 0x25, 0x42, 0xa8, 0xa6, - 0x30, 0x70, 0x46, 0x2d, 0x74, 0x85, 0x1e, 0x8f, 0x7a, 0xa9, 0x38, 0x7e, 0x55, 0xbe, 0xf5, 0x45, - 0xd2, 0x0a, 0x08, 0x33, 0xa5, 0x34, 0x29, 0xe2, 0x44, 0x3d, 0x54, 0x87, 0x53, 0x4e, 0x3b, 0xf2, - 0x99, 0x76, 0xd1, 0x44, 0x5d, 0xf3, 0xb7, 0x88, 0xc7, 0x14, 0xfb, 0x43, 0x2c, 0xf4, 0xe9, 0xa9, - 0xb9, 0x0e, 0x78, 0xb8, 0x23, 0x15, 0xfa, 0x9c, 0xa2, 0x63, 0xa1, 0x29, 0xfe, 0x0c, 0x3f, 0x75, - 0xae, 0x0d, 0x97, 0x18, 0xe8, 0x25, 0x18, 0xd9, 0xf4, 0xc3, 0x68, 0x95, 0x44, 0x77, 0xfc, 0x60, - 0x4b, 0xa4, 0x78, 0x88, 0xd3, 0xea, 0xc4, 0x20, 0xac, 0xe3, 0xa1, 0xa7, 0x60, 0x90, 0x99, 0x9d, - 0x95, 0x17, 0xd9, 0x5d, 0x3b, 0x14, 0x9f, 0x31, 0x57, 0x78, 0x31, 0x96, 0x70, 0x89, 0x5a, 0xae, - 0x2c, 0xb0, 0xe3, 0x38, 0x81, 0x5a, 0xae, 0x2c, 0x60, 0x09, 0xa7, 0xcb, 0x35, 0xdc, 0x74, 0x02, - 0x52, 0x09, 0xfc, 0x1a, 0x09, 0xb5, 0x64, 0x4e, 0x8f, 0xf0, 0x04, 0x16, 0x74, 0xb9, 0x56, 0xb3, - 0x10, 0x70, 0x76, 0x3d, 0x44, 0xd2, 0x29, 0x8a, 0xc7, 0xf3, 0xd5, 0xae, 0x69, 0x76, 0xb0, 0xc7, - 0x2c, 0xc5, 0x1e, 0x4c, 0xaa, 0xe4, 0xc8, 0x3c, 0x65, 0x45, 0x38, 0x3d, 0xc1, 0xd6, 0x76, 0xef, - 0xf9, 0x2e, 0x94, 0x22, 0xbb, 0x9c, 0xa0, 0x84, 0x53, 0xb4, 0x8d, 0xd8, 0xba, 0x93, 0x5d, 0x63, - 0xeb, 0x5e, 0x80, 0xe1, 0xb0, 0x7d, 0xbb, 0xee, 0x37, 0x1d, 0xd7, 0x63, 0xd6, 0x3b, 0xda, 0xc3, - 0xbd, 0x2a, 0x01, 0x38, 0xc6, 0x41, 0xcb, 0x30, 0xe4, 0x48, 0x2d, 0x35, 0xca, 0x0f, 0x1b, 0xa8, - 0x74, 0xd3, 0x3c, 0x92, 0x96, 0xd4, 0x4b, 0xab, 0xba, 0xe8, 0x55, 0x18, 0x13, 0xa1, 0x49, 0x78, - 0x14, 0x1e, 0x66, 0x5d, 0xa3, 0x39, 0x53, 0x57, 0x75, 0x20, 0x36, 0x71, 0xd1, 0x0d, 0x18, 0x89, - 0x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90, 0x04, 0x70, 0x4c, 0x0b, 0xdd, 0x85, 0x63, 0xc6, 0x93, 0x59, 0x79, 0x08, 0x42, 0xbe, - 0x91, 0x42, 0x02, 0x79, 0xfe, 0xb4, 0xe8, 0xf4, 0xb1, 0x72, 0x16, 0x25, 0x9c, 0xdd, 0x00, 0x6a, - 0xc0, 0x54, 0x2d, 0xd5, 0xea, 0x50, 0xef, 0xad, 0xaa, 0x75, 0x91, 0x6e, 0x31, 0x4d, 0x18, 0xbd, - 0x0a, 0x43, 0xef, 0xfa, 0xdc, 0xa0, 0x50, 0xbc, 0x9e, 0x64, 0x7c, 0x9b, 0xa1, 0xb7, 0xae, 0x57, - 0x59, 0xf9, 0xfe, 0x6e, 0x69, 0xa4, 0xe2, 0xd7, 0xe5, 0x5f, 0xac, 0x2a, 0xa0, 0x1f, 0xb3, 0x60, - 0x26, 0xfd, 0x26, 0x57, 0x9d, 0x1e, 0xeb, 0xbd, 0xd3, 0xb6, 0x68, 0x74, 0x66, 0x29, 0x97, 0x1c, - 0xee, 0xd0, 0x14, 0xfa, 0x28, 0xdd, 0x4f, 0xa1, 0x7b, 0x8f, 0x88, 0x84, 0xfe, 0x8f, 0xc6, 0xfb, - 0x89, 0x96, 0xee, 0xef, 0x96, 0x26, 0xf8, 0xe1, 0xed, 0xde, 0x53, 0x59, 0x08, 0x78, 0x05, 0xf4, - 0x83, 0x70, 0x2c, 0x48, 0xcb, 0xc8, 0x89, 0x7c, 0x27, 0x3c, 0xdd, 0xcb, 0x45, 0x90, 0x9c, 0x70, - 0x9c, 0x45, 0x10, 0x67, 0xb7, 0x63, 0xff, 0xa1, 0xc5, 0x74, 0x23, 0xa2, 0x5b, 0x24, 0x6c, 0x37, - 0xa2, 0x43, 0x30, 0xe2, 0x5b, 0x32, 0x6c, 0x13, 0xee, 0xdb, 0x0a, 0xef, 0xbf, 0xb3, 0x98, 0x15, - 0xde, 0x21, 0xfa, 0x13, 0xbe, 0x05, 0x43, 0x91, 0x68, 0x4d, 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, 0x13, 0xbc, 0x33, - 0x4b, 0xde, 0xb6, 0xb8, 0x0d, 0xee, 0xc1, 0xd1, 0x46, 0xc6, 0xa9, 0x2c, 0xa6, 0xbf, 0xf7, 0x53, - 0x5c, 0x89, 0x21, 0xb3, 0xa0, 0x38, 0xb3, 0x0d, 0x74, 0x9e, 0xee, 0x38, 0x7a, 0xea, 0x3a, 0x0d, - 0x11, 0x99, 0x64, 0x94, 0xef, 0x36, 0x5e, 0x86, 0x15, 0xd4, 0xfe, 0x5b, 0x0b, 0xa6, 0x78, 0xcf, - 0xaf, 0x92, 0x1d, 0x75, 0x36, 0x7d, 0x27, 0xfb, 0x2e, 0xd2, 0x84, 0x17, 0x72, 0xd2, 0x84, 0xeb, - 0x9f, 0x56, 0xec, 0xf8, 0x69, 0x5f, 0xb5, 0x40, 0xac, 0x90, 0x43, 0x90, 0xb4, 0x7c, 0x9f, 0x29, - 0x69, 0x99, 0xc9, 0xdf, 0x04, 0x39, 0x22, 0x96, 0x7f, 0xb3, 0x60, 0x92, 0x23, 0xc4, 0x56, 0x10, - 0xdf, 0xd1, 0x79, 0x98, 0x37, 0xbf, 0x28, 0xd3, 0xac, 0xf5, 0x2a, 0xd9, 0x59, 0xf3, 0x2b, 0x4e, - 0xb4, 0x99, 0xfd, 0x51, 0xc6, 0x64, 0xf5, 0x75, 0x9c, 0xac, 0xba, 0xdc, 0x40, 0x46, 0x42, 0xc8, - 0x2e, 0x02, 0xe0, 0x83, 0x26, 0x84, 0xb4, 0xff, 0xd1, 0x02, 0xc4, 0x9b, 0x31, 0x18, 0x37, 0xca, - 0x0e, 0xb1, 0x52, 0xed, 0xa2, 0x8b, 0x8f, 0x26, 0x05, 0xc1, 0x1a, 0xd6, 0x03, 0x19, 0x9e, 0x84, - 0x29, 0x4b, 0xb1, 0xbb, 0x29, 0xcb, 0x01, 0x46, 0xf4, 0xab, 0x83, 0x90, 0x74, 0xeb, 0x44, 0x37, - 0x61, 0xb4, 0xe6, 0xb4, 0x9c,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8, 0x41, 0xd4, 0x03, 0x97, 0x78, 0xff, 0x6e, 0x2f, 0x17, 0x61, 0xc4, 0x69, - 0xb5, 0x24, 0x40, 0xda, 0x2f, 0xb2, 0x14, 0x16, 0x71, 0x31, 0xd6, 0x71, 0x94, 0x17, 0x4e, 0x31, - 0xd7, 0x0b, 0xa7, 0x0e, 0x10, 0x39, 0xc1, 0x06, 0x89, 0x68, 0x99, 0x30, 0xb7, 0xce, 0x3f, 0x6f, - 0xda, 0x91, 0xdb, 0x98, 0x75, 0xbd, 0x28, 0x8c, 0x82, 0xd9, 0xb2, 0x17, 0x5d, 0x0f, 0xf8, 0x33, - 0x55, 0x0b, 0xc0, 0xa8, 0x68, 0x61, 0x8d, 0xae, 0x0c, 0x91, 0xc2, 0xda, 0xe8, 0x37, 0x0d, 0x61, - 0x56, 0x45, 0x39, 0x56, 0x18, 0xf6, 0xcb, 0xec, 0xf6, 0x61, 0x63, 0x7a, 0xb0, 0xc0, 0x82, 0xff, - 0x34, 0xaa, 0x66, 0x83, 0xa9, 0x84, 0x17, 0xf5, 0xf0, 0x85, 0x9d, 0x0f, 0x7b, 0xda, 0xb0, 0xee, - 0xcf, 0x1a, 0xc7, 0x38, 0x44, 0x9f, 0x4c, 0x19, 0x37, 0x3d, 0xd7, 0xe5, 0xd6, 0x38, 0x80, 0x39, - 0x13, 0xcb, 0x67, 0xc7, 0xb2, 0x7d, 0x95, 0x2b, 0x62, 0x5f, 0x68, 0xf9, 0xec, 0x04, 0x00, 0xc7, - 0x38, 0x94, 0x61, 0x53, 0x7f, 0xc2, 0x69, 0x14, 0x87, 0x3d, 0x57, 0xd8, 0x21, 0xd6, 0x30, 0xd0, - 0x05, 0x21, 0xb4, 0xe0, 0xba, 0x87, 0x47, 0x12, 0x42, 0x0b, 0x39, 0x5c, 0x9a, 0xa4, 0xe9, 0x22, - 0x8c, 0x90, 0xbb, 0x11, 0x09, 0x3c, 0xa7, 0x41, 0x5b, 0xe8, 0x8f, 0xa3, 0xeb,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xd3, 0x09, - 0x99, 0x5f, 0x49, 0x14, 0x63, 0x1d, 0x67, 0xfe, 0xd2, 0x5f, 0x7c, 0xeb, 0xcc, 0x87, 0xfe, 0xea, - 0x5b, 0x67, 0x3e, 0xf4, 0xb7, 0xdf, 0x3a, 0xf3, 0xa1, 0x1f, 0xda, 0x3b, 0x63, 0xfd, 0xc5, 0xde, - 0x19, 0xeb, 0xaf, 0xf6, 0xce, 0x58, 0x7f, 0xbb, 0x77, 0xc6, 0xfa, 0xdf, 0xf7, 0xce, 0x58, 0x5f, - 0xfe, 0x3f, 0xce, 0x7c, 0xe8, 0x6d, 0x14, 0x47, 0xa8, 0xbe, 0x40, 0x67, 0xe7, 0xc2, 0xf6, 0xc5, - 0xff, 0x10, 0x00, 0x00, 0xff, 0xff, 0xf5, 0xf1, 0x8c, 0x4c, 0x2d, 0x26, 0x01, 0x00, + // 16114 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x69, 0x90, 0x64, 0xd9, + 0x59, 0x28, 0xa6, 0x9b, 0x59, 0xeb, 0x57, 0xfb, 0xa9, 0x5e, 0xaa, 0x6b, 0xba, 0x3b, 0x7b, 0xee, + 0xcc, 0xf4, 0xf4, 0x6c, 0xd5, 0xea, 0x59, 0x34, 0xad, 0x99, 0xd1, 0x30, 0xb5, 0x76, 0xd7, 0x74, + 0x57, 0x75, 0xce, 0xc9, 0xaa, 0x6e, 0x69, 0x34, 0x12, 0xba, 0x9d, 0x79, 0xaa, 0xea, 0xaa, 0x32, + 0xef, 0xcd, 0xb9, 0xf7, 0x66, 0x75, 0x57, 0x5b, 0x04, 0x20, 0x8c, 0x40, 0x02, 0x47, 0x28, 0x08, + 0x6c, 0x1c, 0x82, 0xe0, 0x07, 0x60, 0x16, 0xcb, 0x60, 0x64, 0x61, 0xc0, 0x88, 0xcd, 0x36, 0x8e, + 0x00, 0xff, 0xc0, 0x98, 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f, 0x79, 0x51, 0x38, 0x35, 0xc8, 0xfa, 0x9d, 0xa9, 0x9b, 0xbe, 0x19, 0xe3, 0x25, + 0x75, 0x12, 0xbc, 0x32, 0x36, 0x48, 0xa1, 0x4f, 0xc1, 0x08, 0xff, 0xcf, 0x55, 0xaa, 0xe1, 0xd4, + 0x71, 0x46, 0xfb, 0x5c, 0x3e, 0x6d, 0x8e, 0x38, 0x77, 0x5c, 0x10, 0x1f, 0xd1, 0x4b, 0x43, 0x6c, + 0x52, 0x43, 0x18, 0x46, 0xea, 0xee, 0x0e, 0xf1, 0x48, 0x18, 0x96, 0x03, 0xff, 0x36, 0x11, 0x12, + 0xe2, 0x53, 0xd9, 0x2a, 0x58, 0xff, 0x36, 0x11, 0x8f, 0x40, 0xbd, 0x0e, 0x36, 0x49, 0xa0, 0x75, + 0x18, 0xa5, 0x4f, 0x72, 0x37, 0x26, 0x3a, 0xd4, 0x89, 0x28, 0x7b, 0x38, 0x63, 0xa3, 0x12, 0x4e, + 0x10, 0x41, 0x37, 0x60, 0x98, 0x8d, 0x79, 0xab, 0xc9, 0x89, 0x9e, 0xe8, 0x44, 0x94, 0x19, 0x14, + 0x54, 0xb4, 0x2a, 0xd8, 0x20, 0x80, 0xde, 0x84, 0xc1, 0xba, 0xbb, 0x41, 0xaa, 0xbb, 0xd5, 0x3a, + 0x99, 0x1a, 0x66, 0xd4, 0x32, 0x0f, 0xc3, 0xeb, 0x12, 0x89, 0xf3, 0xe7, 0xea, 0x2f, 0x8e, 0xab, + 0xa3, 0x9b, 0x70, 0x22, 0x22, 0x41, 0xc3, 0xf5, 0x1c, 0x7a, 0x88, 0x89, 0x27, 0x21, 0xd3, 0x8c, + 0x8f, 0xb0, 0xd5, 0x75, 0x56, 0xcc, 0xc6, 0x89, 0xb5, 0x4c, 0x2c, 0x9c, 0x53, 0x1b, 0xdd, 0x85, + 0xa9, 0x0c, 0x08, 0x5f, 0xb7, 0xc7, 0x18, 0xe5, 0xd7, 0x04, 0xe5, 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 0xe7, 0x5a, 0x1d, 0xfb, 0xb3, 0x30, + 0xa8, 0xdc, 0x4d, 0xa5, 0xbf, 0xb9, 0x95, 0xe3, 0x6f, 0xde, 0x99, 0x8d, 0x90, 0xb6, 0x71, 0xc5, + 0x4c, 0xdb, 0xb8, 0xaf, 0x5a, 0x10, 0x6b, 0x38, 0xd0, 0x5b, 0x30, 0xd8, 0xf4, 0x99, 0x41, 0x74, + 0x20, 0xbd, 0x0c, 0x1e, 0x6f, 0xab, 0x22, 0xe1, 0x71, 0x02, 0x03, 0x3e, 0x1d, 0x65, 0x59, 0x15, + 0xc7, 0x54, 0xd0, 0x35, 0xe8, 0x6f, 0x06, 0xa4, 0x12, 0xb1, 0x20, 0x56, 0xdd, 0x13, 0xe4, 0xcb, + 0x97, 0x57, 0xc4, 0x92, 0x82, 0xfd, 0x1b, 0x05, 0x18, 0x4f, 0xa2, 0xa2, 0xd7, 0xa0, 0x87, 0xdc, + 0x25, 0x55, 0xd1, 0xdf, 0x4c, 0x9e, 0x20, 0x96, 0x91, 0xf0, 0x01, 0xa0, 0xff, 0x31, 0xab, 0x85, + 0xae, 0x42, 0x3f, 0x65, 0x08, 0xae, 0xa8, 0x80, 0x8d, 0x8f, 0xe6, 0x31, 0x15, 0x8a, 0xb3, 0xe2, + 0x9d, 0x13, 0x45, 0x58, 0x56, 0x67, 0x06, 0x69, 0xd5, 0x66, 0x85, 0xbe, 0xb5, 0xa2, 0x76, 0x22, + 0x81, 0xb5, 0xf9, 0x32, 0x47, 0x12, 0xd4, 0xb8, 0x41, 0x9a, 0x2c, 0xc4, 0x31, 0x11, 0xf4, 0x06, + 0xf4, 0x86, 0x75, 0x42, 0x9a, 0xc2, 0xe2, 0x20, 0x53, 0xca, 0x59, 0xa1, 0x08, 0x82, 0x12, 0x93, + 0x8a, 0xb0, 0x02, 0xcc, 0x2b, 0xda, 0xbf, 0x65, 0x01, 0x70, 0x0b, 0x3e, 0xc7, 0xdb, 0x24, 0x47, + 0xa0, 0x18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x13, 0x44, 0xb7, 0x89, 0xc3, 0xad, 0x12, 0x8b, 0x87, 0x3e, 0xfd, 0x95, 0x78, 0xfc, + 0x7a, 0x92, 0x18, 0x4e, 0xd3, 0xff, 0x5e, 0xba, 0x73, 0x3c, 0x18, 0x4f, 0x45, 0xfa, 0x7c, 0x1b, + 0x06, 0x95, 0x93, 0x94, 0x38, 0x74, 0xda, 0x07, 0xcc, 0x4d, 0x52, 0xe0, 0x42, 0xcf, 0xd8, 0x41, + 0x2f, 0x26, 0x67, 0xff, 0x66, 0xc1, 0x68, 0x90, 0x4f, 0xe2, 0x2a, 0x0c, 0x38, 0x21, 0x0b, 0xe2, + 0x5d, 0x6b, 0x27, 0x97, 0x4e, 0x35, 0xc3, 0x1c, 0xd5, 0x66, 0x45, 0x4d, 0xac, 0x68, 0xa0, 0xab, + 0xdc, 0xf6, 0x73, 0x87, 0xb4, 0x13, 0x4a, 0xa7, 0xa8, 0x81, 0xb4, 0x0e, 0xdd, 0x21, 0x58, 0xd4, + 0x47, 0x9f, 0xe2, 0xc6, 0xb9, 0xd7, 0x3c, 0xff, 0x8e, 0x77, 0xc5, 0xf7, 0x65, 0x48, 0xa0, 0xee, + 0x08, 0x4e, 0x48, 0x93, 0x5c, 0x55, 0x1d, 0x9b, 0xd4, 0xba, 0x0b, 0x9d, 0xfd, 0x39, 0x60, 0x79, + 0x49, 0xcc, 0x98, 0x04, 0x21, 0x22, 0x30, 0x26, 0x62, 0x90, 0xca, 0x32, 0x31, 0x76, 0x99, 0xcf, + 0x6f, 0xb3, 0x76, 0xac, 0xc7, 0xb9, 0x66, 0x92, 0xc0, 0x49, 0x9a, 0xf6, 0x16, 0x3f, 0x84, 0x97, + 0x88, 0x13, 0xb5, 0x02, 0x12, 0xa2, 0x8f, 0xc3, 0x54, 0xfa, 0x65, 0x2c, 0xd4, 0x21, 0x16, 0xe3, + 0x9e, 0x4f, 0xef, 0xef, 0x95, 0xa6, 0x2a, 0x39, 0x38, 0x38, 0xb7, 0x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eb, 0x50, 0xf4, 0x36, 0x42, 0x11, 0xa2, 0x2e, 0xdb, 0x12, 0xd7, 0xb4, 0x75, + 0xe6, 0x21, 0x98, 0x56, 0x97, 0x2a, 0x98, 0x56, 0x44, 0x57, 0xa1, 0x18, 0xdc, 0xae, 0x09, 0x4d, + 0x4a, 0xe6, 0x26, 0xc5, 0x73, 0x0b, 0x39, 0xbd, 0x62, 0x94, 0xf0, 0xdc, 0x02, 0xa6, 0x24, 0x50, + 0x19, 0x7a, 0x99, 0xfb, 0xb2, 0x60, 0x6d, 0x33, 0x9f, 0xf2, 0x6d, 0xc2, 0x00, 0x70, 0x8f, 0x44, + 0x86, 0x80, 0x39, 0x21, 0xb4, 0x06, 0x7d, 0x55, 0xd7, 0xab, 0x91, 0x40, 0xf0, 0xb2, 0x1f, 0xce, + 0xd4, 0x99, 0x30, 0x8c, 0x1c, 0x9a, 0x5c, 0x85, 0xc0, 0x30, 0xb0, 0xa0, 0xc5, 0xa8, 0x92, 0xe6, + 0xd6, 0x86, 0xbc, 0xb1, 0xb2, 0xa9, 0x92, 0xe6, 0xd6, 0x52, 0xa5, 0x2d, 0x55, 0x86, 0x81, 0x05, + 0x2d, 0xf4, 0x0a, 0x14, 0x36, 0xaa, 0xc2, 0x35, 0x39, 0x53, 0x79, 0x62, 0x46, 0xd1, 0x9a, 0xeb, + 0xdb, 0xdf, 0x2b, 0x15, 0x96, 0xe6, 0x71, 0x61, 0xa3, 0x8a, 0x56, 0xa1, 0x7f, 0x83, 0xc7, 0xdd, + 0x11, 0xfa, 0x91, 0x27, 0xb3, 0x43, 0x02, 0xa5, 0x42, 0xf3, 0x70, 0xef, 0x52, 0x01, 0xc0, 0x92, + 0x08, 0x4b, 0x40, 0xa5, 0xe2, 0x07, 0x89, 0xf0, 0xa5, 0x33, 0x87, 0x8b, 0xf9, 0xc4, 0x9f, 0x1a, + 0x71, 0x14, 0x22, 0xac, 0x51, 0xa4, 0xab, 0xda, 0xb9, 0xd7, 0x0a, 0x58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 0xf0, 0xb3, 0x89, 0x15, 0x63, 0x5e, 0x9d, 0xee, 0x01, 0x21, 0x29, 0xf0, 0xc3, 0xa9, + 0xe3, 0xf9, 0x7b, 0x40, 0x08, 0x18, 0x6e, 0x54, 0xda, 0xed, 0x01, 0x85, 0x84, 0x63, 0xa2, 0xf4, + 0x64, 0xa6, 0xa7, 0xe9, 0x89, 0x36, 0x26, 0x93, 0xb9, 0x67, 0x29, 0x3b, 0x99, 0xe9, 0x49, 0x4a, + 0x49, 0xd8, 0x7f, 0x30, 0x90, 0xe6, 0x59, 0x98, 0x84, 0xe9, 0x3f, 0xb7, 0x52, 0x36, 0x13, 0x1f, + 0xe9, 0x56, 0xe0, 0xfd, 0x00, 0x1f, 0xae, 0x9f, 0xb7, 0xe0, 0x44, 0x33, 0xf3, 0x43, 0x04, 0x03, + 0xd0, 0x9d, 0xdc, 0x9c, 0x7f, 0xba, 0x0a, 0xa7, 0x9c, 0x0d, 0xc7, 0x39, 0x2d, 0x25, 0x85, 0x03, + 0xc5, 0xf7, 0x2c, 0x1c, 0x58, 0x81, 0x81, 0x2a, 0x7f, 0xc9, 0xc9, 0x34, 0x00, 0x5d, 0x05, 0x03, + 0x65, 0xac, 0x84, 0x78, 0x02, 0x6e, 0x60, 0x45, 0x02, 0xfd, 0xa4, 0x05, 0x67, 0x92, 0x5d, 0xc7, + 0x84, 0x81, 0x85, 0xc1, 0x24, 0x17, 0x6b, 0x2d, 0x89, 0xef, 0x4f, 0xf1, 0xff, 0x06, 0xf2, 0x41, + 0x27, 0x04, 0xdc, 0xbe, 0x31, 0xb4, 0x90, 0x21, 0x57, 0xeb, 0x33, 0x35, 0x8a, 0x5d, 0xc8, 0xd6, + 0x5e, 0x84, 0xe1, 0x86, 0xdf, 0xf2, 0x22, 0x61, 0xf7, 0x28, 0x8c, 0xa7, 0x98, 0xd1, 0xd0, 0x8a, + 0x56, 0x8e, 0x0d, 0xac, 0x84, 0x44, 0x6e, 0xe0, 0xbe, 0x25, 0x72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a, + 0x47, 0x75, 0x18, 0xa9, 0xeb, 0xaa, 0x24, 0xb1, 0x4e, 0xef, 0x4b, 0x0b, 0x25, 0xfc, 0x21, 0xb4, + 0x22, 0x6c, 0x12, 0x47, 0x33, 0x00, 0x9e, 0x6e, 0x15, 0xae, 0x02, 0x15, 0x6b, 0x16, 0xe1, 0x1a, + 0x06, 0x7a, 0x09, 0x86, 0x22, 0xbf, 0xe9, 0xd7, 0xfd, 0xcd, 0xdd, 0x6b, 0x44, 0x46, 0xb6, 0x54, + 0x46, 0xc3, 0x6b, 0x31, 0x08, 0xeb, 0x78, 0xe8, 0x2e, 0x4c, 0x28, 0x22, 0x95, 0x07, 0xa0, 0x5e, + 0x63, 0x62, 0x93, 0xd5, 0x24, 0x45, 0x9c, 0x6e, 0x04, 0xbd, 0x02, 0xa3, 0xcc, 0x7a, 0x99, 0xd5, + 0xbf, 0x46, 0x76, 0x65, 0xc4, 0x63, 0xc6, 0x61, 0xaf, 0x18, 0x10, 0x9c, 0xc0, 0x44, 0xf3, 0x30, + 0xd1, 0x70, 0xc3, 0x44, 0xf5, 0x3e, 0x56, 0x9d, 0x75, 0x60, 0x25, 0x09, 0xc4, 0x69, 0x7c, 0xfb, + 0x57, 0xc5, 0x1c, 0x7b, 0x91, 0xfb, 0xc1, 0x76, 0x7c, 0x7f, 0x6f, 0xc7, 0x6f, 0x59, 0x30, 0x4e, + 0x5b, 0x67, 0x26, 0x99, 0x92, 0x91, 0x52, 0x39, 0x31, 0xac, 0x36, 0x39, 0x31, 0xce, 0xd3, 0x63, + 0xbb, 0xe6, 0xb7, 0x22, 0x21, 0x1d, 0xd5, 0xce, 0x65, 0x5a, 0x8a, 0x05, 0x54, 0xe0, 0x91, 0x20, + 0x10, 0x7e, 0xef, 0x3a, 0x1e, 0x09, 0x02, 0x2c, 0xa0, 0x32, 0x65, 0x46, 0x4f, 0x76, 0xca, 0x0c, + 0x1e, 0xf9, 0x5c, 0x58, 0xc1, 0x09, 0x96, 0x56, 0x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a4, 0x66, 0x19, 0xe5, 0x07, 0xdb, 0x53, 0xfa, 0x64, 0x1e, 0x7f, + 0x4a, 0xea, 0x92, 0x55, 0x5d, 0xf4, 0x2a, 0x8c, 0x88, 0x80, 0x1e, 0x22, 0x97, 0xfe, 0xa4, 0xe9, + 0xbe, 0x5c, 0xd1, 0x81, 0xd8, 0xc4, 0x45, 0xeb, 0x30, 0x14, 0xf9, 0x75, 0xe6, 0x83, 0x4b, 0xb9, + 0xe4, 0x13, 0xf9, 0x31, 0x71, 0xd7, 0x14, 0x9a, 0xae, 0xf3, 0x50, 0x55, 0xb1, 0x4e, 0x07, 0xad, + 0xf1, 0xf5, 0xce, 0xd2, 0x16, 0x91, 0x50, 0x24, 0x63, 0x3f, 0x93, 0x67, 0x2e, 0xc9, 0xd0, 0xcc, + 0xed, 0x20, 0x6a, 0x62, 0x9d, 0x0c, 0xba, 0x02, 0x13, 0xcd, 0xc0, 0xf5, 0xd9, 0x9a, 0x50, 0x9a, + 0xf2, 0x29, 0x33, 0x49, 0x69, 0x39, 0x89, 0x80, 0xd3, 0x75, 0x58, 0x3c, 0x16, 0x51, 0x38, 0x75, + 0x8a, 0x27, 0x5a, 0xe3, 0x72, 0x10, 0x5e, 0x86, 0x15, 0x14, 0xad, 0xb0, 0x93, 0x98, 0x8b, 0xf0, + 0xa6, 0xa6, 0xf3, 0xbd, 0xfc, 0x75, 0x51, 0x1f, 0xe7, 0xfd, 0xd5, 0x5f, 0x1c, 0x53, 0x40, 0x35, + 0x2d, 0xbf, 0x39, 0x7d, 0x41, 0x85, 0x53, 0xa7, 0xdb, 0xd8, 0xeb, 0x26, 0x9e, 0xcb, 0x31, 0x43, + 0x60, 0x14, 0x87, 0x38, 0x41, 0x13, 0xbd, 0x01, 0xe3, 0x22, 0x58, 0x41, 0x3c, 0x4c, 0x67, 0x62, + 0x9f, 0x26, 0x9c, 0x80, 0xe1, 0x14, 0x36, 0x4f, 0x74, 0xe6, 0xdc, 0xae, 0x13, 0x71, 0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 0x2e, 0x73, 0x74, + 0x23, 0x35, 0x89, 0x21, 0x78, 0x4a, 0x29, 0x1c, 0x39, 0xb6, 0x94, 0x81, 0x83, 0x33, 0x6b, 0xd2, + 0x27, 0x16, 0xbd, 0x49, 0x76, 0x15, 0xa9, 0xc4, 0x13, 0x0b, 0xeb, 0x40, 0x6c, 0xe2, 0xa2, 0x2b, + 0x30, 0xe1, 0xec, 0x38, 0x2e, 0x4f, 0xef, 0x21, 0x09, 0xf0, 0x37, 0x96, 0x92, 0x45, 0xcf, 0x26, + 0x11, 0x70, 0xba, 0x0e, 0x7a, 0x13, 0x90, 0x7f, 0x9b, 0x39, 0xcf, 0xd4, 0xae, 0x10, 0x4f, 0x28, + 0xf3, 0xd9, 0xdc, 0x15, 0xe3, 0x23, 0xe1, 0x46, 0x0a, 0x03, 0x67, 0xd4, 0x4a, 0x04, 0x1b, 0xec, + 0xcb, 0x0f, 0x36, 0xd8, 0xfe, 0x5c, 0xec, 0x98, 0x19, 0xf1, 0x1d, 0x18, 0x39, 0xac, 0xb5, 0xf7, + 0x53, 0xd0, 0x1f, 0x88, 0x9c, 0xf3, 0x09, 0xaf, 0x72, 0x99, 0x91, 0x5b, 0xc2, 0xed, 0xff, 0xc7, + 0x02, 0x25, 0x4b, 0x36, 0xe3, 0x8a, 0xbf, 0xca, 0x4c, 0xd7, 0xb9, 0x14, 0x5c, 0x0b, 0x25, 0x76, + 0x5c, 0x33, 0x5d, 0x8f, 0x81, 0xd8, 0xc4, 0xe5, 0xcb, 0x2d, 0x8c, 0x23, 0x58, 0x18, 0x0f, 0x08, + 0xa1, 0x35, 0x54, 0x18, 0xe8, 0x13, 0xd0, 0x5f, 0x73, 0x77, 0xdc, 0x50, 0xc8, 0xd1, 0x0e, 0xad, + 0xb7, 0x8b, 0xbf, 0x6f, 0x81, 0x93, 0xc1, 0x92, 0x9e, 0xfd, 0x53, 0x16, 0x28, 0x75, 0xe7, 0x55, + 0xe2, 0xd4, 0xa3, 0x2d, 0xf4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0x48, 0x38, 0x78, 0x29, 0x71, 0xa7, 0x95, 0x2b, 0xee, 0x3c, 0x07, 0x3d, 0x81, 0x5f, 0x27, + 0xc9, 0xd4, 0xfb, 0xd8, 0xaf, 0x13, 0xcc, 0x20, 0x14, 0x23, 0x8a, 0x85, 0x58, 0xc3, 0xfa, 0x03, + 0x5d, 0x3c, 0xbd, 0x1f, 0x83, 0xde, 0x3a, 0xd9, 0x21, 0xf5, 0x64, 0x86, 0xd4, 0xeb, 0xb4, 0x10, + 0x73, 0x98, 0xfd, 0xdb, 0x3d, 0x70, 0xa6, 0x6d, 0x64, 0x39, 0xca, 0x60, 0x6e, 0x3a, 0x11, 0xb9, + 0xe3, 0xec, 0x26, 0x33, 0x03, 0x5e, 0xe1, 0xc5, 0x58, 0xc2, 0x99, 0xb3, 0x35, 0xcf, 0x94, 0x93, + 0x10, 0x0e, 0x8b, 0x04, 0x39, 0x02, 0x6a, 0x0a, 0x1b, 0x8b, 0x0f, 0x42, 0xd8, 0xf8, 0x3c, 0x40, + 0x18, 0xd6, 0xb9, 0x1d, 0x67, 0x4d, 0x78, 0x71, 0xc7, 0x19, 0x95, 0x2a, 0xd7, 0x05, 0x04, 0x6b, + 0x58, 0x68, 0x01, 0xc6, 0x9b, 0x81, 0x1f, 0x71, 0x59, 0xfb, 0x02, 0x37, 0x75, 0xee, 0x35, 0x83, + 0x7a, 0x95, 0x13, 0x70, 0x9c, 0xaa, 0x81, 0x5e, 0x82, 0x21, 0x11, 0xe8, 0xab, 0xec, 0xfb, 0x75, + 0x21, 0xde, 0x53, 0xd6, 0xbf, 0x95, 0x18, 0x84, 0x75, 0x3c, 0xad, 0x1a, 0x13, 0xe0, 0xf7, 0x67, + 0x56, 0xe3, 0x42, 0x7c, 0x0d, 0x2f, 0x91, 0x14, 0x60, 0xa0, 0xab, 0xa4, 0x00, 0xb1, 0xc0, 0x73, + 0xb0, 0x6b, 0x7d, 0x32, 0x74, 0x14, 0x11, 0x7e, 0xad, 0x07, 0x26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91, 0xb9, 0xf4, 0x67, 0x25, 0x52, 0x7a, + 0xe9, 0x2b, 0x10, 0x8e, 0x49, 0x51, 0xba, 0x31, 0x0f, 0x36, 0x99, 0x4f, 0x57, 0xb1, 0x5a, 0x69, + 0xba, 0x99, 0x5c, 0xd8, 0x36, 0x8c, 0xec, 0x84, 0xcd, 0x2d, 0x22, 0x4f, 0x45, 0xa6, 0xae, 0xcb, + 0x89, 0x54, 0x71, 0x53, 0x20, 0xba, 0x41, 0xd4, 0x72, 0xea, 0xa9, 0x83, 0x9c, 0x89, 0x56, 0x6e, + 0xea, 0xc4, 0xb0, 0x49, 0x9b, 0x2e, 0x84, 0x77, 0x79, 0x38, 0x39, 0xa6, 0xb8, 0xcb, 0x59, 0x08, + 0x19, 0x11, 0xe7, 0xf8, 0x42, 0x10, 0x00, 0x2c, 0x89, 0xa8, 0xc1, 0x66, 0x17, 0xd0, 0x89, 0x0e, + 0x83, 0x9d, 0xea, 0x6f, 0x3c, 0xd8, 0xec, 0xc2, 0x89, 0x49, 0xb1, 0x8b, 0xa6, 0xb9, 0xe5, 0x47, + 0xbe, 0x97, 0xb8, 0xe4, 0x4e, 0xe6, 0x5f, 0x34, 0xe5, 0x0c, 0xfc, 0xf4, 0x45, 0x93, 0x85, 0x85, + 0x33, 0xdb, 0xa2, 0x1f, 0xd7, 0x94, 0x91, 0x01, 0x45, 0xe6, 0x8d, 0xa7, 0x72, 0x02, 0x6b, 0xa6, + 0xc3, 0x07, 0xf2, 0x8f, 0x53, 0x20, 0x1c, 0x93, 0x42, 0x35, 0x18, 0x6d, 0x1a, 0x11, 0x67, 0x59, + 0x06, 0x91, 0x1c, 0xbe, 0x20, 0x2b, 0x36, 0x2d, 0x97, 0x10, 0x99, 0x10, 0x9c, 0xa0, 0xc9, 0x2c, + 0xf7, 0xb8, 0xab, 0x1f, 0x4b, 0x30, 0x92, 0x33, 0xd5, 0x19, 0xde, 0x80, 0x7c, 0xaa, 0x05, 0x00, + 0x4b, 0x22, 0x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, 0xc8, 0x75, 0xea, 0x95, 0x26, 0xa9, 0x6a, 0x5a, + 0x50, 0x66, 0xa8, 0x7e, 0x65, 0xa5, 0x32, 0x9b, 0xc6, 0xc0, 0x39, 0x35, 0xd1, 0x12, 0xa0, 0x34, + 0x44, 0xcc, 0x30, 0x7b, 0xe2, 0xa6, 0xe9, 0xe1, 0x8c, 0x1a, 0xe8, 0x65, 0x18, 0x51, 0x76, 0xfb, + 0xda, 0x8c, 0xb3, 0x0b, 0x02, 0xeb, 0x00, 0x6c, 0xe2, 0xa1, 0x4b, 0x3c, 0x6d, 0x92, 0x48, 0xb0, + 0x25, 0x54, 0xa6, 0x63, 0x32, 0x27, 0x92, 0x28, 0xc6, 0x3a, 0xce, 0xdc, 0xe5, 0x3f, 0xfd, 0xf6, + 0xd9, 0x0f, 0xfd, 0xc5, 0xb7, 0xcf, 0x7e, 0xe8, 0xaf, 0xbe, 0x7d, 0xf6, 0x43, 0x3f, 0xb4, 0x7f, + 0xd6, 0xfa, 0xd3, 0xfd, 0xb3, 0xd6, 0x5f, 0xec, 0x9f, 0xb5, 0xfe, 0x6a, 0xff, 0xac, 0xf5, 0xff, + 0xee, 0x9f, 0xb5, 0xbe, 0xfc, 0xb7, 0x67, 0x3f, 0xf4, 0x36, 0x8a, 0x23, 0x54, 0x5f, 0xa4, 0xb3, + 0x73, 0x71, 0xe7, 0xd2, 0x7f, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x60, 0x45, 0x7a, 0xd6, 0xa3, 0x24, + 0x01, 0x00, } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { @@ -9921,13 +9887,6 @@ func (m *ContainerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.StopSignal != nil { - i -= len(*m.StopSignal) - copy(dAtA[i:], *m.StopSignal) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StopSignal))) - i-- - dAtA[i] = 0x7a - } if len(m.AllocatedResourcesStatus) > 0 { for iNdEx := len(m.AllocatedResourcesStatus) - 1; iNdEx >= 0; iNdEx-- { { @@ -12299,13 +12258,6 @@ func (m *Lifecycle) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.StopSignal != nil { - i -= len(*m.StopSignal) - copy(dAtA[i:], *m.StopSignal) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StopSignal))) - i-- - dAtA[i] = 0x1a - } if m.PreStop != nil { { size, err := m.PreStop.MarshalToSizedBuffer(dAtA[:i]) @@ -14183,34 +14135,6 @@ func (m *NodeStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *NodeSwapStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeSwapStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeSwapStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Capacity != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Capacity)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *NodeSystemInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -14231,18 +14155,6 @@ func (m *NodeSystemInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } i -= len(m.Architecture) copy(dAtA[i:], m.Architecture) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Architecture))) @@ -15811,9 +15723,6 @@ func (m *PodCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) - i-- - dAtA[i] = 0x38 i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) @@ -17085,11 +16994,6 @@ func (m *PodStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 if len(m.HostIPs) > 0 { for iNdEx := len(m.HostIPs) - 1; iNdEx >= 0; iNdEx-- { { @@ -22638,10 +22542,6 @@ func (m *ContainerStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - if m.StopSignal != nil { - l = len(*m.StopSignal) - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -23482,10 +23382,6 @@ func (m *Lifecycle) Size() (n int) { l = m.PreStop.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.StopSignal != nil { - l = len(*m.StopSignal) - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -24171,18 +24067,6 @@ func (m *NodeStatus) Size() (n int) { return n } -func (m *NodeSwapStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Capacity != nil { - n += 1 + sovGenerated(uint64(*m.Capacity)) - } - return n -} - func (m *NodeSystemInfo) Size() (n int) { if m == nil { return 0 @@ -24209,10 +24093,6 @@ func (m *NodeSystemInfo) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Architecture) n += 1 + l + sovGenerated(uint64(l)) - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -24770,7 +24650,6 @@ func (m *PodCondition) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Message) n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.ObservedGeneration)) return n } @@ -25295,7 +25174,6 @@ func (m *PodStatus) Size() (n int) { n += 2 + l + sovGenerated(uint64(l)) } } - n += 2 + sovGenerated(uint64(m.ObservedGeneration)) return n } @@ -27579,7 +27457,6 @@ func (this *ContainerStatus) String() string { `VolumeMounts:` + repeatedStringForVolumeMounts + `,`, `User:` + strings.Replace(this.User.String(), "ContainerUser", "ContainerUser", 1) + `,`, `AllocatedResourcesStatus:` + repeatedStringForAllocatedResourcesStatus + `,`, - `StopSignal:` + valueToStringGenerated(this.StopSignal) + `,`, `}`, }, "") return s @@ -28203,7 +28080,6 @@ func (this *Lifecycle) String() string { s := strings.Join([]string{`&Lifecycle{`, `PostStart:` + strings.Replace(this.PostStart.String(), "LifecycleHandler", "LifecycleHandler", 1) + `,`, `PreStop:` + strings.Replace(this.PreStop.String(), "LifecycleHandler", "LifecycleHandler", 1) + `,`, - `StopSignal:` + valueToStringGenerated(this.StopSignal) + `,`, `}`, }, "") return s @@ -28782,16 +28658,6 @@ func (this *NodeStatus) String() string { }, "") return s } -func (this *NodeSwapStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NodeSwapStatus{`, - `Capacity:` + valueToStringGenerated(this.Capacity) + `,`, - `}`, - }, "") - return s -} func (this *NodeSystemInfo) String() string { if this == nil { return "nil" @@ -28807,7 +28673,6 @@ func (this *NodeSystemInfo) String() string { `KubeProxyVersion:` + fmt.Sprintf("%v", this.KubeProxyVersion) + `,`, `OperatingSystem:` + fmt.Sprintf("%v", this.OperatingSystem) + `,`, `Architecture:` + fmt.Sprintf("%v", this.Architecture) + `,`, - `Swap:` + strings.Replace(this.Swap.String(), "NodeSwapStatus", "NodeSwapStatus", 1) + `,`, `}`, }, "") return s @@ -29180,7 +29045,6 @@ func (this *PodCondition) String() string { `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, `}`, }, "") return s @@ -29563,7 +29427,6 @@ func (this *PodStatus) String() string { `Resize:` + fmt.Sprintf("%v", this.Resize) + `,`, `ResourceClaimStatuses:` + repeatedStringForResourceClaimStatuses + `,`, `HostIPs:` + repeatedStringForHostIPs + `,`, - `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, `}`, }, "") return s @@ -37931,122 +37794,18 @@ func (m *ContainerStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Resources == nil { - m.Resources = &ResourceRequirements{} - } - if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VolumeMounts = append(m.VolumeMounts, VolumeMountStatus{}) - if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.User == nil { - m.User = &ContainerUser{} - } - if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocatedResourcesStatus", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllocatedResourcesStatus = append(m.AllocatedResourcesStatus, ResourceStatus{}) - if err := m.AllocatedResourcesStatus[len(m.AllocatedResourcesStatus)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Resources == nil { + m.Resources = &ResourceRequirements{} + } + if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 15: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StopSignal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -38056,24 +37815,95 @@ func (m *ContainerStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := Signal(dAtA[iNdEx:postIndex]) - m.StopSignal = &s + m.VolumeMounts = append(m.VolumeMounts, VolumeMountStatus{}) + if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.User == nil { + m.User = &ContainerUser{} + } + if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocatedResourcesStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllocatedResourcesStatus = append(m.AllocatedResourcesStatus, ResourceStatus{}) + if err := m.AllocatedResourcesStatus[len(m.AllocatedResourcesStatus)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -45226,39 +45056,6 @@ func (m *Lifecycle) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StopSignal", 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 - } - s := Signal(dAtA[iNdEx:postIndex]) - m.StopSignal = &s - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -50946,76 +50743,6 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeSwapStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeSwapStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeSwapStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Capacity = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *NodeSystemInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -51365,42 +51092,6 @@ func (m *NodeSystemInfo) Unmarshal(dAtA []byte) error { } m.Architecture = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Swap == nil { - m.Swap = &NodeSwapStatus{} - } - if err := m.Swap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -56396,25 +56087,6 @@ func (m *PodCondition) Unmarshal(dAtA []byte) error { } m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - m.ObservedGeneration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ObservedGeneration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -60668,25 +60340,6 @@ func (m *PodStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - m.ObservedGeneration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ObservedGeneration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/go-controller/vendor/k8s.io/api/core/v1/generated.proto b/go-controller/vendor/k8s.io/api/core/v1/generated.proto index 9b48fb1c39..08706987c5 100644 --- a/go-controller/vendor/k8s.io/api/core/v1/generated.proto +++ b/go-controller/vendor/k8s.io/api/core/v1/generated.proto @@ -1103,11 +1103,6 @@ message ContainerStatus { // +listType=map // +listMapKey=name repeated ResourceStatus allocatedResourcesStatus = 14; - - // StopSignal reports the effective stop signal for this container - // +featureGate=ContainerStopSignals - // +optional - optional string stopSignal = 15; } // ContainerUser represents user identity information @@ -1199,7 +1194,6 @@ message EmptyDirVolumeSource { } // EndpointAddress is a tuple that describes single IP address. -// Deprecated: This API is deprecated in v1.33+. // +structType=atomic message EndpointAddress { // The IP of this endpoint. @@ -1221,7 +1215,6 @@ message EndpointAddress { } // EndpointPort is a tuple that describes a single port. -// Deprecated: This API is deprecated in v1.33+. // +structType=atomic message EndpointPort { // The name of this port. This must match the 'name' field in the @@ -1272,8 +1265,6 @@ message EndpointPort { // // a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], // b: [ 10.10.1.1:309, 10.10.2.2:309 ] -// -// Deprecated: This API is deprecated in v1.33+. message EndpointSubset { // IP addresses which offer the related ports that are marked as ready. These endpoints // should be considered safe for load balancers and clients to utilize. @@ -1307,11 +1298,6 @@ message EndpointSubset { // Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] // }, // ] -// -// Endpoints is a legacy API and does not contain information about all Service features. -// Use discoveryv1.EndpointSlice for complete information about Service endpoints. -// -// Deprecated: This API is deprecated in v1.33+. Use discoveryv1.EndpointSlice. message Endpoints { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata @@ -1331,7 +1317,6 @@ message Endpoints { } // EndpointsList is a list of endpoints. -// Deprecated: This API is deprecated in v1.33+. message EndpointsList { // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds @@ -1342,9 +1327,9 @@ message EndpointsList { repeated Endpoints items = 2; } -// EnvFromSource represents the source of a set of ConfigMaps or Secrets +// EnvFromSource represents the source of a set of ConfigMaps message EnvFromSource { - // Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. + // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. // +optional optional string prefix = 1; @@ -2213,12 +2198,6 @@ message Lifecycle { // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks // +optional optional LifecycleHandler preStop = 2; - - // StopSignal defines which signal will be sent to a container when it is being stopped. - // If not specified, the default is defined by the container runtime in use. - // StopSignal can only be set for Pods with a non-empty .spec.os.name - // +optional - optional string stopSignal = 3; } // LifecycleHandler defines a specific action that should be taken in a lifecycle @@ -2883,13 +2862,6 @@ message NodeStatus { optional NodeFeatures features = 13; } -// NodeSwapStatus represents swap memory information. -message NodeSwapStatus { - // Total amount of swap memory in bytes. - // +optional - optional int64 capacity = 1; -} - // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. message NodeSystemInfo { // MachineID reported by the node. For unique machine identification @@ -2925,9 +2897,6 @@ message NodeSystemInfo { // The Architecture reported by the node optional string architecture = 10; - - // Swap Info reported by the node. - optional NodeSwapStatus swap = 11; } // ObjectFieldSelector selects an APIVersioned field of an object. @@ -3646,6 +3615,7 @@ message PodAffinityTerm { // pod labels will be ignored. The default value is empty. // The same key is forbidden to exist in both matchLabelKeys and labelSelector. // Also, matchLabelKeys cannot be set when labelSelector isn't set. + // This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). // // +listType=atomic // +optional @@ -3659,6 +3629,7 @@ message PodAffinityTerm { // pod labels will be ignored. The default value is empty. // The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. // Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + // This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). // // +listType=atomic // +optional @@ -3731,12 +3702,6 @@ message PodCondition { // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions optional string type = 1; - // If set, this represents the .metadata.generation that the pod condition was set based upon. - // This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field. - // +featureGate=PodObservedGenerationTracking - // +optional - optional int64 observedGeneration = 7; - // Status is the status of the condition. // Can be True, False, Unknown. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions @@ -4173,7 +4138,7 @@ message PodSpec { // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. // The resourceRequirements of an init container are taken into account during scheduling // by finding the highest request/limit for each resource type, and then using the max of - // that value or the sum of the normal containers. Limits are applied to init containers + // of that value or the sum of the normal containers. Limits are applied to init containers // in a similar fashion. // Init containers cannot currently be added or removed. // Cannot be updated. @@ -4522,12 +4487,6 @@ message PodSpec { // state of a system, especially if the node that hosts the pod cannot contact the control // plane. message PodStatus { - // If set, this represents the .metadata.generation that the pod status was set based upon. - // This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field. - // +featureGate=PodObservedGenerationTracking - // +optional - optional int64 observedGeneration = 17; - // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. // The conditions array, the reason and message fields, and the individual container status // arrays contain more detail about the pod's status. @@ -4659,9 +4618,6 @@ message PodStatus { // Status of resources resize desired for pod's containers. // It is empty if no resources resize is pending. // Any changes to container resources will automatically set this to "Proposed" - // Deprecated: Resize status is moved to two pod conditions PodResizePending and PodResizeInProgress. - // PodResizePending will track states where the spec has been resized, but the Kubelet has not yet allocated the resources. - // PodResizeInProgress will track in-progress resizes, and should be present whenever allocated resources != acknowledged resources. // +featureGate=InPlacePodVerticalScaling // +optional optional string resize = 14; @@ -5107,18 +5063,12 @@ message ReplicationControllerSpec { // Defaults to 1. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller // +optional - // +k8s:optional - // +default=1 - // +k8s:minimum=0 optional int32 replicas = 1; // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing, for it to be considered available. // Defaults to 0 (pod will be considered available as soon as it is ready) // +optional - // +k8s:optional - // +default=0 - // +k8s:minimum=0 optional int32 minReadySeconds = 4; // Selector is a label query over pods that should match the Replicas count. @@ -6160,12 +6110,13 @@ message ServiceSpec { // +optional optional string internalTrafficPolicy = 22; - // TrafficDistribution offers a way to express preferences for how traffic - // is distributed to Service endpoints. Implementations can use this field - // as a hint, but are not required to guarantee strict adherence. If the - // field is not set, the implementation will apply its default routing - // strategy. If set to "PreferClose", implementations should prioritize - // endpoints that are in the same zone. + // TrafficDistribution offers a way to express preferences for how traffic is + // distributed to Service endpoints. Implementations can use this field as a + // hint, but are not required to guarantee strict adherence. If the field is + // not set, the implementation will apply its default routing strategy. If set + // to "PreferClose", implementations should prioritize endpoints that are + // topologically close (e.g., same zone). + // This is a beta field and requires enabling ServiceTrafficDistribution feature. // +featureGate=ServiceTrafficDistribution // +optional optional string trafficDistribution = 23; @@ -6460,6 +6411,7 @@ message TopologySpreadConstraint { // - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. // // If this value is nil, the behavior is equivalent to the Honor policy. + // This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. // +optional optional string nodeAffinityPolicy = 6; @@ -6470,6 +6422,7 @@ message TopologySpreadConstraint { // - Ignore: node taints are ignored. All nodes are included. // // If this value is nil, the behavior is equivalent to the Ignore policy. + // This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. // +optional optional string nodeTaintsPolicy = 7; @@ -6901,7 +6854,7 @@ message VolumeSource { // The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. // The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. // The volume will be mounted read-only (ro) and non-executable files (noexec). - // Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. + // Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). // The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. // +featureGate=ImageVolume // +optional diff --git a/go-controller/vendor/k8s.io/api/core/v1/lifecycle.go b/go-controller/vendor/k8s.io/api/core/v1/lifecycle.go index 21b931b67a..21ca90e815 100644 --- a/go-controller/vendor/k8s.io/api/core/v1/lifecycle.go +++ b/go-controller/vendor/k8s.io/api/core/v1/lifecycle.go @@ -16,10 +16,6 @@ limitations under the License. package v1 -import ( - "k8s.io/apimachinery/pkg/runtime/schema" -) - // APILifecycleIntroduced returns the release in which the API struct was introduced as int versions of major and minor for comparison. func (in *ComponentStatus) APILifecycleIntroduced() (major, minor int) { return 1, 0 @@ -39,23 +35,3 @@ func (in *ComponentStatusList) APILifecycleIntroduced() (major, minor int) { func (in *ComponentStatusList) APILifecycleDeprecated() (major, minor int) { return 1, 19 } - -// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -func (in *Endpoints) APILifecycleDeprecated() (major, minor int) { - return 1, 33 -} - -// APILifecycleReplacement returns the GVK of the replacement for the given API -func (in *Endpoints) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1", Kind: "EndpointSlice"} -} - -// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -func (in *EndpointsList) APILifecycleDeprecated() (major, minor int) { - return 1, 33 -} - -// APILifecycleReplacement returns the GVK of the replacement for the given API -func (in *EndpointsList) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "discovery.k8s.io", Version: "v1", Kind: "EndpointSliceList"} -} diff --git a/go-controller/vendor/k8s.io/api/core/v1/types.go b/go-controller/vendor/k8s.io/api/core/v1/types.go index f7641e485a..fb2c1c7453 100644 --- a/go-controller/vendor/k8s.io/api/core/v1/types.go +++ b/go-controller/vendor/k8s.io/api/core/v1/types.go @@ -217,7 +217,7 @@ type VolumeSource struct { // The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. // The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. // The volume will be mounted read-only (ro) and non-executable files (noexec). - // Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. + // Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). // The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. // +featureGate=ImageVolume // +optional @@ -2437,9 +2437,9 @@ type SecretKeySelector struct { Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"` } -// EnvFromSource represents the source of a set of ConfigMaps or Secrets +// EnvFromSource represents the source of a set of ConfigMaps type EnvFromSource struct { - // Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. + // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. // +optional Prefix string `json:"prefix,omitempty" protobuf:"bytes,1,opt,name=prefix"` // The ConfigMap to select from @@ -2980,78 +2980,6 @@ type LifecycleHandler struct { Sleep *SleepAction `json:"sleep,omitempty" protobuf:"bytes,4,opt,name=sleep"` } -// Signal defines the stop signal of containers -// +enum -type Signal string - -const ( - SIGABRT Signal = "SIGABRT" - SIGALRM Signal = "SIGALRM" - SIGBUS Signal = "SIGBUS" - SIGCHLD Signal = "SIGCHLD" - SIGCLD Signal = "SIGCLD" - SIGCONT Signal = "SIGCONT" - SIGFPE Signal = "SIGFPE" - SIGHUP Signal = "SIGHUP" - SIGILL Signal = "SIGILL" - SIGINT Signal = "SIGINT" - SIGIO Signal = "SIGIO" - SIGIOT Signal = "SIGIOT" - SIGKILL Signal = "SIGKILL" - SIGPIPE Signal = "SIGPIPE" - SIGPOLL Signal = "SIGPOLL" - SIGPROF Signal = "SIGPROF" - SIGPWR Signal = "SIGPWR" - SIGQUIT Signal = "SIGQUIT" - SIGSEGV Signal = "SIGSEGV" - SIGSTKFLT Signal = "SIGSTKFLT" - SIGSTOP Signal = "SIGSTOP" - SIGSYS Signal = "SIGSYS" - SIGTERM Signal = "SIGTERM" - SIGTRAP Signal = "SIGTRAP" - SIGTSTP Signal = "SIGTSTP" - SIGTTIN Signal = "SIGTTIN" - SIGTTOU Signal = "SIGTTOU" - SIGURG Signal = "SIGURG" - SIGUSR1 Signal = "SIGUSR1" - SIGUSR2 Signal = "SIGUSR2" - SIGVTALRM Signal = "SIGVTALRM" - SIGWINCH Signal = "SIGWINCH" - SIGXCPU Signal = "SIGXCPU" - SIGXFSZ Signal = "SIGXFSZ" - SIGRTMIN Signal = "SIGRTMIN" - SIGRTMINPLUS1 Signal = "SIGRTMIN+1" - SIGRTMINPLUS2 Signal = "SIGRTMIN+2" - SIGRTMINPLUS3 Signal = "SIGRTMIN+3" - SIGRTMINPLUS4 Signal = "SIGRTMIN+4" - SIGRTMINPLUS5 Signal = "SIGRTMIN+5" - SIGRTMINPLUS6 Signal = "SIGRTMIN+6" - SIGRTMINPLUS7 Signal = "SIGRTMIN+7" - SIGRTMINPLUS8 Signal = "SIGRTMIN+8" - SIGRTMINPLUS9 Signal = "SIGRTMIN+9" - SIGRTMINPLUS10 Signal = "SIGRTMIN+10" - SIGRTMINPLUS11 Signal = "SIGRTMIN+11" - SIGRTMINPLUS12 Signal = "SIGRTMIN+12" - SIGRTMINPLUS13 Signal = "SIGRTMIN+13" - SIGRTMINPLUS14 Signal = "SIGRTMIN+14" - SIGRTMINPLUS15 Signal = "SIGRTMIN+15" - SIGRTMAXMINUS14 Signal = "SIGRTMAX-14" - SIGRTMAXMINUS13 Signal = "SIGRTMAX-13" - SIGRTMAXMINUS12 Signal = "SIGRTMAX-12" - SIGRTMAXMINUS11 Signal = "SIGRTMAX-11" - SIGRTMAXMINUS10 Signal = "SIGRTMAX-10" - SIGRTMAXMINUS9 Signal = "SIGRTMAX-9" - SIGRTMAXMINUS8 Signal = "SIGRTMAX-8" - SIGRTMAXMINUS7 Signal = "SIGRTMAX-7" - SIGRTMAXMINUS6 Signal = "SIGRTMAX-6" - SIGRTMAXMINUS5 Signal = "SIGRTMAX-5" - SIGRTMAXMINUS4 Signal = "SIGRTMAX-4" - SIGRTMAXMINUS3 Signal = "SIGRTMAX-3" - SIGRTMAXMINUS2 Signal = "SIGRTMAX-2" - SIGRTMAXMINUS1 Signal = "SIGRTMAX-1" - SIGRTMAX Signal = "SIGRTMAX" -) - // Lifecycle describes actions that the management system should take in response to container lifecycle // events. For the PostStart and PreStop lifecycle handlers, management of the container blocks // until the action is complete, unless the container process fails, in which case the handler is aborted. @@ -3073,11 +3001,6 @@ type Lifecycle struct { // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks // +optional PreStop *LifecycleHandler `json:"preStop,omitempty" protobuf:"bytes,2,opt,name=preStop"` - // StopSignal defines which signal will be sent to a container when it is being stopped. - // If not specified, the default is defined by the container runtime in use. - // StopSignal can only be set for Pods with a non-empty .spec.os.name - // +optional - StopSignal *Signal `json:"stopSignal,omitempty" protobuf:"bytes,3,opt,name=stopSignal"` } type ConditionStatus string @@ -3231,10 +3154,6 @@ type ContainerStatus struct { // +listType=map // +listMapKey=name AllocatedResourcesStatus []ResourceStatus `json:"allocatedResourcesStatus,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,14,rep,name=allocatedResourcesStatus"` - // StopSignal reports the effective stop signal for this container - // +featureGate=ContainerStopSignals - // +optional - StopSignal *Signal `json:"stopSignal,omitempty" protobuf:"bytes,15,opt,name=stopSignal"` } // ResourceStatus represents the status of a single resource allocated to a Pod. @@ -3359,17 +3278,6 @@ const ( // PodReadyToStartContainers pod sandbox is successfully configured and // the pod is ready to launch containers. PodReadyToStartContainers PodConditionType = "PodReadyToStartContainers" - // PodResizePending indicates that the pod has been resized, but kubelet has not - // yet allocated the resources. If both PodResizePending and PodResizeInProgress - // are set, it means that a new resize was requested in the middle of a previous - // pod resize that is still in progress. - PodResizePending PodConditionType = "PodResizePending" - // PodResizeInProgress indicates that a resize is in progress, and is present whenever - // the Kubelet has allocated resources for the resize, but has not yet actuated all of - // the required changes. - // If both PodResizePending and PodResizeInProgress are set, it means that a new resize was - // requested in the middle of a previous pod resize that is still in progress. - PodResizeInProgress PodConditionType = "PodResizeInProgress" ) // These are reasons for a pod's transition to a condition. @@ -3393,18 +3301,6 @@ const ( // PodReasonPreemptionByScheduler reason in DisruptionTarget pod condition indicates that the // disruption was initiated by scheduler's preemption. PodReasonPreemptionByScheduler = "PreemptionByScheduler" - - // PodReasonDeferred reason in PodResizePending pod condition indicates the proposed resize is feasible in - // theory (it fits on this node) but is not possible right now. - PodReasonDeferred = "Deferred" - - // PodReasonInfeasible reason in PodResizePending pod condition indicates the proposed resize is not - // feasible and is rejected; it may not be re-evaluated - PodReasonInfeasible = "Infeasible" - - // PodReasonError reason in PodResizeInProgress pod condition indicates that an error occurred while - // actuating the resize. - PodReasonError = "Error" ) // PodCondition contains details for the current condition of this pod. @@ -3412,11 +3308,6 @@ type PodCondition struct { // Type is the type of the condition. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"` - // If set, this represents the .metadata.generation that the pod condition was set based upon. - // This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field. - // +featureGate=PodObservedGenerationTracking - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,7,opt,name=observedGeneration"` // Status is the status of the condition. // Can be True, False, Unknown. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions @@ -3435,10 +3326,12 @@ type PodCondition struct { Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` } -// Deprecated: PodResizeStatus shows status of desired resize of a pod's containers. +// PodResizeStatus shows status of desired resize of a pod's containers. type PodResizeStatus string const ( + // Pod resources resize has been requested and will be evaluated by node. + PodResizeStatusProposed PodResizeStatus = "Proposed" // Pod resources resize has been accepted by node and is being actuated. PodResizeStatusInProgress PodResizeStatus = "InProgress" // Node cannot resize the pod at this time and will keep retrying. @@ -3734,6 +3627,7 @@ type PodAffinityTerm struct { // pod labels will be ignored. The default value is empty. // The same key is forbidden to exist in both matchLabelKeys and labelSelector. // Also, matchLabelKeys cannot be set when labelSelector isn't set. + // This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). // // +listType=atomic // +optional @@ -3746,6 +3640,7 @@ type PodAffinityTerm struct { // pod labels will be ignored. The default value is empty. // The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. // Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + // This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). // // +listType=atomic // +optional @@ -3897,7 +3792,7 @@ type PodSpec struct { // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. // The resourceRequirements of an init container are taken into account during scheduling // by finding the highest request/limit for each resource type, and then using the max of - // that value or the sum of the normal containers. Limits are applied to init containers + // of that value or the sum of the normal containers. Limits are applied to init containers // in a similar fashion. // Init containers cannot currently be added or removed. // Cannot be updated. @@ -4406,6 +4301,7 @@ type TopologySpreadConstraint struct { // - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. // // If this value is nil, the behavior is equivalent to the Honor policy. + // This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. // +optional NodeAffinityPolicy *NodeInclusionPolicy `json:"nodeAffinityPolicy,omitempty" protobuf:"bytes,6,opt,name=nodeAffinityPolicy"` // NodeTaintsPolicy indicates how we will treat node taints when calculating @@ -4415,6 +4311,7 @@ type TopologySpreadConstraint struct { // - Ignore: node taints are ignored. All nodes are included. // // If this value is nil, the behavior is equivalent to the Ignore policy. + // This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. // +optional NodeTaintsPolicy *NodeInclusionPolicy `json:"nodeTaintsPolicy,omitempty" protobuf:"bytes,7,opt,name=nodeTaintsPolicy"` // MatchLabelKeys is a set of pod label keys to select the pods over which @@ -4944,11 +4841,6 @@ type EphemeralContainer struct { // state of a system, especially if the node that hosts the pod cannot contact the control // plane. type PodStatus struct { - // If set, this represents the .metadata.generation that the pod status was set based upon. - // This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field. - // +featureGate=PodObservedGenerationTracking - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,17,opt,name=observedGeneration"` // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. // The conditions array, the reason and message fields, and the individual container status // arrays contain more detail about the pod's status. @@ -5076,9 +4968,6 @@ type PodStatus struct { // Status of resources resize desired for pod's containers. // It is empty if no resources resize is pending. // Any changes to container resources will automatically set this to "Proposed" - // Deprecated: Resize status is moved to two pod conditions PodResizePending and PodResizeInProgress. - // PodResizePending will track states where the spec has been resized, but the Kubelet has not yet allocated the resources. - // PodResizeInProgress will track in-progress resizes, and should be present whenever allocated resources != acknowledged resources. // +featureGate=InPlacePodVerticalScaling // +optional Resize PodResizeStatus `json:"resize,omitempty" protobuf:"bytes,14,opt,name=resize,casttype=PodResizeStatus"` @@ -5210,18 +5099,12 @@ type ReplicationControllerSpec struct { // Defaults to 1. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller // +optional - // +k8s:optional - // +default=1 - // +k8s:minimum=0 Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing, for it to be considered available. // Defaults to 0 (pod will be considered available as soon as it is ready) // +optional - // +k8s:optional - // +default=0 - // +k8s:minimum=0 MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"` // Selector is a label query over pods that should match the Replicas count. @@ -5451,27 +5334,14 @@ const ( // These are valid values for the TrafficDistribution field of a Service. const ( - // Indicates a preference for routing traffic to endpoints that are in the same - // zone as the client. Users should not set this value unless they have ensured - // that clients and endpoints are distributed in such a way that the "same zone" - // preference will not result in endpoints getting overloaded. + // Indicates a preference for routing traffic to endpoints that are + // topologically proximate to the client. The interpretation of "topologically + // proximate" may vary across implementations and could encompass endpoints + // within the same node, rack, zone, or even region. Setting this value gives + // implementations permission to make different tradeoffs, e.g. optimizing for + // proximity rather than equal distribution of load. Users should not set this + // value if such tradeoffs are not acceptable. ServiceTrafficDistributionPreferClose = "PreferClose" - - // Indicates a preference for routing traffic to endpoints that are in the same - // zone as the client. Users should not set this value unless they have ensured - // that clients and endpoints are distributed in such a way that the "same zone" - // preference will not result in endpoints getting overloaded. - // This is an alias for "PreferClose", but it is an Alpha feature and is only - // recognized if the PreferSameTrafficDistribution feature gate is enabled. - ServiceTrafficDistributionPreferSameZone = "PreferSameZone" - - // Indicates a preference for routing traffic to endpoints that are on the same - // node as the client. Users should not set this value unless they have ensured - // that clients and endpoints are distributed in such a way that the "same node" - // preference will not result in endpoints getting overloaded. - // This is an Alpha feature and is only recognized if the - // PreferSameTrafficDistribution feature gate is enabled. - ServiceTrafficDistributionPreferSameNode = "PreferSameNode" ) // These are the valid conditions of a service. @@ -5819,12 +5689,13 @@ type ServiceSpec struct { // +optional InternalTrafficPolicy *ServiceInternalTrafficPolicy `json:"internalTrafficPolicy,omitempty" protobuf:"bytes,22,opt,name=internalTrafficPolicy"` - // TrafficDistribution offers a way to express preferences for how traffic - // is distributed to Service endpoints. Implementations can use this field - // as a hint, but are not required to guarantee strict adherence. If the - // field is not set, the implementation will apply its default routing - // strategy. If set to "PreferClose", implementations should prioritize - // endpoints that are in the same zone. + // TrafficDistribution offers a way to express preferences for how traffic is + // distributed to Service endpoints. Implementations can use this field as a + // hint, but are not required to guarantee strict adherence. If the field is + // not set, the implementation will apply its default routing strategy. If set + // to "PreferClose", implementations should prioritize endpoints that are + // topologically close (e.g., same zone). + // This is a beta field and requires enabling ServiceTrafficDistribution feature. // +featureGate=ServiceTrafficDistribution // +optional TrafficDistribution *string `json:"trafficDistribution,omitempty" protobuf:"bytes,23,opt,name=trafficDistribution"` @@ -6017,11 +5888,6 @@ type ServiceAccountList struct { // Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] // }, // ] -// -// Endpoints is a legacy API and does not contain information about all Service features. -// Use discoveryv1.EndpointSlice for complete information about Service endpoints. -// -// Deprecated: This API is deprecated in v1.33+. Use discoveryv1.EndpointSlice. type Endpoints struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -6054,8 +5920,6 @@ type Endpoints struct { // // a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], // b: [ 10.10.1.1:309, 10.10.2.2:309 ] -// -// Deprecated: This API is deprecated in v1.33+. type EndpointSubset struct { // IP addresses which offer the related ports that are marked as ready. These endpoints // should be considered safe for load balancers and clients to utilize. @@ -6075,7 +5939,6 @@ type EndpointSubset struct { } // EndpointAddress is a tuple that describes single IP address. -// Deprecated: This API is deprecated in v1.33+. // +structType=atomic type EndpointAddress struct { // The IP of this endpoint. @@ -6094,7 +5957,6 @@ type EndpointAddress struct { } // EndpointPort is a tuple that describes a single port. -// Deprecated: This API is deprecated in v1.33+. // +structType=atomic type EndpointPort struct { // The name of this port. This must match the 'name' field in the @@ -6136,7 +5998,6 @@ type EndpointPort struct { // +k8s:prerelease-lifecycle-gen:introduced=1.0 // EndpointsList is a list of endpoints. -// Deprecated: This API is deprecated in v1.33+. type EndpointsList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. @@ -6305,15 +6166,6 @@ type NodeSystemInfo struct { OperatingSystem string `json:"operatingSystem" protobuf:"bytes,9,opt,name=operatingSystem"` // The Architecture reported by the node Architecture string `json:"architecture" protobuf:"bytes,10,opt,name=architecture"` - // Swap Info reported by the node. - Swap *NodeSwapStatus `json:"swap,omitempty" protobuf:"bytes,11,opt,name=swap"` -} - -// NodeSwapStatus represents swap memory information. -type NodeSwapStatus struct { - // Total amount of swap memory in bytes. - // +optional - Capacity *int64 `json:"capacity,omitempty" protobuf:"varint,1,opt,name=capacity"` } // NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. @@ -7415,9 +7267,6 @@ const ( ResourceQuotaScopePriorityClass ResourceQuotaScope = "PriorityClass" // Match all pod objects that have cross-namespace pod (anti)affinity mentioned. ResourceQuotaScopeCrossNamespacePodAffinity ResourceQuotaScope = "CrossNamespacePodAffinity" - - // Match all pvc objects that have volume attributes class mentioned. - ResourceQuotaScopeVolumeAttributesClass ResourceQuotaScope = "VolumeAttributesClass" ) // ResourceQuotaSpec defines the desired hard limits to enforce for Quota. diff --git a/go-controller/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index 9e987eefdd..89ce3d2303 100644 --- a/go-controller/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -474,7 +474,6 @@ var map_ContainerStatus = map[string]string{ "volumeMounts": "Status of volume mounts.", "user": "User represents user identity information initially attached to the first process of the container", "allocatedResourcesStatus": "AllocatedResourcesStatus represents the status of various resources allocated for this Pod.", - "stopSignal": "StopSignal reports the effective stop signal for this container", } func (ContainerStatus) SwaggerDoc() map[string]string { @@ -541,7 +540,7 @@ func (EmptyDirVolumeSource) SwaggerDoc() map[string]string { } var map_EndpointAddress = map[string]string{ - "": "EndpointAddress is a tuple that describes single IP address. Deprecated: This API is deprecated in v1.33+.", + "": "EndpointAddress is a tuple that describes single IP address.", "ip": "The IP of this endpoint. May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), or link-local multicast (224.0.0.0/24 or ff02::/16).", "hostname": "The Hostname of this endpoint", "nodeName": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", @@ -553,7 +552,7 @@ func (EndpointAddress) SwaggerDoc() map[string]string { } var map_EndpointPort = map[string]string{ - "": "EndpointPort is a tuple that describes a single port. Deprecated: This API is deprecated in v1.33+.", + "": "EndpointPort is a tuple that describes a single port.", "name": "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", "port": "The port number of the endpoint.", "protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", @@ -565,7 +564,7 @@ func (EndpointPort) SwaggerDoc() map[string]string { } var map_EndpointSubset = map[string]string{ - "": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n\n\t{\n\t Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n\t Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n\t}\n\nThe resulting set of endpoints can be viewed as:\n\n\ta: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n\tb: [ 10.10.1.1:309, 10.10.2.2:309 ]\n\nDeprecated: This API is deprecated in v1.33+.", + "": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n\n\t{\n\t Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n\t Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n\t}\n\nThe resulting set of endpoints can be viewed as:\n\n\ta: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n\tb: [ 10.10.1.1:309, 10.10.2.2:309 ]", "addresses": "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", "notReadyAddresses": "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", "ports": "Port numbers available on the related IP addresses.", @@ -576,7 +575,7 @@ func (EndpointSubset) SwaggerDoc() map[string]string { } var map_Endpoints = map[string]string{ - "": "Endpoints is a collection of endpoints that implement the actual service. Example:\n\n\t Name: \"mysvc\",\n\t Subsets: [\n\t {\n\t Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n\t Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n\t },\n\t {\n\t Addresses: [{\"ip\": \"10.10.3.3\"}],\n\t Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n\t },\n\t]\n\nEndpoints is a legacy API and does not contain information about all Service features. Use discoveryv1.EndpointSlice for complete information about Service endpoints.\n\nDeprecated: This API is deprecated in v1.33+. Use discoveryv1.EndpointSlice.", + "": "Endpoints is a collection of endpoints that implement the actual service. Example:\n\n\t Name: \"mysvc\",\n\t Subsets: [\n\t {\n\t Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n\t Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n\t },\n\t {\n\t Addresses: [{\"ip\": \"10.10.3.3\"}],\n\t Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n\t },\n\t]", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "subsets": "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", } @@ -586,7 +585,7 @@ func (Endpoints) SwaggerDoc() map[string]string { } var map_EndpointsList = map[string]string{ - "": "EndpointsList is a list of endpoints. Deprecated: This API is deprecated in v1.33+.", + "": "EndpointsList is a list of endpoints.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of endpoints.", } @@ -596,8 +595,8 @@ func (EndpointsList) SwaggerDoc() map[string]string { } var map_EnvFromSource = map[string]string{ - "": "EnvFromSource represents the source of a set of ConfigMaps or Secrets", - "prefix": "Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER.", + "": "EnvFromSource represents the source of a set of ConfigMaps", + "prefix": "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", "configMapRef": "The ConfigMap to select from", "secretRef": "The Secret to select from", } @@ -958,10 +957,9 @@ func (KeyToPath) SwaggerDoc() map[string]string { } var map_Lifecycle = map[string]string{ - "": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", - "postStart": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - "preStop": "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - "stopSignal": "StopSignal defines which signal will be sent to a container when it is being stopped. If not specified, the default is defined by the container runtime in use. StopSignal can only be set for Pods with a non-empty .spec.os.name", + "": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", + "postStart": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + "preStop": "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", } func (Lifecycle) SwaggerDoc() map[string]string { @@ -1337,15 +1335,6 @@ func (NodeStatus) SwaggerDoc() map[string]string { return map_NodeStatus } -var map_NodeSwapStatus = map[string]string{ - "": "NodeSwapStatus represents swap memory information.", - "capacity": "Total amount of swap memory in bytes.", -} - -func (NodeSwapStatus) SwaggerDoc() map[string]string { - return map_NodeSwapStatus -} - var map_NodeSystemInfo = map[string]string{ "": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", "machineID": "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", @@ -1358,7 +1347,6 @@ var map_NodeSystemInfo = map[string]string{ "kubeProxyVersion": "Deprecated: KubeProxy Version reported by the node.", "operatingSystem": "The Operating System reported by the node", "architecture": "The Architecture reported by the node", - "swap": "Swap Info reported by the node.", } func (NodeSystemInfo) SwaggerDoc() map[string]string { @@ -1595,8 +1583,8 @@ var map_PodAffinityTerm = map[string]string{ "namespaces": "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\".", "topologyKey": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", "namespaceSelector": "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces.", - "matchLabelKeys": "MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set.", - "mismatchLabelKeys": "MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set.", + "matchLabelKeys": "MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).", + "mismatchLabelKeys": "MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).", } func (PodAffinityTerm) SwaggerDoc() map[string]string { @@ -1629,7 +1617,6 @@ func (PodAttachOptions) SwaggerDoc() map[string]string { var map_PodCondition = map[string]string{ "": "PodCondition contains details for the current condition of this pod.", "type": "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - "observedGeneration": "If set, this represents the .metadata.generation that the pod condition was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", "status": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", "lastProbeTime": "Last time we probed the condition.", "lastTransitionTime": "Last time the condition transitioned from one status to another.", @@ -1812,7 +1799,7 @@ func (PodSignature) SwaggerDoc() map[string]string { var map_PodSpec = map[string]string{ "": "PodSpec is a description of a pod.", "volumes": "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", - "initContainers": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", + "initContainers": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", "containers": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.", "ephemeralContainers": "List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource.", "restartPolicy": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", @@ -1859,7 +1846,6 @@ func (PodSpec) SwaggerDoc() map[string]string { var map_PodStatus = map[string]string{ "": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.", - "observedGeneration": "If set, this represents the .metadata.generation that the pod status was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", "phase": "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", "conditions": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", "message": "A human readable message indicating details about why the pod is in this condition.", @@ -1874,7 +1860,7 @@ var map_PodStatus = map[string]string{ "containerStatuses": "Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "qosClass": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes", "ephemeralContainerStatuses": "Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - "resize": "Status of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\" Deprecated: Resize status is moved to two pod conditions PodResizePending and PodResizeInProgress. PodResizePending will track states where the spec has been resized, but the Kubelet has not yet allocated the resources. PodResizeInProgress will track in-progress resizes, and should be present whenever allocated resources != acknowledged resources.", + "resize": "Status of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\"", "resourceClaimStatuses": "Status of resource claims.", } @@ -2501,7 +2487,7 @@ var map_ServiceSpec = map[string]string{ "allocateLoadBalancerNodePorts": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.", "loadBalancerClass": "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.", "internalTrafficPolicy": "InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. If set to \"Local\", the proxy will assume that pods only want to talk to endpoints of the service on the same node as the pod, dropping the traffic if there are no local endpoints. The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features).", - "trafficDistribution": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are in the same zone.", + "trafficDistribution": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is a beta field and requires enabling ServiceTrafficDistribution feature.", } func (ServiceSpec) SwaggerDoc() map[string]string { @@ -2633,8 +2619,8 @@ var map_TopologySpreadConstraint = map[string]string{ "whenUnsatisfiable": "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: ", "labelSelector": "LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.", "minDomains": "MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule.\n\nFor example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: ", - "nodeAffinityPolicy": "NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations.\n\nIf this value is nil, the behavior is equivalent to the Honor policy.", - "nodeTaintsPolicy": "NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included.\n\nIf this value is nil, the behavior is equivalent to the Ignore policy.", + "nodeAffinityPolicy": "NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations.\n\nIf this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", + "nodeTaintsPolicy": "NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included.\n\nIf this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.", "matchLabelKeys": "MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.\n\nThis is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).", } @@ -2774,7 +2760,7 @@ var map_VolumeSource = map[string]string{ "storageos": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", "csi": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", "ephemeral": "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", - "image": "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. The volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.", + "image": "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. The volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.", } func (VolumeSource) SwaggerDoc() map[string]string { diff --git a/go-controller/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go index 619c525427..3f669092ef 100644 --- a/go-controller/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -1055,11 +1055,6 @@ func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.StopSignal != nil { - in, out := &in.StopSignal, &out.StopSignal - *out = new(Signal) - **out = **in - } return } @@ -2106,11 +2101,6 @@ func (in *Lifecycle) DeepCopyInto(out *Lifecycle) { *out = new(LifecycleHandler) (*in).DeepCopyInto(*out) } - if in.StopSignal != nil { - in, out := &in.StopSignal, &out.StopSignal - *out = new(Signal) - **out = **in - } return } @@ -3012,7 +3002,7 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { copy(*out, *in) } out.DaemonEndpoints = in.DaemonEndpoints - in.NodeInfo.DeepCopyInto(&out.NodeInfo) + out.NodeInfo = in.NodeInfo if in.Images != nil { in, out := &in.Images, &out.Images *out = make([]ContainerImage, len(*in)) @@ -3060,35 +3050,9 @@ func (in *NodeStatus) DeepCopy() *NodeStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeSwapStatus) DeepCopyInto(out *NodeSwapStatus) { - *out = *in - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSwapStatus. -func (in *NodeSwapStatus) DeepCopy() *NodeSwapStatus { - if in == nil { - return nil - } - out := new(NodeSwapStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeSystemInfo) DeepCopyInto(out *NodeSystemInfo) { *out = *in - if in.Swap != nil { - in, out := &in.Swap, &out.Swap - *out = new(NodeSwapStatus) - (*in).DeepCopyInto(*out) - } return } diff --git a/go-controller/vendor/k8s.io/api/discovery/v1/doc.go b/go-controller/vendor/k8s.io/api/discovery/v1/doc.go index 43e30b7f43..01913669ff 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=discovery.k8s.io -package v1 +package v1 // import "k8s.io/api/discovery/v1" diff --git a/go-controller/vendor/k8s.io/api/discovery/v1/generated.pb.go b/go-controller/vendor/k8s.io/api/discovery/v1/generated.pb.go index 443ff8f8f3..5792481dc1 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1/generated.pb.go @@ -214,38 +214,10 @@ func (m *EndpointSliceList) XXX_DiscardUnknown() { var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo -func (m *ForNode) Reset() { *m = ForNode{} } -func (*ForNode) ProtoMessage() {} -func (*ForNode) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{6} -} -func (m *ForNode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ForNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForNode.Merge(m, src) -} -func (m *ForNode) XXX_Size() int { - return m.Size() -} -func (m *ForNode) XXX_DiscardUnknown() { - xxx_messageInfo_ForNode.DiscardUnknown(m) -} - -var xxx_messageInfo_ForNode proto.InternalMessageInfo - func (m *ForZone) Reset() { *m = ForZone{} } func (*ForZone) ProtoMessage() {} func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_2237b452324cf77e, []int{7} + return fileDescriptor_2237b452324cf77e, []int{6} } func (m *ForZone) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -278,7 +250,6 @@ func init() { proto.RegisterType((*EndpointPort)(nil), "k8s.io.api.discovery.v1.EndpointPort") proto.RegisterType((*EndpointSlice)(nil), "k8s.io.api.discovery.v1.EndpointSlice") proto.RegisterType((*EndpointSliceList)(nil), "k8s.io.api.discovery.v1.EndpointSliceList") - proto.RegisterType((*ForNode)(nil), "k8s.io.api.discovery.v1.ForNode") proto.RegisterType((*ForZone)(nil), "k8s.io.api.discovery.v1.ForZone") } @@ -287,64 +258,62 @@ func init() { } var fileDescriptor_2237b452324cf77e = []byte{ - // 902 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0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, 0x30, 0x41, 0x3a, 0x54, 0x85, 0xd7, 0x77, 0xfa, 0xf6, 0xc6, 0xd1, 0xf2, 0xee, 0x57, - 0x69, 0xf4, 0x1a, 0x61, 0xa4, 0x95, 0xc1, 0x5f, 0x22, 0x55, 0x18, 0xc9, 0xcc, 0xbe, 0xd4, 0x7b, - 0xb0, 0x51, 0x4f, 0x98, 0xef, 0xed, 0x55, 0x9a, 0xaa, 0x58, 0x31, 0x52, 0x4a, 0x38, 0x7f, 0x28, - 0xe8, 0xfe, 0x92, 0xb3, 0x5f, 0xc7, 0x8c, 0xe3, 0xef, 0x56, 0xdc, 0x75, 0x5f, 0xcd, 0x5d, 0x11, - 0x2d, 0xbd, 0x6d, 0xda, 0xb2, 0x46, 0x3a, 0xce, 0x7e, 0x85, 0xd4, 0x98, 0xc3, 0xb4, 0xf6, 0x63, - 0xf3, 0x53, 0x23, 0x0b, 0x6b, 0x0f, 0xf0, 0x85, 0x08, 0x26, 0xa5, 0x86, 0x73, 0x80, 0x76, 0xaa, - 0xce, 0xc7, 0xc3, 0xa5, 0xee, 0xde, 0xad, 0xe8, 0x9d, 0x0e, 0xaf, 0xc8, 0x62, 0xd8, 0x36, 0x93, - 0xbd, 0x4f, 0x6f, 0x6e, 0xad, 0xde, 0xf3, 0x5b, 0xab, 0xf7, 0xe2, 0xd6, 0xea, 0xfd, 0x5c, 0x58, - 0xca, 0x4d, 0x61, 0x29, 0xcf, 0x0b, 0x4b, 0x79, 0x51, 0x58, 0xca, 0xdf, 0x85, 0xa5, 0xfc, 0xf6, - 0x8f, 0xd5, 0x7b, 0xb6, 0xbf, 0xe6, 0x97, 0xe2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xfc, - 0xbe, 0xad, 0x6c, 0x08, 0x00, 0x00, + // 877 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x6f, 0xdc, 0x44, + 0x18, 0x5e, 0x67, 0x63, 0x62, 0x8f, 0x13, 0xd1, 0x8e, 0x90, 0x62, 0x2d, 0xc8, 0x5e, 0x8c, 0x0a, + 0x2b, 0x45, 0x78, 0x49, 0x84, 0x50, 0x41, 0xe2, 0x10, 0xd3, 0xd0, 0xf2, 0x15, 0xa2, 0x69, 0x4e, + 0x15, 0x52, 0x71, 0xec, 0x37, 0x5e, 0x93, 0xd8, 0x63, 0x79, 0x26, 0x2b, 0x2d, 0x27, 0x2e, 0x9c, + 0xe1, 0x17, 0x71, 0x44, 0x39, 0xf6, 0x46, 0x4f, 0x16, 0x31, 0x7f, 0x81, 0x53, 0x4f, 0x68, 0xc6, + 0x9f, 0x61, 0xb3, 0xda, 0xde, 0x3c, 0xcf, 0x3c, 0xcf, 0xfb, 0xf1, 0xcc, 0xcc, 0x6b, 0xf4, 0xc1, + 0xc5, 0x43, 0xe6, 0xc6, 0x74, 0xea, 0x67, 0xf1, 0x34, 0x8c, 0x59, 0x40, 0xe7, 0x90, 0x2f, 0xa6, + 0xf3, 0xfd, 0x69, 0x04, 0x29, 0xe4, 0x3e, 0x87, 0xd0, 0xcd, 0x72, 0xca, 0x29, 0xde, 0xad, 0x88, + 0xae, 0x9f, 0xc5, 0x6e, 0x4b, 0x74, 0xe7, 0xfb, 0xa3, 0x0f, 0xa3, 0x98, 0xcf, 0xae, 0xce, 0xdc, + 0x80, 0x26, 0xd3, 0x88, 0x46, 0x74, 0x2a, 0xf9, 0x67, 0x57, 0xe7, 0x72, 0x25, 0x17, 0xf2, 0xab, + 0x8a, 0x33, 0x72, 0x7a, 0x09, 0x03, 0x9a, 0xc3, 0x1d, 0xb9, 0x46, 0x1f, 0x77, 0x9c, 0xc4, 0x0f, + 0x66, 0x71, 0x2a, 0x6a, 0xca, 0x2e, 0x22, 0x01, 0xb0, 0x69, 0x02, 0xdc, 0xbf, 0x4b, 0x35, 0x5d, + 0xa5, 0xca, 0xaf, 0x52, 0x1e, 0x27, 0xb0, 0x24, 0xf8, 0x64, 0x9d, 0x80, 0x05, 0x33, 0x48, 0xfc, + 0xff, 0xeb, 0x9c, 0x7f, 0x37, 0x91, 0x76, 0x94, 0x86, 0x19, 0x8d, 0x53, 0x8e, 0xf7, 0x90, 0xee, + 0x87, 0x61, 0x0e, 0x8c, 0x01, 0x33, 0x95, 0xf1, 0x70, 0xa2, 0x7b, 0x3b, 0x65, 0x61, 0xeb, 0x87, + 0x0d, 0x48, 0xba, 0x7d, 0xfc, 0x1c, 0xa1, 0x80, 0xa6, 0x61, 0xcc, 0x63, 0x9a, 0x32, 0x73, 0x63, + 0xac, 0x4c, 0x8c, 0x83, 0x3d, 0x77, 0x85, 0xb3, 0x6e, 0x93, 0xe3, 0x8b, 0x56, 0xe2, 0xe1, 0xeb, + 0xc2, 0x1e, 0x94, 0x85, 0x8d, 0x3a, 0x8c, 0xf4, 0x42, 0xe2, 0x09, 0xd2, 0x66, 0x94, 0xf1, 0xd4, + 0x4f, 0xc0, 0x1c, 0x8e, 0x95, 0x89, 0xee, 0x6d, 0x97, 0x85, 0xad, 0x3d, 0xa9, 0x31, 0xd2, 0xee, + 0xe2, 0x13, 0xa4, 0x73, 0x3f, 0x8f, 0x80, 0x13, 0x38, 0x37, 0x37, 0x65, 0x25, 0xef, 0xf5, 0x2b, + 0x11, 0x67, 0x23, 0x8a, 0xf8, 0xfe, 0xec, 0x27, 0x08, 0x04, 0x09, 0x72, 0x48, 0x03, 0xa8, 0x9a, + 0x3b, 0x6d, 0x94, 0xa4, 0x0b, 0x82, 0x7f, 0x55, 0x10, 0x0e, 0x21, 0xcb, 0x21, 0x10, 0x5e, 0x9d, + 0xd2, 0x8c, 0x5e, 0xd2, 0x68, 0x61, 0xaa, 0xe3, 0xe1, 0xc4, 0x38, 0xf8, 0x74, 0x6d, 0x97, 0xee, + 0xa3, 0x25, 0xed, 0x51, 0xca, 0xf3, 0x85, 0x37, 0xaa, 0x7b, 0xc6, 0xcb, 0x04, 0x72, 0x47, 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, 0xf1, 0x1e, 0xac, 0x8d, 0x27, + 0xcc, 0xf7, 0x76, 0xea, 0x98, 0xaa, 0x58, 0x31, 0x52, 0x85, 0x70, 0xfe, 0x50, 0xd0, 0xfd, 0x5b, + 0xce, 0x7e, 0x1b, 0x33, 0x8e, 0x7f, 0x58, 0x72, 0xd7, 0x7d, 0x3d, 0x77, 0x85, 0x5a, 0x7a, 0xdb, + 0x5e, 0xcb, 0x06, 0xe9, 0x39, 0xfb, 0x0d, 0x52, 0x63, 0x0e, 0x49, 0xe3, 0xc7, 0xfa, 0xc9, 0x20, + 0x0b, 0xeb, 0x1a, 0xf8, 0x4a, 0x88, 0x49, 0x15, 0xc3, 0xd9, 0x43, 0x5b, 0xf5, 0xcd, 0xc7, 0xe3, + 0x5b, 0xb7, 0x7b, 0xbb, 0xa6, 0xf7, 0x6e, 0xb8, 0xf7, 0xf9, 0xf5, 0x8d, 0x35, 0x78, 0x71, 0x63, + 0x0d, 0x5e, 0xde, 0x58, 0x83, 0x5f, 0x4a, 0x4b, 0xb9, 0x2e, 0x2d, 0xe5, 0x45, 0x69, 0x29, 0x2f, + 0x4b, 0x4b, 0xf9, 0xbb, 0xb4, 0x94, 0xdf, 0xff, 0xb1, 0x06, 0xcf, 0x76, 0x57, 0xfc, 0xd4, 0xff, + 0x0b, 0x00, 0x00, 0xff, 0xff, 0x76, 0x4b, 0x26, 0xe3, 0xee, 0x07, 0x00, 0x00, } func (m *Endpoint) Marshal() (dAtA []byte, err error) { @@ -531,20 +500,6 @@ func (m *EndpointHints) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.ForNodes) > 0 { - for iNdEx := len(m.ForNodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ForNodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } if len(m.ForZones) > 0 { for iNdEx := len(m.ForZones) - 1; iNdEx >= 0; iNdEx-- { { @@ -724,34 +679,6 @@ func (m *EndpointSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ForNode) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ForNode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ForNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *ForZone) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -866,12 +793,6 @@ func (m *EndpointHints) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - if len(m.ForNodes) > 0 { - for _, e := range m.ForNodes { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } return n } @@ -941,17 +862,6 @@ func (m *EndpointSliceList) Size() (n int) { return n } -func (m *ForNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - func (m *ForZone) Size() (n int) { if m == nil { return 0 @@ -1017,14 +927,8 @@ func (this *EndpointHints) String() string { repeatedStringForForZones += strings.Replace(strings.Replace(f.String(), "ForZone", "ForZone", 1), `&`, ``, 1) + "," } repeatedStringForForZones += "}" - repeatedStringForForNodes := "[]ForNode{" - for _, f := range this.ForNodes { - repeatedStringForForNodes += strings.Replace(strings.Replace(f.String(), "ForNode", "ForNode", 1), `&`, ``, 1) + "," - } - repeatedStringForForNodes += "}" s := strings.Join([]string{`&EndpointHints{`, `ForZones:` + repeatedStringForForZones + `,`, - `ForNodes:` + repeatedStringForForNodes + `,`, `}`, }, "") return s @@ -1081,16 +985,6 @@ func (this *EndpointSliceList) String() string { }, "") return s } -func (this *ForNode) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ForNode{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} func (this *ForZone) String() string { if this == nil { return "nil" @@ -1698,40 +1592,6 @@ func (m *EndpointHints) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ForNodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ForNodes = append(m.ForNodes, ForNode{}) - if err := m.ForNodes[len(m.ForNodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2222,88 +2082,6 @@ func (m *EndpointSliceList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ForNode) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ForNode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ForNode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ForZone) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go-controller/vendor/k8s.io/api/discovery/v1/generated.proto b/go-controller/vendor/k8s.io/api/discovery/v1/generated.proto index 569d8a916e..8ddf0dc5d3 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1/generated.proto +++ b/go-controller/vendor/k8s.io/api/discovery/v1/generated.proto @@ -31,12 +31,12 @@ option go_package = "k8s.io/api/discovery/v1"; // Endpoint represents a single logical "backend" implementing a service. message Endpoint { - // addresses of this endpoint. For EndpointSlices of addressType "IPv4" or "IPv6", - // the values are IP addresses in canonical form. The syntax and semantics of - // other addressType values are not defined. This must contain at least one - // address but no more than 100. EndpointSlices generated by the EndpointSlice - // controller will always have exactly 1 address. No semantics are defined for - // additional addresses beyond the first, and kube-proxy does not look at them. + // addresses of this endpoint. The contents of this field are interpreted + // according to the corresponding EndpointSlice addressType field. Consumers + // must handle different types of addresses in the context of their own + // capabilities. This must contain at least one address but no more than + // 100. These are all assumed to be fungible and clients may choose to only + // use the first element. Refer to: https://issue.k8s.io/106267 // +listType=set repeated string addresses = 1; @@ -82,42 +82,36 @@ message Endpoint { // EndpointConditions represents the current condition of an endpoint. message EndpointConditions { - // ready indicates that this endpoint is ready to receive traffic, + // ready indicates that this endpoint is prepared to receive traffic, // according to whatever system is managing the endpoint. A nil value - // should be interpreted as "true". In general, an endpoint should be - // marked ready if it is serving and not terminating, though this can - // be overridden in some cases, such as when the associated Service has - // set the publishNotReadyAddresses flag. + // indicates an unknown state. In most cases consumers should interpret this + // unknown state as ready. For compatibility reasons, ready should never be + // "true" for terminating endpoints, except when the normal readiness + // behavior is being explicitly overridden, for example when the associated + // Service has set the publishNotReadyAddresses flag. // +optional optional bool ready = 1; - // serving indicates that this endpoint is able to receive traffic, - // according to whatever system is managing the endpoint. For endpoints - // backed by pods, the EndpointSlice controller will mark the endpoint - // as serving if the pod's Ready condition is True. A nil value should be - // interpreted as "true". + // serving is identical to ready except that it is set regardless of the + // terminating state of endpoints. This condition should be set to true for + // a ready endpoint that is terminating. If nil, consumers should defer to + // the ready condition. // +optional optional bool serving = 2; // terminating indicates that this endpoint is terminating. A nil value - // should be interpreted as "false". + // indicates an unknown state. Consumers should interpret this unknown state + // to mean that the endpoint is not terminating. // +optional optional bool terminating = 3; } // EndpointHints provides hints describing how an endpoint should be consumed. message EndpointHints { - // forZones indicates the zone(s) this endpoint should be consumed by when - // using topology aware routing. May contain a maximum of 8 entries. + // forZones indicates the zone(s) this endpoint should be consumed by to + // enable topology aware routing. // +listType=atomic repeated ForZone forZones = 1; - - // forNodes indicates the node(s) this endpoint should be consumed by when - // using topology aware routing. May contain a maximum of 8 entries. - // This is an Alpha feature and is only used when the PreferSameTrafficDistribution - // feature gate is enabled. - // +listType=atomic - repeated ForNode forNodes = 2; } // EndpointPort represents a Port used by an EndpointSlice @@ -138,9 +132,8 @@ message EndpointPort { optional string protocol = 2; // port represents the port number of the endpoint. - // If the EndpointSlice is derived from a Kubernetes service, this must be set - // to the service's target port. EndpointSlices used for other purposes may have - // a nil port. + // If this is not specified, ports are not restricted and must be + // interpreted in the context of the specific consumer. optional int32 port = 3; // The application protocol for this port. @@ -162,12 +155,9 @@ message EndpointPort { optional string appProtocol = 4; } -// EndpointSlice represents a set of service endpoints. Most EndpointSlices are created by -// the EndpointSlice controller to represent the Pods selected by Service objects. For a -// given service there may be multiple EndpointSlice objects which must be joined to -// produce the full set of endpoints; you can find all of the slices for a given service -// by listing EndpointSlices in the service's namespace whose `kubernetes.io/service-name` -// label contains the service's name. +// EndpointSlice represents a subset of the endpoints that implement a service. +// For a given service there may be multiple EndpointSlice objects, selected by +// labels, which must be joined to produce the full set of endpoints. message EndpointSlice { // Standard object's metadata. // +optional @@ -179,10 +169,7 @@ message EndpointSlice { // supported: // * IPv4: Represents an IPv4 Address. // * IPv6: Represents an IPv6 Address. - // * FQDN: Represents a Fully Qualified Domain Name. (Deprecated) - // The EndpointSlice controller only generates, and kube-proxy only processes, - // slices of addressType "IPv4" and "IPv6". No semantics are defined for - // the "FQDN" type. + // * FQDN: Represents a Fully Qualified Domain Name. optional string addressType = 4; // endpoints is a list of unique endpoints in this slice. Each slice may @@ -191,11 +178,10 @@ message EndpointSlice { repeated Endpoint endpoints = 2; // ports specifies the list of network ports exposed by each endpoint in - // this slice. Each port must have a unique name. Each slice may include a + // this slice. Each port must have a unique name. When ports is empty, it + // indicates that there are no defined ports. When a port is defined with a + // nil port value, it indicates "all ports". Each slice may include a // maximum of 100 ports. - // Services always have at least 1 port, so EndpointSlices generated by the - // EndpointSlice controller will likewise always have at least 1 port. - // EndpointSlices used for other purposes may have an empty ports list. // +optional // +listType=atomic repeated EndpointPort ports = 3; @@ -211,12 +197,6 @@ message EndpointSliceList { repeated EndpointSlice items = 2; } -// ForNode provides information about which nodes should consume this endpoint. -message ForNode { - // name represents the name of the node. - optional string name = 1; -} - // ForZone provides information about which zones should consume this endpoint. message ForZone { // name represents the name of the zone. diff --git a/go-controller/vendor/k8s.io/api/discovery/v1/types.go b/go-controller/vendor/k8s.io/api/discovery/v1/types.go index 6f26953169..d6a9d0fced 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1/types.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1/types.go @@ -25,12 +25,9 @@ import ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.21 -// EndpointSlice represents a set of service endpoints. Most EndpointSlices are created by -// the EndpointSlice controller to represent the Pods selected by Service objects. For a -// given service there may be multiple EndpointSlice objects which must be joined to -// produce the full set of endpoints; you can find all of the slices for a given service -// by listing EndpointSlices in the service's namespace whose `kubernetes.io/service-name` -// label contains the service's name. +// EndpointSlice represents a subset of the endpoints that implement a service. +// For a given service there may be multiple EndpointSlice objects, selected by +// labels, which must be joined to produce the full set of endpoints. type EndpointSlice struct { metav1.TypeMeta `json:",inline"` @@ -44,10 +41,7 @@ type EndpointSlice struct { // supported: // * IPv4: Represents an IPv4 Address. // * IPv6: Represents an IPv6 Address. - // * FQDN: Represents a Fully Qualified Domain Name. (Deprecated) - // The EndpointSlice controller only generates, and kube-proxy only processes, - // slices of addressType "IPv4" and "IPv6". No semantics are defined for - // the "FQDN" type. + // * FQDN: Represents a Fully Qualified Domain Name. AddressType AddressType `json:"addressType" protobuf:"bytes,4,rep,name=addressType"` // endpoints is a list of unique endpoints in this slice. Each slice may @@ -56,11 +50,10 @@ type EndpointSlice struct { Endpoints []Endpoint `json:"endpoints" protobuf:"bytes,2,rep,name=endpoints"` // ports specifies the list of network ports exposed by each endpoint in - // this slice. Each port must have a unique name. Each slice may include a + // this slice. Each port must have a unique name. When ports is empty, it + // indicates that there are no defined ports. When a port is defined with a + // nil port value, it indicates "all ports". Each slice may include a // maximum of 100 ports. - // Services always have at least 1 port, so EndpointSlices generated by the - // EndpointSlice controller will likewise always have at least 1 port. - // EndpointSlices used for other purposes may have an empty ports list. // +optional // +listType=atomic Ports []EndpointPort `json:"ports" protobuf:"bytes,3,rep,name=ports"` @@ -83,12 +76,12 @@ const ( // Endpoint represents a single logical "backend" implementing a service. type Endpoint struct { - // addresses of this endpoint. For EndpointSlices of addressType "IPv4" or "IPv6", - // the values are IP addresses in canonical form. The syntax and semantics of - // other addressType values are not defined. This must contain at least one - // address but no more than 100. EndpointSlices generated by the EndpointSlice - // controller will always have exactly 1 address. No semantics are defined for - // additional addresses beyond the first, and kube-proxy does not look at them. + // addresses of this endpoint. The contents of this field are interpreted + // according to the corresponding EndpointSlice addressType field. Consumers + // must handle different types of addresses in the context of their own + // capabilities. This must contain at least one address but no more than + // 100. These are all assumed to be fungible and clients may choose to only + // use the first element. Refer to: https://issue.k8s.io/106267 // +listType=set Addresses []string `json:"addresses" protobuf:"bytes,1,rep,name=addresses"` @@ -134,42 +127,36 @@ type Endpoint struct { // EndpointConditions represents the current condition of an endpoint. type EndpointConditions struct { - // ready indicates that this endpoint is ready to receive traffic, + // ready indicates that this endpoint is prepared to receive traffic, // according to whatever system is managing the endpoint. A nil value - // should be interpreted as "true". In general, an endpoint should be - // marked ready if it is serving and not terminating, though this can - // be overridden in some cases, such as when the associated Service has - // set the publishNotReadyAddresses flag. + // indicates an unknown state. In most cases consumers should interpret this + // unknown state as ready. For compatibility reasons, ready should never be + // "true" for terminating endpoints, except when the normal readiness + // behavior is being explicitly overridden, for example when the associated + // Service has set the publishNotReadyAddresses flag. // +optional Ready *bool `json:"ready,omitempty" protobuf:"bytes,1,name=ready"` - // serving indicates that this endpoint is able to receive traffic, - // according to whatever system is managing the endpoint. For endpoints - // backed by pods, the EndpointSlice controller will mark the endpoint - // as serving if the pod's Ready condition is True. A nil value should be - // interpreted as "true". + // serving is identical to ready except that it is set regardless of the + // terminating state of endpoints. This condition should be set to true for + // a ready endpoint that is terminating. If nil, consumers should defer to + // the ready condition. // +optional Serving *bool `json:"serving,omitempty" protobuf:"bytes,2,name=serving"` // terminating indicates that this endpoint is terminating. A nil value - // should be interpreted as "false". + // indicates an unknown state. Consumers should interpret this unknown state + // to mean that the endpoint is not terminating. // +optional Terminating *bool `json:"terminating,omitempty" protobuf:"bytes,3,name=terminating"` } // EndpointHints provides hints describing how an endpoint should be consumed. type EndpointHints struct { - // forZones indicates the zone(s) this endpoint should be consumed by when - // using topology aware routing. May contain a maximum of 8 entries. + // forZones indicates the zone(s) this endpoint should be consumed by to + // enable topology aware routing. // +listType=atomic ForZones []ForZone `json:"forZones,omitempty" protobuf:"bytes,1,name=forZones"` - - // forNodes indicates the node(s) this endpoint should be consumed by when - // using topology aware routing. May contain a maximum of 8 entries. - // This is an Alpha feature and is only used when the PreferSameTrafficDistribution - // feature gate is enabled. - // +listType=atomic - ForNodes []ForNode `json:"forNodes,omitempty" protobuf:"bytes,2,name=forNodes"` } // ForZone provides information about which zones should consume this endpoint. @@ -178,12 +165,6 @@ type ForZone struct { Name string `json:"name" protobuf:"bytes,1,name=name"` } -// ForNode provides information about which nodes should consume this endpoint. -type ForNode struct { - // name represents the name of the node. - Name string `json:"name" protobuf:"bytes,1,name=name"` -} - // EndpointPort represents a Port used by an EndpointSlice // +structType=atomic type EndpointPort struct { @@ -202,9 +183,8 @@ type EndpointPort struct { Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,2,name=protocol"` // port represents the port number of the endpoint. - // If the EndpointSlice is derived from a Kubernetes service, this must be set - // to the service's target port. EndpointSlices used for other purposes may have - // a nil port. + // If this is not specified, ports are not restricted and must be + // interpreted in the context of the specific consumer. Port *int32 `json:"port,omitempty" protobuf:"bytes,3,opt,name=port"` // The application protocol for this port. diff --git a/go-controller/vendor/k8s.io/api/discovery/v1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/discovery/v1/types_swagger_doc_generated.go index ac5b853b9e..41c3060568 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Endpoint = map[string]string{ "": "Endpoint represents a single logical \"backend\" implementing a service.", - "addresses": "addresses of this endpoint. For EndpointSlices of addressType \"IPv4\" or \"IPv6\", the values are IP addresses in canonical form. The syntax and semantics of other addressType values are not defined. This must contain at least one address but no more than 100. EndpointSlices generated by the EndpointSlice controller will always have exactly 1 address. No semantics are defined for additional addresses beyond the first, and kube-proxy does not look at them.", + "addresses": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267", "conditions": "conditions contains information about the current status of the endpoint.", "hostname": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.", "targetRef": "targetRef is a reference to a Kubernetes object that represents this endpoint.", @@ -45,9 +45,9 @@ func (Endpoint) SwaggerDoc() map[string]string { var map_EndpointConditions = map[string]string{ "": "EndpointConditions represents the current condition of an endpoint.", - "ready": "ready indicates that this endpoint is ready to receive traffic, according to whatever system is managing the endpoint. A nil value should be interpreted as \"true\". In general, an endpoint should be marked ready if it is serving and not terminating, though this can be overridden in some cases, such as when the associated Service has set the publishNotReadyAddresses flag.", - "serving": "serving indicates that this endpoint is able to receive traffic, according to whatever system is managing the endpoint. For endpoints backed by pods, the EndpointSlice controller will mark the endpoint as serving if the pod's Ready condition is True. A nil value should be interpreted as \"true\".", - "terminating": "terminating indicates that this endpoint is terminating. A nil value should be interpreted as \"false\".", + "ready": "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be \"true\" for terminating endpoints, except when the normal readiness behavior is being explicitly overridden, for example when the associated Service has set the publishNotReadyAddresses flag.", + "serving": "serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition.", + "terminating": "terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating.", } func (EndpointConditions) SwaggerDoc() map[string]string { @@ -56,8 +56,7 @@ func (EndpointConditions) SwaggerDoc() map[string]string { var map_EndpointHints = map[string]string{ "": "EndpointHints provides hints describing how an endpoint should be consumed.", - "forZones": "forZones indicates the zone(s) this endpoint should be consumed by when using topology aware routing. May contain a maximum of 8 entries.", - "forNodes": "forNodes indicates the node(s) this endpoint should be consumed by when using topology aware routing. May contain a maximum of 8 entries. This is an Alpha feature and is only used when the PreferSameTrafficDistribution feature gate is enabled.", + "forZones": "forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing.", } func (EndpointHints) SwaggerDoc() map[string]string { @@ -68,7 +67,7 @@ var map_EndpointPort = map[string]string{ "": "EndpointPort represents a Port used by an EndpointSlice", "name": "name represents the name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.", "protocol": "protocol represents the IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", - "port": "port represents the port number of the endpoint. If the EndpointSlice is derived from a Kubernetes service, this must be set to the service's target port. EndpointSlices used for other purposes may have a nil port.", + "port": "port represents the port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.", "appProtocol": "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:\n\n* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).\n\n* Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-\n * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455\n * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455\n\n* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.", } @@ -77,11 +76,11 @@ func (EndpointPort) SwaggerDoc() map[string]string { } var map_EndpointSlice = map[string]string{ - "": "EndpointSlice represents a set of service endpoints. Most EndpointSlices are created by the EndpointSlice controller to represent the Pods selected by Service objects. For a given service there may be multiple EndpointSlice objects which must be joined to produce the full set of endpoints; you can find all of the slices for a given service by listing EndpointSlices in the service's namespace whose `kubernetes.io/service-name` label contains the service's name.", + "": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", "metadata": "Standard object's metadata.", - "addressType": "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. (Deprecated) The EndpointSlice controller only generates, and kube-proxy only processes, slices of addressType \"IPv4\" and \"IPv6\". No semantics are defined for the \"FQDN\" type.", + "addressType": "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.", "endpoints": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.", - "ports": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. Each slice may include a maximum of 100 ports. Services always have at least 1 port, so EndpointSlices generated by the EndpointSlice controller will likewise always have at least 1 port. EndpointSlices used for other purposes may have an empty ports list.", + "ports": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.", } func (EndpointSlice) SwaggerDoc() map[string]string { @@ -98,15 +97,6 @@ func (EndpointSliceList) SwaggerDoc() map[string]string { return map_EndpointSliceList } -var map_ForNode = map[string]string{ - "": "ForNode provides information about which nodes should consume this endpoint.", - "name": "name represents the name of the node.", -} - -func (ForNode) SwaggerDoc() map[string]string { - return map_ForNode -} - var map_ForZone = map[string]string{ "": "ForZone provides information about which zones should consume this endpoint.", "name": "name represents the name of the zone.", diff --git a/go-controller/vendor/k8s.io/api/discovery/v1/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/discovery/v1/zz_generated.deepcopy.go index 60eada3b9f..caa872af00 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1/zz_generated.deepcopy.go @@ -119,11 +119,6 @@ func (in *EndpointHints) DeepCopyInto(out *EndpointHints) { *out = make([]ForZone, len(*in)) copy(*out, *in) } - if in.ForNodes != nil { - in, out := &in.ForNodes, &out.ForNodes - *out = make([]ForNode, len(*in)) - copy(*out, *in) - } return } @@ -246,22 +241,6 @@ func (in *EndpointSliceList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ForNode) DeepCopyInto(out *ForNode) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForNode. -func (in *ForNode) DeepCopy() *ForNode { - if in == nil { - return nil - } - out := new(ForNode) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ForZone) DeepCopyInto(out *ForZone) { *out = *in diff --git a/go-controller/vendor/k8s.io/api/discovery/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/discovery/v1beta1/doc.go index f12087eff1..7d7084802d 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1beta1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=discovery.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/discovery/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go b/go-controller/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go index de32577864..46935574bf 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go @@ -214,38 +214,10 @@ func (m *EndpointSliceList) XXX_DiscardUnknown() { var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo -func (m *ForNode) Reset() { *m = ForNode{} } -func (*ForNode) ProtoMessage() {} -func (*ForNode) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{6} -} -func (m *ForNode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ForNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ForNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_ForNode.Merge(m, src) -} -func (m *ForNode) XXX_Size() int { - return m.Size() -} -func (m *ForNode) XXX_DiscardUnknown() { - xxx_messageInfo_ForNode.DiscardUnknown(m) -} - -var xxx_messageInfo_ForNode proto.InternalMessageInfo - func (m *ForZone) Reset() { *m = ForZone{} } func (*ForZone) ProtoMessage() {} func (*ForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_6555bad15de200e0, []int{7} + return fileDescriptor_6555bad15de200e0, []int{6} } func (m *ForZone) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -278,7 +250,6 @@ func init() { proto.RegisterType((*EndpointPort)(nil), "k8s.io.api.discovery.v1beta1.EndpointPort") proto.RegisterType((*EndpointSlice)(nil), "k8s.io.api.discovery.v1beta1.EndpointSlice") proto.RegisterType((*EndpointSliceList)(nil), "k8s.io.api.discovery.v1beta1.EndpointSliceList") - proto.RegisterType((*ForNode)(nil), "k8s.io.api.discovery.v1beta1.ForNode") proto.RegisterType((*ForZone)(nil), "k8s.io.api.discovery.v1beta1.ForZone") } @@ -287,62 +258,61 @@ func init() { } var fileDescriptor_6555bad15de200e0 = []byte{ - // 877 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x6f, 0xe4, 0x34, - 0x1c, 0x9d, 0x74, 0x1a, 0x9a, 0x78, 0x5a, 0xb1, 0x6b, 0x71, 0x18, 0x95, 0x2a, 0x19, 0x05, 0x2d, + // 857 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4f, 0x6f, 0xe4, 0x34, + 0x14, 0x9f, 0x74, 0x1a, 0x9a, 0x78, 0x5a, 0xb1, 0x6b, 0x71, 0x18, 0x95, 0x2a, 0x19, 0x05, 0x2d, 0x1a, 0x51, 0x48, 0x68, 0xb5, 0x42, 0x2b, 0x38, 0x35, 0xb0, 0xb0, 0x48, 0xcb, 0x6e, 0xe5, 0x56, 0x42, 0x5a, 0x71, 0xc0, 0x93, 0xb8, 0x19, 0xd3, 0x26, 0x8e, 0x62, 0x77, 0xa4, 0xb9, 0xf1, 0x0d, - 0xe0, 0xb3, 0x70, 0xe3, 0x8c, 0x84, 0x7a, 0xdc, 0xe3, 0x9e, 0x22, 0x1a, 0xbe, 0xc5, 0x9e, 0x90, - 0x1d, 0xe7, 0xcf, 0x30, 0xd0, 0xce, 0x2d, 0x7e, 0x7e, 0xef, 0xfd, 0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07, 0x5a, 0xd8, 0x94, 0x2b, 0x8e, 0x6a, 0x1d, 0xef, 0x77, 0x03, 0x3c, 0x5c, 0xf3, 0xf8, 0x39, + 0xe5, 0x02, 0xfe, 0xb0, 0xe1, 0xb3, 0xbf, 0x9d, 0xcf, 0x92, 0xad, 0x5c, 0x6e, 0x0f, 0x68, 0x83, + 0xf4, 0x3c, 0x3e, 0x07, 0x26, 0x15, 0x24, 0x6d, 0x9c, 0xd9, 0xf2, 0x8d, 0x50, 0xd5, 0x75, 0x5d, + 0x7c, 0x2b, 0x15, 0x50, 0x2d, 0xe4, 0x1d, 0x83, 0x3d, 0x7d, 0x11, 0xe0, 0x64, 0xed, 0xb0, 0xef, + 0xeb, 0xf0, 0xde, 0x81, 0x0f, 0xc3, 0xbb, 0x95, 0x33, 0x78, 0xbd, 0x72, 0x06, 0x6f, 0x56, 0xce, + 0xe0, 0xe7, 0xca, 0x31, 0xee, 0x2a, 0xc7, 0x78, 0x5d, 0x39, 0xc6, 0x9b, 0xca, 0x31, 0xfe, 0xac, + 0x1c, 0xe3, 0xd7, 0xbf, 0x9c, 0xc1, 0xab, 0xa3, 0xfb, 0x7e, 0xd8, 0x7f, 0x07, 0x00, 0x00, 0xff, + 0xff, 0x1c, 0xe6, 0x20, 0x06, 0xcf, 0x07, 0x00, 0x00, } func (m *Endpoint) Marshal() (dAtA []byte, err error) { @@ -522,20 +492,6 @@ func (m *EndpointHints) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.ForNodes) > 0 { - for iNdEx := len(m.ForNodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ForNodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } if len(m.ForZones) > 0 { for iNdEx := len(m.ForZones) - 1; iNdEx >= 0; iNdEx-- { { @@ -715,34 +671,6 @@ func (m *EndpointSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ForNode) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ForNode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ForNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *ForZone) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -853,12 +781,6 @@ func (m *EndpointHints) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - if len(m.ForNodes) > 0 { - for _, e := range m.ForNodes { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } return n } @@ -928,17 +850,6 @@ func (m *EndpointSliceList) Size() (n int) { return n } -func (m *ForNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - func (m *ForZone) Size() (n int) { if m == nil { return 0 @@ -1003,14 +914,8 @@ func (this *EndpointHints) String() string { repeatedStringForForZones += strings.Replace(strings.Replace(f.String(), "ForZone", "ForZone", 1), `&`, ``, 1) + "," } repeatedStringForForZones += "}" - repeatedStringForForNodes := "[]ForNode{" - for _, f := range this.ForNodes { - repeatedStringForForNodes += strings.Replace(strings.Replace(f.String(), "ForNode", "ForNode", 1), `&`, ``, 1) + "," - } - repeatedStringForForNodes += "}" s := strings.Join([]string{`&EndpointHints{`, `ForZones:` + repeatedStringForForZones + `,`, - `ForNodes:` + repeatedStringForForNodes + `,`, `}`, }, "") return s @@ -1067,16 +972,6 @@ func (this *EndpointSliceList) String() string { }, "") return s } -func (this *ForNode) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ForNode{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} func (this *ForZone) String() string { if this == nil { return "nil" @@ -1651,40 +1546,6 @@ func (m *EndpointHints) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ForNodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ForNodes = append(m.ForNodes, ForNode{}) - if err := m.ForNodes[len(m.ForNodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2175,88 +2036,6 @@ func (m *EndpointSliceList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ForNode) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ForNode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ForNode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ForZone) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go-controller/vendor/k8s.io/api/discovery/v1beta1/generated.proto b/go-controller/vendor/k8s.io/api/discovery/v1beta1/generated.proto index 907050da1c..55828dd97d 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1beta1/generated.proto +++ b/go-controller/vendor/k8s.io/api/discovery/v1beta1/generated.proto @@ -114,13 +114,6 @@ message EndpointHints { // enable topology aware routing. May contain a maximum of 8 entries. // +listType=atomic repeated ForZone forZones = 1; - - // forNodes indicates the node(s) this endpoint should be consumed by when - // using topology aware routing. May contain a maximum of 8 entries. - // This is an Alpha feature and is only used when the PreferSameTrafficDistribution - // feature gate is enabled. - // +listType=atomic - repeated ForNode forNodes = 2; } // EndpointPort represents a Port used by an EndpointSlice @@ -196,12 +189,6 @@ message EndpointSliceList { repeated EndpointSlice items = 2; } -// ForNode provides information about which nodes should consume this endpoint. -message ForNode { - // name represents the name of the node. - optional string name = 1; -} - // ForZone provides information about which zones should consume this endpoint. message ForZone { // name represents the name of the zone. diff --git a/go-controller/vendor/k8s.io/api/discovery/v1beta1/types.go b/go-controller/vendor/k8s.io/api/discovery/v1beta1/types.go index fa9d1eae43..defd8e2ce6 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1beta1/types.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1beta1/types.go @@ -161,13 +161,6 @@ type EndpointHints struct { // enable topology aware routing. May contain a maximum of 8 entries. // +listType=atomic ForZones []ForZone `json:"forZones,omitempty" protobuf:"bytes,1,name=forZones"` - - // forNodes indicates the node(s) this endpoint should be consumed by when - // using topology aware routing. May contain a maximum of 8 entries. - // This is an Alpha feature and is only used when the PreferSameTrafficDistribution - // feature gate is enabled. - // +listType=atomic - ForNodes []ForNode `json:"forNodes,omitempty" protobuf:"bytes,2,name=forNodes"` } // ForZone provides information about which zones should consume this endpoint. @@ -176,12 +169,6 @@ type ForZone struct { Name string `json:"name" protobuf:"bytes,1,name=name"` } -// ForNode provides information about which nodes should consume this endpoint. -type ForNode struct { - // name represents the name of the node. - Name string `json:"name" protobuf:"bytes,1,name=name"` -} - // EndpointPort represents a Port used by an EndpointSlice type EndpointPort struct { // name represents the name of this port. All ports in an EndpointSlice must have a unique name. diff --git a/go-controller/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go index 72aa0cb9b2..847d4d58e0 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go @@ -56,7 +56,6 @@ func (EndpointConditions) SwaggerDoc() map[string]string { var map_EndpointHints = map[string]string{ "": "EndpointHints provides hints describing how an endpoint should be consumed.", "forZones": "forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries.", - "forNodes": "forNodes indicates the node(s) this endpoint should be consumed by when using topology aware routing. May contain a maximum of 8 entries. This is an Alpha feature and is only used when the PreferSameTrafficDistribution feature gate is enabled.", } func (EndpointHints) SwaggerDoc() map[string]string { @@ -97,15 +96,6 @@ func (EndpointSliceList) SwaggerDoc() map[string]string { return map_EndpointSliceList } -var map_ForNode = map[string]string{ - "": "ForNode provides information about which nodes should consume this endpoint.", - "name": "name represents the name of the node.", -} - -func (ForNode) SwaggerDoc() map[string]string { - return map_ForNode -} - var map_ForZone = map[string]string{ "": "ForZone provides information about which zones should consume this endpoint.", "name": "name represents the name of the zone.", diff --git a/go-controller/vendor/k8s.io/api/discovery/v1beta1/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/discovery/v1beta1/zz_generated.deepcopy.go index 72490d6adf..13b9544b0c 100644 --- a/go-controller/vendor/k8s.io/api/discovery/v1beta1/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/discovery/v1beta1/zz_generated.deepcopy.go @@ -114,11 +114,6 @@ func (in *EndpointHints) DeepCopyInto(out *EndpointHints) { *out = make([]ForZone, len(*in)) copy(*out, *in) } - if in.ForNodes != nil { - in, out := &in.ForNodes, &out.ForNodes - *out = make([]ForNode, len(*in)) - copy(*out, *in) - } return } @@ -241,22 +236,6 @@ func (in *EndpointSliceList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ForNode) DeepCopyInto(out *ForNode) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForNode. -func (in *ForNode) DeepCopy() *ForNode { - if in == nil { - return nil - } - out := new(ForNode) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ForZone) DeepCopyInto(out *ForZone) { *out = *in diff --git a/go-controller/vendor/k8s.io/api/events/v1/doc.go b/go-controller/vendor/k8s.io/api/events/v1/doc.go index 911639044f..5fe700ffcf 100644 --- a/go-controller/vendor/k8s.io/api/events/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/events/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=events.k8s.io -package v1 +package v1 // import "k8s.io/api/events/v1" diff --git a/go-controller/vendor/k8s.io/api/events/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/events/v1beta1/doc.go index e4864294fd..46048a65b4 100644 --- a/go-controller/vendor/k8s.io/api/events/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/events/v1beta1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=events.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/events/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/extensions/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/extensions/v1beta1/doc.go index 7770fab5d2..c9af49d55c 100644 --- a/go-controller/vendor/k8s.io/api/extensions/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/extensions/v1beta1/doc.go @@ -19,4 +19,4 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true -package v1beta1 +package v1beta1 // import "k8s.io/api/extensions/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go b/go-controller/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go index 35b9a4ff2a..818486f39d 100644 --- a/go-controller/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -1364,187 +1364,185 @@ func init() { } var fileDescriptor_90a532284de28347 = []byte{ - // 2875 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcf, 0x6f, 0x24, 0x47, - 0xf5, 0xdf, 0x9e, 0xf1, 0xd8, 0xe3, 0xe7, 0xb5, 0xbd, 0x5b, 0xeb, 0xac, 0x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66, 0x91, 0xe8, 0xca, 0x90, 0x24, 0xfa, 0x54, 0x89, 0x2f, 0xcb, 0x37, 0x7d, - 0x63, 0xe0, 0x93, 0x0e, 0xcf, 0x6d, 0xd5, 0x30, 0xdf, 0x34, 0x79, 0x2b, 0x96, 0x52, 0xf4, 0x4e, - 0x2c, 0x64, 0xab, 0xa3, 0x84, 0xec, 0x4c, 0x7e, 0xb8, 0xa2, 0x2d, 0x98, 0xef, 0x7b, 0x6e, 0xd7, - 0x23, 0xbe, 0x7f, 0x87, 0x18, 0x1d, 0xdb, 0x72, 0x48, 0x30, 0x3f, 0x82, 0x11, 0x5d, 0x39, 0x3a, - 0x5c, 0x9e, 0x6f, 0x66, 0xab, 0xe0, 0x3c, 0x5b, 0xfd, 0x67, 0x15, 0xb8, 0x90, 0xac, 0x80, 0x39, - 0x24, 0x55, 0x1b, 0x89, 0xa4, 0x5e, 0x8b, 0x6c, 0x06, 0xc1, 0xe0, 0xd5, 0xea, 0x67, 0x6c, 0x88, - 0xdb, 0x30, 0x2b, 0xb3, 0x41, 0x20, 0x94, 0x34, 0x5d, 0xad, 0xfe, 0x56, 0x5c, 0x8c, 0x93, 0xfa, - 0xe8, 0x45, 0x98, 0xf6, 0x38, 0xef, 0x0e, 0x00, 0x04, 0x77, 0x7d, 0x44, 0x02, 0x4c, 0xe3, 0xa8, - 0x10, 0xc7, 0x75, 0x19, 0x6f, 0x0d, 0xe9, 0x68, 0x00, 0x30, 0x16, 0xe7, 0xad, 0xb7, 0x93, 0x0a, - 0x38, 0x6d, 0x83, 0xd6, 0xe1, 0xd2, 0xc0, 0x49, 0x43, 0x89, 0x50, 0xbe, 0x22, 0xa1, 0x2e, 0x6d, - 0xa5, 0x55, 0x70, 0x96, 0x1d, 0x5a, 0x85, 0x4b, 0x94, 0x78, 0x3d, 0xcb, 0x31, 0xa8, 0xe5, 0x74, - 0x15, 0x9c, 0x58, 0xf9, 0x79, 0x06, 0xd5, 0x4e, 0x8b, 0x71, 0x96, 0x0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9d, 0x58, 0x6d, 0x29, 0x17, - 0xb8, 0xb4, 0x89, 0xf4, 0x55, 0x0b, 0xaa, 0x89, 0xf8, 0x46, 0x23, 0x7c, 0x95, 0x4f, 0x17, 0x99, - 0x97, 0x60, 0x86, 0x1a, 0x5e, 0x97, 0x50, 0x75, 0x02, 0x10, 0xf7, 0x95, 0xea, 0x63, 0xa1, 0x76, - 0x4c, 0x8a, 0x13, 0xda, 0x8b, 0x2f, 0xc2, 0x74, 0xac, 0xb3, 0x61, 0x3e, 0xb1, 0x68, 0xac, 0x7c, - 0xf2, 0xf9, 0xd2, 0xb9, 0x4f, 0x3f, 0x5f, 0x3a, 0xf7, 0xd9, 0xe7, 0x4b, 0xe7, 0x7e, 0x70, 0xb4, - 0xa4, 0x7d, 0x72, 0xb4, 0xa4, 0x7d, 0x7a, 0xb4, 0xa4, 0x7d, 0x76, 0xb4, 0xa4, 0xfd, 0xed, 0x68, - 0x49, 0xfb, 0xe9, 0x17, 0x4b, 0xe7, 0xde, 0x7e, 0xec, 0xd8, 0xff, 0x71, 0xf1, 0xaf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x6a, 0x79, 0xb9, 0xab, 0x91, 0x31, 0x00, 0x00, + // 2842 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcd, 0x6f, 0x24, 0x47, + 0x15, 0xdf, 0x9e, 0xf1, 0xd8, 0xe3, 0xe7, 0xb5, 0xbd, 0x5b, 0xeb, 0xac, 0x1d, 0x2f, 0xb1, 0xa3, + 0x46, 0x84, 0x4d, 0xd8, 0x9d, 0x61, 0x37, 0xc9, 0x92, 0x0f, 0x29, 0x61, 0xc7, 0xbb, 0xc9, 0x3a, + 0xb1, 0xc7, 0x93, 0x9a, 0x71, 0x82, 0x22, 0x02, 0xb4, 0x7b, 0xca, 0xe3, 0x8e, 0x7b, 0xba, 0x47, + 0xdd, 0x35, 0x66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x92, + 0xf6, 0xe0, 0x70, 0x49, 0xfb, 0xf8, 0x70, 0x49, 0xfb, 0xe4, 0x70, 0x49, 0xfb, 0xfb, 0xe1, 0x92, + 0xf6, 0xd3, 0xcf, 0x96, 0xce, 0xbd, 0xfd, 0xd8, 0x91, 0xff, 0xb7, 0xe1, 0xdf, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x5f, 0xd8, 0x14, 0x50, 0xfb, 0x30, 0x00, 0x00, } func (m *DaemonSet) Marshal() (dAtA []byte, err error) { @@ -2210,11 +2208,6 @@ func (m *DeploymentStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TerminatingReplicas != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TerminatingReplicas)) - i-- - dAtA[i] = 0x48 - } if m.CollisionCount != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount)) i-- @@ -3493,11 +3486,6 @@ func (m *ReplicaSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TerminatingReplicas != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TerminatingReplicas)) - i-- - dAtA[i] = 0x38 - } if len(m.Conditions) > 0 { for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { { @@ -4036,9 +4024,6 @@ func (m *DeploymentStatus) Size() (n int) { if m.CollisionCount != nil { n += 1 + sovGenerated(uint64(*m.CollisionCount)) } - if m.TerminatingReplicas != nil { - n += 1 + sovGenerated(uint64(*m.TerminatingReplicas)) - } return n } @@ -4517,9 +4502,6 @@ func (m *ReplicaSetStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - if m.TerminatingReplicas != nil { - n += 1 + sovGenerated(uint64(*m.TerminatingReplicas)) - } return n } @@ -4811,7 +4793,6 @@ func (this *DeploymentStatus) String() string { `Conditions:` + repeatedStringForConditions + `,`, `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`, - `TerminatingReplicas:` + valueToStringGenerated(this.TerminatingReplicas) + `,`, `}`, }, "") return s @@ -5201,7 +5182,6 @@ func (this *ReplicaSetStatus) String() string { `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`, `Conditions:` + repeatedStringForConditions + `,`, - `TerminatingReplicas:` + valueToStringGenerated(this.TerminatingReplicas) + `,`, `}`, }, "") return s @@ -7587,26 +7567,6 @@ func (m *DeploymentStatus) Unmarshal(dAtA []byte) error { } } m.CollisionCount = &v - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TerminatingReplicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TerminatingReplicas = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -11202,26 +11162,6 @@ func (m *ReplicaSetStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TerminatingReplicas", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TerminatingReplicas = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/go-controller/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/go-controller/vendor/k8s.io/api/extensions/v1beta1/generated.proto index 70fcec0cc5..9bbcaa0e26 100644 --- a/go-controller/vendor/k8s.io/api/extensions/v1beta1/generated.proto +++ b/go-controller/vendor/k8s.io/api/extensions/v1beta1/generated.proto @@ -320,19 +320,19 @@ message DeploymentStatus { // +optional optional int64 observedGeneration = 1; - // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + // Total number of non-terminated pods targeted by this deployment (their labels match the selector). // +optional optional int32 replicas = 2; - // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + // Total number of non-terminated pods targeted by this deployment that have the desired template spec. // +optional optional int32 updatedReplicas = 3; - // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + // Total number of ready pods targeted by this deployment. // +optional optional int32 readyReplicas = 7; - // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. // +optional optional int32 availableReplicas = 4; @@ -342,13 +342,6 @@ message DeploymentStatus { // +optional optional int32 unavailableReplicas = 5; - // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null - // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - optional int32 terminatingReplicas = 9; - // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge @@ -870,16 +863,16 @@ message ReplicaSetList { optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of ReplicaSets. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller repeated ReplicaSet items = 2; } // ReplicaSetSpec is the specification of a ReplicaSet. message ReplicaSetSpec { - // Replicas is the number of desired pods. + // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller // +optional optional int32 replicas = 1; @@ -898,36 +891,29 @@ message ReplicaSetSpec { // Template is the object that describes the pod that will be created if // insufficient replicas are detected. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template // +optional optional .k8s.io.api.core.v1.PodTemplateSpec template = 3; } // ReplicaSetStatus represents the current status of a ReplicaSet. message ReplicaSetStatus { - // Replicas is the most recently observed number of non-terminating pods. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // Replicas is the most recently observed number of replicas. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller optional int32 replicas = 1; - // The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset. + // The number of pods that have labels matching the labels of the pod template of the replicaset. // +optional optional int32 fullyLabeledReplicas = 2; - // The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition. + // The number of ready replicas for this replica set. // +optional optional int32 readyReplicas = 4; - // The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set. + // The number of available replicas (ready for at least minReadySeconds) for this replica set. // +optional optional int32 availableReplicas = 5; - // The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp - // and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - optional int32 terminatingReplicas = 7; - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. // +optional optional int64 observedGeneration = 3; diff --git a/go-controller/vendor/k8s.io/api/extensions/v1beta1/types.go b/go-controller/vendor/k8s.io/api/extensions/v1beta1/types.go index b80a7a7e16..09f58692f4 100644 --- a/go-controller/vendor/k8s.io/api/extensions/v1beta1/types.go +++ b/go-controller/vendor/k8s.io/api/extensions/v1beta1/types.go @@ -245,19 +245,19 @@ type DeploymentStatus struct { // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` - // Total number of non-terminating pods targeted by this deployment (their labels match the selector). + // Total number of non-terminated pods targeted by this deployment (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` - // Total number of non-terminating pods targeted by this deployment that have the desired template spec. + // Total number of non-terminated pods targeted by this deployment that have the desired template spec. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"` - // Total number of non-terminating pods targeted by this Deployment with a Ready Condition. + // Total number of ready pods targeted by this deployment. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"` - // Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. + // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"` @@ -267,13 +267,6 @@ type DeploymentStatus struct { // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` - // Total number of terminating pods targeted by this deployment. Terminating pods have a non-null - // .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty" protobuf:"varint,9,opt,name=terminatingReplicas"` - // Represents the latest available observations of a deployment's current state. // +patchMergeKey=type // +patchStrategy=merge @@ -948,16 +941,16 @@ type ReplicaSetList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ReplicaSets. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"` } // ReplicaSetSpec is the specification of a ReplicaSet. type ReplicaSetSpec struct { - // Replicas is the number of desired pods. + // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` @@ -976,36 +969,29 @@ type ReplicaSetSpec struct { // Template is the object that describes the pod that will be created if // insufficient replicas are detected. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template // +optional Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` } // ReplicaSetStatus represents the current status of a ReplicaSet. type ReplicaSetStatus struct { - // Replicas is the most recently observed number of non-terminating pods. - // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset + // Replicas is the most recently observed number of replicas. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"` - // The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset. + // The number of pods that have labels matching the labels of the pod template of the replicaset. // +optional FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"` - // The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition. + // The number of ready replicas for this replica set. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"` - // The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set. + // The number of available replicas (ready for at least minReadySeconds) for this replica set. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"` - // The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp - // and have not yet reached the Failed or Succeeded .status.phase. - // - // This is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. - // +optional - TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty" protobuf:"varint,7,opt,name=terminatingReplicas"` - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` diff --git a/go-controller/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index 923fab3aa1..408022c9d8 100644 --- a/go-controller/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -169,12 +169,11 @@ func (DeploymentSpec) SwaggerDoc() map[string]string { var map_DeploymentStatus = map[string]string{ "": "DeploymentStatus is the most recently observed status of the Deployment.", "observedGeneration": "The generation observed by the deployment controller.", - "replicas": "Total number of non-terminating pods targeted by this deployment (their labels match the selector).", - "updatedReplicas": "Total number of non-terminating pods targeted by this deployment that have the desired template spec.", - "readyReplicas": "Total number of non-terminating pods targeted by this Deployment with a Ready Condition.", - "availableReplicas": "Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment.", + "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "readyReplicas": "Total number of ready pods targeted by this deployment.", + "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", "unavailableReplicas": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - "terminatingReplicas": "Total number of terminating pods targeted by this deployment. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.\n\nThis is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.", "conditions": "Represents the latest available observations of a deployment's current state.", "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", } @@ -436,7 +435,7 @@ func (ReplicaSetCondition) SwaggerDoc() map[string]string { var map_ReplicaSetList = map[string]string{ "": "ReplicaSetList is a collection of ReplicaSets.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset", + "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", } func (ReplicaSetList) SwaggerDoc() map[string]string { @@ -445,10 +444,10 @@ func (ReplicaSetList) SwaggerDoc() map[string]string { var map_ReplicaSetSpec = map[string]string{ "": "ReplicaSetSpec is the specification of a ReplicaSet.", - "replicas": "Replicas is the number of desired pods. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset", + "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", "selector": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/#pod-template", + "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", } func (ReplicaSetSpec) SwaggerDoc() map[string]string { @@ -457,11 +456,10 @@ func (ReplicaSetSpec) SwaggerDoc() map[string]string { var map_ReplicaSetStatus = map[string]string{ "": "ReplicaSetStatus represents the current status of a ReplicaSet.", - "replicas": "Replicas is the most recently observed number of non-terminating pods. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset", - "fullyLabeledReplicas": "The number of non-terminating pods that have labels matching the labels of the pod template of the replicaset.", - "readyReplicas": "The number of non-terminating pods targeted by this ReplicaSet with a Ready Condition.", - "availableReplicas": "The number of available non-terminating pods (ready for at least minReadySeconds) for this replica set.", - "terminatingReplicas": "The number of terminating pods for this replica set. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase.\n\nThis is an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field.", + "replicas": "Replicas is the most recently observed number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.", + "readyReplicas": "The number of ready replicas for this replica set.", + "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replica set.", "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", "conditions": "Represents the latest available observations of a replica set's current state.", } diff --git a/go-controller/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go index 2c7a8524ea..6b474ae483 100644 --- a/go-controller/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go @@ -341,11 +341,6 @@ func (in *DeploymentSpec) DeepCopy() *DeploymentSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { *out = *in - if in.TerminatingReplicas != nil { - in, out := &in.TerminatingReplicas, &out.TerminatingReplicas - *out = new(int32) - **out = **in - } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]DeploymentCondition, len(*in)) @@ -1050,11 +1045,6 @@ func (in *ReplicaSetSpec) DeepCopy() *ReplicaSetSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus) { *out = *in - if in.TerminatingReplicas != nil { - in, out := &in.TerminatingReplicas, &out.TerminatingReplicas - *out = new(int32) - **out = **in - } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ReplicaSetCondition, len(*in)) diff --git a/go-controller/vendor/k8s.io/api/flowcontrol/v1/doc.go b/go-controller/vendor/k8s.io/api/flowcontrol/v1/doc.go index ad5f457919..c9e7db1589 100644 --- a/go-controller/vendor/k8s.io/api/flowcontrol/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/flowcontrol/v1/doc.go @@ -22,4 +22,4 @@ limitations under the License. // +groupName=flowcontrol.apiserver.k8s.io // Package v1 holds api types of version v1 for group "flowcontrol.apiserver.k8s.io". -package v1 +package v1 // import "k8s.io/api/flowcontrol/v1" diff --git a/go-controller/vendor/k8s.io/api/flowcontrol/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/flowcontrol/v1beta1/doc.go index 20268c1f2d..50897b7eb5 100644 --- a/go-controller/vendor/k8s.io/api/flowcontrol/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/flowcontrol/v1beta1/doc.go @@ -22,4 +22,4 @@ limitations under the License. // +groupName=flowcontrol.apiserver.k8s.io // Package v1beta1 holds api types of version v1alpha1 for group "flowcontrol.apiserver.k8s.io". -package v1beta1 +package v1beta1 // import "k8s.io/api/flowcontrol/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/flowcontrol/v1beta2/doc.go b/go-controller/vendor/k8s.io/api/flowcontrol/v1beta2/doc.go index 2dcad11ad9..53b460d374 100644 --- a/go-controller/vendor/k8s.io/api/flowcontrol/v1beta2/doc.go +++ b/go-controller/vendor/k8s.io/api/flowcontrol/v1beta2/doc.go @@ -22,4 +22,4 @@ limitations under the License. // +groupName=flowcontrol.apiserver.k8s.io // Package v1beta2 holds api types of version v1alpha1 for group "flowcontrol.apiserver.k8s.io". -package v1beta2 +package v1beta2 // import "k8s.io/api/flowcontrol/v1beta2" diff --git a/go-controller/vendor/k8s.io/api/flowcontrol/v1beta3/doc.go b/go-controller/vendor/k8s.io/api/flowcontrol/v1beta3/doc.go index 95f4430d38..cd60cfef7f 100644 --- a/go-controller/vendor/k8s.io/api/flowcontrol/v1beta3/doc.go +++ b/go-controller/vendor/k8s.io/api/flowcontrol/v1beta3/doc.go @@ -22,4 +22,4 @@ limitations under the License. // +groupName=flowcontrol.apiserver.k8s.io // Package v1beta3 holds api types of version v1beta3 for group "flowcontrol.apiserver.k8s.io". -package v1beta3 +package v1beta3 // import "k8s.io/api/flowcontrol/v1beta3" diff --git a/go-controller/vendor/k8s.io/api/imagepolicy/v1alpha1/doc.go b/go-controller/vendor/k8s.io/api/imagepolicy/v1alpha1/doc.go index f5fbbdbf0c..5db6d52d47 100644 --- a/go-controller/vendor/k8s.io/api/imagepolicy/v1alpha1/doc.go +++ b/go-controller/vendor/k8s.io/api/imagepolicy/v1alpha1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +groupName=imagepolicy.k8s.io -package v1alpha1 +package v1alpha1 // import "k8s.io/api/imagepolicy/v1alpha1" diff --git a/go-controller/vendor/k8s.io/api/networking/v1/doc.go b/go-controller/vendor/k8s.io/api/networking/v1/doc.go index e2093b7df6..1d13e7bab3 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/networking/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=networking.k8s.io -package v1 +package v1 // import "k8s.io/api/networking/v1" diff --git a/go-controller/vendor/k8s.io/api/networking/v1/generated.pb.go b/go-controller/vendor/k8s.io/api/networking/v1/generated.pb.go index 062382b633..7c023e6903 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/networking/v1/generated.pb.go @@ -104,94 +104,10 @@ func (m *HTTPIngressRuleValue) XXX_DiscardUnknown() { var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo -func (m *IPAddress) Reset() { *m = IPAddress{} } -func (*IPAddress) ProtoMessage() {} -func (*IPAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{2} -} -func (m *IPAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddress.Merge(m, src) -} -func (m *IPAddress) XXX_Size() int { - return m.Size() -} -func (m *IPAddress) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddress proto.InternalMessageInfo - -func (m *IPAddressList) Reset() { *m = IPAddressList{} } -func (*IPAddressList) ProtoMessage() {} -func (*IPAddressList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{3} -} -func (m *IPAddressList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddressList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPAddressList) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddressList.Merge(m, src) -} -func (m *IPAddressList) XXX_Size() int { - return m.Size() -} -func (m *IPAddressList) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddressList.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddressList proto.InternalMessageInfo - -func (m *IPAddressSpec) Reset() { *m = IPAddressSpec{} } -func (*IPAddressSpec) ProtoMessage() {} -func (*IPAddressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{4} -} -func (m *IPAddressSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddressSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *IPAddressSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddressSpec.Merge(m, src) -} -func (m *IPAddressSpec) XXX_Size() int { - return m.Size() -} -func (m *IPAddressSpec) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddressSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddressSpec proto.InternalMessageInfo - func (m *IPBlock) Reset() { *m = IPBlock{} } func (*IPBlock) ProtoMessage() {} func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{5} + return fileDescriptor_2c41434372fec1d7, []int{2} } func (m *IPBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +135,7 @@ var xxx_messageInfo_IPBlock proto.InternalMessageInfo func (m *Ingress) Reset() { *m = Ingress{} } func (*Ingress) ProtoMessage() {} func (*Ingress) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{6} + return fileDescriptor_2c41434372fec1d7, []int{3} } func (m *Ingress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +163,7 @@ var xxx_messageInfo_Ingress proto.InternalMessageInfo func (m *IngressBackend) Reset() { *m = IngressBackend{} } func (*IngressBackend) ProtoMessage() {} func (*IngressBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{7} + return fileDescriptor_2c41434372fec1d7, []int{4} } func (m *IngressBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +191,7 @@ var xxx_messageInfo_IngressBackend proto.InternalMessageInfo func (m *IngressClass) Reset() { *m = IngressClass{} } func (*IngressClass) ProtoMessage() {} func (*IngressClass) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{8} + return fileDescriptor_2c41434372fec1d7, []int{5} } func (m *IngressClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +219,7 @@ var xxx_messageInfo_IngressClass proto.InternalMessageInfo func (m *IngressClassList) Reset() { *m = IngressClassList{} } func (*IngressClassList) ProtoMessage() {} func (*IngressClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{9} + return fileDescriptor_2c41434372fec1d7, []int{6} } func (m *IngressClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +247,7 @@ var xxx_messageInfo_IngressClassList proto.InternalMessageInfo func (m *IngressClassParametersReference) Reset() { *m = IngressClassParametersReference{} } func (*IngressClassParametersReference) ProtoMessage() {} func (*IngressClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{10} + return fileDescriptor_2c41434372fec1d7, []int{7} } func (m *IngressClassParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +275,7 @@ var xxx_messageInfo_IngressClassParametersReference proto.InternalMessageInfo func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } func (*IngressClassSpec) ProtoMessage() {} func (*IngressClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{11} + return fileDescriptor_2c41434372fec1d7, []int{8} } func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +303,7 @@ var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo func (m *IngressList) Reset() { *m = IngressList{} } func (*IngressList) ProtoMessage() {} func (*IngressList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{12} + return fileDescriptor_2c41434372fec1d7, []int{9} } func (m *IngressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +331,7 @@ var xxx_messageInfo_IngressList proto.InternalMessageInfo func (m *IngressLoadBalancerIngress) Reset() { *m = IngressLoadBalancerIngress{} } func (*IngressLoadBalancerIngress) ProtoMessage() {} func (*IngressLoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{13} + return fileDescriptor_2c41434372fec1d7, []int{10} } func (m *IngressLoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +359,7 @@ var xxx_messageInfo_IngressLoadBalancerIngress proto.InternalMessageInfo func (m *IngressLoadBalancerStatus) Reset() { *m = IngressLoadBalancerStatus{} } func (*IngressLoadBalancerStatus) ProtoMessage() {} func (*IngressLoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{14} + return fileDescriptor_2c41434372fec1d7, []int{11} } func (m *IngressLoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +387,7 @@ var xxx_messageInfo_IngressLoadBalancerStatus proto.InternalMessageInfo func (m *IngressPortStatus) Reset() { *m = IngressPortStatus{} } func (*IngressPortStatus) ProtoMessage() {} func (*IngressPortStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{15} + return fileDescriptor_2c41434372fec1d7, []int{12} } func (m *IngressPortStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +415,7 @@ var xxx_messageInfo_IngressPortStatus proto.InternalMessageInfo func (m *IngressRule) Reset() { *m = IngressRule{} } func (*IngressRule) ProtoMessage() {} func (*IngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{16} + return fileDescriptor_2c41434372fec1d7, []int{13} } func (m *IngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +443,7 @@ var xxx_messageInfo_IngressRule proto.InternalMessageInfo func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } func (*IngressRuleValue) ProtoMessage() {} func (*IngressRuleValue) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{17} + return fileDescriptor_2c41434372fec1d7, []int{14} } func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +471,7 @@ var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo func (m *IngressServiceBackend) Reset() { *m = IngressServiceBackend{} } func (*IngressServiceBackend) ProtoMessage() {} func (*IngressServiceBackend) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{18} + return fileDescriptor_2c41434372fec1d7, []int{15} } func (m *IngressServiceBackend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +499,7 @@ var xxx_messageInfo_IngressServiceBackend proto.InternalMessageInfo func (m *IngressSpec) Reset() { *m = IngressSpec{} } func (*IngressSpec) ProtoMessage() {} func (*IngressSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{19} + return fileDescriptor_2c41434372fec1d7, []int{16} } func (m *IngressSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +527,7 @@ var xxx_messageInfo_IngressSpec proto.InternalMessageInfo func (m *IngressStatus) Reset() { *m = IngressStatus{} } func (*IngressStatus) ProtoMessage() {} func (*IngressStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{20} + return fileDescriptor_2c41434372fec1d7, []int{17} } func (m *IngressStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +555,7 @@ var xxx_messageInfo_IngressStatus proto.InternalMessageInfo func (m *IngressTLS) Reset() { *m = IngressTLS{} } func (*IngressTLS) ProtoMessage() {} func (*IngressTLS) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{21} + return fileDescriptor_2c41434372fec1d7, []int{18} } func (m *IngressTLS) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -667,7 +583,7 @@ var xxx_messageInfo_IngressTLS proto.InternalMessageInfo func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{22} + return fileDescriptor_2c41434372fec1d7, []int{19} } func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +611,7 @@ var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } func (*NetworkPolicyEgressRule) ProtoMessage() {} func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{23} + return fileDescriptor_2c41434372fec1d7, []int{20} } func (m *NetworkPolicyEgressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +639,7 @@ var xxx_messageInfo_NetworkPolicyEgressRule proto.InternalMessageInfo func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{24} + return fileDescriptor_2c41434372fec1d7, []int{21} } func (m *NetworkPolicyIngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,7 +667,7 @@ var xxx_messageInfo_NetworkPolicyIngressRule proto.InternalMessageInfo func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } func (*NetworkPolicyList) ProtoMessage() {} func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{25} + return fileDescriptor_2c41434372fec1d7, []int{22} } func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -779,7 +695,7 @@ var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } func (*NetworkPolicyPeer) ProtoMessage() {} func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{26} + return fileDescriptor_2c41434372fec1d7, []int{23} } func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -807,7 +723,7 @@ var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } func (*NetworkPolicyPort) ProtoMessage() {} func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{27} + return fileDescriptor_2c41434372fec1d7, []int{24} } func (m *NetworkPolicyPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -835,7 +751,7 @@ var xxx_messageInfo_NetworkPolicyPort proto.InternalMessageInfo func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } func (*NetworkPolicySpec) ProtoMessage() {} func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{28} + return fileDescriptor_2c41434372fec1d7, []int{25} } func (m *NetworkPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -860,38 +776,10 @@ func (m *NetworkPolicySpec) XXX_DiscardUnknown() { var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo -func (m *ParentReference) Reset() { *m = ParentReference{} } -func (*ParentReference) ProtoMessage() {} -func (*ParentReference) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{29} -} -func (m *ParentReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParentReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ParentReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParentReference.Merge(m, src) -} -func (m *ParentReference) XXX_Size() int { - return m.Size() -} -func (m *ParentReference) XXX_DiscardUnknown() { - xxx_messageInfo_ParentReference.DiscardUnknown(m) -} - -var xxx_messageInfo_ParentReference proto.InternalMessageInfo - func (m *ServiceBackendPort) Reset() { *m = ServiceBackendPort{} } func (*ServiceBackendPort) ProtoMessage() {} func (*ServiceBackendPort) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{30} + return fileDescriptor_2c41434372fec1d7, []int{26} } func (m *ServiceBackendPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -916,124 +804,9 @@ func (m *ServiceBackendPort) XXX_DiscardUnknown() { var xxx_messageInfo_ServiceBackendPort proto.InternalMessageInfo -func (m *ServiceCIDR) Reset() { *m = ServiceCIDR{} } -func (*ServiceCIDR) ProtoMessage() {} -func (*ServiceCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{31} -} -func (m *ServiceCIDR) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDR) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDR) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDR.Merge(m, src) -} -func (m *ServiceCIDR) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDR) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDR.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceCIDR proto.InternalMessageInfo - -func (m *ServiceCIDRList) Reset() { *m = ServiceCIDRList{} } -func (*ServiceCIDRList) ProtoMessage() {} -func (*ServiceCIDRList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{32} -} -func (m *ServiceCIDRList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDRList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDRList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDRList.Merge(m, src) -} -func (m *ServiceCIDRList) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDRList) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDRList.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceCIDRList proto.InternalMessageInfo - -func (m *ServiceCIDRSpec) Reset() { *m = ServiceCIDRSpec{} } -func (*ServiceCIDRSpec) ProtoMessage() {} -func (*ServiceCIDRSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{33} -} -func (m *ServiceCIDRSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDRSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDRSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDRSpec.Merge(m, src) -} -func (m *ServiceCIDRSpec) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDRSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDRSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceCIDRSpec proto.InternalMessageInfo - -func (m *ServiceCIDRStatus) Reset() { *m = ServiceCIDRStatus{} } -func (*ServiceCIDRStatus) ProtoMessage() {} -func (*ServiceCIDRStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c41434372fec1d7, []int{34} -} -func (m *ServiceCIDRStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCIDRStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceCIDRStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCIDRStatus.Merge(m, src) -} -func (m *ServiceCIDRStatus) XXX_Size() int { - return m.Size() -} -func (m *ServiceCIDRStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCIDRStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceCIDRStatus proto.InternalMessageInfo - func init() { proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.api.networking.v1.HTTPIngressPath") proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.api.networking.v1.HTTPIngressRuleValue") - proto.RegisterType((*IPAddress)(nil), "k8s.io.api.networking.v1.IPAddress") - proto.RegisterType((*IPAddressList)(nil), "k8s.io.api.networking.v1.IPAddressList") - proto.RegisterType((*IPAddressSpec)(nil), "k8s.io.api.networking.v1.IPAddressSpec") proto.RegisterType((*IPBlock)(nil), "k8s.io.api.networking.v1.IPBlock") proto.RegisterType((*Ingress)(nil), "k8s.io.api.networking.v1.Ingress") proto.RegisterType((*IngressBackend)(nil), "k8s.io.api.networking.v1.IngressBackend") @@ -1058,12 +831,7 @@ func init() { proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.api.networking.v1.NetworkPolicyPeer") proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.api.networking.v1.NetworkPolicyPort") proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.api.networking.v1.NetworkPolicySpec") - proto.RegisterType((*ParentReference)(nil), "k8s.io.api.networking.v1.ParentReference") proto.RegisterType((*ServiceBackendPort)(nil), "k8s.io.api.networking.v1.ServiceBackendPort") - proto.RegisterType((*ServiceCIDR)(nil), "k8s.io.api.networking.v1.ServiceCIDR") - proto.RegisterType((*ServiceCIDRList)(nil), "k8s.io.api.networking.v1.ServiceCIDRList") - proto.RegisterType((*ServiceCIDRSpec)(nil), "k8s.io.api.networking.v1.ServiceCIDRSpec") - proto.RegisterType((*ServiceCIDRStatus)(nil), "k8s.io.api.networking.v1.ServiceCIDRStatus") } func init() { @@ -1071,125 +839,111 @@ func init() { } var fileDescriptor_2c41434372fec1d7 = []byte{ - // 1884 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xcd, 0x8f, 0x1b, 0x49, - 0x15, 0x9f, 0xf6, 0x8c, 0x67, 0xec, 0xe7, 0xf9, 0xc8, 0x14, 0x59, 0x61, 0x06, 0x61, 0x87, 0x5e, - 0xb2, 0x3b, 0x4b, 0x76, 0x6d, 0x32, 0x1b, 0x21, 0xb8, 0x00, 0xdb, 0x93, 0x6c, 0xe2, 0xcd, 0xc4, - 0xb1, 0xca, 0x56, 0x10, 0x88, 0x8f, 0xed, 0x69, 0xd7, 0x78, 0x7a, 0xa7, 0xdd, 0xd5, 0xaa, 0x2e, - 0x87, 0x44, 0x42, 0x88, 0x0b, 0x07, 0x6e, 0xf0, 0x27, 0x20, 0xfe, 0x02, 0x04, 0xd2, 0xae, 0xb4, - 0x82, 0x85, 0x0b, 0xca, 0x71, 0x25, 0x2e, 0x7b, 0xc1, 0x22, 0xe6, 0xbf, 0xc8, 0x09, 0xd5, 0x47, - 0x7f, 0xd9, 0xee, 0xb1, 0x89, 0x22, 0x9f, 0xc6, 0xfd, 0xde, 0xab, 0xdf, 0x7b, 0xf5, 0xea, 0x7d, - 0x55, 0x0d, 0x1c, 0x5e, 0x7c, 0x27, 0x6c, 0xb8, 0xb4, 0x69, 0x07, 0x6e, 0xd3, 0x27, 0xfc, 0x17, - 0x94, 0x5d, 0xb8, 0xfe, 0xa0, 0xf9, 0xf8, 0x66, 0x73, 0x40, 0x7c, 0xc2, 0x6c, 0x4e, 0xfa, 0x8d, - 0x80, 0x51, 0x4e, 0x51, 0x55, 0x49, 0x36, 0xec, 0xc0, 0x6d, 0x24, 0x92, 0x8d, 0xc7, 0x37, 0x0f, - 0xde, 0x19, 0xb8, 0xfc, 0x7c, 0x74, 0xda, 0x70, 0xe8, 0xb0, 0x39, 0xa0, 0x03, 0xda, 0x94, 0x0b, - 0x4e, 0x47, 0x67, 0xf2, 0x4b,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xdc, 0xa6, 0x8f, 0xa3, 0x75, 0x99, 0x67, 0x0e, 0x0d, 0x85, - 0x53, 0xb0, 0xd6, 0xf7, 0x9e, 0x3d, 0xaf, 0xad, 0x7d, 0xfe, 0xbc, 0xb6, 0xf6, 0xc5, 0xf3, 0xda, - 0xda, 0xaf, 0x27, 0x35, 0xe3, 0xd9, 0xa4, 0x66, 0x7c, 0x3e, 0xa9, 0x19, 0x5f, 0x4c, 0x6a, 0xc6, - 0x7f, 0x26, 0x35, 0xe3, 0x77, 0xff, 0xad, 0xad, 0xfd, 0xb8, 0x9a, 0xf7, 0x5f, 0xa4, 0xff, 0x05, - 0x00, 0x00, 0xff, 0xff, 0xb5, 0x6b, 0x8c, 0x52, 0x60, 0x1a, 0x00, 0x00, + // 1652 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x6f, 0x1b, 0x55, + 0x14, 0xce, 0x38, 0x71, 0xec, 0x1c, 0x27, 0x69, 0x72, 0x69, 0x85, 0x09, 0xc2, 0x0e, 0x23, 0xda, + 0x06, 0xda, 0xda, 0x34, 0xad, 0x10, 0x6c, 0x78, 0x4c, 0x9a, 0xa6, 0xa1, 0xa9, 0x63, 0x5d, 0x5b, + 0x45, 0x20, 0x1e, 0x9d, 0x8c, 0x6f, 0x9c, 0x69, 0xc6, 0x33, 0xa3, 0x3b, 0xd7, 0xa5, 0x95, 0x10, + 0x62, 0xc3, 0x82, 0x1d, 0x7f, 0x01, 0xf1, 0x0b, 0x10, 0x2c, 0x90, 0x10, 0x14, 0x36, 0xa8, 0xcb, + 0x4a, 0x6c, 0xba, 0xc1, 0xa2, 0xe6, 0x5f, 0x64, 0x85, 0xee, 0x63, 0x1e, 0x7e, 0xd5, 0xa6, 0xaa, + 0xb2, 0x4a, 0xee, 0x39, 0xe7, 0x7e, 0xe7, 0x71, 0xcf, 0x6b, 0x0c, 0x6b, 0x87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0e, 0x88, 0x69, 0x38, 0x42, 0x45, 0x5b, 0x30, 0x13, + 0xf8, 0xc4, 0x52, 0x81, 0x3f, 0x3d, 0x36, 0xf0, 0x35, 0x9f, 0x58, 0xb1, 0x6b, 0xfc, 0x84, 0x05, + 0x00, 0xda, 0x85, 0xd9, 0x80, 0x99, 0xac, 0x1d, 0x88, 0x87, 0xcf, 0xad, 0x9f, 0x1d, 0x0f, 0x25, + 0xc4, 0x8d, 0x45, 0x05, 0x36, 0x2b, 0xcf, 0x58, 0xc1, 0xe8, 0x7f, 0x68, 0xb0, 0xd8, 0xfb, 0xda, + 0xe8, 0x26, 0x64, 0x02, 0x42, 0xef, 0xd8, 0x16, 0xc9, 0xcf, 0x08, 0x25, 0xe5, 0xf1, 0x4a, 0xa4, + 0x7c, 0x98, 0x2f, 0x39, 0x9e, 0x2b, 0x8a, 0x86, 0x43, 0x30, 0xf4, 0x01, 0x64, 0x29, 0x09, 0xbc, + 0x36, 0xb5, 0x88, 0xb2, 0xfe, 0x42, 0x12, 0x98, 0xd7, 0x3d, 0x87, 0xe4, 0xc9, 0xda, 0xd8, 0xf1, + 0x2c, 0xd3, 0x91, 0xa1, 0xc4, 0x64, 0x9f, 0x50, 0xe2, 0x5a, 0xc4, 0x98, 0xe7, 0x59, 0x8e, 0x15, + 0x04, 0x8e, 0xc0, 0x78, 0x15, 0xcd, 0x2b, 0x43, 0x36, 0x1c, 0xf3, 0x58, 0x1e, 0x74, 0xa7, 0xe7, + 0x41, 0x5f, 0x1b, 0x1b, 0x20, 0x61, 0xd7, 0xa8, 0x57, 0xd5, 0x7f, 0xd5, 0x60, 0x29, 0x29, 0xb8, + 0x63, 0x07, 0x0c, 0x7d, 0x3c, 0xe0, 0x44, 0x69, 0x32, 0x27, 0xf8, 0x6d, 0xe1, 0xc2, 0x92, 0x52, + 0x95, 0x0d, 0x29, 0x09, 0x07, 0xae, 0x43, 0xda, 0x66, 0xa4, 0x15, 0x88, 0x12, 0xc9, 0xad, 0x9f,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3f, 0x70, 0xa2, 0x23, + 0x4e, 0xde, 0xd0, 0x3f, 0x05, 0x34, 0xb8, 0xe4, 0x4c, 0xb0, 0x42, 0x9d, 0x81, 0x59, 0xb7, 0xdd, + 0xda, 0x23, 0xb2, 0x86, 0xd2, 0xb1, 0x81, 0x15, 0x41, 0xc5, 0x8a, 0x6b, 0xbc, 0xfd, 0xe0, 0x71, + 0x61, 0xea, 0xe1, 0xe3, 0xc2, 0xd4, 0xa3, 0xc7, 0x85, 0xa9, 0xaf, 0xba, 0x05, 0xed, 0x41, 0xb7, + 0xa0, 0x3d, 0xec, 0x16, 0xb4, 0x47, 0xdd, 0x82, 0xf6, 0x4f, 0xb7, 0xa0, 0x7d, 0xfb, 0x6f, 0x61, + 0xea, 0xa3, 0xfc, 0xa8, 0x5f, 0x4b, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x24, 0x03, 0xec, 0x04, + 0x48, 0x15, 0x00, 0x00, } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { @@ -1274,7 +1028,7 @@ func (m *HTTPIngressRuleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *IPAddress) Marshal() (dAtA []byte, err error) { +func (m *IPBlock) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1284,40 +1038,34 @@ func (m *IPAddress) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *IPAddress) MarshalTo(dAtA []byte) (int, error) { +func (m *IPBlock) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *IPAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *IPBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Except) > 0 { + for iNdEx := len(m.Except) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Except[iNdEx]) + copy(dAtA[i:], m.Except[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Except[iNdEx]))) + i-- + dAtA[i] = 0x12 } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i -= len(m.CIDR) + copy(dAtA[i:], m.CIDR) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDR))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *IPAddressList) Marshal() (dAtA []byte, err error) { +func (m *Ingress) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1327,32 +1075,38 @@ func (m *IPAddressList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *IPAddressList) MarshalTo(dAtA []byte) (int, error) { +func (m *Ingress) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *IPAddressList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Ingress) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1364,7 +1118,7 @@ func (m *IPAddressList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *IPAddressSpec) Marshal() (dAtA []byte, err error) { +func (m *IngressBackend) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1374,19 +1128,19 @@ func (m *IPAddressSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *IPAddressSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *IngressBackend) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *IPAddressSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *IngressBackend) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.ParentRef != nil { + if m.Service != nil { { - size, err := m.ParentRef.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1394,132 +1148,7 @@ func (m *IPAddressSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *IPBlock) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IPBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IPBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Except) > 0 { - for iNdEx := len(m.Except) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Except[iNdEx]) - copy(dAtA[i:], m.Except[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Except[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.CIDR) - copy(dAtA[i:], m.CIDR) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDR))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Ingress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Ingress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Ingress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *IngressBackend) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IngressBackend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IngressBackend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Service != nil { - { - size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 + dAtA[i] = 0x22 } if m.Resource != nil { { @@ -2508,49 +2137,6 @@ func (m *NetworkPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ParentReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ParentReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParentReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x22 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x1a - i -= len(m.Resource) - copy(dAtA[i:], m.Resource) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) - i-- - dAtA[i] = 0x12 - i -= len(m.Group) - copy(dAtA[i:], m.Group) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *ServiceBackendPort) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2582,281 +2168,69 @@ func (m *ServiceBackendPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ServiceCIDR) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil + dAtA[offset] = uint8(v) + return base } - -func (m *ServiceCIDR) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *HTTPIngressPath) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Path) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Backend.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.PathType != nil { + l = len(*m.PathType) + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (m *ServiceCIDR) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *HTTPIngressRuleValue) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Paths) > 0 { + for _, e := range m.Paths { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + return n +} + +func (m *IPBlock) Size() (n int) { + if m == nil { + return 0 } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + var l int + _ = l + l = len(m.CIDR) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Except) > 0 { + for _, s := range m.Except { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *ServiceCIDRList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceCIDRList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceCIDRList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ServiceCIDRSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceCIDRSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceCIDRSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CIDRs) > 0 { - for iNdEx := len(m.CIDRs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CIDRs[iNdEx]) - copy(dAtA[i:], m.CIDRs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDRs[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ServiceCIDRStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceCIDRStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceCIDRStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *HTTPIngressPath) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Backend.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.PathType != nil { - l = len(*m.PathType) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *HTTPIngressRuleValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Paths) > 0 { - for _, e := range m.Paths { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *IPAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *IPAddressList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *IPAddressSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParentRef != nil { - l = m.ParentRef.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *IPBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CIDR) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Except) > 0 { - for _, s := range m.Except { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *Ingress) Size() (n int) { - if m == nil { - return 0 +func (m *Ingress) Size() (n int) { + if m == nil { + return 0 } var l int _ = l @@ -3261,23 +2635,6 @@ func (m *NetworkPolicySpec) Size() (n int) { return n } -func (m *ParentReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Resource) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - func (m *ServiceBackendPort) Size() (n int) { if m == nil { return 0 @@ -3290,68 +2647,6 @@ func (m *ServiceBackendPort) Size() (n int) { return n } -func (m *ServiceCIDR) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ServiceCIDRList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ServiceCIDRSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.CIDRs) > 0 { - for _, s := range m.CIDRs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ServiceCIDRStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3385,55 +2680,18 @@ func (this *HTTPIngressRuleValue) String() string { }, "") return s } -func (this *IPAddress) String() string { +func (this *IPBlock) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&IPAddress{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IPAddressSpec", "IPAddressSpec", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&IPBlock{`, + `CIDR:` + fmt.Sprintf("%v", this.CIDR) + `,`, + `Except:` + fmt.Sprintf("%v", this.Except) + `,`, `}`, }, "") return s } -func (this *IPAddressList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]IPAddress{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "IPAddress", "IPAddress", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&IPAddressList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *IPAddressSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IPAddressSpec{`, - `ParentRef:` + strings.Replace(this.ParentRef.String(), "ParentReference", "ParentReference", 1) + `,`, - `}`, - }, "") - return s -} -func (this *IPBlock) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IPBlock{`, - `CIDR:` + fmt.Sprintf("%v", this.CIDR) + `,`, - `Except:` + fmt.Sprintf("%v", this.Except) + `,`, - `}`, - }, "") - return s -} -func (this *Ingress) String() string { +func (this *Ingress) String() string { if this == nil { return "nil" } @@ -3760,19 +3018,6 @@ func (this *NetworkPolicySpec) String() string { }, "") return s } -func (this *ParentReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ParentReference{`, - `Group:` + fmt.Sprintf("%v", this.Group) + `,`, - `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} func (this *ServiceBackendPort) String() string { if this == nil { return "nil" @@ -3784,59 +3029,6 @@ func (this *ServiceBackendPort) String() string { }, "") return s } -func (this *ServiceCIDR) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceCIDR{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceCIDRSpec", "ServiceCIDRSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceCIDRStatus", "ServiceCIDRStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceCIDRList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ServiceCIDR{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ServiceCIDR", "ServiceCIDR", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ServiceCIDRList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ServiceCIDRSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceCIDRSpec{`, - `CIDRs:` + fmt.Sprintf("%v", this.CIDRs) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceCIDRStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]Condition{" - for _, f := range this.Conditions { - repeatedStringForConditions += fmt.Sprintf("%v", f) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&ServiceCIDRStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -4077,7 +3269,7 @@ func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *IPAddress) Unmarshal(dAtA []byte) error { +func (m *IPBlock) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4100,17 +3292,17 @@ func (m *IPAddress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IPAddress: wiretype end group for non-group") + return fmt.Errorf("proto: IPBlock: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IPAddress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IPBlock: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CIDR", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4120,30 +3312,29 @@ func (m *IPAddress) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.CIDR = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Except", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4153,24 +3344,23 @@ func (m *IPAddress) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Except = append(m.Except, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -4193,7 +3383,7 @@ func (m *IPAddress) Unmarshal(dAtA []byte) error { } return nil } -func (m *IPAddressList) Unmarshal(dAtA []byte) error { +func (m *Ingress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4216,15 +3406,15 @@ func (m *IPAddressList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IPAddressList: wiretype end group for non-group") + return fmt.Errorf("proto: Ingress: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IPAddressList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Ingress: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4251,13 +3441,13 @@ func (m *IPAddressList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4284,8 +3474,40 @@ func (m *IPAddressList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, IPAddress{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4310,7 +3532,7 @@ func (m *IPAddressList) Unmarshal(dAtA []byte) error { } return nil } -func (m *IPAddressSpec) Unmarshal(dAtA []byte) error { +func (m *IngressBackend) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4333,15 +3555,51 @@ func (m *IPAddressSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IPAddressSpec: wiretype end group for non-group") + return fmt.Errorf("proto: IngressBackend: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IPAddressSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressBackend: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resource == nil { + m.Resource = &v11.TypedLocalObjectReference{} + } + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4368,10 +3626,10 @@ func (m *IPAddressSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ParentRef == nil { - m.ParentRef = &ParentReference{} + if m.Service == nil { + m.Service = &IngressServiceBackend{} } - if err := m.ParentRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4396,7 +3654,7 @@ func (m *IPAddressSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *IPBlock) Unmarshal(dAtA []byte) error { +func (m *IngressClass) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4419,17 +3677,17 @@ func (m *IPBlock) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IPBlock: wiretype end group for non-group") + return fmt.Errorf("proto: IngressClass: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IPBlock: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressClass: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CIDR", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4439,29 +3697,30 @@ func (m *IPBlock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.CIDR = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Except", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4471,23 +3730,24 @@ func (m *IPBlock) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Except = append(m.Except, string(dAtA[iNdEx:postIndex])) + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -4510,7 +3770,7 @@ func (m *IPBlock) Unmarshal(dAtA []byte) error { } return nil } -func (m *Ingress) Unmarshal(dAtA []byte) error { +func (m *IngressClassList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4533,15 +3793,15 @@ func (m *Ingress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Ingress: wiretype end group for non-group") + return fmt.Errorf("proto: IngressClassList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Ingress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressClassList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4568,13 +3828,13 @@ func (m *Ingress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4601,48 +3861,16 @@ func (m *Ingress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, IngressClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated @@ -4659,7 +3887,7 @@ func (m *Ingress) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressBackend) Unmarshal(dAtA []byte) error { +func (m *IngressClassParametersReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4682,17 +3910,17 @@ func (m *IngressBackend) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressBackend: wiretype end group for non-group") + return fmt.Errorf("proto: IngressClassParametersReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressBackend: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressClassParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 3: + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4702,33 +3930,94 @@ func (m *IngressBackend) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Resource == nil { - m.Resource = &v11.TypedLocalObjectReference{} + s := string(dAtA[iNdEx:postIndex]) + m.APIGroup = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + 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.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4738,27 +4027,57 @@ func (m *IngressBackend) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Service == nil { - m.Service = &IngressServiceBackend{} + s := string(dAtA[iNdEx:postIndex]) + m.Scope = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + 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 + } + s := string(dAtA[iNdEx:postIndex]) + m.Namespace = &s iNdEx = postIndex default: iNdEx = preIndex @@ -4781,7 +4100,7 @@ func (m *IngressBackend) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressClass) Unmarshal(dAtA []byte) error { +func (m *IngressClassSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4804,17 +4123,17 @@ func (m *IngressClass) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressClass: wiretype end group for non-group") + return fmt.Errorf("proto: IngressClassSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressClass: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4824,28 +4143,27 @@ func (m *IngressClass) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4872,7 +4190,10 @@ func (m *IngressClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Parameters == nil { + m.Parameters = &IngressClassParametersReference{} + } + if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4897,7 +4218,7 @@ func (m *IngressClass) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressClassList) Unmarshal(dAtA []byte) error { +func (m *IngressList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4920,10 +4241,10 @@ func (m *IngressClassList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressClassList: wiretype end group for non-group") + return fmt.Errorf("proto: IngressList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressClassList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4988,7 +4309,7 @@ func (m *IngressClassList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, IngressClass{}) + m.Items = append(m.Items, Ingress{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5014,7 +4335,7 @@ func (m *IngressClassList) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressClassParametersReference) Unmarshal(dAtA []byte) error { +func (m *IngressLoadBalancerIngress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5037,15 +4358,15 @@ func (m *IngressClassParametersReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressClassParametersReference: wiretype end group for non-group") + return fmt.Errorf("proto: IngressLoadBalancerIngress: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressClassParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressLoadBalancerIngress: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5073,12 +4394,11 @@ func (m *IngressClassParametersReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.APIGroup = &s + m.IP = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5106,13 +4426,13 @@ func (m *IngressClassParametersReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = string(dAtA[iNdEx:postIndex]) + m.Hostname = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5122,62 +4442,81 @@ func (m *IngressClassParametersReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Ports = append(m.Ports, IngressPortStatus{}) + if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - 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 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressLoadBalancerStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Scope = &s - iNdEx = postIndex - case 5: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressLoadBalancerStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressLoadBalancerStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5187,24 +4526,25 @@ func (m *IngressClassParametersReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Namespace = &s + m.Ingress = append(m.Ingress, IngressLoadBalancerIngress{}) + if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -5227,7 +4567,7 @@ func (m *IngressClassParametersReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressClassSpec) Unmarshal(dAtA []byte) error { +func (m *IngressPortStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5250,15 +4590,34 @@ func (m *IngressClassSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressClassSpec: wiretype end group for non-group") + return fmt.Errorf("proto: IngressPortStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressPortStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5286,13 +4645,13 @@ func (m *IngressClassSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Controller = string(dAtA[iNdEx:postIndex]) + m.Protocol = k8s_io_api_core_v1.Protocol(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5302,27 +4661,24 @@ func (m *IngressClassSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Parameters == nil { - m.Parameters = &IngressClassParametersReference{} - } - if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.Error = &s iNdEx = postIndex default: iNdEx = preIndex @@ -5345,7 +4701,7 @@ func (m *IngressClassSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressList) Unmarshal(dAtA []byte) error { +func (m *IngressRule) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5368,17 +4724,17 @@ func (m *IngressList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressList: wiretype end group for non-group") + return fmt.Errorf("proto: IngressRule: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressRule: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5388,28 +4744,27 @@ func (m *IngressList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Host = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IngressRuleValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5436,8 +4791,7 @@ func (m *IngressList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, Ingress{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.IngressRuleValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5462,7 +4816,7 @@ func (m *IngressList) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressLoadBalancerIngress) Unmarshal(dAtA []byte) error { +func (m *IngressRuleValue) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5485,17 +4839,17 @@ func (m *IngressLoadBalancerIngress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressLoadBalancerIngress: wiretype end group for non-group") + return fmt.Errorf("proto: IngressRuleValue: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressLoadBalancerIngress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5505,27 +4859,81 @@ func (m *IngressLoadBalancerIngress) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.IP = string(dAtA[iNdEx:postIndex]) + if m.HTTP == nil { + m.HTTP = &HTTPIngressRuleValue{} + } + if err := m.HTTP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressServiceBackend) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressServiceBackend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressServiceBackend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5553,11 +4961,11 @@ func (m *IngressLoadBalancerIngress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Hostname = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5584,8 +4992,7 @@ func (m *IngressLoadBalancerIngress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ports = append(m.Ports, IngressPortStatus{}) - if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5610,7 +5017,7 @@ func (m *IngressLoadBalancerIngress) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressLoadBalancerStatus) Unmarshal(dAtA []byte) error { +func (m *IngressSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5633,15 +5040,15 @@ func (m *IngressLoadBalancerStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressLoadBalancerStatus: wiretype end group for non-group") + return fmt.Errorf("proto: IngressSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressLoadBalancerStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultBackend", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5668,66 +5075,18 @@ func (m *IngressLoadBalancerStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ingress = append(m.Ingress, IngressLoadBalancerIngress{}) - if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.DefaultBackend == nil { + m.DefaultBackend = &IngressBackend{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + if err := m.DefaultBackend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TLS", wireType) } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IngressPortStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IngressPortStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IngressPortStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5737,16 +5096,31 @@ func (m *IngressPortStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Port |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TLS = append(m.TLS, IngressTLS{}) + if err := m.TLS[len(m.TLS)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5756,27 +5130,29 @@ func (m *IngressPortStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Protocol = k8s_io_api_core_v1.Protocol(dAtA[iNdEx:postIndex]) + m.Rules = append(m.Rules, IngressRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IngressClassName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5805,7 +5181,7 @@ func (m *IngressPortStatus) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) - m.Error = &s + m.IngressClassName = &s iNdEx = postIndex default: iNdEx = preIndex @@ -5828,7 +5204,7 @@ func (m *IngressPortStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressRule) Unmarshal(dAtA []byte) error { +func (m *IngressStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5851,47 +5227,15 @@ func (m *IngressRule) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressRule: wiretype end group for non-group") + return fmt.Errorf("proto: IngressStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressRule: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", 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.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IngressRuleValue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5918,7 +5262,7 @@ func (m *IngressRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.IngressRuleValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5943,7 +5287,7 @@ func (m *IngressRule) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressRuleValue) Unmarshal(dAtA []byte) error { +func (m *IngressTLS) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5966,17 +5310,17 @@ func (m *IngressRuleValue) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressRuleValue: wiretype end group for non-group") + return fmt.Errorf("proto: IngressTLS: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IngressTLS: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5986,27 +5330,55 @@ func (m *IngressRuleValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.HTTP == nil { - m.HTTP = &HTTPIngressRuleValue{} + m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType) } - if err := m.HTTP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + 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.SecretName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6029,7 +5401,7 @@ func (m *IngressRuleValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressServiceBackend) Unmarshal(dAtA []byte) error { +func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6052,17 +5424,17 @@ func (m *IngressServiceBackend) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressServiceBackend: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressServiceBackend: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6072,27 +5444,28 @@ func (m *IngressServiceBackend) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6119,7 +5492,7 @@ func (m *IngressServiceBackend) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6144,7 +5517,7 @@ func (m *IngressServiceBackend) Unmarshal(dAtA []byte) error { } return nil } -func (m *IngressSpec) Unmarshal(dAtA []byte) error { +func (m *NetworkPolicyEgressRule) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6167,15 +5540,15 @@ func (m *IngressSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IngressSpec: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkPolicyEgressRule: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IngressSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkPolicyEgressRule: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultBackend", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6202,16 +5575,14 @@ func (m *IngressSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.DefaultBackend == nil { - m.DefaultBackend = &IngressBackend{} - } - if err := m.DefaultBackend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Ports = append(m.Ports, NetworkPolicyPort{}) + if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TLS", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6238,1048 +5609,18 @@ func (m *IngressSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TLS = append(m.TLS, IngressTLS{}) - if err := m.TLS[len(m.TLS)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.To = append(m.To, NetworkPolicyPeer{}) + if err := m.To[len(m.To)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, IngressRule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IngressClassName", 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 - } - s := string(dAtA[iNdEx:postIndex]) - m.IngressClassName = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IngressStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IngressStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IngressStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IngressTLS) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IngressTLS: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IngressTLS: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", 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.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretName", 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.SecretName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkPolicyEgressRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyEgressRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyEgressRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, NetworkPolicyPort{}) - if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.To = append(m.To, NetworkPolicyPeer{}) - if err := m.To[len(m.To)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkPolicyIngressRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyIngressRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyIngressRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ports = append(m.Ports, NetworkPolicyPort{}) - if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.From = append(m.From, NetworkPolicyPeer{}) - if err := m.From[len(m.From)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, NetworkPolicy{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PodSelector == nil { - m.PodSelector = &v1.LabelSelector{} - } - if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NamespaceSelector == nil { - m.NamespaceSelector = &v1.LabelSelector{} - } - if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IPBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IPBlock == nil { - m.IPBlock = &IPBlock{} - } - if err := m.IPBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetworkPolicyPort) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyPort: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyPort: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", 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 - } - s := k8s_io_api_core_v1.Protocol(dAtA[iNdEx:postIndex]) - m.Protocol = &s - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Port == nil { - m.Port = &intstr.IntOrString{} - } - if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndPort", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EndPort = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { @@ -7294,7 +5635,7 @@ func (m *NetworkPolicyPort) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error { +func (m *NetworkPolicyIngressRule) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7317,15 +5658,15 @@ func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicySpec: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkPolicyIngressRule: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkPolicyIngressRule: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7352,47 +5693,14 @@ func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Ports = append(m.Ports, NetworkPolicyPort{}) + if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ingress = append(m.Ingress, NetworkPolicyIngressRule{}) - if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Egress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7419,220 +5727,10 @@ func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Egress = append(m.Egress, NetworkPolicyEgressRule{}) - if err := m.Egress[len(m.Egress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PolicyTypes", 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.PolicyTypes = append(m.PolicyTypes, PolicyType(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + m.From = append(m.From, NetworkPolicyPeer{}) + if err := m.From[len(m.From)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParentReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ParentReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParentReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", 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.Group = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", 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.Resource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", 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.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7655,7 +5753,7 @@ func (m *ParentReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceBackendPort) Unmarshal(dAtA []byte) error { +func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7678,17 +5776,17 @@ func (m *ServiceBackendPort) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceBackendPort: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceBackendPort: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7698,29 +5796,30 @@ func (m *ServiceBackendPort) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } - m.Number = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7730,11 +5829,26 @@ func (m *ServiceBackendPort) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Number |= int32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, NetworkPolicy{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -7756,7 +5870,7 @@ func (m *ServiceBackendPort) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceCIDR) Unmarshal(dAtA []byte) error { +func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7779,15 +5893,15 @@ func (m *ServiceCIDR) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceCIDR: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceCIDR: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7814,13 +5928,16 @@ func (m *ServiceCIDR) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.PodSelector == nil { + m.PodSelector = &v1.LabelSelector{} + } + if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7847,13 +5964,16 @@ func (m *ServiceCIDR) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.NamespaceSelector == nil { + m.NamespaceSelector = &v1.LabelSelector{} + } + if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IPBlock", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7880,7 +6000,10 @@ func (m *ServiceCIDR) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.IPBlock == nil { + m.IPBlock = &IPBlock{} + } + if err := m.IPBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7905,7 +6028,7 @@ func (m *ServiceCIDR) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceCIDRList) Unmarshal(dAtA []byte) error { +func (m *NetworkPolicyPort) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7928,17 +6051,17 @@ func (m *ServiceCIDRList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceCIDRList: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkPolicyPort: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceCIDRList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkPolicyPort: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7948,28 +6071,28 @@ func (m *ServiceCIDRList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := k8s_io_api_core_v1.Protocol(dAtA[iNdEx:postIndex]) + m.Protocol = &s iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7996,11 +6119,33 @@ func (m *ServiceCIDRList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ServiceCIDR{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Port == nil { + m.Port = &intstr.IntOrString{} + } + if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndPort", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EndPort = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -8022,7 +6167,7 @@ func (m *ServiceCIDRList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceCIDRSpec) Unmarshal(dAtA []byte) error { +func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8045,15 +6190,116 @@ func (m *ServiceCIDRSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceCIDRSpec: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkPolicySpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceCIDRSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CIDRs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ingress = append(m.Ingress, NetworkPolicyIngressRule{}) + if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Egress", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Egress = append(m.Egress, NetworkPolicyEgressRule{}) + if err := m.Egress[len(m.Egress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyTypes", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8081,7 +6327,7 @@ func (m *ServiceCIDRSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CIDRs = append(m.CIDRs, string(dAtA[iNdEx:postIndex])) + m.PolicyTypes = append(m.PolicyTypes, PolicyType(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -8104,7 +6350,7 @@ func (m *ServiceCIDRSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceCIDRStatus) Unmarshal(dAtA []byte) error { +func (m *ServiceBackendPort) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8127,17 +6373,17 @@ func (m *ServiceCIDRStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceCIDRStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ServiceBackendPort: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceCIDRStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ServiceBackendPort: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8147,26 +6393,43 @@ func (m *ServiceCIDRStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Conditions = append(m.Conditions, v1.Condition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/go-controller/vendor/k8s.io/api/networking/v1/generated.proto b/go-controller/vendor/k8s.io/api/networking/v1/generated.proto index e3e3e9215e..c72fdc8f37 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1/generated.proto +++ b/go-controller/vendor/k8s.io/api/networking/v1/generated.proto @@ -72,44 +72,6 @@ message HTTPIngressRuleValue { repeated HTTPIngressPath paths = 1; } -// IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs -// that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. -// An IP address can be represented in different formats, to guarantee the uniqueness of the IP, -// the name of the object is the IP address in canonical format, four decimal digits separated -// by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. -// Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 -// Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 -message IPAddress { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec is the desired state of the IPAddress. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional IPAddressSpec spec = 2; -} - -// IPAddressList contains a list of IPAddress. -message IPAddressList { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of IPAddresses. - repeated IPAddress items = 2; -} - -// IPAddressSpec describe the attributes in an IP Address. -message IPAddressSpec { - // ParentRef references the resource that an IPAddress is attached to. - // An IPAddress must reference a parent object. - // +required - optional ParentReference parentRef = 1; -} - // IPBlock describes a particular CIDR (Ex. "192.168.1.0/24","2001:db8::/64") that is allowed // to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs // that should not be included within this rule. @@ -578,25 +540,6 @@ message NetworkPolicySpec { repeated string policyTypes = 4; } -// ParentReference describes a reference to a parent object. -message ParentReference { - // Group is the group of the object being referenced. - // +optional - optional string group = 1; - - // Resource is the resource of the object being referenced. - // +required - optional string resource = 2; - - // Namespace is the namespace of the object being referenced. - // +optional - optional string namespace = 3; - - // Name is the name of the object being referenced. - // +required - optional string name = 4; -} - // ServiceBackendPort is the service port being referenced. // +structType=atomic message ServiceBackendPort { @@ -611,55 +554,3 @@ message ServiceBackendPort { optional int32 number = 2; } -// ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). -// This range is used to allocate ClusterIPs to Service objects. -message ServiceCIDR { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec is the desired state of the ServiceCIDR. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional ServiceCIDRSpec spec = 2; - - // status represents the current state of the ServiceCIDR. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional ServiceCIDRStatus status = 3; -} - -// ServiceCIDRList contains a list of ServiceCIDR objects. -message ServiceCIDRList { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of ServiceCIDRs. - repeated ServiceCIDR items = 2; -} - -// ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. -message ServiceCIDRSpec { - // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") - // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. - // This field is immutable. - // +optional - // +listType=atomic - repeated string cidrs = 1; -} - -// ServiceCIDRStatus describes the current state of the ServiceCIDR. -message ServiceCIDRStatus { - // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 1; -} - diff --git a/go-controller/vendor/k8s.io/api/networking/v1/register.go b/go-controller/vendor/k8s.io/api/networking/v1/register.go index b9bdcb78c9..a200d54370 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1/register.go +++ b/go-controller/vendor/k8s.io/api/networking/v1/register.go @@ -50,10 +50,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &IngressClassList{}, &NetworkPolicy{}, &NetworkPolicyList{}, - &IPAddress{}, - &IPAddressList{}, - &ServiceCIDR{}, - &ServiceCIDRList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/go-controller/vendor/k8s.io/api/networking/v1/types.go b/go-controller/vendor/k8s.io/api/networking/v1/types.go index 216647ceeb..d75e27558d 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1/types.go +++ b/go-controller/vendor/k8s.io/api/networking/v1/types.go @@ -635,133 +635,3 @@ type IngressClassList struct { // items is the list of IngressClasses. Items []IngressClass `json:"items" protobuf:"bytes,2,rep,name=items"` } - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.33 - -// IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs -// that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. -// An IP address can be represented in different formats, to guarantee the uniqueness of the IP, -// the name of the object is the IP address in canonical format, four decimal digits separated -// by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. -// Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 -// Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 -type IPAddress struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // spec is the desired state of the IPAddress. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec IPAddressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` -} - -// IPAddressSpec describe the attributes in an IP Address. -type IPAddressSpec struct { - // ParentRef references the resource that an IPAddress is attached to. - // An IPAddress must reference a parent object. - // +required - ParentRef *ParentReference `json:"parentRef,omitempty" protobuf:"bytes,1,opt,name=parentRef"` -} - -// ParentReference describes a reference to a parent object. -type ParentReference struct { - // Group is the group of the object being referenced. - // +optional - Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` - // Resource is the resource of the object being referenced. - // +required - Resource string `json:"resource,omitempty" protobuf:"bytes,2,opt,name=resource"` - // Namespace is the namespace of the object being referenced. - // +optional - Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` - // Name is the name of the object being referenced. - // +required - Name string `json:"name,omitempty" protobuf:"bytes,4,opt,name=name"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.33 - -// IPAddressList contains a list of IPAddress. -type IPAddressList struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // items is the list of IPAddresses. - Items []IPAddress `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.33 - -// ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). -// This range is used to allocate ClusterIPs to Service objects. -type ServiceCIDR struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // spec is the desired state of the ServiceCIDR. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec ServiceCIDRSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // status represents the current state of the ServiceCIDR. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status ServiceCIDRStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. -type ServiceCIDRSpec struct { - // CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") - // from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. - // This field is immutable. - // +optional - // +listType=atomic - CIDRs []string `json:"cidrs,omitempty" protobuf:"bytes,1,opt,name=cidrs"` -} - -const ( - // ServiceCIDRConditionReady represents status of a ServiceCIDR that is ready to be used by the - // apiserver to allocate ClusterIPs for Services. - ServiceCIDRConditionReady = "Ready" - // ServiceCIDRReasonTerminating represents a reason where a ServiceCIDR is not ready because it is - // being deleted. - ServiceCIDRReasonTerminating = "Terminating" -) - -// ServiceCIDRStatus describes the current state of the ServiceCIDR. -type ServiceCIDRStatus struct { - // conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.33 - -// ServiceCIDRList contains a list of ServiceCIDR objects. -type ServiceCIDRList struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // items is the list of ServiceCIDRs. - Items []ServiceCIDR `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/go-controller/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go index 0e294848ba..ff080540d3 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go @@ -47,35 +47,6 @@ func (HTTPIngressRuleValue) SwaggerDoc() map[string]string { return map_HTTPIngressRuleValue } -var map_IPAddress = map[string]string{ - "": "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", -} - -func (IPAddress) SwaggerDoc() map[string]string { - return map_IPAddress -} - -var map_IPAddressList = map[string]string{ - "": "IPAddressList contains a list of IPAddress.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of IPAddresses.", -} - -func (IPAddressList) SwaggerDoc() map[string]string { - return map_IPAddressList -} - -var map_IPAddressSpec = map[string]string{ - "": "IPAddressSpec describe the attributes in an IP Address.", - "parentRef": "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object.", -} - -func (IPAddressSpec) SwaggerDoc() map[string]string { - return map_IPAddressSpec -} - var map_IPBlock = map[string]string{ "": "IPBlock describes a particular CIDR (Ex. \"192.168.1.0/24\",\"2001:db8::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", "cidr": "cidr is a string representing the IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\"", @@ -323,18 +294,6 @@ func (NetworkPolicySpec) SwaggerDoc() map[string]string { return map_NetworkPolicySpec } -var map_ParentReference = map[string]string{ - "": "ParentReference describes a reference to a parent object.", - "group": "Group is the group of the object being referenced.", - "resource": "Resource is the resource of the object being referenced.", - "namespace": "Namespace is the namespace of the object being referenced.", - "name": "Name is the name of the object being referenced.", -} - -func (ParentReference) SwaggerDoc() map[string]string { - return map_ParentReference -} - var map_ServiceBackendPort = map[string]string{ "": "ServiceBackendPort is the service port being referenced.", "name": "name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", @@ -345,43 +304,4 @@ func (ServiceBackendPort) SwaggerDoc() map[string]string { return map_ServiceBackendPort } -var map_ServiceCIDR = map[string]string{ - "": "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - "status": "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", -} - -func (ServiceCIDR) SwaggerDoc() map[string]string { - return map_ServiceCIDR -} - -var map_ServiceCIDRList = map[string]string{ - "": "ServiceCIDRList contains a list of ServiceCIDR objects.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of ServiceCIDRs.", -} - -func (ServiceCIDRList) SwaggerDoc() map[string]string { - return map_ServiceCIDRList -} - -var map_ServiceCIDRSpec = map[string]string{ - "": "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.", - "cidrs": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.", -} - -func (ServiceCIDRSpec) SwaggerDoc() map[string]string { - return map_ServiceCIDRSpec -} - -var map_ServiceCIDRStatus = map[string]string{ - "": "ServiceCIDRStatus describes the current state of the ServiceCIDR.", - "conditions": "conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state", -} - -func (ServiceCIDRStatus) SwaggerDoc() map[string]string { - return map_ServiceCIDRStatus -} - // AUTO-GENERATED FUNCTIONS END HERE diff --git a/go-controller/vendor/k8s.io/api/networking/v1/well_known_labels.go b/go-controller/vendor/k8s.io/api/networking/v1/well_known_labels.go deleted file mode 100644 index 28e2e8f3f6..0000000000 --- a/go-controller/vendor/k8s.io/api/networking/v1/well_known_labels.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -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 v1 - -const ( - - // TODO: Use IPFamily as field with a field selector,And the value is set based on - // the name at create time and immutable. - // LabelIPAddressFamily is used to indicate the IP family of a Kubernetes IPAddress. - // This label simplify dual-stack client operations allowing to obtain the list of - // IP addresses filtered by family. - LabelIPAddressFamily = "ipaddress.kubernetes.io/ip-family" - // LabelManagedBy is used to indicate the controller or entity that manages - // an IPAddress. This label aims to enable different IPAddress - // objects to be managed by different controllers or entities within the - // same cluster. It is highly recommended to configure this label for all - // IPAddress objects. - LabelManagedBy = "ipaddress.kubernetes.io/managed-by" -) diff --git a/go-controller/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go b/go-controller/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go index 9ce6435a46..540873833f 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go +++ b/go-controller/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go @@ -73,87 +73,6 @@ func (in *HTTPIngressRuleValue) DeepCopy() *HTTPIngressRuleValue { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAddress) DeepCopyInto(out *IPAddress) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddress. -func (in *IPAddress) DeepCopy() *IPAddress { - if in == nil { - return nil - } - out := new(IPAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IPAddress) 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 *IPAddressList) DeepCopyInto(out *IPAddressList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]IPAddress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddressList. -func (in *IPAddressList) DeepCopy() *IPAddressList { - if in == nil { - return nil - } - out := new(IPAddressList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IPAddressList) 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 *IPAddressSpec) DeepCopyInto(out *IPAddressSpec) { - *out = *in - if in.ParentRef != nil { - in, out := &in.ParentRef, &out.ParentRef - *out = new(ParentReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddressSpec. -func (in *IPAddressSpec) DeepCopy() *IPAddressSpec { - if in == nil { - return nil - } - out := new(IPAddressSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IPBlock) DeepCopyInto(out *IPBlock) { *out = *in @@ -792,22 +711,6 @@ func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ParentReference) DeepCopyInto(out *ParentReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParentReference. -func (in *ParentReference) DeepCopy() *ParentReference { - if in == nil { - return nil - } - out := new(ParentReference) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceBackendPort) DeepCopyInto(out *ServiceBackendPort) { *out = *in @@ -823,108 +726,3 @@ func (in *ServiceBackendPort) DeepCopy() *ServiceBackendPort { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceCIDR) DeepCopyInto(out *ServiceCIDR) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDR. -func (in *ServiceCIDR) DeepCopy() *ServiceCIDR { - if in == nil { - return nil - } - out := new(ServiceCIDR) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCIDR) 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 *ServiceCIDRList) DeepCopyInto(out *ServiceCIDRList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ServiceCIDR, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRList. -func (in *ServiceCIDRList) DeepCopy() *ServiceCIDRList { - if in == nil { - return nil - } - out := new(ServiceCIDRList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCIDRList) 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 *ServiceCIDRSpec) DeepCopyInto(out *ServiceCIDRSpec) { - *out = *in - if in.CIDRs != nil { - in, out := &in.CIDRs, &out.CIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRSpec. -func (in *ServiceCIDRSpec) DeepCopy() *ServiceCIDRSpec { - if in == nil { - return nil - } - out := new(ServiceCIDRSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceCIDRStatus) DeepCopyInto(out *ServiceCIDRStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCIDRStatus. -func (in *ServiceCIDRStatus) DeepCopy() *ServiceCIDRStatus { - if in == nil { - return nil - } - out := new(ServiceCIDRStatus) - in.DeepCopyInto(out) - return out -} diff --git a/go-controller/vendor/k8s.io/api/networking/v1/zz_generated.prerelease-lifecycle.go b/go-controller/vendor/k8s.io/api/networking/v1/zz_generated.prerelease-lifecycle.go index 6894d8c539..21e8c671a5 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1/zz_generated.prerelease-lifecycle.go +++ b/go-controller/vendor/k8s.io/api/networking/v1/zz_generated.prerelease-lifecycle.go @@ -21,18 +21,6 @@ limitations under the License. package v1 -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *IPAddress) APILifecycleIntroduced() (major, minor int) { - return 1, 33 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *IPAddressList) APILifecycleIntroduced() (major, minor int) { - return 1, 33 -} - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *Ingress) APILifecycleIntroduced() (major, minor int) { @@ -68,15 +56,3 @@ func (in *NetworkPolicy) APILifecycleIntroduced() (major, minor int) { func (in *NetworkPolicyList) APILifecycleIntroduced() (major, minor int) { return 1, 19 } - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *ServiceCIDR) APILifecycleIntroduced() (major, minor int) { - return 1, 33 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *ServiceCIDRList) APILifecycleIntroduced() (major, minor int) { - return 1, 33 -} diff --git a/go-controller/vendor/k8s.io/api/networking/v1alpha1/doc.go b/go-controller/vendor/k8s.io/api/networking/v1alpha1/doc.go index 55264ae707..3827b0418f 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1alpha1/doc.go +++ b/go-controller/vendor/k8s.io/api/networking/v1alpha1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=networking.k8s.io -package v1alpha1 +package v1alpha1 // import "k8s.io/api/networking/v1alpha1" diff --git a/go-controller/vendor/k8s.io/api/networking/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/networking/v1beta1/doc.go index c5a03e04e8..fa6d01cea0 100644 --- a/go-controller/vendor/k8s.io/api/networking/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/networking/v1beta1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=networking.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/networking/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/node/v1/doc.go b/go-controller/vendor/k8s.io/api/node/v1/doc.go index 3239af7039..57ca52445b 100644 --- a/go-controller/vendor/k8s.io/api/node/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/node/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=node.k8s.io -package v1 +package v1 // import "k8s.io/api/node/v1" diff --git a/go-controller/vendor/k8s.io/api/node/v1alpha1/doc.go b/go-controller/vendor/k8s.io/api/node/v1alpha1/doc.go index 2f3d46ac20..dfe99540b5 100644 --- a/go-controller/vendor/k8s.io/api/node/v1alpha1/doc.go +++ b/go-controller/vendor/k8s.io/api/node/v1alpha1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +groupName=node.k8s.io -package v1alpha1 +package v1alpha1 // import "k8s.io/api/node/v1alpha1" diff --git a/go-controller/vendor/k8s.io/api/node/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/node/v1beta1/doc.go index 7b47c8df66..c76ba89c48 100644 --- a/go-controller/vendor/k8s.io/api/node/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/node/v1beta1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=node.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/node/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/policy/v1/doc.go b/go-controller/vendor/k8s.io/api/policy/v1/doc.go index ff47e7fd49..c51e02685a 100644 --- a/go-controller/vendor/k8s.io/api/policy/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/policy/v1/doc.go @@ -22,4 +22,4 @@ limitations under the License. // Package policy is for any kind of policy object. Suitable examples, even if // they aren't all here, are PodDisruptionBudget, // NetworkPolicy, etc. -package v1 +package v1 // import "k8s.io/api/policy/v1" diff --git a/go-controller/vendor/k8s.io/api/policy/v1/generated.proto b/go-controller/vendor/k8s.io/api/policy/v1/generated.proto index 9534890723..57128e8112 100644 --- a/go-controller/vendor/k8s.io/api/policy/v1/generated.proto +++ b/go-controller/vendor/k8s.io/api/policy/v1/generated.proto @@ -115,6 +115,9 @@ message PodDisruptionBudgetSpec { // Additional policies may be added in the future. // Clients making eviction decisions should disallow eviction of unhealthy pods // if they encounter an unrecognized policy in this field. + // + // This field is beta-level. The eviction API uses this field when + // the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default). // +optional optional string unhealthyPodEvictionPolicy = 4; } diff --git a/go-controller/vendor/k8s.io/api/policy/v1/types.go b/go-controller/vendor/k8s.io/api/policy/v1/types.go index 4e74367894..f05367ebe4 100644 --- a/go-controller/vendor/k8s.io/api/policy/v1/types.go +++ b/go-controller/vendor/k8s.io/api/policy/v1/types.go @@ -70,6 +70,9 @@ type PodDisruptionBudgetSpec struct { // Additional policies may be added in the future. // Clients making eviction decisions should disallow eviction of unhealthy pods // if they encounter an unrecognized policy in this field. + // + // This field is beta-level. The eviction API uses this field when + // the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default). // +optional UnhealthyPodEvictionPolicy *UnhealthyPodEvictionPolicyType `json:"unhealthyPodEvictionPolicy,omitempty" protobuf:"bytes,4,opt,name=unhealthyPodEvictionPolicy"` } diff --git a/go-controller/vendor/k8s.io/api/policy/v1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/policy/v1/types_swagger_doc_generated.go index 9b2f5b9450..799b0794a9 100644 --- a/go-controller/vendor/k8s.io/api/policy/v1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/policy/v1/types_swagger_doc_generated.go @@ -63,7 +63,7 @@ var map_PodDisruptionBudgetSpec = map[string]string{ "minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", "selector": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", "maxUnavailable": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", - "unhealthyPodEvictionPolicy": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.", + "unhealthyPodEvictionPolicy": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.\n\nThis field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).", } func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string { diff --git a/go-controller/vendor/k8s.io/api/policy/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/policy/v1beta1/doc.go index 777106c600..76da54b4c7 100644 --- a/go-controller/vendor/k8s.io/api/policy/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/policy/v1beta1/doc.go @@ -22,4 +22,4 @@ limitations under the License. // Package policy is for any kind of policy object. Suitable examples, even if // they aren't all here, are PodDisruptionBudget, // NetworkPolicy, etc. -package v1beta1 +package v1beta1 // import "k8s.io/api/policy/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/policy/v1beta1/generated.proto b/go-controller/vendor/k8s.io/api/policy/v1beta1/generated.proto index e0cbe00f1c..91e33f2332 100644 --- a/go-controller/vendor/k8s.io/api/policy/v1beta1/generated.proto +++ b/go-controller/vendor/k8s.io/api/policy/v1beta1/generated.proto @@ -115,6 +115,9 @@ message PodDisruptionBudgetSpec { // Additional policies may be added in the future. // Clients making eviction decisions should disallow eviction of unhealthy pods // if they encounter an unrecognized policy in this field. + // + // This field is beta-level. The eviction API uses this field when + // the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default). // +optional optional string unhealthyPodEvictionPolicy = 4; } diff --git a/go-controller/vendor/k8s.io/api/policy/v1beta1/types.go b/go-controller/vendor/k8s.io/api/policy/v1beta1/types.go index 9bba454f94..bc5f970d27 100644 --- a/go-controller/vendor/k8s.io/api/policy/v1beta1/types.go +++ b/go-controller/vendor/k8s.io/api/policy/v1beta1/types.go @@ -67,6 +67,9 @@ type PodDisruptionBudgetSpec struct { // Additional policies may be added in the future. // Clients making eviction decisions should disallow eviction of unhealthy pods // if they encounter an unrecognized policy in this field. + // + // This field is beta-level. The eviction API uses this field when + // the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default). // +optional UnhealthyPodEvictionPolicy *UnhealthyPodEvictionPolicyType `json:"unhealthyPodEvictionPolicy,omitempty" protobuf:"bytes,4,opt,name=unhealthyPodEvictionPolicy"` } diff --git a/go-controller/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go b/go-controller/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go index cffc9a548c..4a79d75949 100644 --- a/go-controller/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go +++ b/go-controller/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go @@ -63,7 +63,7 @@ var map_PodDisruptionBudgetSpec = map[string]string{ "minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", "selector": "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.", "maxUnavailable": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", - "unhealthyPodEvictionPolicy": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.", + "unhealthyPodEvictionPolicy": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.\n\nThis field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).", } func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string { diff --git a/go-controller/vendor/k8s.io/api/rbac/v1/doc.go b/go-controller/vendor/k8s.io/api/rbac/v1/doc.go index 408546274b..b0e4e5b5b5 100644 --- a/go-controller/vendor/k8s.io/api/rbac/v1/doc.go +++ b/go-controller/vendor/k8s.io/api/rbac/v1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:prerelease-lifecycle-gen=true // +groupName=rbac.authorization.k8s.io -package v1 +package v1 // import "k8s.io/api/rbac/v1" diff --git a/go-controller/vendor/k8s.io/api/rbac/v1alpha1/doc.go b/go-controller/vendor/k8s.io/api/rbac/v1alpha1/doc.go index 70d3c0e971..918b8a337c 100644 --- a/go-controller/vendor/k8s.io/api/rbac/v1alpha1/doc.go +++ b/go-controller/vendor/k8s.io/api/rbac/v1alpha1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +groupName=rbac.authorization.k8s.io -package v1alpha1 +package v1alpha1 // import "k8s.io/api/rbac/v1alpha1" diff --git a/go-controller/vendor/k8s.io/api/rbac/v1beta1/doc.go b/go-controller/vendor/k8s.io/api/rbac/v1beta1/doc.go index 504a58d8bf..156f273e69 100644 --- a/go-controller/vendor/k8s.io/api/rbac/v1beta1/doc.go +++ b/go-controller/vendor/k8s.io/api/rbac/v1beta1/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=rbac.authorization.k8s.io -package v1beta1 +package v1beta1 // import "k8s.io/api/rbac/v1beta1" diff --git a/go-controller/vendor/k8s.io/api/resource/v1alpha3/doc.go b/go-controller/vendor/k8s.io/api/resource/v1alpha3/doc.go index 82e64f1d00..ffc21307d0 100644 --- a/go-controller/vendor/k8s.io/api/resource/v1alpha3/doc.go +++ b/go-controller/vendor/k8s.io/api/resource/v1alpha3/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=resource.k8s.io // Package v1alpha3 is the v1alpha3 version of the resource API. -package v1alpha3 +package v1alpha3 // import "k8s.io/api/resource/v1alpha3" diff --git a/go-controller/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go b/go-controller/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go index 716492fea4..540f7b8184 100644 --- a/go-controller/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go +++ b/go-controller/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go @@ -29,7 +29,6 @@ import ( v11 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" math "math" math_bits "math/bits" @@ -162,66 +161,10 @@ func (m *CELDeviceSelector) XXX_DiscardUnknown() { var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo -func (m *Counter) Reset() { *m = Counter{} } -func (*Counter) ProtoMessage() {} -func (*Counter) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{4} -} -func (m *Counter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Counter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Counter.Merge(m, src) -} -func (m *Counter) XXX_Size() int { - return m.Size() -} -func (m *Counter) XXX_DiscardUnknown() { - xxx_messageInfo_Counter.DiscardUnknown(m) -} - -var xxx_messageInfo_Counter proto.InternalMessageInfo - -func (m *CounterSet) Reset() { *m = CounterSet{} } -func (*CounterSet) ProtoMessage() {} -func (*CounterSet) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{5} -} -func (m *CounterSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CounterSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CounterSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_CounterSet.Merge(m, src) -} -func (m *CounterSet) XXX_Size() int { - return m.Size() -} -func (m *CounterSet) XXX_DiscardUnknown() { - xxx_messageInfo_CounterSet.DiscardUnknown(m) -} - -var xxx_messageInfo_CounterSet proto.InternalMessageInfo - func (m *Device) Reset() { *m = Device{} } func (*Device) ProtoMessage() {} func (*Device) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{6} + return fileDescriptor_66649ee9bbcd89d2, []int{4} } func (m *Device) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -249,7 +192,7 @@ var xxx_messageInfo_Device proto.InternalMessageInfo func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } func (*DeviceAllocationConfiguration) ProtoMessage() {} func (*DeviceAllocationConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{7} + return fileDescriptor_66649ee9bbcd89d2, []int{5} } func (m *DeviceAllocationConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -277,7 +220,7 @@ var xxx_messageInfo_DeviceAllocationConfiguration proto.InternalMessageInfo func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } func (*DeviceAllocationResult) ProtoMessage() {} func (*DeviceAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{8} + return fileDescriptor_66649ee9bbcd89d2, []int{6} } func (m *DeviceAllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -305,7 +248,7 @@ var xxx_messageInfo_DeviceAllocationResult proto.InternalMessageInfo func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } func (*DeviceAttribute) ProtoMessage() {} func (*DeviceAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{9} + return fileDescriptor_66649ee9bbcd89d2, []int{7} } func (m *DeviceAttribute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -333,7 +276,7 @@ var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } func (*DeviceClaim) ProtoMessage() {} func (*DeviceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{10} + return fileDescriptor_66649ee9bbcd89d2, []int{8} } func (m *DeviceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -361,7 +304,7 @@ var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } func (*DeviceClaimConfiguration) ProtoMessage() {} func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{11} + return fileDescriptor_66649ee9bbcd89d2, []int{9} } func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -389,7 +332,7 @@ var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo func (m *DeviceClass) Reset() { *m = DeviceClass{} } func (*DeviceClass) ProtoMessage() {} func (*DeviceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{12} + return fileDescriptor_66649ee9bbcd89d2, []int{10} } func (m *DeviceClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -417,7 +360,7 @@ var xxx_messageInfo_DeviceClass proto.InternalMessageInfo func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } func (*DeviceClassConfiguration) ProtoMessage() {} func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{13} + return fileDescriptor_66649ee9bbcd89d2, []int{11} } func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -445,7 +388,7 @@ var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } func (*DeviceClassList) ProtoMessage() {} func (*DeviceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{14} + return fileDescriptor_66649ee9bbcd89d2, []int{12} } func (m *DeviceClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -473,7 +416,7 @@ var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } func (*DeviceClassSpec) ProtoMessage() {} func (*DeviceClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{15} + return fileDescriptor_66649ee9bbcd89d2, []int{13} } func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -501,7 +444,7 @@ var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } func (*DeviceConfiguration) ProtoMessage() {} func (*DeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{16} + return fileDescriptor_66649ee9bbcd89d2, []int{14} } func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -529,7 +472,7 @@ var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } func (*DeviceConstraint) ProtoMessage() {} func (*DeviceConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{17} + return fileDescriptor_66649ee9bbcd89d2, []int{15} } func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,38 +497,10 @@ func (m *DeviceConstraint) XXX_DiscardUnknown() { var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo -func (m *DeviceCounterConsumption) Reset() { *m = DeviceCounterConsumption{} } -func (*DeviceCounterConsumption) ProtoMessage() {} -func (*DeviceCounterConsumption) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{18} -} -func (m *DeviceCounterConsumption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceCounterConsumption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceCounterConsumption) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceCounterConsumption.Merge(m, src) -} -func (m *DeviceCounterConsumption) XXX_Size() int { - return m.Size() -} -func (m *DeviceCounterConsumption) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceCounterConsumption.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceCounterConsumption proto.InternalMessageInfo - func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } func (*DeviceRequest) ProtoMessage() {} func (*DeviceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{19} + return fileDescriptor_66649ee9bbcd89d2, []int{16} } func (m *DeviceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -613,7 +528,7 @@ var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } func (*DeviceRequestAllocationResult) ProtoMessage() {} func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{20} + return fileDescriptor_66649ee9bbcd89d2, []int{17} } func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -641,7 +556,7 @@ var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } func (*DeviceSelector) ProtoMessage() {} func (*DeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{21} + return fileDescriptor_66649ee9bbcd89d2, []int{18} } func (m *DeviceSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -666,206 +581,10 @@ func (m *DeviceSelector) XXX_DiscardUnknown() { var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo -func (m *DeviceSubRequest) Reset() { *m = DeviceSubRequest{} } -func (*DeviceSubRequest) ProtoMessage() {} -func (*DeviceSubRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{22} -} -func (m *DeviceSubRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceSubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceSubRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceSubRequest.Merge(m, src) -} -func (m *DeviceSubRequest) XXX_Size() int { - return m.Size() -} -func (m *DeviceSubRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceSubRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceSubRequest proto.InternalMessageInfo - -func (m *DeviceTaint) Reset() { *m = DeviceTaint{} } -func (*DeviceTaint) ProtoMessage() {} -func (*DeviceTaint) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{23} -} -func (m *DeviceTaint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaint.Merge(m, src) -} -func (m *DeviceTaint) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaint) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaint.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceTaint proto.InternalMessageInfo - -func (m *DeviceTaintRule) Reset() { *m = DeviceTaintRule{} } -func (*DeviceTaintRule) ProtoMessage() {} -func (*DeviceTaintRule) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{24} -} -func (m *DeviceTaintRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaintRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaintRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaintRule.Merge(m, src) -} -func (m *DeviceTaintRule) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaintRule) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaintRule.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceTaintRule proto.InternalMessageInfo - -func (m *DeviceTaintRuleList) Reset() { *m = DeviceTaintRuleList{} } -func (*DeviceTaintRuleList) ProtoMessage() {} -func (*DeviceTaintRuleList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{25} -} -func (m *DeviceTaintRuleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaintRuleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaintRuleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaintRuleList.Merge(m, src) -} -func (m *DeviceTaintRuleList) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaintRuleList) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaintRuleList.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceTaintRuleList proto.InternalMessageInfo - -func (m *DeviceTaintRuleSpec) Reset() { *m = DeviceTaintRuleSpec{} } -func (*DeviceTaintRuleSpec) ProtoMessage() {} -func (*DeviceTaintRuleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{26} -} -func (m *DeviceTaintRuleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaintRuleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaintRuleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaintRuleSpec.Merge(m, src) -} -func (m *DeviceTaintRuleSpec) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaintRuleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaintRuleSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceTaintRuleSpec proto.InternalMessageInfo - -func (m *DeviceTaintSelector) Reset() { *m = DeviceTaintSelector{} } -func (*DeviceTaintSelector) ProtoMessage() {} -func (*DeviceTaintSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{27} -} -func (m *DeviceTaintSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceTaintSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceTaintSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceTaintSelector.Merge(m, src) -} -func (m *DeviceTaintSelector) XXX_Size() int { - return m.Size() -} -func (m *DeviceTaintSelector) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceTaintSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceTaintSelector proto.InternalMessageInfo - -func (m *DeviceToleration) Reset() { *m = DeviceToleration{} } -func (*DeviceToleration) ProtoMessage() {} -func (*DeviceToleration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{28} -} -func (m *DeviceToleration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviceToleration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviceToleration) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviceToleration.Merge(m, src) -} -func (m *DeviceToleration) XXX_Size() int { - return m.Size() -} -func (m *DeviceToleration) XXX_DiscardUnknown() { - xxx_messageInfo_DeviceToleration.DiscardUnknown(m) -} - -var xxx_messageInfo_DeviceToleration proto.InternalMessageInfo - func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} } func (*NetworkDeviceData) ProtoMessage() {} func (*NetworkDeviceData) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{29} + return fileDescriptor_66649ee9bbcd89d2, []int{19} } func (m *NetworkDeviceData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -893,7 +612,7 @@ var xxx_messageInfo_NetworkDeviceData proto.InternalMessageInfo func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } func (*OpaqueDeviceConfiguration) ProtoMessage() {} func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{30} + return fileDescriptor_66649ee9bbcd89d2, []int{20} } func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -921,7 +640,7 @@ var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{31} + return fileDescriptor_66649ee9bbcd89d2, []int{21} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -949,7 +668,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{32} + return fileDescriptor_66649ee9bbcd89d2, []int{22} } func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -977,7 +696,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{33} + return fileDescriptor_66649ee9bbcd89d2, []int{23} } func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1005,7 +724,7 @@ var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{34} + return fileDescriptor_66649ee9bbcd89d2, []int{24} } func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1033,7 +752,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{35} + return fileDescriptor_66649ee9bbcd89d2, []int{25} } func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1061,7 +780,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{36} + return fileDescriptor_66649ee9bbcd89d2, []int{26} } func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1089,7 +808,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{37} + return fileDescriptor_66649ee9bbcd89d2, []int{27} } func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1117,7 +836,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{38} + return fileDescriptor_66649ee9bbcd89d2, []int{28} } func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1145,7 +864,7 @@ var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo func (m *ResourcePool) Reset() { *m = ResourcePool{} } func (*ResourcePool) ProtoMessage() {} func (*ResourcePool) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{39} + return fileDescriptor_66649ee9bbcd89d2, []int{29} } func (m *ResourcePool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1173,7 +892,7 @@ var xxx_messageInfo_ResourcePool proto.InternalMessageInfo func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } func (*ResourceSlice) ProtoMessage() {} func (*ResourceSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{40} + return fileDescriptor_66649ee9bbcd89d2, []int{30} } func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1201,7 +920,7 @@ var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } func (*ResourceSliceList) ProtoMessage() {} func (*ResourceSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{41} + return fileDescriptor_66649ee9bbcd89d2, []int{31} } func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1229,7 +948,7 @@ var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } func (*ResourceSliceSpec) ProtoMessage() {} func (*ResourceSliceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{42} + return fileDescriptor_66649ee9bbcd89d2, []int{32} } func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1261,9 +980,6 @@ func init() { proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice.AttributesEntry") proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice.CapacityEntry") proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.CELDeviceSelector") - proto.RegisterType((*Counter)(nil), "k8s.io.api.resource.v1alpha3.Counter") - proto.RegisterType((*CounterSet)(nil), "k8s.io.api.resource.v1alpha3.CounterSet") - proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1alpha3.CounterSet.CountersEntry") proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1alpha3.Device") proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceAllocationConfiguration") proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DeviceAllocationResult") @@ -1276,18 +992,9 @@ func init() { proto.RegisterType((*DeviceClassSpec)(nil), "k8s.io.api.resource.v1alpha3.DeviceClassSpec") proto.RegisterType((*DeviceConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceConfiguration") proto.RegisterType((*DeviceConstraint)(nil), "k8s.io.api.resource.v1alpha3.DeviceConstraint") - proto.RegisterType((*DeviceCounterConsumption)(nil), "k8s.io.api.resource.v1alpha3.DeviceCounterConsumption") - proto.RegisterMapType((map[string]Counter)(nil), "k8s.io.api.resource.v1alpha3.DeviceCounterConsumption.CountersEntry") proto.RegisterType((*DeviceRequest)(nil), "k8s.io.api.resource.v1alpha3.DeviceRequest") proto.RegisterType((*DeviceRequestAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DeviceRequestAllocationResult") proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceSelector") - proto.RegisterType((*DeviceSubRequest)(nil), "k8s.io.api.resource.v1alpha3.DeviceSubRequest") - proto.RegisterType((*DeviceTaint)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaint") - proto.RegisterType((*DeviceTaintRule)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRule") - proto.RegisterType((*DeviceTaintRuleList)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRuleList") - proto.RegisterType((*DeviceTaintRuleSpec)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintRuleSpec") - proto.RegisterType((*DeviceTaintSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceTaintSelector") - proto.RegisterType((*DeviceToleration)(nil), "k8s.io.api.resource.v1alpha3.DeviceToleration") proto.RegisterType((*NetworkDeviceData)(nil), "k8s.io.api.resource.v1alpha3.NetworkDeviceData") proto.RegisterType((*OpaqueDeviceConfiguration)(nil), "k8s.io.api.resource.v1alpha3.OpaqueDeviceConfiguration") proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaim") @@ -1309,172 +1016,134 @@ func init() { } var fileDescriptor_66649ee9bbcd89d2 = []byte{ - // 2635 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0x5b, 0x6f, 0x1c, 0x57, - 0x39, 0xb3, 0xbb, 0x5e, 0xaf, 0xbf, 0x8d, 0x1d, 0xfb, 0x84, 0x84, 0x8d, 0x49, 0x77, 0x93, 0x09, - 0x17, 0xa7, 0x75, 0xd6, 0x8d, 0x53, 0xb5, 0x85, 0x80, 0x84, 0xd7, 0x76, 0x52, 0xa7, 0x89, 0xe3, - 0x9c, 0x75, 0x03, 0x81, 0x12, 0x18, 0xcf, 0x1e, 0xdb, 0x83, 0x67, 0x67, 0xa6, 0x73, 0x66, 0x9d, - 0x5a, 0x42, 0xa8, 0xe2, 0x07, 0x54, 0xbc, 0xf2, 0x80, 0x2a, 0xf1, 0x50, 0x89, 0x17, 0xe0, 0x99, - 0x17, 0x90, 0x40, 0x6a, 0x04, 0x3c, 0x44, 0xa2, 0x42, 0x15, 0x12, 0x0b, 0x59, 0x84, 0xf8, 0x0b, - 0xc8, 0x4f, 0xe8, 0x5c, 0xe6, 0xba, 0x3b, 0xce, 0xac, 0x49, 0xac, 0x20, 0xf5, 0x6d, 0xf7, 0x3b, - 0xdf, 0xed, 0x7c, 0x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xa1, 0x58, 0xae, 0xa2, 0x73, 0x50, 0x70, 0x6c, 0xdb, - 0xac, 0xe4, 0x38, 0xd6, 0x71, 0x89, 0x55, 0x58, 0xb3, 0x6d, 0x13, 0xf3, 0x15, 0xce, 0x89, 0x73, - 0xae, 0xe4, 0x13, 0x9c, 0x38, 0x14, 0xcb, 0x55, 0xa4, 0x03, 0xe8, 0xb6, 0xd5, 0x32, 0x3c, 0xc3, - 0xb6, 0x68, 0xa5, 0x70, 0x2e, 0x3f, 0x53, 0x9e, 0x9f, 0xab, 0x87, 0x6e, 0x0e, 0x36, 0x56, 0x77, - 0x76, 0xb6, 0x18, 0x80, 0xd6, 0x99, 0xfd, 0xea, 0xbb, 0x97, 0xeb, 0x8b, 0x3e, 0x5d, 0x03, 0x49, - 0xe6, 0x10, 0x80, 0x28, 0x8e, 0xb0, 0x45, 0x6f, 0x42, 0xa1, 0xa5, 0x79, 0x5a, 0x65, 0xe4, 0x9c, - 0x32, 0x53, 0x9e, 0xbf, 0x94, 0xca, 0x5e, 0xda, 0xad, 0x8e, 0xb5, 0x07, 0xcb, 0xef, 0x7a, 0xc4, - 0xa2, 0x8c, 0x79, 0x89, 0xed, 0x6c, 0x49, 0xf3, 0x34, 0xcc, 0x99, 0xa0, 0x0d, 0x28, 0x5b, 0xc4, - 0x7b, 0x60, 0xbb, 0x3b, 0x0c, 0x58, 0x29, 0x72, 0x9e, 0x51, 0x95, 0xfb, 0x23, 0xb3, 0xbe, 0x2a, - 0x09, 0xf8, 0x9e, 0x19, 0x59, 0xe3, 0x44, 0xaf, 0x5b, 0x2b, 0xaf, 0x86, 0x7c, 0x70, 0x94, 0xa9, - 0xfa, 0x47, 0x05, 0x26, 0xa5, 0x87, 0x0c, 0xdb, 0xc2, 0x84, 0x76, 0x4c, 0x0f, 0x7d, 0x17, 0x46, - 0x85, 0xd1, 0x28, 0xf7, 0x4e, 0x79, 0xfe, 0x95, 0x83, 0x85, 0x0a, 0x69, 0x49, 0x36, 0x8d, 0x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b0, 0xab, 0x19, 0xa6, 0xb6, 0x61, 0x12, 0x79, 0x3c, 0xcd, 0x34, 0x3f, 0x34, - 0x3b, 0x1b, 0xfe, 0x80, 0x72, 0xda, 0xdf, 0xdf, 0xb5, 0x18, 0x37, 0x9c, 0xe0, 0xce, 0x86, 0x15, - 0xcf, 0x36, 0x89, 0xc8, 0x68, 0x5a, 0x29, 0x65, 0x17, 0xb6, 0x1e, 0x90, 0x85, 0xc3, 0x4a, 0x08, - 0xa3, 0x38, 0xca, 0x57, 0xfd, 0x4b, 0x70, 0x46, 0x48, 0x99, 0x65, 0xd1, 0x45, 0x36, 0x19, 0xf3, - 0x25, 0x19, 0x6f, 0x91, 0xe1, 0x96, 0x83, 0xb1, 0xbf, 0x1e, 0xb9, 0x42, 0xcc, 0x65, 0xba, 0x42, - 0xcc, 0x67, 0xb8, 0x42, 0x2c, 0x1c, 0x78, 0x85, 0x98, 0x70, 0xe4, 0x48, 0x06, 0x47, 0x26, 0x0c, - 0x5b, 0x7c, 0x46, 0x86, 0x7d, 0x1b, 0x26, 0x12, 0xa7, 0xf2, 0x1b, 0x90, 0xd7, 0x89, 0x29, 0x6b, - 0xfb, 0x13, 0x2e, 0x0d, 0xfb, 0xce, 0xf4, 0x8d, 0xd1, 0x5e, 0xb7, 0x96, 0x5f, 0x5c, 0xbe, 0x89, - 0x19, 0x13, 0xf5, 0xd7, 0x79, 0xbf, 0x9a, 0x87, 0xa1, 0xf5, 0x69, 0x59, 0xf8, 0x5f, 0xcb, 0x42, - 0x22, 0x34, 0x46, 0x9f, 0x51, 0x68, 0xfc, 0x3b, 0x18, 0x7b, 0xf9, 0x3d, 0x15, 0x7a, 0x21, 0xd2, - 0x33, 0x1a, 0x65, 0x49, 0x9e, 0x7f, 0x93, 0xec, 0x89, 0x06, 0x72, 0x21, 0xda, 0x40, 0xc6, 0x06, - 0x5f, 0xaf, 0xa0, 0xab, 0x50, 0x24, 0x9b, 0x9b, 0x44, 0xf7, 0x64, 0x52, 0xf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, 0x74, 0xe0, 0xf5, 0xdc, 0x6c, 0xe4, 0x3d, 0x51, 0x62, 0xba, 0xc8, 0xf0, - 0xa6, 0xa8, 0xf0, 0x94, 0xde, 0x14, 0xcd, 0x46, 0xde, 0x14, 0x89, 0x9b, 0xbf, 0x70, 0x22, 0xea, - 0x7f, 0x57, 0x74, 0x3b, 0xec, 0x2f, 0xe2, 0xce, 0xef, 0xf3, 0x59, 0x5a, 0xf4, 0x01, 0x4f, 0xe6, - 0x30, 0x9c, 0x76, 0x88, 0x2b, 0xc0, 0xa1, 0x96, 0x2c, 0x53, 0x47, 0xb9, 0x32, 0xd3, 0xbd, 0x6e, - 0xed, 0xf4, 0xda, 0x40, 0x0c, 0x9c, 0x42, 0x89, 0xb6, 0x61, 0x82, 0x6e, 0x6b, 0x2e, 0x69, 0x05, - 0x8f, 0xc4, 0xc4, 0xc5, 0xef, 0x4c, 0xd6, 0xa7, 0x2f, 0xe1, 0xfd, 0x72, 0x33, 0xc6, 0x07, 0x27, - 0xf8, 0x36, 0x1a, 0x0f, 0x1f, 0x57, 0x8f, 0x3d, 0x7a, 0x5c, 0x3d, 0xf6, 0xc9, 0xe3, 0xea, 0xb1, - 0xf7, 0x7a, 0x55, 0xe5, 0x61, 0xaf, 0xaa, 0x3c, 0xea, 0x55, 0x95, 0x4f, 0x7a, 0x55, 0xe5, 0x1f, - 0xbd, 0xaa, 0xf2, 0xe3, 0x7f, 0x56, 0x8f, 0x7d, 0xeb, 0xec, 0x41, 0x4f, 0x74, 0xff, 0x1b, 0x00, - 0x00, 0xff, 0xff, 0xa5, 0x57, 0x37, 0xad, 0xc1, 0x2b, 0x00, 0x00, + // 2030 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x19, 0xcd, 0x6f, 0x1c, 0x57, + 0xdd, 0xb3, 0xe3, 0xcf, 0xdf, 0xfa, 0x2b, 0x2f, 0xa4, 0x38, 0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0x15, 0x32, 0x26, 0x29, 0x65, 0x37, 0xbd, 0x17, 0x81, + 0x22, 0xd2, 0x98, 0xc0, 0xf8, 0x7d, 0x0d, 0xea, 0x2a, 0x80, 0x0e, 0xb1, 0xbb, 0xe8, 0x7e, 0x26, + 0xa1, 0xa2, 0x48, 0xbc, 0x76, 0x8a, 0x48, 0x98, 0xf3, 0x71, 0xf3, 0x1a, 0x92, 0x81, 0x14, 0xea, + 0x96, 0xe7, 0x32, 0x1e, 0x10, 0xdb, 0x55, 0xe9, 0x9a, 0x6f, 0x10, 0x27, 0x25, 0x9e, 0x62, 0x33, + 0xcf, 0x2b, 0x05, 0xf5, 0x14, 0xc6, 0x70, 0x56, 0x2e, 0x7a, 0x90, 0x84, 0x58, 0x97, 0x1a, 0xde, + 0xaa, 0xa4, 0x41, 0x1c, 0xbe, 0x5a, 0x74, 0xff, 0xaa, 0xc1, 0x42, 0x19, 0x53, 0xae, 0x1e, 0xb5, + 0xcf, 0x54, 0x8f, 0xb5, 0xb3, 0xab, 0xc7, 0x3f, 0x69, 0x99, 0xd8, 0x33, 0x86, 0x7e, 0x0c, 0x93, + 0x62, 0x19, 0x92, 0xbb, 0x4d, 0xb4, 0x0e, 0xbc, 0x51, 0x6d, 0x75, 0xba, 0xb3, 0xfb, 0x13, 0x6a, + 0xf1, 0xdb, 0x94, 0x93, 0xb4, 0x19, 0xa7, 0x30, 0x9c, 0x48, 0x15, 0x9b, 0x13, 0xf3, 0xa9, 0x75, + 0x9a, 0x41, 0x24, 0x4d, 0xdb, 0xf1, 0xa9, 0x95, 0xf6, 0x6b, 0xf1, 0x85, 0xa5, 0x20, 0xe3, 0x97, + 0xd9, 0x60, 0x30, 0x96, 0x0f, 0x46, 0x99, 0x8b, 0xb5, 0xb3, 0x73, 0xf1, 0x1f, 0x93, 0x56, 0x20, + 0xed, 0xbb, 0x65, 0x33, 0x8e, 0x3e, 0x18, 0x70, 0x73, 0xab, 0x9a, 0x9b, 0x05, 0xb7, 0x74, 0x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, 0xdf, 0x50, 0x3e, + 0x4d, 0xea, 0xe1, 0xbb, 0x79, 0x34, 0x2e, 0xd2, 0x1b, 0xbf, 0xd1, 0xe0, 0x62, 0x69, 0x27, 0xa9, + 0xfc, 0x80, 0x42, 0x00, 0x7c, 0x12, 0x90, 0x2e, 0xe5, 0x34, 0x60, 0x43, 0xa6, 0x6b, 0x85, 0x77, + 0x89, 0x64, 0x70, 0x6f, 0x27, 0x82, 0x70, 0x46, 0xa8, 0xf1, 0xab, 0x1a, 0xcc, 0x60, 0x15, 0x8f, + 0x68, 0x55, 0xfc, 0xff, 0xaf, 0x0b, 0x77, 0x73, 0xeb, 0xc2, 0x73, 0x52, 0x23, 0x67, 0x5c, 0xd9, + 0xc2, 0x80, 0xee, 0x8b, 0x25, 0x9a, 0xf0, 0x90, 0x55, 0xbb, 0xf8, 0xe4, 0x85, 0x4a, 0xc6, 0x34, + 0x08, 0xd1, 0x37, 0x56, 0x02, 0x8d, 0xbe, 0x06, 0x8d, 0x1c, 0xbd, 0xe8, 0xf4, 0x61, 0x97, 0x06, + 0x98, 0xee, 0xd1, 0x80, 0xba, 0x16, 0x45, 0x57, 0x60, 0x92, 0xf8, 0xf6, 0x8d, 0xc0, 0x0b, 0x7d, + 0x15, 0xd1, 0x64, 0x94, 0xaf, 0x6e, 0x6f, 0x4a, 0x38, 0x4e, 0x28, 0x04, 0x75, 0x6c, 0x91, 0xca, + 0xab, 0xcc, 0x7a, 0x1d, 0xc1, 0x71, 0x42, 0x91, 0xb4, 0xef, 0xd1, 0xd2, 0xf6, 0x6d, 0x82, 0x1e, + 0xda, 0x1d, 0x75, 0x27, 0x78, 0x43, 0x11, 0xe8, 0xef, 0x6f, 0xae, 0x3f, 0xeb, 0x35, 0x2f, 0x95, + 0x3d, 0xfe, 0xf1, 0x63, 0x9f, 0xb2, 0xd6, 0xfb, 0x9b, 0xeb, 0x58, 0x30, 0x1b, 0x7f, 0xd6, 0xe0, + 0x5c, 0xee, 0x90, 0x67, 0xb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0xa0, 0xd8, 0xc2, 0x1d, 0x47, + 0x2e, 0x05, 0x62, 0xf5, 0xd4, 0x25, 0xef, 0xa2, 0xe2, 0x45, 0x78, 0x80, 0x02, 0x0f, 0xe1, 0x32, + 0xfe, 0xa2, 0xa5, 0x73, 0x5b, 0x82, 0x5f, 0x54, 0xcf, 0x4b, 0xe3, 0x4a, 0x3d, 0x9f, 0x9d, 0x3b, + 0x92, 0xf2, 0x85, 0x9d, 0x3b, 0xd2, 0xba, 0x92, 0x92, 0x78, 0xa4, 0x17, 0x4e, 0x21, 0x4b, 0xa1, + 0xea, 0x96, 0x77, 0x2b, 0xf3, 0x37, 0x59, 0x7d, 0xe5, 0xd5, 0x6a, 0xe6, 0x88, 0x34, 0x1d, 0xba, + 0xe3, 0x5f, 0x81, 0x49, 0xd7, 0xeb, 0x44, 0xfb, 0x70, 0x61, 0xbb, 0xd8, 0x52, 0x70, 0x9c, 0x50, + 0x0c, 0xfc, 0x91, 0x33, 0xfa, 0xf9, 0xfc, 0x91, 0x23, 0x37, 0x22, 0xc7, 0x11, 0x04, 0xf1, 0xf5, + 0x21, 0xdd, 0x88, 0x14, 0x1c, 0x27, 0x14, 0xe8, 0x4e, 0x3a, 0x5f, 0xc6, 0x65, 0x4c, 0xbe, 0x56, + 0x65, 0x44, 0x97, 0x0f, 0x14, 0xd3, 0x7c, 0xfc, 0xb4, 0x31, 0xf2, 0xe4, 0x69, 0x63, 0xe4, 0x93, + 0xa7, 0x8d, 0x91, 0x8f, 0xfb, 0x0d, 0xed, 0x71, 0xbf, 0xa1, 0x3d, 0xe9, 0x37, 0xb4, 0x4f, 0xfa, + 0x0d, 0xed, 0xd3, 0x7e, 0x43, 0xfb, 0xc5, 0xbf, 0x1b, 0x23, 0xdf, 0x7f, 0xf9, 0xa4, 0x7f, 0x95, + 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x60, 0x85, 0x64, 0x74, 0x1e, 0x00, 0x00, } func (m *AllocatedDeviceStatus) Marshal() (dAtA []byte, err error) { @@ -1509,18 +1178,16 @@ func (m *AllocatedDeviceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if len(m.Conditions) > 0 { for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { { @@ -1618,10 +1285,17 @@ func (m *BasicDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Taints) > 0 { - for iNdEx := len(m.Taints) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Capacity) > 0 { + keysForCapacity := make([]string, 0, len(m.Capacity)) + for k := range m.Capacity { + keysForCapacity = append(keysForCapacity, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { + v := m.Capacity[QualifiedName(keysForCapacity[iNdEx])] + baseI := i { - size, err := m.Taints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1629,79 +1303,15 @@ func (m *BasicDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a - } - } - if m.AllNodes != nil { - i-- - if *m.AllNodes { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.NodeSelector != nil { - { - size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.NodeName != nil { - i -= len(*m.NodeName) - copy(dAtA[i:], *m.NodeName) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NodeName))) - i-- - dAtA[i] = 0x22 - } - if len(m.ConsumesCounters) > 0 { - for iNdEx := len(m.ConsumesCounters) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ConsumesCounters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Capacity) > 0 { - keysForCapacity := make([]string, 0, len(m.Capacity)) - for k := range m.Capacity { - keysForCapacity = append(keysForCapacity, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) - for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { - v := m.Capacity[QualifiedName(keysForCapacity[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForCapacity[iNdEx]) - copy(dAtA[i:], keysForCapacity[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCapacity[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 + dAtA[i] = 0x12 + i -= len(keysForCapacity[iNdEx]) + copy(dAtA[i:], keysForCapacity[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCapacity[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } } if len(m.Attributes) > 0 { @@ -1764,96 +1374,6 @@ func (m *CELDeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Counter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Counter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CounterSet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CounterSet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CounterSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Counters) > 0 { - keysForCounters := make([]string, 0, len(m.Counters)) - for k := range m.Counters { - keysForCounters = append(keysForCounters, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) - for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- { - v := m.Counters[string(keysForCounters[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForCounters[iNdEx]) - copy(dAtA[i:], keysForCounters[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCounters[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *Device) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2399,63 +1919,6 @@ func (m *DeviceConstraint) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DeviceCounterConsumption) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeviceCounterConsumption) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeviceCounterConsumption) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Counters) > 0 { - keysForCounters := make([]string, 0, len(m.Counters)) - for k := range m.Counters { - keysForCounters = append(keysForCounters, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) - for iNdEx := len(keysForCounters) - 1; iNdEx >= 0; iNdEx-- { - v := m.Counters[string(keysForCounters[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForCounters[iNdEx]) - copy(dAtA[i:], keysForCounters[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCounters[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.CounterSet) - copy(dAtA[i:], m.CounterSet) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CounterSet))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *DeviceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2476,34 +1939,6 @@ func (m *DeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Tolerations) > 0 { - for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.FirstAvailable) > 0 { - for iNdEx := len(m.FirstAvailable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FirstAvailable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } if m.AdminAccess != nil { i-- if *m.AdminAccess { @@ -2569,20 +2004,6 @@ func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - if len(m.Tolerations) > 0 { - for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } if m.AdminAccess != nil { i-- if *m.AdminAccess { @@ -2651,7 +2072,7 @@ func (m *DeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DeviceSubRequest) Marshal() (dAtA []byte, err error) { +func (m *NetworkDeviceData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2661,66 +2082,39 @@ func (m *DeviceSubRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeviceSubRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *NetworkDeviceData) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DeviceSubRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NetworkDeviceData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Tolerations) > 0 { - for iNdEx := len(m.Tolerations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tolerations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - i = encodeVarintGenerated(dAtA, i, uint64(m.Count)) - i-- - dAtA[i] = 0x28 - i -= len(m.AllocationMode) - copy(dAtA[i:], m.AllocationMode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode))) + i -= len(m.HardwareAddress) + copy(dAtA[i:], m.HardwareAddress) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.HardwareAddress))) i-- - dAtA[i] = 0x22 - if len(m.Selectors) > 0 { - for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + dAtA[i] = 0x1a + if len(m.IPs) > 0 { + for iNdEx := len(m.IPs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.IPs[iNdEx]) + copy(dAtA[i:], m.IPs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.IPs[iNdEx]))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } - i -= len(m.DeviceClassName) - copy(dAtA[i:], m.DeviceClassName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DeviceClassName))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i -= len(m.InterfaceName) + copy(dAtA[i:], m.InterfaceName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.InterfaceName))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DeviceTaint) Marshal() (dAtA []byte, err error) { +func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2730,47 +2124,35 @@ func (m *DeviceTaint) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeviceTaint) MarshalTo(dAtA []byte) (int, error) { +func (m *OpaqueDeviceConfiguration) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DeviceTaint) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TimeAdded != nil { - { - size, err := m.TimeAdded.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + { + size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= len(m.Effect) - copy(dAtA[i:], m.Effect) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect))) - i-- - dAtA[i] = 0x1a - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value))) i-- dAtA[i] = 0x12 - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DeviceTaintRule) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2780,16 +2162,26 @@ func (m *DeviceTaintRule) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeviceTaintRule) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DeviceTaintRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -2813,7 +2205,50 @@ func (m *DeviceTaintRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DeviceTaintRuleList) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.UID) + copy(dAtA[i:], m.UID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i-- + dAtA[i] = 0x2a + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x22 + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x1a + i -= len(m.APIGroup) + copy(dAtA[i:], m.APIGroup) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2823,12 +2258,12 @@ func (m *DeviceTaintRuleList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeviceTaintRuleList) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DeviceTaintRuleList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2860,7 +2295,7 @@ func (m *DeviceTaintRuleList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DeviceTaintRuleSpec) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2870,18 +2305,18 @@ func (m *DeviceTaintRuleSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeviceTaintRuleSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DeviceTaintRuleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.Taint.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2889,23 +2324,11 @@ func (m *DeviceTaintRuleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - if m.DeviceSelector != nil { - { - size, err := m.DeviceSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DeviceTaintSelector) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2915,20 +2338,20 @@ func (m *DeviceTaintSelector) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeviceTaintSelector) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DeviceTaintSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Selectors) > 0 { - for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Devices) > 0 { + for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2936,41 +2359,39 @@ func (m *DeviceTaintSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } - if m.Device != nil { - i -= len(*m.Device) - copy(dAtA[i:], *m.Device) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Device))) - i-- - dAtA[i] = 0x22 - } - if m.Pool != nil { - i -= len(*m.Pool) - copy(dAtA[i:], *m.Pool) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Pool))) - i-- - dAtA[i] = 0x1a - } - if m.Driver != nil { - i -= len(*m.Driver) - copy(dAtA[i:], *m.Driver) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Driver))) - i-- - dAtA[i] = 0x12 + if len(m.ReservedFor) > 0 { + for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ReservedFor[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - if m.DeviceClassName != nil { - i -= len(*m.DeviceClassName) - copy(dAtA[i:], *m.DeviceClassName) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DeviceClassName))) + if m.Allocation != nil { + { + size, err := m.Allocation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *DeviceToleration) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2980,45 +2401,40 @@ func (m *DeviceToleration) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeviceToleration) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DeviceToleration) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TolerationSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TolerationSeconds)) - i-- - dAtA[i] = 0x28 + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= len(m.Effect) - copy(dAtA[i:], m.Effect) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect))) - i-- - dAtA[i] = 0x22 - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x1a - i -= len(m.Operator) - copy(dAtA[i:], m.Operator) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator))) i-- dAtA[i] = 0x12 - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *NetworkDeviceData) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3028,60 +2444,32 @@ func (m *NetworkDeviceData) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NetworkDeviceData) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NetworkDeviceData) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.HardwareAddress) - copy(dAtA[i:], m.HardwareAddress) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.HardwareAddress))) - i-- - dAtA[i] = 0x1a - if len(m.IPs) > 0 { - for iNdEx := len(m.IPs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.IPs[iNdEx]) - copy(dAtA[i:], m.IPs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.IPs[iNdEx]))) + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } } - i -= len(m.InterfaceName) - copy(dAtA[i:], m.InterfaceName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.InterfaceName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OpaqueDeviceConfiguration) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l { - size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3089,16 +2477,11 @@ func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, erro i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - i -= len(m.Driver) - copy(dAtA[i:], m.Driver) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) - i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3108,26 +2491,16 @@ func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -3151,7 +2524,7 @@ func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { +func (m *ResourcePool) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3161,40 +2534,31 @@ func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourcePool) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourcePool) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceSliceCount)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x18 + i = encodeVarintGenerated(dAtA, i, uint64(m.Generation)) + i-- + dAtA[i] = 0x10 i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x22 - i -= len(m.Resource) - copy(dAtA[i:], m.Resource) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) - i-- - dAtA[i] = 0x1a - i -= len(m.APIGroup) - copy(dAtA[i:], m.APIGroup) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) - i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { +func (m *ResourceSlice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3204,32 +2568,28 @@ func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3241,7 +2601,7 @@ func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { +func (m *ResourceSliceList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3251,18 +2611,32 @@ func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } { - size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3274,7 +2648,7 @@ func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { +func (m *ResourceSliceSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3284,12 +2658,12 @@ func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceSliceSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceSliceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3305,26 +2679,20 @@ func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } } - if len(m.ReservedFor) > 0 { - for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ReservedFor[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + i-- + if m.AllNodes { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - if m.Allocation != nil { + i-- + dAtA[i] = 0x28 + if m.NodeSelector != nil { { - size, err := m.Allocation.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3332,33 +2700,15 @@ func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x22 } - return dAtA[:n], nil -} - -func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x1a { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3367,529 +2717,453 @@ func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil -} - -func (m *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *AllocatedDeviceStatus) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Pool) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Device) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + l = m.Data.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.NetworkData != nil { + l = m.NetworkData.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *AllocationResult) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + var l int + _ = l + l = m.Devices.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.NodeSelector != nil { + l = m.NodeSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *BasicDevice) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Attributes) > 0 { + for k, v := range m.Attributes { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Capacity) > 0 { + for k, v := range m.Capacity { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *ResourcePool) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *CELDeviceSelector) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *ResourcePool) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourcePool) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceSliceCount)) - i-- - dAtA[i] = 0x18 - i = encodeVarintGenerated(dAtA, i, uint64(m.Generation)) - i-- - dAtA[i] = 0x10 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceSlice) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Device) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.Basic != nil { + l = m.Basic.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *DeviceAllocationConfiguration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Source) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Requests) > 0 { + for _, s := range m.Requests { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.DeviceConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DeviceAllocationResult) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *ResourceSliceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DeviceAttribute) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + var l int + _ = l + if m.IntValue != nil { + n += 1 + sovGenerated(uint64(*m.IntValue)) + } + if m.BoolValue != nil { + n += 2 + } + if m.StringValue != nil { + l = len(*m.StringValue) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.VersionValue != nil { + l = len(*m.VersionValue) + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DeviceClaim) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if len(m.Requests) > 0 { + for _, e := range m.Requests { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Constraints) > 0 { + for _, e := range m.Constraints { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (m *ResourceSliceSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DeviceClaimConfiguration) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + if len(m.Requests) > 0 { + for _, s := range m.Requests { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.DeviceConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceSliceSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *DeviceClass) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceSliceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DeviceClassConfiguration) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.SharedCounters) > 0 { - for iNdEx := len(m.SharedCounters) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SharedCounters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } + l = m.DeviceConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DeviceClassList) Size() (n int) { + if m == nil { + return 0 } - if m.PerDeviceNodeSelection != nil { - i-- - if *m.PerDeviceNodeSelection { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i-- - dAtA[i] = 0x38 - } - if len(m.Devices) > 0 { - for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - i-- - if m.AllNodes { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - if m.NodeSelector != nil { - { - size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - i -= len(m.NodeName) - copy(dAtA[i:], m.NodeName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) - i-- - dAtA[i] = 0x1a - { - size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 - i -= len(m.Driver) - copy(dAtA[i:], m.Driver) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AllocatedDeviceStatus) Size() (n int) { +func (m *DeviceClassSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Driver) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Pool) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Device) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { + if len(m.Selectors) > 0 { + for _, e := range m.Selectors { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.NetworkData != nil { - l = m.NetworkData.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } return n } -func (m *AllocationResult) Size() (n int) { +func (m *DeviceConfiguration) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Devices.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.NodeSelector != nil { - l = m.NodeSelector.Size() + if m.Opaque != nil { + l = m.Opaque.Size() n += 1 + l + sovGenerated(uint64(l)) } return n } -func (m *BasicDevice) Size() (n int) { +func (m *DeviceConstraint) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Attributes) > 0 { - for k, v := range m.Attributes { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Capacity) > 0 { - for k, v := range m.Capacity { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.ConsumesCounters) > 0 { - for _, e := range m.ConsumesCounters { - l = e.Size() + if len(m.Requests) > 0 { + for _, s := range m.Requests { + l = len(s) n += 1 + l + sovGenerated(uint64(l)) } } - if m.NodeName != nil { - l = len(*m.NodeName) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.NodeSelector != nil { - l = m.NodeSelector.Size() + if m.MatchAttribute != nil { + l = len(*m.MatchAttribute) n += 1 + l + sovGenerated(uint64(l)) } - if m.AllNodes != nil { - n += 2 + return n +} + +func (m *DeviceRequest) Size() (n int) { + if m == nil { + return 0 } - if len(m.Taints) > 0 { - for _, e := range m.Taints { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DeviceClassName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Selectors) > 0 { + for _, e := range m.Selectors { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } + l = len(m.AllocationMode) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Count)) + if m.AdminAccess != nil { + n += 2 + } return n } -func (m *CELDeviceSelector) Size() (n int) { +func (m *DeviceRequestAllocationResult) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Expression) + l = len(m.Request) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Pool) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Device) n += 1 + l + sovGenerated(uint64(l)) + if m.AdminAccess != nil { + n += 2 + } return n } -func (m *Counter) Size() (n int) { +func (m *DeviceSelector) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Value.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.CEL != nil { + l = m.CEL.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } -func (m *CounterSet) Size() (n int) { +func (m *NetworkDeviceData) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Name) + l = len(m.InterfaceName) n += 1 + l + sovGenerated(uint64(l)) - if len(m.Counters) > 0 { - for k, v := range m.Counters { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + if len(m.IPs) > 0 { + for _, s := range m.IPs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } } + l = len(m.HardwareAddress) + n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *Device) Size() (n int) { +func (m *OpaqueDeviceConfiguration) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Name) + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Parameters.Size() n += 1 + l + sovGenerated(uint64(l)) - if m.Basic != nil { - l = m.Basic.Size() - n += 1 + l + sovGenerated(uint64(l)) - } return n } -func (m *DeviceAllocationConfiguration) Size() (n int) { +func (m *ResourceClaim) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Source) + l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) - if len(m.Requests) > 0 { - for _, s := range m.Requests { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.DeviceConfiguration.Size() + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *DeviceAllocationResult) Size() (n int) { +func (m *ResourceClaimConsumerReference) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceClaimList) Size() (n int) { + if m == nil { + return 0 } - if len(m.Config) > 0 { - for _, e := range m.Config { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } @@ -3897,49 +3171,35 @@ func (m *DeviceAllocationResult) Size() (n int) { return n } -func (m *DeviceAttribute) Size() (n int) { +func (m *ResourceClaimSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.IntValue != nil { - n += 1 + sovGenerated(uint64(*m.IntValue)) - } - if m.BoolValue != nil { - n += 2 - } - if m.StringValue != nil { - l = len(*m.StringValue) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.VersionValue != nil { - l = len(*m.VersionValue) - n += 1 + l + sovGenerated(uint64(l)) - } + l = m.Devices.Size() + n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *DeviceClaim) Size() (n int) { +func (m *ResourceClaimStatus) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Requests) > 0 { - for _, e := range m.Requests { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + if m.Allocation != nil { + l = m.Allocation.Size() + n += 1 + l + sovGenerated(uint64(l)) } - if len(m.Constraints) > 0 { - for _, e := range m.Constraints { + if len(m.ReservedFor) > 0 { + for _, e := range m.ReservedFor { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } - if len(m.Config) > 0 { - for _, e := range m.Config { + if len(m.Devices) > 0 { + for _, e := range m.Devices { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } @@ -3947,24 +3207,7 @@ func (m *DeviceClaim) Size() (n int) { return n } -func (m *DeviceClaimConfiguration) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Requests) > 0 { - for _, s := range m.Requests { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.DeviceConfiguration.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *DeviceClass) Size() (n int) { +func (m *ResourceClaimTemplate) Size() (n int) { if m == nil { return 0 } @@ -3977,18 +3220,7 @@ func (m *DeviceClass) Size() (n int) { return n } -func (m *DeviceClassConfiguration) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.DeviceConfiguration.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *DeviceClassList) Size() (n int) { +func (m *ResourceClaimTemplateList) Size() (n int) { if m == nil { return 0 } @@ -4005,109 +3237,55 @@ func (m *DeviceClassList) Size() (n int) { return n } -func (m *DeviceClassSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Selectors) > 0 { - for _, e := range m.Selectors { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Config) > 0 { - for _, e := range m.Config { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *DeviceConfiguration) Size() (n int) { +func (m *ResourceClaimTemplateSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Opaque != nil { - l = m.Opaque.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *DeviceConstraint) Size() (n int) { +func (m *ResourcePool) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Requests) > 0 { - for _, s := range m.Requests { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.MatchAttribute != nil { - l = len(*m.MatchAttribute) - n += 1 + l + sovGenerated(uint64(l)) - } + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + n += 1 + sovGenerated(uint64(m.ResourceSliceCount)) return n } -func (m *DeviceCounterConsumption) Size() (n int) { +func (m *ResourceSlice) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.CounterSet) + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - if len(m.Counters) > 0 { - for k, v := range m.Counters { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } return n } -func (m *DeviceRequest) Size() (n int) { +func (m *ResourceSliceList) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DeviceClassName) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Selectors) > 0 { - for _, e := range m.Selectors { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.AllocationMode) + l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Count)) - if m.AdminAccess != nil { - n += 2 - } - if len(m.FirstAvailable) > 0 { - for _, e := range m.FirstAvailable { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Tolerations) > 0 { - for _, e := range m.Tolerations { + if len(m.Items) > 0 { + for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } @@ -4115,25 +3293,25 @@ func (m *DeviceRequest) Size() (n int) { return n } -func (m *DeviceRequestAllocationResult) Size() (n int) { +func (m *ResourceSliceSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Request) - n += 1 + l + sovGenerated(uint64(l)) l = len(m.Driver) n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Pool) + l = m.Pool.Size() n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Device) + l = len(m.NodeName) n += 1 + l + sovGenerated(uint64(l)) - if m.AdminAccess != nil { - n += 2 + if m.NodeSelector != nil { + l = m.NodeSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) } - if len(m.Tolerations) > 0 { - for _, e := range m.Tolerations { + n += 2 + if len(m.Devices) > 0 { + for _, e := range m.Devices { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } @@ -4141,3318 +3319,504 @@ func (m *DeviceRequestAllocationResult) Size() (n int) { return n } -func (m *DeviceSelector) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CEL != nil { - l = m.CEL.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 } - -func (m *DeviceSubRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DeviceClassName) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Selectors) > 0 { - for _, e := range m.Selectors { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.AllocationMode) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Count)) - if len(m.Tolerations) > 0 { - for _, e := range m.Tolerations { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - -func (m *DeviceTaint) Size() (n int) { - if m == nil { - return 0 +func (this *AllocatedDeviceStatus) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Value) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Effect) - n += 1 + l + sovGenerated(uint64(l)) - if m.TimeAdded != nil { - l = m.TimeAdded.Size() - n += 1 + l + sovGenerated(uint64(l)) + repeatedStringForConditions := "[]Condition{" + for _, f := range this.Conditions { + repeatedStringForConditions += fmt.Sprintf("%v", f) + "," } - return n + repeatedStringForConditions += "}" + s := strings.Join([]string{`&AllocatedDeviceStatus{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`, + `Device:` + fmt.Sprintf("%v", this.Device) + `,`, + `Conditions:` + repeatedStringForConditions + `,`, + `Data:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Data), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `NetworkData:` + strings.Replace(this.NetworkData.String(), "NetworkDeviceData", "NetworkDeviceData", 1) + `,`, + `}`, + }, "") + return s } - -func (m *DeviceTaintRule) Size() (n int) { - if m == nil { - return 0 +func (this *AllocationResult) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&AllocationResult{`, + `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceAllocationResult", "DeviceAllocationResult", 1), `&`, ``, 1) + `,`, + `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`, + `}`, + }, "") + return s } - -func (m *DeviceTaintRuleList) Size() (n int) { - if m == nil { - return 0 +func (this *BasicDevice) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + keysForAttributes := make([]string, 0, len(this.Attributes)) + for k := range this.Attributes { + keysForAttributes = append(keysForAttributes, string(k)) } - return n -} - -func (m *DeviceTaintRuleSpec) Size() (n int) { - if m == nil { - return 0 + github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + mapStringForAttributes := "map[QualifiedName]DeviceAttribute{" + for _, k := range keysForAttributes { + mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[QualifiedName(k)]) } - var l int - _ = l - if m.DeviceSelector != nil { - l = m.DeviceSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) + mapStringForAttributes += "}" + keysForCapacity := make([]string, 0, len(this.Capacity)) + for k := range this.Capacity { + keysForCapacity = append(keysForCapacity, string(k)) } - l = m.Taint.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + mapStringForCapacity := "map[QualifiedName]resource.Quantity{" + for _, k := range keysForCapacity { + mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)]) + } + mapStringForCapacity += "}" + s := strings.Join([]string{`&BasicDevice{`, + `Attributes:` + mapStringForAttributes + `,`, + `Capacity:` + mapStringForCapacity + `,`, + `}`, + }, "") + return s } - -func (m *DeviceTaintSelector) Size() (n int) { - if m == nil { - return 0 +func (this *CELDeviceSelector) String() string { + if this == nil { + return "nil" } - var l int - _ = l - if m.DeviceClassName != nil { - l = len(*m.DeviceClassName) - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&CELDeviceSelector{`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s +} +func (this *Device) String() string { + if this == nil { + return "nil" } - if m.Driver != nil { - l = len(*m.Driver) - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&Device{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Basic:` + strings.Replace(this.Basic.String(), "BasicDevice", "BasicDevice", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceAllocationConfiguration) String() string { + if this == nil { + return "nil" } - if m.Pool != nil { - l = len(*m.Pool) - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&DeviceAllocationConfiguration{`, + `Source:` + fmt.Sprintf("%v", this.Source) + `,`, + `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, + `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceAllocationResult) String() string { + if this == nil { + return "nil" } - if m.Device != nil { - l = len(*m.Device) - n += 1 + l + sovGenerated(uint64(l)) + repeatedStringForResults := "[]DeviceRequestAllocationResult{" + for _, f := range this.Results { + repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DeviceRequestAllocationResult", "DeviceRequestAllocationResult", 1), `&`, ``, 1) + "," } - if len(m.Selectors) > 0 { - for _, e := range m.Selectors { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForResults += "}" + repeatedStringForConfig := "[]DeviceAllocationConfiguration{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceAllocationConfiguration", "DeviceAllocationConfiguration", 1), `&`, ``, 1) + "," } - return n + repeatedStringForConfig += "}" + s := strings.Join([]string{`&DeviceAllocationResult{`, + `Results:` + repeatedStringForResults + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s } - -func (m *DeviceToleration) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Operator) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Value) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Effect) - n += 1 + l + sovGenerated(uint64(l)) - if m.TolerationSeconds != nil { - n += 1 + sovGenerated(uint64(*m.TolerationSeconds)) +func (this *DeviceAttribute) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&DeviceAttribute{`, + `IntValue:` + valueToStringGenerated(this.IntValue) + `,`, + `BoolValue:` + valueToStringGenerated(this.BoolValue) + `,`, + `StringValue:` + valueToStringGenerated(this.StringValue) + `,`, + `VersionValue:` + valueToStringGenerated(this.VersionValue) + `,`, + `}`, + }, "") + return s } - -func (m *NetworkDeviceData) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceClaim) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.InterfaceName) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.IPs) > 0 { - for _, s := range m.IPs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForRequests := "[]DeviceRequest{" + for _, f := range this.Requests { + repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "DeviceRequest", "DeviceRequest", 1), `&`, ``, 1) + "," } - l = len(m.HardwareAddress) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *OpaqueDeviceConfiguration) Size() (n int) { - if m == nil { - return 0 + repeatedStringForRequests += "}" + repeatedStringForConstraints := "[]DeviceConstraint{" + for _, f := range this.Constraints { + repeatedStringForConstraints += strings.Replace(strings.Replace(f.String(), "DeviceConstraint", "DeviceConstraint", 1), `&`, ``, 1) + "," } - var l int - _ = l - l = len(m.Driver) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Parameters.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceClaim) Size() (n int) { - if m == nil { - return 0 + repeatedStringForConstraints += "}" + repeatedStringForConfig := "[]DeviceClaimConfiguration{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClaimConfiguration", "DeviceClaimConfiguration", 1), `&`, ``, 1) + "," } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + repeatedStringForConfig += "}" + s := strings.Join([]string{`&DeviceClaim{`, + `Requests:` + repeatedStringForRequests + `,`, + `Constraints:` + repeatedStringForConstraints + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimConsumerReference) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceClaimConfiguration) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.APIGroup) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Resource) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&DeviceClaimConfiguration{`, + `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, + `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } +func (this *DeviceClass) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&DeviceClass{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceClassSpec", "DeviceClassSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimSpec) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceClassConfiguration) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.Devices.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&DeviceClassConfiguration{`, + `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Allocation != nil { - l = m.Allocation.Size() - n += 1 + l + sovGenerated(uint64(l)) +func (this *DeviceClassList) String() string { + if this == nil { + return "nil" } - if len(m.ReservedFor) > 0 { - for _, e := range m.ReservedFor { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForItems := "[]DeviceClass{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeviceClass", "DeviceClass", 1), `&`, ``, 1) + "," } - if len(m.Devices) > 0 { - for _, e := range m.Devices { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ResourceClaimTemplate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceClaimTemplateList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ResourceClaimTemplateSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourcePool) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Generation)) - n += 1 + sovGenerated(uint64(m.ResourceSliceCount)) - return n -} - -func (m *ResourceSlice) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceSliceList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n + repeatedStringForItems += "}" + s := strings.Join([]string{`&DeviceClassList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s } - -func (m *ResourceSliceSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Driver) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Pool.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.NodeName) - n += 1 + l + sovGenerated(uint64(l)) - if m.NodeSelector != nil { - l = m.NodeSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - if len(m.Devices) > 0 { - for _, e := range m.Devices { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } +func (this *DeviceClassSpec) String() string { + if this == nil { + return "nil" } - if m.PerDeviceNodeSelection != nil { - n += 2 + repeatedStringForSelectors := "[]DeviceSelector{" + for _, f := range this.Selectors { + repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," } - if len(m.SharedCounters) > 0 { - for _, e := range m.SharedCounters { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForSelectors += "}" + repeatedStringForConfig := "[]DeviceClassConfiguration{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClassConfiguration", "DeviceClassConfiguration", 1), `&`, ``, 1) + "," } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + repeatedStringForConfig += "}" + s := strings.Join([]string{`&DeviceClassSpec{`, + `Selectors:` + repeatedStringForSelectors + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s } -func (this *AllocatedDeviceStatus) String() string { +func (this *DeviceConfiguration) String() string { if this == nil { return "nil" } - repeatedStringForConditions := "[]Condition{" - for _, f := range this.Conditions { - repeatedStringForConditions += fmt.Sprintf("%v", f) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&AllocatedDeviceStatus{`, - `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, - `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`, - `Device:` + fmt.Sprintf("%v", this.Device) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `Data:` + strings.Replace(fmt.Sprintf("%v", this.Data), "RawExtension", "runtime.RawExtension", 1) + `,`, - `NetworkData:` + strings.Replace(this.NetworkData.String(), "NetworkDeviceData", "NetworkDeviceData", 1) + `,`, + s := strings.Join([]string{`&DeviceConfiguration{`, + `Opaque:` + strings.Replace(this.Opaque.String(), "OpaqueDeviceConfiguration", "OpaqueDeviceConfiguration", 1) + `,`, `}`, }, "") return s } -func (this *AllocationResult) String() string { +func (this *DeviceConstraint) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&AllocationResult{`, - `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceAllocationResult", "DeviceAllocationResult", 1), `&`, ``, 1) + `,`, - `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`, + s := strings.Join([]string{`&DeviceConstraint{`, + `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, + `MatchAttribute:` + valueToStringGenerated(this.MatchAttribute) + `,`, `}`, }, "") return s } -func (this *BasicDevice) String() string { +func (this *DeviceRequest) String() string { if this == nil { return "nil" } - repeatedStringForConsumesCounters := "[]DeviceCounterConsumption{" - for _, f := range this.ConsumesCounters { - repeatedStringForConsumesCounters += strings.Replace(strings.Replace(f.String(), "DeviceCounterConsumption", "DeviceCounterConsumption", 1), `&`, ``, 1) + "," - } - repeatedStringForConsumesCounters += "}" - repeatedStringForTaints := "[]DeviceTaint{" - for _, f := range this.Taints { - repeatedStringForTaints += strings.Replace(strings.Replace(f.String(), "DeviceTaint", "DeviceTaint", 1), `&`, ``, 1) + "," - } - repeatedStringForTaints += "}" - keysForAttributes := make([]string, 0, len(this.Attributes)) - for k := range this.Attributes { - keysForAttributes = append(keysForAttributes, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) - mapStringForAttributes := "map[QualifiedName]DeviceAttribute{" - for _, k := range keysForAttributes { - mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[QualifiedName(k)]) - } - mapStringForAttributes += "}" - keysForCapacity := make([]string, 0, len(this.Capacity)) - for k := range this.Capacity { - keysForCapacity = append(keysForCapacity, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) - mapStringForCapacity := "map[QualifiedName]resource.Quantity{" - for _, k := range keysForCapacity { - mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)]) + repeatedStringForSelectors := "[]DeviceSelector{" + for _, f := range this.Selectors { + repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," } - mapStringForCapacity += "}" - s := strings.Join([]string{`&BasicDevice{`, - `Attributes:` + mapStringForAttributes + `,`, - `Capacity:` + mapStringForCapacity + `,`, - `ConsumesCounters:` + repeatedStringForConsumesCounters + `,`, - `NodeName:` + valueToStringGenerated(this.NodeName) + `,`, - `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`, - `AllNodes:` + valueToStringGenerated(this.AllNodes) + `,`, - `Taints:` + repeatedStringForTaints + `,`, + repeatedStringForSelectors += "}" + s := strings.Join([]string{`&DeviceRequest{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `DeviceClassName:` + fmt.Sprintf("%v", this.DeviceClassName) + `,`, + `Selectors:` + repeatedStringForSelectors + `,`, + `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, + `Count:` + fmt.Sprintf("%v", this.Count) + `,`, + `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`, `}`, }, "") return s } -func (this *CELDeviceSelector) String() string { +func (this *DeviceRequestAllocationResult) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CELDeviceSelector{`, - `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + s := strings.Join([]string{`&DeviceRequestAllocationResult{`, + `Request:` + fmt.Sprintf("%v", this.Request) + `,`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`, + `Device:` + fmt.Sprintf("%v", this.Device) + `,`, + `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`, `}`, }, "") return s } -func (this *Counter) String() string { +func (this *DeviceSelector) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Counter{`, - `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&DeviceSelector{`, + `CEL:` + strings.Replace(this.CEL.String(), "CELDeviceSelector", "CELDeviceSelector", 1) + `,`, `}`, }, "") return s } -func (this *CounterSet) String() string { +func (this *NetworkDeviceData) String() string { if this == nil { return "nil" } - keysForCounters := make([]string, 0, len(this.Counters)) - for k := range this.Counters { - keysForCounters = append(keysForCounters, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) - mapStringForCounters := "map[string]Counter{" - for _, k := range keysForCounters { - mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k]) - } - mapStringForCounters += "}" - s := strings.Join([]string{`&CounterSet{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Counters:` + mapStringForCounters + `,`, + s := strings.Join([]string{`&NetworkDeviceData{`, + `InterfaceName:` + fmt.Sprintf("%v", this.InterfaceName) + `,`, + `IPs:` + fmt.Sprintf("%v", this.IPs) + `,`, + `HardwareAddress:` + fmt.Sprintf("%v", this.HardwareAddress) + `,`, `}`, }, "") return s } -func (this *Device) String() string { +func (this *OpaqueDeviceConfiguration) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&Device{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Basic:` + strings.Replace(this.Basic.String(), "BasicDevice", "BasicDevice", 1) + `,`, + s := strings.Join([]string{`&OpaqueDeviceConfiguration{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *DeviceAllocationConfiguration) String() string { +func (this *ResourceClaim) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DeviceAllocationConfiguration{`, - `Source:` + fmt.Sprintf("%v", this.Source) + `,`, - `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, - `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&ResourceClaim{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *DeviceAllocationResult) String() string { +func (this *ResourceClaimConsumerReference) String() string { if this == nil { return "nil" } - repeatedStringForResults := "[]DeviceRequestAllocationResult{" - for _, f := range this.Results { - repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DeviceRequestAllocationResult", "DeviceRequestAllocationResult", 1), `&`, ``, 1) + "," - } - repeatedStringForResults += "}" - repeatedStringForConfig := "[]DeviceAllocationConfiguration{" - for _, f := range this.Config { - repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceAllocationConfiguration", "DeviceAllocationConfiguration", 1), `&`, ``, 1) + "," - } - repeatedStringForConfig += "}" - s := strings.Join([]string{`&DeviceAllocationResult{`, - `Results:` + repeatedStringForResults + `,`, - `Config:` + repeatedStringForConfig + `,`, - `}`, - }, "") - return s -} -func (this *DeviceAttribute) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeviceAttribute{`, - `IntValue:` + valueToStringGenerated(this.IntValue) + `,`, - `BoolValue:` + valueToStringGenerated(this.BoolValue) + `,`, - `StringValue:` + valueToStringGenerated(this.StringValue) + `,`, - `VersionValue:` + valueToStringGenerated(this.VersionValue) + `,`, - `}`, - }, "") - return s -} -func (this *DeviceClaim) String() string { - if this == nil { - return "nil" - } - repeatedStringForRequests := "[]DeviceRequest{" - for _, f := range this.Requests { - repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "DeviceRequest", "DeviceRequest", 1), `&`, ``, 1) + "," - } - repeatedStringForRequests += "}" - repeatedStringForConstraints := "[]DeviceConstraint{" - for _, f := range this.Constraints { - repeatedStringForConstraints += strings.Replace(strings.Replace(f.String(), "DeviceConstraint", "DeviceConstraint", 1), `&`, ``, 1) + "," - } - repeatedStringForConstraints += "}" - repeatedStringForConfig := "[]DeviceClaimConfiguration{" - for _, f := range this.Config { - repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClaimConfiguration", "DeviceClaimConfiguration", 1), `&`, ``, 1) + "," - } - repeatedStringForConfig += "}" - s := strings.Join([]string{`&DeviceClaim{`, - `Requests:` + repeatedStringForRequests + `,`, - `Constraints:` + repeatedStringForConstraints + `,`, - `Config:` + repeatedStringForConfig + `,`, - `}`, - }, "") - return s -} -func (this *DeviceClaimConfiguration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeviceClaimConfiguration{`, - `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, - `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeviceClass) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeviceClass{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceClassSpec", "DeviceClassSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeviceClassConfiguration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeviceClassConfiguration{`, - `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&ResourceClaimConsumerReference{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, `}`, }, "") return s } -func (this *DeviceClassList) String() string { +func (this *ResourceClaimList) String() string { if this == nil { return "nil" } - repeatedStringForItems := "[]DeviceClass{" + repeatedStringForItems := "[]ResourceClaim{" for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeviceClass", "DeviceClass", 1), `&`, ``, 1) + "," + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaim", "ResourceClaim", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" - s := strings.Join([]string{`&DeviceClassList{`, + s := strings.Join([]string{`&ResourceClaimList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } -func (this *DeviceClassSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForSelectors := "[]DeviceSelector{" - for _, f := range this.Selectors { - repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," - } - repeatedStringForSelectors += "}" - repeatedStringForConfig := "[]DeviceClassConfiguration{" - for _, f := range this.Config { - repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClassConfiguration", "DeviceClassConfiguration", 1), `&`, ``, 1) + "," - } - repeatedStringForConfig += "}" - s := strings.Join([]string{`&DeviceClassSpec{`, - `Selectors:` + repeatedStringForSelectors + `,`, - `Config:` + repeatedStringForConfig + `,`, - `}`, - }, "") - return s -} -func (this *DeviceConfiguration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeviceConfiguration{`, - `Opaque:` + strings.Replace(this.Opaque.String(), "OpaqueDeviceConfiguration", "OpaqueDeviceConfiguration", 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeviceConstraint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeviceConstraint{`, - `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, - `MatchAttribute:` + valueToStringGenerated(this.MatchAttribute) + `,`, - `}`, - }, "") - return s -} -func (this *DeviceCounterConsumption) String() string { - if this == nil { - return "nil" - } - keysForCounters := make([]string, 0, len(this.Counters)) - for k := range this.Counters { - keysForCounters = append(keysForCounters, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCounters) - mapStringForCounters := "map[string]Counter{" - for _, k := range keysForCounters { - mapStringForCounters += fmt.Sprintf("%v: %v,", k, this.Counters[k]) - } - mapStringForCounters += "}" - s := strings.Join([]string{`&DeviceCounterConsumption{`, - `CounterSet:` + fmt.Sprintf("%v", this.CounterSet) + `,`, - `Counters:` + mapStringForCounters + `,`, - `}`, - }, "") - return s -} -func (this *DeviceRequest) String() string { - if this == nil { - return "nil" - } - repeatedStringForSelectors := "[]DeviceSelector{" - for _, f := range this.Selectors { - repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," - } - repeatedStringForSelectors += "}" - repeatedStringForFirstAvailable := "[]DeviceSubRequest{" - for _, f := range this.FirstAvailable { - repeatedStringForFirstAvailable += strings.Replace(strings.Replace(f.String(), "DeviceSubRequest", "DeviceSubRequest", 1), `&`, ``, 1) + "," - } - repeatedStringForFirstAvailable += "}" - repeatedStringForTolerations := "[]DeviceToleration{" - for _, f := range this.Tolerations { - repeatedStringForTolerations += strings.Replace(strings.Replace(f.String(), "DeviceToleration", "DeviceToleration", 1), `&`, ``, 1) + "," - } - repeatedStringForTolerations += "}" - s := strings.Join([]string{`&DeviceRequest{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `DeviceClassName:` + fmt.Sprintf("%v", this.DeviceClassName) + `,`, - `Selectors:` + repeatedStringForSelectors + `,`, - `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, - `Count:` + fmt.Sprintf("%v", this.Count) + `,`, - `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`, - `FirstAvailable:` + repeatedStringForFirstAvailable + `,`, - `Tolerations:` + repeatedStringForTolerations + `,`, - `}`, - }, "") - return s -} -func (this *DeviceRequestAllocationResult) String() string { - if this == nil { - return "nil" - } - repeatedStringForTolerations := "[]DeviceToleration{" - for _, f := range this.Tolerations { - repeatedStringForTolerations += strings.Replace(strings.Replace(f.String(), "DeviceToleration", "DeviceToleration", 1), `&`, ``, 1) + "," - } - repeatedStringForTolerations += "}" - s := strings.Join([]string{`&DeviceRequestAllocationResult{`, - `Request:` + fmt.Sprintf("%v", this.Request) + `,`, - `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, - `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`, - `Device:` + fmt.Sprintf("%v", this.Device) + `,`, - `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`, - `Tolerations:` + repeatedStringForTolerations + `,`, - `}`, - }, "") - return s -} -func (this *DeviceSelector) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeviceSelector{`, - `CEL:` + strings.Replace(this.CEL.String(), "CELDeviceSelector", "CELDeviceSelector", 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeviceSubRequest) String() string { - if this == nil { - return "nil" - } - repeatedStringForSelectors := "[]DeviceSelector{" - for _, f := range this.Selectors { - repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," - } - repeatedStringForSelectors += "}" - repeatedStringForTolerations := "[]DeviceToleration{" - for _, f := range this.Tolerations { - repeatedStringForTolerations += strings.Replace(strings.Replace(f.String(), "DeviceToleration", "DeviceToleration", 1), `&`, ``, 1) + "," - } - repeatedStringForTolerations += "}" - s := strings.Join([]string{`&DeviceSubRequest{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `DeviceClassName:` + fmt.Sprintf("%v", this.DeviceClassName) + `,`, - `Selectors:` + repeatedStringForSelectors + `,`, - `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, - `Count:` + fmt.Sprintf("%v", this.Count) + `,`, - `Tolerations:` + repeatedStringForTolerations + `,`, - `}`, - }, "") - return s -} -func (this *DeviceTaint) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeviceTaint{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`, - `TimeAdded:` + strings.Replace(fmt.Sprintf("%v", this.TimeAdded), "Time", "v1.Time", 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeviceTaintRule) String() string { +func (this *ResourceClaimSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DeviceTaintRule{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceTaintRuleSpec", "DeviceTaintRuleSpec", 1), `&`, ``, 1) + `,`, + s := strings.Join([]string{`&ResourceClaimSpec{`, + `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceClaim", "DeviceClaim", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *DeviceTaintRuleList) String() string { +func (this *ResourceClaimStatus) String() string { if this == nil { return "nil" } - repeatedStringForItems := "[]DeviceTaintRule{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeviceTaintRule", "DeviceTaintRule", 1), `&`, ``, 1) + "," + repeatedStringForReservedFor := "[]ResourceClaimConsumerReference{" + for _, f := range this.ReservedFor { + repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + "," } - repeatedStringForItems += "}" - s := strings.Join([]string{`&DeviceTaintRuleList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *DeviceTaintRuleSpec) String() string { - if this == nil { - return "nil" + repeatedStringForReservedFor += "}" + repeatedStringForDevices := "[]AllocatedDeviceStatus{" + for _, f := range this.Devices { + repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "AllocatedDeviceStatus", "AllocatedDeviceStatus", 1), `&`, ``, 1) + "," } - s := strings.Join([]string{`&DeviceTaintRuleSpec{`, - `DeviceSelector:` + strings.Replace(this.DeviceSelector.String(), "DeviceTaintSelector", "DeviceTaintSelector", 1) + `,`, - `Taint:` + strings.Replace(strings.Replace(this.Taint.String(), "DeviceTaint", "DeviceTaint", 1), `&`, ``, 1) + `,`, + repeatedStringForDevices += "}" + s := strings.Join([]string{`&ResourceClaimStatus{`, + `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`, + `ReservedFor:` + repeatedStringForReservedFor + `,`, + `Devices:` + repeatedStringForDevices + `,`, `}`, }, "") return s -} -func (this *DeviceTaintSelector) String() string { - if this == nil { - return "nil" - } - repeatedStringForSelectors := "[]DeviceSelector{" - for _, f := range this.Selectors { - repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," - } - repeatedStringForSelectors += "}" - s := strings.Join([]string{`&DeviceTaintSelector{`, - `DeviceClassName:` + valueToStringGenerated(this.DeviceClassName) + `,`, - `Driver:` + valueToStringGenerated(this.Driver) + `,`, - `Pool:` + valueToStringGenerated(this.Pool) + `,`, - `Device:` + valueToStringGenerated(this.Device) + `,`, - `Selectors:` + repeatedStringForSelectors + `,`, - `}`, - }, "") - return s -} -func (this *DeviceToleration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeviceToleration{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`, - `TolerationSeconds:` + valueToStringGenerated(this.TolerationSeconds) + `,`, - `}`, - }, "") - return s -} -func (this *NetworkDeviceData) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NetworkDeviceData{`, - `InterfaceName:` + fmt.Sprintf("%v", this.InterfaceName) + `,`, - `IPs:` + fmt.Sprintf("%v", this.IPs) + `,`, - `HardwareAddress:` + fmt.Sprintf("%v", this.HardwareAddress) + `,`, - `}`, - }, "") - return s -} -func (this *OpaqueDeviceConfiguration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OpaqueDeviceConfiguration{`, - `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, - `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaim) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaim{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimConsumerReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimConsumerReference{`, - `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, - `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ResourceClaim{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaim", "ResourceClaim", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClaimList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimSpec{`, - `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceClaim", "DeviceClaim", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForReservedFor := "[]ResourceClaimConsumerReference{" - for _, f := range this.ReservedFor { - repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + "," - } - repeatedStringForReservedFor += "}" - repeatedStringForDevices := "[]AllocatedDeviceStatus{" - for _, f := range this.Devices { - repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "AllocatedDeviceStatus", "AllocatedDeviceStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForDevices += "}" - s := strings.Join([]string{`&ResourceClaimStatus{`, - `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`, - `ReservedFor:` + repeatedStringForReservedFor + `,`, - `Devices:` + repeatedStringForDevices + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimTemplate) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimTemplateList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ResourceClaimTemplate{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimTemplate", "ResourceClaimTemplate", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClaimTemplateList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimTemplateSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourcePool) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourcePool{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, - `ResourceSliceCount:` + fmt.Sprintf("%v", this.ResourceSliceCount) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceSlice) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceSlice{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceSliceSpec", "ResourceSliceSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceSliceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ResourceSlice{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceSlice", "ResourceSlice", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceSliceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ResourceSliceSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForDevices := "[]Device{" - for _, f := range this.Devices { - repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "Device", "Device", 1), `&`, ``, 1) + "," - } - repeatedStringForDevices += "}" - repeatedStringForSharedCounters := "[]CounterSet{" - for _, f := range this.SharedCounters { - repeatedStringForSharedCounters += strings.Replace(strings.Replace(f.String(), "CounterSet", "CounterSet", 1), `&`, ``, 1) + "," - } - repeatedStringForSharedCounters += "}" - s := strings.Join([]string{`&ResourceSliceSpec{`, - `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, - `Pool:` + strings.Replace(strings.Replace(this.Pool.String(), "ResourcePool", "ResourcePool", 1), `&`, ``, 1) + `,`, - `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, - `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`, - `AllNodes:` + fmt.Sprintf("%v", this.AllNodes) + `,`, - `Devices:` + repeatedStringForDevices + `,`, - `PerDeviceNodeSelection:` + valueToStringGenerated(this.PerDeviceNodeSelection) + `,`, - `SharedCounters:` + repeatedStringForSharedCounters + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *AllocatedDeviceStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllocatedDeviceStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllocatedDeviceStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Driver", 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.Driver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pool", 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.Pool = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Device", 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.Device = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, v1.Condition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &runtime.RawExtension{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NetworkData == nil { - m.NetworkData = &NetworkDeviceData{} - } - if err := m.NetworkData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllocationResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NodeSelector == nil { - m.NodeSelector = &v11.NodeSelector{} - } - if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BasicDevice) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BasicDevice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BasicDevice: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = make(map[QualifiedName]DeviceAttribute) - } - var mapkey QualifiedName - mapvalue := &DeviceAttribute{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &DeviceAttribute{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[QualifiedName(mapkey)] = *mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Capacity == nil { - m.Capacity = make(map[QualifiedName]resource.Quantity) - } - var mapkey QualifiedName - mapvalue := &resource.Quantity{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &resource.Quantity{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Capacity[QualifiedName(mapkey)] = *mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsumesCounters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConsumesCounters = append(m.ConsumesCounters, DeviceCounterConsumption{}) - if err := m.ConsumesCounters[len(m.ConsumesCounters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeName", 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 - } - s := string(dAtA[iNdEx:postIndex]) - m.NodeName = &s - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NodeSelector == nil { - m.NodeSelector = &v11.NodeSelector{} - } - if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllNodes", 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.AllNodes = &b - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Taints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Taints = append(m.Taints, DeviceTaint{}) - if err := m.Taints[len(m.Taints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CELDeviceSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CELDeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expression", 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.Expression = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Counter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Counter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CounterSet) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CounterSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CounterSet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Counters == nil { - m.Counters = make(map[string]Counter) - } - var mapkey string - mapvalue := &Counter{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Counter{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Counters[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Device) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Device: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Basic == nil { - m.Basic = &BasicDevice{} - } - if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceAllocationConfiguration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceAllocationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", 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.Source = AllocationConfigSource(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", 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.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceAllocationResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Results = append(m.Results, DeviceRequestAllocationResult{}) - if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Config = append(m.Config, DeviceAllocationConfiguration{}) - if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeviceAttribute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceAttribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IntValue = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", 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.BoolValue = &b - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", 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 - } - s := string(dAtA[iNdEx:postIndex]) - m.StringValue = &s - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", 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 - } - s := string(dAtA[iNdEx:postIndex]) - m.VersionValue = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeviceClaim) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceClaim: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClaim: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Requests = append(m.Requests, DeviceRequest{}) - if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Constraints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Constraints = append(m.Constraints, DeviceConstraint{}) - if err := m.Constraints[len(m.Constraints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Config = append(m.Config, DeviceClaimConfiguration{}) - if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceClaimConfiguration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClaimConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", 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.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeviceClass) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceClass: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClass: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } +} +func (this *ResourceClaimTemplate) String() string { + if this == nil { + return "nil" } - - if iNdEx > l { - return io.ErrUnexpectedEOF + s := strings.Join([]string{`&ResourceClaimTemplate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplateList) String() string { + if this == nil { + return "nil" } - return nil + repeatedStringForItems := "[]ResourceClaimTemplate{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimTemplate", "ResourceClaimTemplate", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimTemplateList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s } -func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceClassConfiguration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClassConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } +func (this *ResourceClaimTemplateSpec) String() string { + if this == nil { + return "nil" } - - if iNdEx > l { - return io.ErrUnexpectedEOF + s := strings.Join([]string{`&ResourceClaimTemplateSpec{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourcePool) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&ResourcePool{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, + `ResourceSliceCount:` + fmt.Sprintf("%v", this.ResourceSliceCount) + `,`, + `}`, + }, "") + return s } -func (m *DeviceClassList) Unmarshal(dAtA []byte) error { +func (this *ResourceSlice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceSlice{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceSliceSpec", "ResourceSliceSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceSliceList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceSlice{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceSlice", "ResourceSlice", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceSliceList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceSliceSpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForDevices := "[]Device{" + for _, f := range this.Devices { + repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "Device", "Device", 1), `&`, ``, 1) + "," + } + repeatedStringForDevices += "}" + s := strings.Join([]string{`&ResourceSliceSpec{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Pool:` + strings.Replace(strings.Replace(this.Pool.String(), "ResourcePool", "ResourcePool", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`, + `AllNodes:` + fmt.Sprintf("%v", this.AllNodes) + `,`, + `Devices:` + repeatedStringForDevices + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *AllocatedDeviceStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7475,17 +3839,17 @@ func (m *DeviceClassList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceClassList: wiretype end group for non-group") + return fmt.Errorf("proto: AllocatedDeviceStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClassList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllocatedDeviceStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7495,30 +3859,29 @@ func (m *DeviceClassList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Driver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7528,79 +3891,59 @@ func (m *DeviceClassList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, DeviceClass{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Pool = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated + 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 + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceClassSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Device = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7627,14 +3970,14 @@ func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Selectors = append(m.Selectors, DeviceSelector{}) - if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Conditions = append(m.Conditions, v1.Condition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7661,64 +4004,13 @@ func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Config = append(m.Config, DeviceClassConfiguration{}) - if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NetworkData", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7745,10 +4037,10 @@ func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Opaque == nil { - m.Opaque = &OpaqueDeviceConfiguration{} + if m.NetworkData == nil { + m.NetworkData = &NetworkDeviceData{} } - if err := m.Opaque.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.NetworkData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7773,7 +4065,7 @@ func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { +func (m *AllocationResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7796,17 +4088,17 @@ func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceConstraint: wiretype end group for non-group") + return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceConstraint: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7816,29 +4108,30 @@ func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) + if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchAttribute", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7848,24 +4141,27 @@ func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := FullyQualifiedName(dAtA[iNdEx:postIndex]) - m.MatchAttribute = &s + if m.NodeSelector == nil { + m.NodeSelector = &v11.NodeSelector{} + } + if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -7888,7 +4184,7 @@ func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error { +func (m *BasicDevice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7911,17 +4207,17 @@ func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceCounterConsumption: wiretype end group for non-group") + return fmt.Errorf("proto: BasicDevice: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceCounterConsumption: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BasicDevice: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7931,27 +4227,124 @@ func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(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.CounterSet = string(dAtA[iNdEx:postIndex]) + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Attributes == nil { + m.Attributes = make(map[QualifiedName]DeviceAttribute) + } + var mapkey QualifiedName + mapvalue := &DeviceAttribute{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &DeviceAttribute{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Attributes[QualifiedName(mapkey)] = *mapvalue iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7978,11 +4371,11 @@ func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Counters == nil { - m.Counters = make(map[string]Counter) + if m.Capacity == nil { + m.Capacity = make(map[QualifiedName]resource.Quantity) } - var mapkey string - mapvalue := &Counter{} + var mapkey QualifiedName + mapvalue := &resource.Quantity{} for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -8028,7 +4421,7 @@ func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error { if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int @@ -8056,7 +4449,7 @@ func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &Counter{} + mapvalue = &resource.Quantity{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } @@ -8076,7 +4469,7 @@ func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Counters[mapkey] = *mapvalue + m.Capacity[QualifiedName(mapkey)] = *mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -8099,7 +4492,7 @@ func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceRequest) Unmarshal(dAtA []byte) error { +func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8122,15 +4515,15 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CELDeviceSelector: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CELDeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8158,11 +4551,61 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Expression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Device) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Device: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8190,11 +4633,11 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DeviceClassName = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8221,14 +4664,66 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Selectors = append(m.Selectors, DeviceSelector{}) - if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Basic == nil { + m.Basic = &BasicDevice{} + } + if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceAllocationConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceAllocationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8256,13 +4751,13 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex]) + m.Source = AllocationConfigSource(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } - m.Count = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8272,16 +4767,29 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Count |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } - var v int + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8291,16 +4799,78 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - b := bool(v != 0) - m.AdminAccess = &b - case 7: + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceAllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FirstAvailable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8327,14 +4897,14 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FirstAvailable = append(m.FirstAvailable, DeviceSubRequest{}) - if err := m.FirstAvailable[len(m.FirstAvailable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Results = append(m.Results, DeviceRequestAllocationResult{}) + if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 8: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8361,8 +4931,8 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Tolerations = append(m.Tolerations, DeviceToleration{}) - if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Config = append(m.Config, DeviceAllocationConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8387,7 +4957,7 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { +func (m *DeviceAttribute) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8410,17 +4980,17 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceRequestAllocationResult: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceAttribute: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceRequestAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceAttribute: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) } - var stringLen uint64 + var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8430,29 +5000,17 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int64(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.Request = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + m.IntValue = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8462,27 +5020,16 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(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.Driver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + b := bool(v != 0) + m.BoolValue = &b + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8510,11 +5057,12 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Pool = string(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + m.StringValue = &s iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8542,62 +5090,8 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Device = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", 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.AdminAccess = &b - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tolerations = append(m.Tolerations, DeviceToleration{}) - if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.VersionValue = &s iNdEx = postIndex default: iNdEx = preIndex @@ -8620,7 +5114,7 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceSelector) Unmarshal(dAtA []byte) error { +func (m *DeviceClaim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8643,15 +5137,15 @@ func (m *DeviceSelector) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceSelector: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClaim: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClaim: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CEL", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8678,10 +5172,76 @@ func (m *DeviceSelector) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CEL == nil { - m.CEL = &CELDeviceSelector{} + m.Requests = append(m.Requests, DeviceRequest{}) + if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.CEL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Constraints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Constraints = append(m.Constraints, DeviceConstraint{}) + if err := m.Constraints[len(m.Constraints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Config = append(m.Config, DeviceClaimConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8706,7 +5266,7 @@ func (m *DeviceSelector) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error { +func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8729,47 +5289,15 @@ func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceSubRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClaimConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceSubRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClaimConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8797,11 +5325,11 @@ func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DeviceClassName = string(dAtA[iNdEx:postIndex]) + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8828,16 +5356,65 @@ func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Selectors = append(m.Selectors, DeviceSelector{}) - if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceClass) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8847,46 +5424,28 @@ func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - case 7: + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8913,8 +5472,7 @@ func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Tolerations = append(m.Tolerations, DeviceToleration{}) - if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8939,7 +5497,7 @@ func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceTaint) Unmarshal(dAtA []byte) error { +func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8962,17 +5520,17 @@ func (m *DeviceTaint) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceTaint: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClassConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceTaint: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClassConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8982,61 +5540,80 @@ func (m *DeviceTaint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - 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 - } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceClassList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClassList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClassList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9046,27 +5623,28 @@ func (m *DeviceTaint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Effect = DeviceTaintEffect(dAtA[iNdEx:postIndex]) + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9093,10 +5671,8 @@ func (m *DeviceTaint) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeAdded == nil { - m.TimeAdded = &v1.Time{} - } - if err := m.TimeAdded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, DeviceClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9121,7 +5697,7 @@ func (m *DeviceTaint) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceTaintRule) Unmarshal(dAtA []byte) error { +func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9144,15 +5720,15 @@ func (m *DeviceTaintRule) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceTaintRule: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClassSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceTaintRule: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9179,13 +5755,14 @@ func (m *DeviceTaintRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Selectors = append(m.Selectors, DeviceSelector{}) + if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9212,7 +5789,8 @@ func (m *DeviceTaintRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Config = append(m.Config, DeviceClassConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9237,7 +5815,7 @@ func (m *DeviceTaintRule) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceTaintRuleList) Unmarshal(dAtA []byte) error { +func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9260,15 +5838,15 @@ func (m *DeviceTaintRuleList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceTaintRuleList: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceTaintRuleList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9295,41 +5873,10 @@ func (m *DeviceTaintRuleList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.Opaque == nil { + m.Opaque = &OpaqueDeviceConfiguration{} } - m.Items = append(m.Items, DeviceTaintRule{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Opaque.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9354,7 +5901,7 @@ func (m *DeviceTaintRuleList) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceTaintRuleSpec) Unmarshal(dAtA []byte) error { +func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9377,17 +5924,17 @@ func (m *DeviceTaintRuleSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceTaintRuleSpec: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceConstraint: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceTaintRuleSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceConstraint: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9397,33 +5944,29 @@ func (m *DeviceTaintRuleSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.DeviceSelector == nil { - m.DeviceSelector = &DeviceTaintSelector{} - } - if err := m.DeviceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Taint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchAttribute", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9433,24 +5976,24 @@ func (m *DeviceTaintRuleSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Taint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := FullyQualifiedName(dAtA[iNdEx:postIndex]) + m.MatchAttribute = &s iNdEx = postIndex default: iNdEx = preIndex @@ -9473,7 +6016,7 @@ func (m *DeviceTaintRuleSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error { +func (m *DeviceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9496,15 +6039,15 @@ func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceTaintSelector: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceTaintSelector: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9532,12 +6075,11 @@ func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.DeviceClassName = &s + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9565,14 +6107,13 @@ func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Driver = &s + m.DeviceClassName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9582,28 +6123,29 @@ func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Pool = &s + m.Selectors = append(m.Selectors, DeviceSelector{}) + if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9631,14 +6173,13 @@ func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Device = &s + m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) } - var msglen int + m.Count = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9648,26 +6189,32 @@ func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Count |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType) } - m.Selectors = append(m.Selectors, DeviceSelector{}) - if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + 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 + } } - iNdEx = postIndex + b := bool(v != 0) + m.AdminAccess = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -9689,7 +6236,7 @@ func (m *DeviceTaintSelector) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceToleration) Unmarshal(dAtA []byte) error { +func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9712,15 +6259,15 @@ func (m *DeviceToleration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceToleration: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceRequestAllocationResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceToleration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceRequestAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9748,11 +6295,11 @@ func (m *DeviceToleration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(dAtA[iNdEx:postIndex]) + m.Request = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9780,11 +6327,11 @@ func (m *DeviceToleration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Operator = DeviceTolerationOperator(dAtA[iNdEx:postIndex]) + m.Driver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9812,11 +6359,11 @@ func (m *DeviceToleration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Value = string(dAtA[iNdEx:postIndex]) + m.Pool = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9844,13 +6391,13 @@ func (m *DeviceToleration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Effect = DeviceTaintEffect(dAtA[iNdEx:postIndex]) + m.Device = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TolerationSeconds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType) } - var v int64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9860,12 +6407,99 @@ func (m *DeviceToleration) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.AdminAccess = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceSelector) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CEL", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.TolerationSeconds = &v + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CEL == nil { + m.CEL = &CELDeviceSelector{} + } + if err := m.CEL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -11747,61 +8381,6 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PerDeviceNodeSelection", 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.PerDeviceNodeSelection = &b - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SharedCounters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SharedCounters = append(m.SharedCounters, CounterSet{}) - if err := m.SharedCounters[len(m.SharedCounters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/go-controller/vendor/k8s.io/api/resource/v1alpha3/generated.proto b/go-controller/vendor/k8s.io/api/resource/v1alpha3/generated.proto index 103cafc6ad..e802a01439 100644 --- a/go-controller/vendor/k8s.io/api/resource/v1alpha3/generated.proto +++ b/go-controller/vendor/k8s.io/api/resource/v1alpha3/generated.proto @@ -62,8 +62,6 @@ message AllocatedDeviceStatus { // If the device has been configured according to the class and claim // config references, the `Ready` condition should be True. // - // Must not contain more than 8 entries. - // // +optional // +listType=map // +listMapKey=type @@ -113,64 +111,6 @@ message BasicDevice { // // +optional map capacity = 2; - - // ConsumesCounters defines a list of references to sharedCounters - // and the set of counters that the device will - // consume from those counter sets. - // - // There can only be a single entry per counterSet. - // - // The total number of device counter consumption entries - // must be <= 32. In addition, the total number in the - // entire ResourceSlice must be <= 1024 (for example, - // 64 devices with 16 counters each). - // - // +optional - // +listType=atomic - // +featureGate=DRAPartitionableDevices - repeated DeviceCounterConsumption consumesCounters = 3; - - // NodeName identifies the node where the device is available. - // - // Must only be set if Spec.PerDeviceNodeSelection is set to true. - // At most one of NodeName, NodeSelector and AllNodes can be set. - // - // +optional - // +oneOf=DeviceNodeSelection - // +featureGate=DRAPartitionableDevices - optional string nodeName = 4; - - // NodeSelector defines the nodes where the device is available. - // - // Must only be set if Spec.PerDeviceNodeSelection is set to true. - // At most one of NodeName, NodeSelector and AllNodes can be set. - // - // +optional - // +oneOf=DeviceNodeSelection - // +featureGate=DRAPartitionableDevices - optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 5; - - // AllNodes indicates that all nodes have access to the device. - // - // Must only be set if Spec.PerDeviceNodeSelection is set to true. - // At most one of NodeName, NodeSelector and AllNodes can be set. - // - // +optional - // +oneOf=DeviceNodeSelection - // +featureGate=DRAPartitionableDevices - optional bool allNodes = 6; - - // If specified, these are the driver-defined taints. - // - // The maximum number of taints is 4. - // - // This is an alpha field and requires enabling the DRADeviceTaints - // feature gate. - // - // +optional - // +listType=atomic - // +featureGate=DRADeviceTaints - repeated DeviceTaint taints = 7; } // CELDeviceSelector contains a CEL expression for selecting a device. @@ -230,42 +170,6 @@ message CELDeviceSelector { optional string expression = 1; } -// Counter describes a quantity associated with a device. -message Counter { - // Value defines how much of a certain device counter is available. - // - // +required - optional .k8s.io.apimachinery.pkg.api.resource.Quantity value = 1; -} - -// CounterSet defines a named set of counters -// that are available to be used by devices defined in the -// ResourceSlice. -// -// The counters are not allocatable by themselves, but -// can be referenced by devices. When a device is allocated, -// the portion of counters it uses will no longer be available for use -// by other devices. -message CounterSet { - // CounterSet is the name of the set from which the - // counters defined will be consumed. - // - // +required - optional string name = 1; - - // Counters defines the counters that will be consumed by the device. - // The name of each counter must be unique in that set and must be a DNS label. - // - // To ensure this uniqueness, capacities defined by the vendor - // must be listed without the driver name as domain prefix in - // their name. All others must be listed with their domain prefix. - // - // The maximum number of counters is 32. - // - // +required - map counters = 2; -} - // Device represents one individual hardware instance that can be selected based // on its attributes. Besides the name, exactly one field must be set. message Device { @@ -294,10 +198,6 @@ message DeviceAllocationConfiguration { // Requests lists the names of requests where the configuration applies. // If empty, its applies to all requests. // - // References to subrequests must include the name of the main request - // and may include the subrequest using the format
[/]. If just - // the main request is given, the configuration applies to all subrequests. - // // +optional // +listType=atomic repeated string requests = 2; @@ -384,10 +284,6 @@ message DeviceClaimConfiguration { // Requests lists the names of requests where the configuration applies. // If empty, it applies to all requests. // - // References to subrequests must include the name of the main request - // and may include the subrequest using the format
[/]. If just - // the main request is given, the configuration applies to all subrequests. - // // +optional // +listType=atomic repeated string requests = 1; @@ -472,10 +368,6 @@ message DeviceConstraint { // constraint. If this is not specified, this constraint applies to all // requests in this claim. // - // References to subrequests must include the name of the main request - // and may include the subrequest using the format
[/]. If just - // the main request is given, the constraint applies to all subrequests. - // // +optional // +listType=atomic repeated string requests = 1; @@ -498,30 +390,14 @@ message DeviceConstraint { optional string matchAttribute = 2; } -// DeviceCounterConsumption defines a set of counters that -// a device will consume from a CounterSet. -message DeviceCounterConsumption { - // CounterSet defines the set from which the - // counters defined will be consumed. - // - // +required - optional string counterSet = 1; - - // Counters defines the Counter that will be consumed by - // the device. - // - // The maximum number counters in a device is 32. - // In addition, the maximum number of all counters - // in all devices is 1024 (for example, 64 devices with - // 16 counters each). - // - // +required - map counters = 2; -} - // DeviceRequest is a request for devices required for a claim. // This is typically a request for a single resource like a device, but can // also ask for several identical devices. +// +// A DeviceClassName is currently required. Clients must check that it is +// indeed set. It's absence indicates that something changed in a way that +// is not supported by the client yet, in which case it must refuse to +// handle the request. message DeviceRequest { // Name can be used to reference this request in a pod.spec.containers[].resources.claims // entry and in a constraint of the claim. @@ -535,10 +411,7 @@ message DeviceRequest { // additional configuration and selectors to be inherited by this // request. // - // A class is required if no subrequests are specified in the - // firstAvailable list and no class can be set if subrequests - // are specified in the firstAvailable list. - // Which classes are available depends on the cluster. + // A class is required. Which classes are available depends on the cluster. // // Administrators may use this to restrict which devices may get // requested by only installing classes with selectors for permitted @@ -546,8 +419,7 @@ message DeviceRequest { // then administrators can create an empty DeviceClass for users // to reference. // - // +optional - // +oneOf=deviceRequestType + // +required optional string deviceClassName = 2; // Selectors define criteria which must be satisfied by a specific @@ -555,9 +427,6 @@ message DeviceRequest { // request. All selectors must be satisfied for a device to be // considered. // - // This field can only be set when deviceClassName is set and no subrequests - // are specified in the firstAvailable list. - // // +optional // +listType=atomic repeated DeviceSelector selectors = 3; @@ -570,17 +439,13 @@ message DeviceRequest { // count field. // // - All: This request is for all of the matching devices in a pool. - // At least one device must exist on the node for the allocation to succeed. // Allocation will fail if some devices are already allocated, // unless adminAccess is requested. // - // If AllocationMode is not specified, the default mode is ExactCount. If + // If AlloctionMode is not specified, the default mode is ExactCount. If // the mode is ExactCount and count is not specified, the default count is // one. Any other requests must specify this field. // - // This field can only be set when deviceClassName is set and no subrequests - // are specified in the firstAvailable list. - // // More modes may get added in the future. Clients must refuse to handle // requests with unknown modes. // @@ -590,9 +455,6 @@ message DeviceRequest { // Count is used only when the count mode is "ExactCount". Must be greater than zero. // If AllocationMode is ExactCount and this field is not specified, the default is one. // - // This field can only be set when deviceClassName is set and no subrequests - // are specified in the firstAvailable list. - // // +optional // +oneOf=AllocationMode optional int64 count = 5; @@ -603,9 +465,6 @@ message DeviceRequest { // all ordinary claims to the device with respect to access modes and // any resource allocations. // - // This field can only be set when deviceClassName is set and no subrequests - // are specified in the firstAvailable list. - // // This is an alpha field and requires enabling the DRAAdminAccess // feature gate. Admin access is disabled if this field is unset or // set to false, otherwise it is enabled. @@ -613,65 +472,13 @@ message DeviceRequest { // +optional // +featureGate=DRAAdminAccess optional bool adminAccess = 6; - - // FirstAvailable contains subrequests, of which exactly one will be - // satisfied by the scheduler to satisfy this request. It tries to - // satisfy them in the order in which they are listed here. So if - // there are two entries in the list, the scheduler will only check - // the second one if it determines that the first one cannot be used. - // - // This field may only be set in the entries of DeviceClaim.Requests. - // - // DRA does not yet implement scoring, so the scheduler will - // select the first set of devices that satisfies all the - // requests in the claim. And if the requirements can - // be satisfied on more than one node, other scheduling features - // will determine which node is chosen. This means that the set of - // devices allocated to a claim might not be the optimal set - // available to the cluster. Scoring will be implemented later. - // - // +optional - // +oneOf=deviceRequestType - // +listType=atomic - // +featureGate=DRAPrioritizedList - repeated DeviceSubRequest firstAvailable = 7; - - // If specified, the request's tolerations. - // - // Tolerations for NoSchedule are required to allocate a - // device which has a taint with that effect. The same applies - // to NoExecute. - // - // In addition, should any of the allocated devices get tainted - // with NoExecute after allocation and that effect is not tolerated, - // then all pods consuming the ResourceClaim get deleted to evict - // them. The scheduler will not let new pods reserve the claim while - // it has these tainted devices. Once all pods are evicted, the - // claim will get deallocated. - // - // The maximum number of tolerations is 16. - // - // This field can only be set when deviceClassName is set and no subrequests - // are specified in the firstAvailable list. - // - // This is an alpha field and requires enabling the DRADeviceTaints - // feature gate. - // - // +optional - // +listType=atomic - // +featureGate=DRADeviceTaints - repeated DeviceToleration tolerations = 8; } // DeviceRequestAllocationResult contains the allocation result for one request. message DeviceRequestAllocationResult { // Request is the name of the request in the claim which caused this - // device to be allocated. If it references a subrequest in the - // firstAvailable list on a DeviceRequest, this field must - // include both the name of the main request and the subrequest - // using the format
/. - // - // Multiple devices may have been allocated per request. + // device to be allocated. Multiple devices may have been allocated + // per request. // // +required optional string request = 1; @@ -712,19 +519,6 @@ message DeviceRequestAllocationResult { // +optional // +featureGate=DRAAdminAccess optional bool adminAccess = 5; - - // A copy of all tolerations specified in the request at the time - // when the device got allocated. - // - // The maximum number of tolerations is 16. - // - // This is an alpha field and requires enabling the DRADeviceTaints - // feature gate. - // - // +optional - // +listType=atomic - // +featureGate=DRADeviceTaints - repeated DeviceToleration tolerations = 6; } // DeviceSelector must have exactly one field set. @@ -736,262 +530,6 @@ message DeviceSelector { optional CELDeviceSelector cel = 1; } -// DeviceSubRequest describes a request for device provided in the -// claim.spec.devices.requests[].firstAvailable array. Each -// is typically a request for a single resource like a device, but can -// also ask for several identical devices. -// -// DeviceSubRequest is similar to Request, but doesn't expose the AdminAccess -// or FirstAvailable fields, as those can only be set on the top-level request. -// AdminAccess is not supported for requests with a prioritized list, and -// recursive FirstAvailable fields are not supported. -message DeviceSubRequest { - // Name can be used to reference this subrequest in the list of constraints - // or the list of configurations for the claim. References must use the - // format
/. - // - // Must be a DNS label. - // - // +required - optional string name = 1; - - // DeviceClassName references a specific DeviceClass, which can define - // additional configuration and selectors to be inherited by this - // subrequest. - // - // A class is required. Which classes are available depends on the cluster. - // - // Administrators may use this to restrict which devices may get - // requested by only installing classes with selectors for permitted - // devices. If users are free to request anything without restrictions, - // then administrators can create an empty DeviceClass for users - // to reference. - // - // +required - optional string deviceClassName = 2; - - // Selectors define criteria which must be satisfied by a specific - // device in order for that device to be considered for this - // request. All selectors must be satisfied for a device to be - // considered. - // - // +optional - // +listType=atomic - repeated DeviceSelector selectors = 3; - - // AllocationMode and its related fields define how devices are allocated - // to satisfy this request. Supported values are: - // - // - ExactCount: This request is for a specific number of devices. - // This is the default. The exact number is provided in the - // count field. - // - // - All: This request is for all of the matching devices in a pool. - // Allocation will fail if some devices are already allocated, - // unless adminAccess is requested. - // - // If AllocationMode is not specified, the default mode is ExactCount. If - // the mode is ExactCount and count is not specified, the default count is - // one. Any other requests must specify this field. - // - // More modes may get added in the future. Clients must refuse to handle - // requests with unknown modes. - // - // +optional - optional string allocationMode = 4; - - // Count is used only when the count mode is "ExactCount". Must be greater than zero. - // If AllocationMode is ExactCount and this field is not specified, the default is one. - // - // +optional - // +oneOf=AllocationMode - optional int64 count = 5; - - // If specified, the request's tolerations. - // - // Tolerations for NoSchedule are required to allocate a - // device which has a taint with that effect. The same applies - // to NoExecute. - // - // In addition, should any of the allocated devices get tainted - // with NoExecute after allocation and that effect is not tolerated, - // then all pods consuming the ResourceClaim get deleted to evict - // them. The scheduler will not let new pods reserve the claim while - // it has these tainted devices. Once all pods are evicted, the - // claim will get deallocated. - // - // The maximum number of tolerations is 16. - // - // This is an alpha field and requires enabling the DRADeviceTaints - // feature gate. - // - // +optional - // +listType=atomic - // +featureGate=DRADeviceTaints - repeated DeviceToleration tolerations = 7; -} - -// The device this taint is attached to has the "effect" on -// any claim which does not tolerate the taint and, through the claim, -// to pods using the claim. -message DeviceTaint { - // The taint key to be applied to a device. - // Must be a label name. - // - // +required - optional string key = 1; - - // The taint value corresponding to the taint key. - // Must be a label value. - // - // +optional - optional string value = 2; - - // The effect of the taint on claims that do not tolerate the taint - // and through such claims on the pods using them. - // Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for - // nodes is not valid here. - // - // +required - optional string effect = 3; - - // TimeAdded represents the time at which the taint was added. - // Added automatically during create or update if not set. - // - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4; -} - -// DeviceTaintRule adds one taint to all devices which match the selector. -// This has the same effect as if the taint was specified directly -// in the ResourceSlice by the DRA driver. -message DeviceTaintRule { - // Standard object metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec specifies the selector and one taint. - // - // Changing the spec automatically increments the metadata.generation number. - optional DeviceTaintRuleSpec spec = 2; -} - -// DeviceTaintRuleList is a collection of DeviceTaintRules. -message DeviceTaintRuleList { - // Standard list metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of DeviceTaintRules. - repeated DeviceTaintRule items = 2; -} - -// DeviceTaintRuleSpec specifies the selector and one taint. -message DeviceTaintRuleSpec { - // DeviceSelector defines which device(s) the taint is applied to. - // All selector criteria must be satified for a device to - // match. The empty selector matches all devices. Without - // a selector, no devices are matches. - // - // +optional - optional DeviceTaintSelector deviceSelector = 1; - - // The taint that gets applied to matching devices. - // - // +required - optional DeviceTaint taint = 2; -} - -// DeviceTaintSelector defines which device(s) a DeviceTaintRule applies to. -// The empty selector matches all devices. Without a selector, no devices -// are matched. -message DeviceTaintSelector { - // If DeviceClassName is set, the selectors defined there must be - // satisfied by a device to be selected. This field corresponds - // to class.metadata.name. - // - // +optional - optional string deviceClassName = 1; - - // If driver is set, only devices from that driver are selected. - // This fields corresponds to slice.spec.driver. - // - // +optional - optional string driver = 2; - - // If pool is set, only devices in that pool are selected. - // - // Also setting the driver name may be useful to avoid - // ambiguity when different drivers use the same pool name, - // but this is not required because selecting pools from - // different drivers may also be useful, for example when - // drivers with node-local devices use the node name as - // their pool name. - // - // +optional - optional string pool = 3; - - // If device is set, only devices with that name are selected. - // This field corresponds to slice.spec.devices[].name. - // - // Setting also driver and pool may be required to avoid ambiguity, - // but is not required. - // - // +optional - optional string device = 4; - - // Selectors contains the same selection criteria as a ResourceClaim. - // Currently, CEL expressions are supported. All of these selectors - // must be satisfied. - // - // +optional - // +listType=atomic - repeated DeviceSelector selectors = 5; -} - -// The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches -// the triple using the matching operator . -message DeviceToleration { - // Key is the taint key that the toleration applies to. Empty means match all taint keys. - // If the key is empty, operator must be Exists; this combination means to match all values and all keys. - // Must be a label name. - // - // +optional - optional string key = 1; - - // Operator represents a key's relationship to the value. - // Valid operators are Exists and Equal. Defaults to Equal. - // Exists is equivalent to wildcard for value, so that a ResourceClaim can - // tolerate all taints of a particular category. - // - // +optional - // +default="Equal" - optional string operator = 2; - - // Value is the taint value the toleration matches to. - // If the operator is Exists, the value must be empty, otherwise just a regular string. - // Must be a label value. - // - // +optional - optional string value = 3; - - // Effect indicates the taint effect to match. Empty means match all taint effects. - // When specified, allowed values are NoSchedule and NoExecute. - // - // +optional - optional string effect = 4; - - // TolerationSeconds represents the period of time the toleration (which must be - // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - // it is not set, which means tolerate the taint forever (do not evict). Zero and - // negative values will be treated as 0 (evict immediately) by the system. - // If larger than zero, the time when the pod needs to be evicted is calculated as