diff --git a/LICENSES/vendor/github.com/projectcalico/libcalico-go/LICENSE b/LICENSES/vendor/github.com/projectcalico/api/LICENSE similarity index 98% rename from LICENSES/vendor/github.com/projectcalico/libcalico-go/LICENSE rename to LICENSES/vendor/github.com/projectcalico/api/LICENSE index 388b9162e..155ebfbcb 100644 --- a/LICENSES/vendor/github.com/projectcalico/libcalico-go/LICENSE +++ b/LICENSES/vendor/github.com/projectcalico/api/LICENSE @@ -1,4 +1,4 @@ -= vendor/github.com/projectcalico/libcalico-go licensed under: = += vendor/github.com/projectcalico/api licensed under: = Apache License @@ -177,4 +177,4 @@ of your accepting any such warranty or additional liability. -= vendor/github.com/projectcalico/libcalico-go/LICENSE 1dece7821bf3fd70fe1309eaa37d52a2 += vendor/github.com/projectcalico/api/LICENSE 1dece7821bf3fd70fe1309eaa37d52a2 diff --git a/LICENSES/vendor/github.com/projectcalico/kube-controllers/LICENSE b/LICENSES/vendor/github.com/projectcalico/calico/LICENSE similarity index 88% rename from LICENSES/vendor/github.com/projectcalico/kube-controllers/LICENSE rename to LICENSES/vendor/github.com/projectcalico/calico/LICENSE index 6b3dd74be..afc7fdcca 100644 --- a/LICENSES/vendor/github.com/projectcalico/kube-controllers/LICENSE +++ b/LICENSES/vendor/github.com/projectcalico/calico/LICENSE @@ -1,4 +1,5 @@ -= vendor/github.com/projectcalico/kube-controllers licensed under: = += vendor/github.com/projectcalico/calico licensed under: = + Apache License Version 2.0, January 2004 @@ -175,31 +176,5 @@ 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. - -= vendor/github.com/projectcalico/kube-controllers/LICENSE e3fc50a88d0a364313df4b21ef20c29e += vendor/github.com/projectcalico/calico/LICENSE 1dece7821bf3fd70fe1309eaa37d52a2 diff --git a/go.mod b/go.mod index c7384eadb..a56fdd723 100644 --- a/go.mod +++ b/go.mod @@ -53,15 +53,15 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.26.0 + github.com/onsi/gomega v1.27.1 github.com/open-policy-agent/opa v0.49.0 github.com/opencontainers/go-digest v1.0.0 github.com/opensearch-project/opensearch-go v1.1.0 github.com/opensearch-project/opensearch-go/v2 v2.0.0 github.com/operator-framework/helm-operator-plugins v0.0.11 github.com/pkg/errors v0.9.1 - github.com/projectcalico/kube-controllers v3.8.8+incompatible - github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056 + github.com/projectcalico/api v0.0.0 + github.com/projectcalico/calico v3.25.0+incompatible github.com/prometheus-community/prom-label-proxy v0.6.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0 @@ -72,7 +72,7 @@ require ( github.com/speps/go-hashids v2.0.0+incompatible github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.13.0 + github.com/spf13/viper v1.14.0 github.com/stretchr/testify v1.8.1 golang.org/x/crypto v0.5.0 golang.org/x/oauth2 v0.4.0 @@ -95,7 +95,7 @@ require ( k8s.io/code-generator v0.26.1 k8s.io/component-base v0.26.1 k8s.io/klog/v2 v2.90.0 - k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 + k8s.io/kube-openapi v0.0.0-20230224204730-66828de6f33b k8s.io/kubectl v0.26.1 k8s.io/metrics v0.26.1 k8s.io/utils v0.0.0-20230202215443-34013725500c @@ -131,7 +131,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect github.com/containerd/containerd v1.6.16 // indirect - github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.4.0 // indirect github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/deckarep/golang-set v1.8.0 // indirect @@ -169,7 +169,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.0.1 // indirect + github.com/google/btree v1.1.2 // indirect github.com/google/cel-go v0.12.6 // indirect github.com/google/gnostic v0.6.9 // indirect github.com/google/go-querystring v1.1.0 // indirect @@ -255,9 +255,9 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xlab/treeprint v1.1.0 // indirect github.com/yashtewari/glob-intersection v0.1.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.5 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect - go.etcd.io/etcd/client/v3 v3.5.5 // indirect + go.etcd.io/etcd/api/v3 v3.5.7 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect + go.etcd.io/etcd/client/v3 v3.5.7 // indirect go.mongodb.org/mongo-driver v1.11.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.37.0 // indirect @@ -272,14 +272,14 @@ require ( go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/goleak v1.2.0 // indirect - go.uber.org/multierr v1.7.0 // indirect + go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/exp v0.0.0-20230124195608-d38c7dcee874 // indirect - golang.org/x/net v0.5.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/term v0.4.0 // indirect - golang.org/x/text v0.6.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.5.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect @@ -465,8 +465,8 @@ replace ( github.com/pkg/errors => github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib => github.com/pmezard/go-difflib v1.0.0 github.com/pquerna/cachecontrol => github.com/pquerna/cachecontrol v0.1.0 - github.com/projectcalico/kube-controllers => github.com/projectcalico/kube-controllers v3.8.8+incompatible - github.com/projectcalico/libcalico-go => github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056 + github.com/projectcalico/api => github.com/kubesphere/calico/api v0.0.0-20230227071013-a73515ddc939 // v3.25.0 + github.com/projectcalico/calico => github.com/kubesphere/calico v0.0.0-20230227071013-a73515ddc939 // v3.25.0 github.com/prometheus-community/prom-label-proxy => github.com/prometheus-community/prom-label-proxy v0.6.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring => github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 github.com/prometheus-operator/prometheus-operator/pkg/client => github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0 @@ -559,6 +559,8 @@ replace ( k8s.io/client-go => k8s.io/client-go v0.26.1 k8s.io/code-generator => k8s.io/code-generator v0.26.1 k8s.io/component-base => k8s.io/component-base v0.26.1 + k8s.io/component-helpers => k8s.io/component-helpers v0.21.2 + k8s.io/cri-api => k8s.io/cri-api v0.26.1 k8s.io/gengo => k8s.io/gengo v0.0.0-20220902162205-c0856e24416d k8s.io/klog/v2 => k8s.io/klog/v2 v2.90.0 k8s.io/kms => k8s.io/kms v0.26.1 diff --git a/go.sum b/go.sum index c6c64b8ab..65b2b2bfb 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,5 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= +bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -251,6 +252,7 @@ github.com/Masterminds/squirrel v1.5.3 h1:YPpoceAcxuzIljlr5iWpNKaql7hLeG1KLSrhvd github.com/Masterminds/squirrel v1.5.3/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= github.com/Microsoft/hcsshim v0.8.20/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim v0.9.6 h1:VwnDOgLeoi2du6dAznfmspNqTiwczvjv4K7NxuY9jsY= @@ -279,6 +281,7 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alessio/shellescape v1.2.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= github.com/andybalholm/cascadia v1.0.0 h1:hOCXnnZ5A+3eVDX8pvgl4kofXv2ELss0bKcqRySc45o= github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= @@ -306,6 +309,7 @@ github.com/aws/aws-sdk-go v1.44.187/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8 github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/bazelbuild/rules_go v0.30.0/go.mod h1:MC23Dc/wkXEyk3Wpq6lCqz0ZAYOZDw2DR5y3N1q2i7M= github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -324,6 +328,7 @@ github.com/bugsnag/bugsnag-go v1.5.3 h1:yeRUT3mUE13jL1tGwvoQsKdVbAsQx9AJ+fqahKve github.com/bugsnag/panicwrap v1.2.0 h1:OzrKrRvXis8qEvOkfcxNcYbOd2O7xXS2nnKMEMABFQA= github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= +github.com/cenkalti/backoff v1.1.1-0.20190506075156-2146c9339422/go.mod h1:b6Nc7NRH5C4aCISLry0tLnTjcuTEvoiqcWDdsU0sOGM= github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -349,6 +354,7 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= @@ -366,44 +372,48 @@ github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoC github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/containerd v1.6.16 h1:0H5xH6ABsN7XTrxIAKxFpBkFCBtrZ/OSORhCpUnHjrc= github.com/containerd/containerd v1.6.16/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= +github.com/containerd/continuity v0.2.1/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= github.com/containerd/go-cni v1.1.3/go.mod h1:Rflh2EJ/++BA2/vY5ao3K6WJRR/bZKsX123aPk+kUtA= github.com/containerd/go-cni v1.1.6/go.mod h1:BWtoWl5ghVymxu6MBjg79W9NZrCRyHIdUtk4cauMe34= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= github.com/containerd/imgcrypt v1.1.4/go.mod h1:LorQnPtzL/T0IyCeftcsMEO7AqxUDbdO8j/tSUpgxvo= github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= github.com/containerd/stargz-snapshotter/estargz v0.4.1 h1:5e7heayhB7CcgdTkqfZqrNaNv15gABwr3Q2jBTbLlt4= github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= 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 v1.1.1/go.mod h1:Sr5TH/eBsGLXK/h71HeLfX19sZPp3ry5uHSkI4LPxV8= github.com/containers/ocicrypt v1.1.3/go.mod h1:xpdkbVAuaH3WzbEabUd5yDsl9SwJA5pABH85425Es2g= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.8+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q= github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU= github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -428,7 +438,6 @@ github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/dgraph-io/badger/v3 v3.2103.5 h1:ylPa6qzbjYRQMU6jokoj4wzcaweHylt//CH0AKt0akg= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= -github.com/dgrijalva/jwt-go v3.0.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= @@ -497,6 +506,7 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= @@ -562,10 +572,10 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y= github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.0.0-20170327191703-71201497bace/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-redis/redis v6.15.2+incompatible h1:9SpNVG76gr6InJGxoZ6IuuxaCOQwDAhzyXg+Bs+0Sb4= github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= @@ -603,6 +613,7 @@ github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godror/godror v0.24.2/go.mod h1:wZv/9vPiUib6tkoDl+AZ/QLf5YZgMravZ7jxH2eQWAE= +github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI= github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= @@ -669,10 +680,13 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/pprof v0.0.0-20230111200839-76d1ae5aea2b/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2/go.mod h1:Tv1PlzqC9t8wNnpPdctvtSUOPUUg4SHeE6vR1Ir2hmg= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/subcommands v1.0.2-0.20190508160503-636abe8753b8/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -689,6 +703,7 @@ github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= @@ -715,7 +730,6 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaW github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.6/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1 h1:/sDbPb60SusIXjiJGYLUoS/rAQurQmvGWmwn2bBPM9c= @@ -785,6 +799,7 @@ github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOc github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= 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= +github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -805,11 +820,12 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -824,8 +840,8 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= -github.com/kelseyhightower/envconfig v0.0.0-20180517194557-dd1402a4d99d h1:Tqg6yg0as+P38tbKytv9/yk+ifNq0CrvjlgADEniKog= -github.com/kelseyhightower/envconfig v0.0.0-20180517194557-dd1402a4d99d/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= +github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ= @@ -845,12 +861,17 @@ github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NB github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.4-0.20190131011033-7dc38fb350b1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= 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/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 h1:nHHjmvjitIiyPlUHk/ofpgvBcNcawJLtf4PYHORLjAA= github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0/go.mod h1:YBCo4DoEeDndqvAn6eeu0vWM7QdXmHEeI9cFWplmBys= +github.com/kubesphere/calico v0.0.0-20230227071013-a73515ddc939 h1:qAVH1UISSGjbexipm9KNuy3e6QwIDgGl+TUtJE9l1Pg= +github.com/kubesphere/calico v0.0.0-20230227071013-a73515ddc939/go.mod h1:aduNLznhao4Z5fIspL6eHa2mdaJFMUHqvnnyCptkjSY= +github.com/kubesphere/calico/api v0.0.0-20230227071013-a73515ddc939 h1:1H0jLl1BLWcXEWHDRwdEb8/CCQlXCWoy9MRbAWhcIUk= +github.com/kubesphere/calico/api v0.0.0-20230227071013-a73515ddc939/go.mod h1:Avoy1rTN1GfeisnHGf3WhQNqR+BuGOcwfNFsdWX6OHE= github.com/kubesphere/kubefed v0.0.0-20230207032540-cdda80892665 h1:PUdt2R0iSVcDT9M0m3gSYJjubYkrVc40WBjy3itz2g0= github.com/kubesphere/kubefed v0.0.0-20230207032540-cdda80892665/go.mod h1:7SrSdUSNdngMA0FxRNP5B2LHR8LtROKCLONjB8D6X7A= github.com/kubesphere/pvc-autoresizer v0.3.0 h1:1abWUF6xo2zlMlfeRsuafFzXo9e1grS+sCYuw3qUlXM= @@ -864,8 +885,8 @@ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= -github.com/leodido/go-urn v0.0.0-20181204092800-a67a23e1c1af/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= @@ -885,6 +906,7 @@ github.com/markbates/oncer v1.0.0 h1:E83IaVAHygyndzPimgUYJjbshhDTALZyXxvk9FOlQRY github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI= github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= @@ -901,6 +923,11 @@ github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4 github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= +github.com/mdlayher/genetlink v1.2.0/go.mod h1:ra5LDov2KrUCZJiAtEvXXZBxGMInICMXIwshlJ+qRxQ= +github.com/mdlayher/netlink v1.6.0/go.mod h1:0o3PlBmGst1xve7wQ7j/hwpNaFaH4qCRyWCdcZk8/vA= +github.com/mdlayher/netlink v1.6.2/go.mod h1:O1HXX2sIWSMJ3Qn1BYZk1yZM+7iMki/uYGGiwGyq/iU= +github.com/mdlayher/socket v0.1.1/go.mod h1:mYV5YIZAfHh4dzDVzI8x8tWLWCliuX8Mon5Awbj+qDs= +github.com/mdlayher/socket v0.2.3/go.mod h1:bz12/FozYNH/VbvC3q7TRIK/Y6dH1kCKsXaUeXi/FmY= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQovz3p+BiQ81Jy845xSMu2CWKuXsXuUM= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -910,6 +937,7 @@ github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0 github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= @@ -944,6 +972,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/mohae/deepcopy v0.0.0-20170308212314-bb9b5e7adda9/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= @@ -991,11 +1020,14 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc90/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20211123151946-c2389c3cb60a/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opencontainers/selinux v1.10.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= @@ -1025,12 +1057,12 @@ github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6 github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1040,18 +1072,11 @@ github.com/poy/onpar v0.0.0-20190519213022-ee068f8ea4d1 h1:oL4IBbcqwhhNWh31bjOX8 github.com/poy/onpar v0.0.0-20190519213022-ee068f8ea4d1/go.mod h1:nSbFQvMj97ZyhFRSJYtut+msi4sOY6zJDGCdSc+/rZU= github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= -github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/projectcalico/go-json v0.0.0-20161128004156-6219dc7339ba h1:aaF2byUCZhzszHsfPEr2M3qcU4ibtD/yk/il2R7T1PU= github.com/projectcalico/go-json v0.0.0-20161128004156-6219dc7339ba/go.mod h1:q8EdCgBdMQzgiX/uk4GXLWLk+gIHd1a7mWUAamJKDb4= -github.com/projectcalico/go-yaml v0.0.0-20161201183616-955bc3e451ef h1:Di9BaA9apb6DEstin8RdhKmlzQG76UMbmjPzjCVkMpc= -github.com/projectcalico/go-yaml v0.0.0-20161201183616-955bc3e451ef/go.mod h1:1Ra2BftSa7Go38Gbq1q0bfmBFSSgUv+Cdc3SY8IL/C0= -github.com/projectcalico/go-yaml-wrapper v0.0.0-20161127220527-598e54215bee h1:yVWsNSlAuYoJ0CznHsYRPiFgsotoj07k00k5rQvGlHM= -github.com/projectcalico/go-yaml-wrapper v0.0.0-20161127220527-598e54215bee/go.mod h1:UgC0aTQ2KMDxlX3lU/stndk7DMUBJqzN40yFiILHgxc= -github.com/projectcalico/kube-controllers v3.8.8+incompatible h1:ZbCg0wJ+gd7i81CB6vOASiUN//oR4ZBl+wEdy0Vk1uI= -github.com/projectcalico/kube-controllers v3.8.8+incompatible/go.mod h1:ZEafKeKN5wiNARRw1LZP8l10uEfp04C7redU848MMZw= -github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056 h1:qs29Hus4cY8XlsmMLUsSAHT0metSTyqu2Tnpuwy5dkM= -github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056/go.mod h1:tUt8rirmysRy7TR1S80XDriwBK1z2igwwX79lnUrSf4= +github.com/projectcalico/go-yaml-wrapper v0.0.0-20191112210931-090425220c54 h1:Jt2Pic9dxgJisekm8q2WV9FaWxUJhhRfwHSP640drww= +github.com/projectcalico/go-yaml-wrapper v0.0.0-20191112210931-090425220c54/go.mod h1:UgC0aTQ2KMDxlX3lU/stndk7DMUBJqzN40yFiILHgxc= github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTzJdieEwiSko+f7GuPCLjFkI= github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 h1:efsW3CfymG5bZUpeIsYfdihB33YItCn7uHBOEbnHQG8= @@ -1062,7 +1087,6 @@ github.com/prometheus/alertmanager v0.25.0 h1:vbXKUR6PYRiZPRIKfmXaG+dmCKG52RtPL4 github.com/prometheus/alertmanager v0.25.0/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= @@ -1084,7 +1108,6 @@ github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqn github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -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.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= @@ -1102,7 +1125,6 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12 h1:Aaz4T7dZp7cB2cv7D/tGtRdSMh48sRaDYr7Jh0HV4qQ= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= @@ -1122,7 +1144,6 @@ github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0 github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 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/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= @@ -1158,29 +1179,30 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +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= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v0.0.0-20171019201919-bdcc60b419d1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= +github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v1.0.1-0.20190930145447-2ec5bdc52b86/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= @@ -1202,12 +1224,12 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/yashtewari/glob-intersection v0.1.0 h1:6gJvMYQlTDOL3dMsPF6J0+26vwX9MB8/1q3uAdhmTrg= github.com/yashtewari/glob-intersection v0.1.0/go.mod h1:LK7pIC3piUjovexikBbJ26Yml7g8xa5bsjfx2v1fwok= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940 h1:p7OofyZ509h8DmPLh8Hn+EIIZm/xYhdZHJ9GnXHdr6U= github.com/yvasiyarov/gorelic v0.0.7 h1:4DTF1WOM2ZZS/xMOkTFBOcb6XiHu/PKn3rVo6dbewQE= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9 h1:AsFN8kXcCVkUFHyuzp1FtYbzp1nCO/H6+1uPSGEyPzM= github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= @@ -1216,8 +1238,9 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6 go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= -go.etcd.io/etcd/client/v2 v2.305.5 h1:DktRP60//JJpnPC0VBymAN/7V71GHMdjDCBt4ZPXDjI= go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= +go.etcd.io/etcd/client/v2 v2.305.7 h1:AELPkjNR3/igjbO7CjyF1fPuVPjrblliiKj+Y6xSGOU= +go.etcd.io/etcd/client/v2 v2.305.7/go.mod h1:GQGT5Z3TBuAQGvgPfhR7VPySu/SudxmEkRq9BgzFU6s= go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI= go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= go.etcd.io/etcd/pkg/v3 v3.5.5 h1:Ablg7T7OkR+AeeeU32kdVhw/AGDsitkKPl7aW73ssjU= @@ -1315,6 +1338,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -1341,6 +1365,9 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI= +golang.zx2c4.com/wireguard v0.0.0-20220920152132-bb719d3a6e2c/go.mod h1:enML0deDxY1ux+B6ANGiwtg0yAJi1rctkTpcHNAVPyg= +golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230215201556-9c5414ab4bde/go.mod h1:mQqgjkW8GQQcJQsbBvK890TKqUK1DfKWkuBGbOkuMHQ= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= @@ -1411,7 +1438,6 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -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/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= @@ -1421,20 +1447,19 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 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/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v9 v9.27.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= 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.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= @@ -1443,7 +1468,6 @@ gopkg.in/src-d/go-git-fixtures.v3 v3.5.0 h1:ivZFOIltbce2Mo8IjzUHAFoq/IylO9WHhNOA gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= gopkg.in/src-d/go-git.v4 v4.13.1 h1:SRtFyV8Kxc0UP7aCHcijOMQGPxHSmMOPrzulQWolkYE= gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= -gopkg.in/tchap/go-patricia.v2 v2.2.6/go.mod h1:GjlIhdM7u6RWBtv58iEuqTR4NOShCtHo2EeySnNeNfs= gopkg.in/telebot.v3 v3.1.2/go.mod h1:GJKwwWqp9nSkIVN51eRKU78aB5f5OnQuWdwiIZfPbko= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1457,6 +1481,7 @@ gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5/go.mod h1:TIvkJD0sxe8pIob3p6T8IzxXunlp6yfgktvTNp+DGNM= helm.sh/helm/v3 v3.11.1 h1:cmL9fFohOoNQf+wnp2Wa0OhNFH0KFnSzEkVxi3fcc3I= helm.sh/helm/v3 v3.11.1/go.mod h1:z/Bu/BylToGno/6dtNGuSmjRqxKq5gaH+FU0BPO+AQ8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1488,7 +1513,7 @@ k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/cri-api v0.25.0/go.mod h1:J1rAyQkSJ2Q6I+aBMOVgg2/cbbebso6FNa0UagiR0kc= +k8s.io/cri-api v0.26.1/go.mod h1:I5TGOn/ziMzqIcUvsYZzVE8xDAB1JBkvcwvR0yDreuw= k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= @@ -1529,6 +1554,7 @@ sigs.k8s.io/controller-tools v0.11.1/go.mod h1:dm4bN3Yp1ZP+hbbeSLF8zOEHsI1/bf15u sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.8.1/go.mod h1:oNKTxUVPYkV9lWzY6CVMNluVq8cBsyq+UgPJdvA3uu4= +sigs.k8s.io/kind v0.17.0/go.mod h1:Qqp8AiwOlMZmJWs37Hgs31xcbiYXjtXlRBSftcnZXQk= sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= diff --git a/pkg/controller/network/ippool/ippool_controller.go b/pkg/controller/network/ippool/ippool_controller.go index f64e06f83..00f95cb8a 100644 --- a/pkg/controller/network/ippool/ippool_controller.go +++ b/pkg/controller/network/ippool/ippool_controller.go @@ -22,7 +22,7 @@ import ( "reflect" "time" - cnet "github.com/projectcalico/libcalico-go/lib/net" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/controller/network/nsnetworkpolicy/provider/fake_ns.go b/pkg/controller/network/nsnetworkpolicy/provider/fake_ns.go index 86a0582b9..6b8bab404 100644 --- a/pkg/controller/network/nsnetworkpolicy/provider/fake_ns.go +++ b/pkg/controller/network/nsnetworkpolicy/provider/fake_ns.go @@ -19,9 +19,9 @@ package provider import ( "fmt" - "github.com/projectcalico/kube-controllers/pkg/converter" - api "github.com/projectcalico/libcalico-go/lib/apis/v3" - constants "github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion" + api "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + "github.com/projectcalico/calico/kube-controllers/pkg/converter" + constants "github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion" v1 "k8s.io/api/networking/v1" ) diff --git a/pkg/controller/network/nsnetworkpolicy/provider/ns_k8s.go b/pkg/controller/network/nsnetworkpolicy/provider/ns_k8s.go index 97204ecb4..72886a851 100644 --- a/pkg/controller/network/nsnetworkpolicy/provider/ns_k8s.go +++ b/pkg/controller/network/nsnetworkpolicy/provider/ns_k8s.go @@ -24,7 +24,7 @@ import ( "sync" "time" - rcache "github.com/projectcalico/kube-controllers/pkg/cache" + rcache "github.com/projectcalico/calico/kube-controllers/pkg/cache" netv1 "k8s.io/api/networking/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/simple/client/network/ippool/calico/provider.go b/pkg/simple/client/network/ippool/calico/provider.go index 15673d975..1b8d80588 100644 --- a/pkg/simple/client/network/ippool/calico/provider.go +++ b/pkg/simple/client/network/ippool/calico/provider.go @@ -26,9 +26,9 @@ import ( k8sinformers "k8s.io/client-go/informers" - v3 "github.com/projectcalico/libcalico-go/lib/apis/v3" - "github.com/projectcalico/libcalico-go/lib/backend/model" - cnet "github.com/projectcalico/libcalico-go/lib/net" + v3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + "github.com/projectcalico/calico/libcalico-go/lib/backend/model" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/simple/client/network/ippool/ipam/ipam.go b/pkg/simple/client/network/ippool/ipam/ipam.go index 84cf884c0..69e0d7877 100644 --- a/pkg/simple/client/network/ippool/ipam/ipam.go +++ b/pkg/simple/client/network/ippool/ipam/ipam.go @@ -26,8 +26,8 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types" cnitypes040 "github.com/containernetworking/cni/pkg/types/040" "github.com/davecgh/go-spew/spew" - cnet "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/set" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" + "github.com/projectcalico/calico/libcalico-go/lib/set" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/staging/src/kubesphere.io/api/go.mod b/staging/src/kubesphere.io/api/go.mod index b2afde39a..5e8451f0c 100644 --- a/staging/src/kubesphere.io/api/go.mod +++ b/staging/src/kubesphere.io/api/go.mod @@ -6,19 +6,20 @@ go 1.19 require ( github.com/go-logr/logr v1.2.3 - github.com/onsi/gomega v1.26.0 - github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056 + github.com/onsi/gomega v1.27.1 + github.com/projectcalico/api v0.0.0 + github.com/projectcalico/calico v3.25.0+incompatible github.com/prometheus/common v0.39.0 github.com/prometheus/prometheus v0.42.0 github.com/robfig/cron/v3 v3.0.1 - golang.org/x/net v0.5.0 + golang.org/x/net v0.7.0 gopkg.in/yaml.v3 v3.0.1 istio.io/api v0.0.0-20201113182140-d4b7e3fc2b44 k8s.io/api v0.26.1 k8s.io/apiextensions-apiserver v0.26.1 k8s.io/apimachinery v0.26.1 k8s.io/client-go v12.0.0+incompatible - k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 + k8s.io/kube-openapi v0.0.0-20230224204730-66828de6f33b sigs.k8s.io/application v0.8.4-0.20201016185654-c8e2959e57a0 sigs.k8s.io/controller-runtime v0.14.4 ) @@ -53,7 +54,6 @@ require ( github.com/google/uuid v1.3.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-hclog v1.2.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -67,7 +67,6 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/oklog/ulid v1.3.1 // indirect - github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/ginkgo/v2 v2.8.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -83,22 +82,20 @@ require ( go.opentelemetry.io/otel/trace v1.11.2 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/goleak v1.2.0 // indirect - go.uber.org/multierr v1.7.0 // indirect + go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.5.0 // indirect golang.org/x/exp v0.0.0-20230124195608-d38c7dcee874 // indirect - golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect golang.org/x/oauth2 v0.4.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/term v0.4.0 // indirect - golang.org/x/text v0.6.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/grpc v1.52.3 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect istio.io/gogo-genproto v0.0.0-20201113182723-5b8563d8a012 // indirect k8s.io/component-base v0.26.1 // indirect @@ -110,12 +107,24 @@ require ( ) replace ( + github.com/coreos/go-semver => github.com/coreos/go-semver v0.3.0 + github.com/onsi/gomega => github.com/onsi/gomega v1.26.0 + github.com/projectcalico/api => github.com/kubesphere/calico/api v0.0.0-20230227071013-a73515ddc939 // v3.25.0 + github.com/projectcalico/calico => github.com/kubesphere/calico v0.0.0-20230227071013-a73515ddc939 // v3.25.0 + github.com/spf13/viper => github.com/spf13/viper v1.13.0 + go.etcd.io/etcd/api/v3 => go.etcd.io/etcd/api/v3 v3.5.5 + go.etcd.io/etcd/client/pkg/v3 => go.etcd.io/etcd/client/pkg/v3 v3.5.5 + go.etcd.io/etcd/client/v3 => go.etcd.io/etcd/client/v3 v3.5.5 + go.uber.org/multierr => go.uber.org/multierr v1.7.0 + golang.org/x/net => golang.org/x/net v0.5.0 golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a golang.org/x/sync => golang.org/x/sync v0.0.0-20190423024810-112230192c58 golang.org/x/sys => golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d golang.org/x/term => golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 + golang.org/x/text => golang.org/x/text v0.6.0 golang.org/x/time => golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 golang.org/x/tools => golang.org/x/tools v0.0.0-20190710153321-831012c29e42 k8s.io/client-go => k8s.io/client-go v0.26.1 + k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 kubesphere.io/api => ../api ) diff --git a/staging/src/kubesphere.io/api/go.sum b/staging/src/kubesphere.io/api/go.sum index e09e0fabe..c2d88bb8b 100644 --- a/staging/src/kubesphere.io/api/go.sum +++ b/staging/src/kubesphere.io/api/go.sum @@ -1,5 +1,59 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +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.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +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= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= @@ -12,14 +66,13 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -32,8 +85,12 @@ github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8V github.com/alessio/shellescape v1.2.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -55,39 +112,37 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc h1:PYXxkRUBGUMa5xgMVMDl62vEklZvKpVaxQeN9ie7Hfk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.8+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= 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= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 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/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/dgrijalva/jwt-go v3.0.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.95.0 h1:S48/byPKui7RHZc1wYEPfRvkcEvToADNb5I3guu95xg= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= @@ -102,10 +157,9 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.11.2-0.20200112161605-a7c079c43d51+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= @@ -113,12 +167,15 @@ github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRr github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 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/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/go-control-plane v0.10.3 h1:xdCVXxEe0Y3FQith+0cj2irwZudqGYvecuLB1HtdexY= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= -github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -129,16 +186,22 @@ github.com/evanphx/json-patch/v5 v5.0.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2Vvl github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 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= @@ -167,7 +230,6 @@ github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2 github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= @@ -175,12 +237,13 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.4-0.20191224164422-1f9748e5f45e/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -191,7 +254,6 @@ github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCs github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= @@ -200,29 +262,26 @@ github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pL github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= -github.com/go-playground/universal-translator v0.0.0-20170327191703-71201497bace/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-resty/resty/v2 v2.5.0 h1:WFb5bD49/85PO7WgAjZ+/TJQ+Ty1XOcWEfD1zIFCM1c= github.com/go-resty/resty/v2 v2.5.0/go.mod h1:B88+xCTEwvfD94NOuE6GS1wMlnoKNY8eEiNizfNwOwA= 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-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= -github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -232,15 +291,24 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -251,13 +319,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/addlicense v0.0.0-20200906110928-a0294312aa76/go.mod h1:EMjYTRimagHs1FwlIqKyX3wAM0u3rA+McvlIIWmSamA= -github.com/google/btree v0.0.0-20161005200959-925471ac9e21/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= @@ -266,29 +334,60 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= 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= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v1.1.1 h1:MuGyqbSxiuVBqkPZ3+Nhbytk1xZxhmfCB2Rg1cJWFWM= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -297,34 +396,56 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= 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.9.6/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.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/api v1.18.0 h1:R7PPNzTCeN6VuQNDwwhZWJvzCtGSrNpJqfb22h3yH9g= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +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/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/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= 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.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/nomad/api v0.0.0-20230124213148-69fd1a0e4bf7 h1:XOdd3JHyeQnBRxotBo9ibxBFiYGuYhQU25s/YeV2cTU= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hetznercloud/hcloud-go v1.39.0 h1:RUlzI458nGnPR6dlcZlrsGXYC1hQlFbKdm8tVtEQQB0= -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= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -339,19 +460,19 @@ 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/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 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.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 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/kelseyhightower/envconfig v0.0.0-20180517194557-dd1402a4d99d h1:Tqg6yg0as+P38tbKytv9/yk+ifNq0CrvjlgADEniKog= -github.com/kelseyhightower/envconfig v0.0.0-20180517194557-dd1402a4d99d/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -359,10 +480,12 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= 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.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -370,10 +493,12 @@ 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/leodido/go-urn v0.0.0-20181204092800-a67a23e1c1af/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= +github.com/kubesphere/calico v0.0.0-20230227071013-a73515ddc939 h1:qAVH1UISSGjbexipm9KNuy3e6QwIDgGl+TUtJE9l1Pg= +github.com/kubesphere/calico v0.0.0-20230227071013-a73515ddc939/go.mod h1:aduNLznhao4Z5fIspL6eHa2mdaJFMUHqvnnyCptkjSY= +github.com/kubesphere/calico/api v0.0.0-20230227071013-a73515ddc939 h1:1H0jLl1BLWcXEWHDRwdEb8/CCQlXCWoy9MRbAWhcIUk= +github.com/kubesphere/calico/api v0.0.0-20230227071013-a73515ddc939/go.mod h1:Avoy1rTN1GfeisnHGf3WhQNqR+BuGOcwfNFsdWX6OHE= github.com/linode/linodego v1.12.0 h1:33mOIrZ+gVva14gyJMKPZ85mQGovAvZCEP1ftgmFBjA= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -385,26 +510,38 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +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-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= 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/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= 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= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= @@ -419,85 +556,60 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= 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.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= -github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= +github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= github.com/onsi/ginkgo/v2 v2.8.0 h1:pAM+oBNPrpXRs+E/8spkeGx9QgekbRVyr74EUvRVOUI= github.com/onsi/ginkgo/v2 v2.8.0/go.mod h1:6JsQiECmxCa3V5st74AL/AmsV482EDdVrGaVW6z3oYU= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= -github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= -github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= -github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/ovh/go-ovh v1.3.0 h1:mvZaddk4E4kLcXhzb+cxBsMPYp2pHqiQpWYkInsuZPQ= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= 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= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/ffjson v0.0.0-20190813045741-dac163c6c0a9/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/projectcalico/go-json v0.0.0-20161128004156-6219dc7339ba h1:aaF2byUCZhzszHsfPEr2M3qcU4ibtD/yk/il2R7T1PU= -github.com/projectcalico/go-json v0.0.0-20161128004156-6219dc7339ba/go.mod h1:q8EdCgBdMQzgiX/uk4GXLWLk+gIHd1a7mWUAamJKDb4= -github.com/projectcalico/go-yaml v0.0.0-20161201183616-955bc3e451ef h1:Di9BaA9apb6DEstin8RdhKmlzQG76UMbmjPzjCVkMpc= -github.com/projectcalico/go-yaml v0.0.0-20161201183616-955bc3e451ef/go.mod h1:1Ra2BftSa7Go38Gbq1q0bfmBFSSgUv+Cdc3SY8IL/C0= -github.com/projectcalico/go-yaml-wrapper v0.0.0-20161127220527-598e54215bee h1:yVWsNSlAuYoJ0CznHsYRPiFgsotoj07k00k5rQvGlHM= -github.com/projectcalico/go-yaml-wrapper v0.0.0-20161127220527-598e54215bee/go.mod h1:UgC0aTQ2KMDxlX3lU/stndk7DMUBJqzN40yFiILHgxc= -github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056 h1:qs29Hus4cY8XlsmMLUsSAHT0metSTyqu2Tnpuwy5dkM= -github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056/go.mod h1:tUt8rirmysRy7TR1S80XDriwBK1z2igwwX79lnUrSf4= -github.com/prometheus/client_golang v0.0.0-20171005112915-5cec1d0429b0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/projectcalico/go-yaml-wrapper v0.0.0-20191112210931-090425220c54 h1:Jt2Pic9dxgJisekm8q2WV9FaWxUJhhRfwHSP640drww= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= 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.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/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= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.0.0-20171104095907-e3fb1a1acd76/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= 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.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= @@ -505,28 +617,29 @@ github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8u github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= -github.com/prometheus/procfs v0.0.0-20171017214025-a6e9df898b13/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= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/prometheus v0.42.0 h1:G769v8covTkOiNckXFIwLx01XE04OE6Fr0JPA0oR2nI= github.com/prometheus/prometheus v0.42.0/go.mod h1:Pfqb/MLnnR2KK+0vchiaH39jXxvLMBk+3lnIGP4N7Vk= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= 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.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12 h1:Aaz4T7dZp7cB2cv7D/tGtRdSMh48sRaDYr7Jh0HV4qQ= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -537,27 +650,24 @@ github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0 github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 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= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -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/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 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.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -565,16 +675,14 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v0.0.0-20171019201919-bdcc60b419d1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= @@ -582,13 +690,22 @@ github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2 github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= +go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= +go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +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.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= @@ -601,71 +718,67 @@ go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= 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.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/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-20190320223903-b7391e95e576/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= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20230124195608-d38c7dcee874 h1:kWC3b7j6Fu09SnEBr7P4PuQyM0R6sqyH9R+EjIvT1nQ= golang.org/x/exp v0.0.0-20230124195608-d38c7dcee874/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +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 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= 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/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +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= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -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-20181005035420-146acd28ed58/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-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-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= @@ -676,56 +789,185 @@ golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d h1:/m5NbqQelATgoSPVC2Z23sR4k golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20190710153321-831012c29e42 h1:4IOeC7p+OItq3+O5BWkcmVu2uBe3jekXau5S4QZX9DU= golang.org/x/tools v0.0.0-20190710153321-831012c29e42/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +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= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +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-20210222152913-aa3ee6e6a81c/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-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 h1:O97sLx/Xmb/KIZHB/2/BzofxBs5QmmR0LcihPtllmbc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +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.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -742,7 +984,6 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -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= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -751,11 +992,8 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v9 v9.27.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= -gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 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.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= @@ -763,7 +1001,6 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tchap/go-patricia.v2 v2.2.6/go.mod h1:GjlIhdM7u6RWBtv58iEuqTR4NOShCtHo2EeySnNeNfs= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -785,65 +1022,59 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= istio.io/api v0.0.0-20201113182140-d4b7e3fc2b44 h1:mfs4UJtpH8ElVEohFZw39qDGv9gg7TOkYVTwJZGQ5Yc= istio.io/api v0.0.0-20201113182140-d4b7e3fc2b44/go.mod h1:kyq3g5w42zl/AKlbzDGppYpGMQYMYMyZKeq0/eexML8= istio.io/gogo-genproto v0.0.0-20190930162913-45029607206a/go.mod h1:OzpAts7jljZceG4Vqi5/zXy/pOg1b209T3jb7Nv5wIs= istio.io/gogo-genproto v0.0.0-20201113182723-5b8563d8a012 h1:rCPnRe6A2LvpvP1/fy1ZzPFBUaWmBUHxFEw4Onphd7c= istio.io/gogo-genproto v0.0.0-20201113182723-5b8563d8a012/go.mod h1:OzpAts7jljZceG4Vqi5/zXy/pOg1b209T3jb7Nv5wIs= -k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= k8s.io/api v0.18.1/go.mod h1:3My4jorQWzSs5a+l7Ge6JBbIxChLnY8HnuT58ZWolss= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= +k8s.io/api v0.23.2/go.mod h1:sYuDb3flCtRPI8ghn6qFrcK5ZBu2mhbElxRE95qpwlI= k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= k8s.io/apimachinery v0.18.1/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apimachinery v0.23.2/go.mod h1:zDqeV0AK62LbCI0CI7KbWCAYdLg+E+8UXJ0rIz5gmS8= k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= -k8s.io/code-generator v0.0.0-20190814140513-6483f25b1faf/go.mod h1:PT1SOMszr9TJAi4EL8ncHI85SEdLvzWWYlfJ7ICZeYU= k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.9/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190813173942-955ffa8fcfc9/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.90.0 h1:VkTxIV/FjRXn1fgNNcKGM8cfmL1Z33ZjXRTVxKCoF5M= k8s.io/klog/v2 v2.90.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= -k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 h1:vV3ZKAUX0nMjTflyfVea98dTfROpIxDaEsQws0FT2Ts= k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20230202215443-34013725500c h1:YVqDar2X7YiQa/DVAXFMDIfGF8uGrHQemlrwRU5NlVI= k8s.io/utils v0.0.0-20230202215443-34013725500c/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/application v0.8.4-0.20201016185654-c8e2959e57a0 h1:cH3Q4uNycL9LgzlyU+/UikIM1T6tx9LKc/Ie/QVIRM8= sigs.k8s.io/application v0.8.4-0.20201016185654-c8e2959e57a0/go.mod h1:wdTrELsIgKk8lnlRaoKWao9YpLelXpABdEgCM1aEEE4= @@ -851,13 +1082,13 @@ sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2 sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/controller-tools v0.4.0/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.8.1/go.mod h1:oNKTxUVPYkV9lWzY6CVMNluVq8cBsyq+UgPJdvA3uu4= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/staging/src/kubesphere.io/api/network/calicov3/block_affinity_types.go b/staging/src/kubesphere.io/api/network/calicov3/block_affinity_types.go index a07c17007..049a96b62 100644 --- a/staging/src/kubesphere.io/api/network/calicov3/block_affinity_types.go +++ b/staging/src/kubesphere.io/api/network/calicov3/block_affinity_types.go @@ -17,7 +17,7 @@ package calicov3 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v3 "github.com/projectcalico/libcalico-go/lib/apis/v3" + v3 "github.com/projectcalico/calico/libcalico-go/lib/apis/v3" ) // +genclient diff --git a/staging/src/kubesphere.io/api/network/calicov3/ipamblock_types.go b/staging/src/kubesphere.io/api/network/calicov3/ipamblock_types.go index abb840583..c4c237a03 100644 --- a/staging/src/kubesphere.io/api/network/calicov3/ipamblock_types.go +++ b/staging/src/kubesphere.io/api/network/calicov3/ipamblock_types.go @@ -17,8 +17,8 @@ package calicov3 import ( "strings" - v3 "github.com/projectcalico/libcalico-go/lib/apis/v3" - cnet "github.com/projectcalico/libcalico-go/lib/net" + v3 "github.com/projectcalico/calico/libcalico-go/lib/apis/v3" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/staging/src/kubesphere.io/api/network/calicov3/ippool_types.go b/staging/src/kubesphere.io/api/network/calicov3/ippool_types.go index dc4b97715..b26824f1e 100644 --- a/staging/src/kubesphere.io/api/network/calicov3/ippool_types.go +++ b/staging/src/kubesphere.io/api/network/calicov3/ippool_types.go @@ -15,10 +15,10 @@ package calicov3 import ( - cnet "github.com/projectcalico/libcalico-go/lib/net" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v3 "github.com/projectcalico/libcalico-go/lib/apis/v3" + v3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" ) // +genclient diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types.go b/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types.go index 538d17bf9..03d694571 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types.go @@ -22,8 +22,8 @@ import ( "reflect" "strings" - "github.com/projectcalico/libcalico-go/lib/names" - cnet "github.com/projectcalico/libcalico-go/lib/net" + "github.com/projectcalico/calico/libcalico-go/lib/names" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types_test.go b/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types_test.go index 83143741b..6201947e1 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types_test.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/ipamblock_types_test.go @@ -19,7 +19,7 @@ package v1alpha1 import ( "testing" - cnet "github.com/projectcalico/libcalico-go/lib/net" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go b/staging/src/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go index 37fe7384c..3abe7bbeb 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/ipamhandle_types.go @@ -21,8 +21,8 @@ import ( "strconv" "strings" - "github.com/projectcalico/libcalico-go/lib/names" - cnet "github.com/projectcalico/libcalico-go/lib/net" + "github.com/projectcalico/calico/libcalico-go/lib/names" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types.go b/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types.go index 2083a91a4..1c0eef11b 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types.go @@ -20,7 +20,7 @@ import ( "fmt" "math/big" - cnet "github.com/projectcalico/libcalico-go/lib/net" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types_test.go b/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types_test.go index 534cbd0ff..77ba248f2 100644 --- a/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types_test.go +++ b/staging/src/kubesphere.io/api/network/v1alpha1/ippool_types_test.go @@ -19,7 +19,7 @@ package v1alpha1 import ( "testing" - cnet "github.com/projectcalico/libcalico-go/lib/net" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/staging/src/kubesphere.io/client-go/go.mod b/staging/src/kubesphere.io/client-go/go.mod index 7268863ed..fee1c7ace 100644 --- a/staging/src/kubesphere.io/client-go/go.mod +++ b/staging/src/kubesphere.io/client-go/go.mod @@ -32,14 +32,14 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/onsi/ginkgo/v2 v2.8.0 // indirect - github.com/onsi/gomega v1.26.0 // indirect + github.com/onsi/gomega v1.27.1 // indirect go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.7.0 // indirect - golang.org/x/net v0.5.0 // indirect + go.uber.org/multierr v1.8.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.4.0 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/term v0.4.0 // indirect - golang.org/x/text v0.6.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -48,7 +48,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.26.1 // indirect k8s.io/klog/v2 v2.90.0 // indirect - k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 // indirect + k8s.io/kube-openapi v0.0.0-20230224204730-66828de6f33b // indirect k8s.io/utils v0.0.0-20230202215443-34013725500c // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect @@ -56,11 +56,16 @@ require ( ) replace ( + github.com/onsi/gomega => github.com/onsi/gomega v1.26.0 + go.uber.org/multierr => go.uber.org/multierr v1.7.0 + golang.org/x/net => golang.org/x/net v0.5.0 golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a golang.org/x/sys => golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d golang.org/x/term => golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 + golang.org/x/text => golang.org/x/text v0.6.0 golang.org/x/time => golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 golang.org/x/tools => golang.org/x/tools v0.0.0-20190710153321-831012c29e42 k8s.io/client-go => k8s.io/client-go v0.26.1 + k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 kubesphere.io/client-go => ../client-go ) diff --git a/staging/src/kubesphere.io/client-go/go.sum b/staging/src/kubesphere.io/client-go/go.sum index d4f6ade87..b8220778c 100644 --- a/staging/src/kubesphere.io/client-go/go.sum +++ b/staging/src/kubesphere.io/client-go/go.sum @@ -133,23 +133,12 @@ go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0 go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/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-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= @@ -159,11 +148,6 @@ golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d h1:/m5NbqQelATgoSPVC2Z23sR4k golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= diff --git a/staging/src/kubesphere.io/utils/go.mod b/staging/src/kubesphere.io/utils/go.mod index 4dbfb14f2..4b98f7bc6 100644 --- a/staging/src/kubesphere.io/utils/go.mod +++ b/staging/src/kubesphere.io/utils/go.mod @@ -55,7 +55,7 @@ require ( github.com/gofrs/uuid v4.3.1+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/btree v1.0.1 // indirect + github.com/google/btree v1.1.2 // indirect github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -95,7 +95,7 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/onsi/ginkgo/v2 v2.8.0 // indirect - github.com/onsi/gomega v1.26.0 // indirect + github.com/onsi/gomega v1.27.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect @@ -121,12 +121,12 @@ require ( go.opencensus.io v0.24.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect golang.org/x/crypto v0.5.0 // indirect - golang.org/x/net v0.5.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.4.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/term v0.4.0 // indirect - golang.org/x/text v0.6.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 // indirect @@ -137,7 +137,7 @@ require ( k8s.io/apiextensions-apiserver v0.26.1 // indirect k8s.io/apiserver v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect - k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 // indirect + k8s.io/kube-openapi v0.0.0-20230224204730-66828de6f33b // indirect k8s.io/kubectl v0.26.1 // indirect oras.land/oras-go v1.2.2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect @@ -147,12 +147,21 @@ require ( ) replace ( + github.com/google/btree => github.com/google/btree v1.0.1 + github.com/onsi/gomega => github.com/onsi/gomega v1.26.0 + github.com/spf13/viper => github.com/spf13/viper v1.13.0 + go.uber.org/multierr => go.uber.org/multierr v1.7.0 + golang.org/x/net => golang.org/x/net v0.5.0 golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a golang.org/x/sync => golang.org/x/sync v0.0.0-20190423024810-112230192c58 golang.org/x/sys => golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d golang.org/x/term => golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 + golang.org/x/text => golang.org/x/text v0.6.0 golang.org/x/time => golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 golang.org/x/tools => golang.org/x/tools v0.0.0-20190710153321-831012c29e42 k8s.io/client-go => k8s.io/client-go v0.26.1 + k8s.io/component-helpers => k8s.io/component-helpers v0.21.2 + k8s.io/cri-api => k8s.io/cri-api v0.26.1 + k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 kubesphere.io/utils => ../utils ) diff --git a/staging/src/kubesphere.io/utils/go.sum b/staging/src/kubesphere.io/utils/go.sum index ae508e3a0..60f9a3a01 100644 --- a/staging/src/kubesphere.io/utils/go.sum +++ b/staging/src/kubesphere.io/utils/go.sum @@ -3,6 +3,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -15,18 +16,33 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= 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/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= 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= @@ -36,6 +52,7 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= @@ -44,6 +61,7 @@ github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -62,11 +80,16 @@ github.com/Microsoft/hcsshim v0.9.6 h1:VwnDOgLeoi2du6dAznfmspNqTiwczvjv4K7NxuY9j github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +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/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/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= 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= @@ -75,7 +98,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bugsnag/bugsnag-go v1.5.3 h1:yeRUT3mUE13jL1tGwvoQsKdVbAsQx9AJ+fqahKveP04= @@ -84,6 +106,7 @@ github.com/bugsnag/panicwrap v1.2.0 h1:OzrKrRvXis8qEvOkfcxNcYbOd2O7xXS2nnKMEMABF github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= 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= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= @@ -91,11 +114,18 @@ github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHe github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= github.com/containerd/containerd v1.6.16 h1:0H5xH6ABsN7XTrxIAKxFpBkFCBtrZ/OSORhCpUnHjrc= github.com/containerd/containerd v1.6.16/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw= @@ -130,6 +160,7 @@ github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= @@ -140,18 +171,22 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y 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/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= @@ -161,6 +196,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-gorp/gorp/v3 v3.0.2 h1:ULqJXIekoqMx29FI5ekXXFoH1dT2Vc8UhnRzBg+Emz4= github.com/go-gorp/gorp/v3 v3.0.2/go.mod h1:BJ3q1ejpV8cVALtcXvXaXyTOlMmJhWDxTmncaR6rwBY= 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= @@ -199,6 +236,7 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -207,6 +245,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -225,9 +264,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= @@ -243,6 +281,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -251,6 +292,7 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -260,8 +302,12 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -271,7 +317,12 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -280,29 +331,38 @@ github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f h1:ShTPMJQes6tubcjzGMODIVG5hlrCeImaBnZzKF2N8SM= github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= 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/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= 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-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= 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/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= github.com/hashicorp/golang-lru v0.6.0/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/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= @@ -319,15 +379,18 @@ github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +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.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 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/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= @@ -337,12 +400,14 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= 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.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kortschak/utter v1.0.1/go.mod h1:vSmSjbyrlKjjsL71193LmzBOKgwePk9DH6uFaWHIInc= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -359,7 +424,7 @@ github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI= @@ -369,10 +434,15 @@ github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2 github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -386,21 +456,21 @@ github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/cli v1.1.4/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= 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/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -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/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -425,6 +495,7 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P 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/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo/v2 v2.8.0 h1:pAM+oBNPrpXRs+E/8spkeGx9QgekbRVyr74EUvRVOUI= github.com/onsi/ginkgo/v2 v2.8.0/go.mod h1:6JsQiECmxCa3V5st74AL/AmsV482EDdVrGaVW6z3oYU= @@ -435,7 +506,9 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= @@ -444,33 +517,45 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/poy/onpar v0.0.0-20190519213022-ee068f8ea4d1 h1:oL4IBbcqwhhNWh31bjOX8C/OCy0zs9906d/VUru+bqg= github.com/poy/onpar v0.0.0-20190519213022-ee068f8ea4d1/go.mod h1:nSbFQvMj97ZyhFRSJYtut+msi4sOY6zJDGCdSc+/rZU= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 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.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= 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= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= 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.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +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.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= 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.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= @@ -480,19 +565,20 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD 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/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= @@ -502,7 +588,7 @@ github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUq github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= 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.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -516,10 +602,12 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -537,9 +625,10 @@ github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9 h1 github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= +go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= +go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -553,20 +642,20 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/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-20190325154230-a5d413f7728c/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= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= @@ -604,45 +693,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= @@ -653,15 +705,6 @@ golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d h1:/m5NbqQelATgoSPVC2Z23sR4k golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= @@ -670,6 +713,8 @@ golang.org/x/tools v0.0.0-20190710153321-831012c29e42/go.mod h1:jcCCGcm9btYwXyDq golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -691,7 +736,24 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -735,13 +797,50 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 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-20210222152913-aa3ee6e6a81c/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-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 h1:O97sLx/Xmb/KIZHB/2/BzofxBs5QmmR0LcihPtllmbc= google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -763,10 +862,21 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 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.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -780,6 +890,7 @@ 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.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -791,11 +902,12 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 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.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 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= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -850,5 +962,6 @@ sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2 sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/vendor/github.com/projectcalico/libcalico-go/LICENSE b/vendor/github.com/projectcalico/api/LICENSE similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/LICENSE rename to vendor/github.com/projectcalico/api/LICENSE diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/BUILD b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/BUILD new file mode 100644 index 000000000..e7d227e66 --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/BUILD @@ -0,0 +1,27 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "register.go", + "types.go", + "zz_generated.conversion.go", + "zz_generated.deepcopy.go", + ], + tags = ["automanaged"], + deps = [ + "k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "k8s.io/apimachinery/pkg/conversion:go_default_library", + "k8s.io/apimachinery/pkg/runtime:go_default_library", + "k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "k8s.io/sample-apiserver/pkg/apis/wardle:go_default_library", + ], +) diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/bgpconfig.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/bgpconfig.go new file mode 100644 index 000000000..70316efe8 --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/bgpconfig.go @@ -0,0 +1,160 @@ +// Copyright (c) 2020-2021 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/projectcalico/api/pkg/lib/numorstring" +) + +const ( + KindBGPConfiguration = "BGPConfiguration" + KindBGPConfigurationList = "BGPConfigurationList" +) + +type BindMode string + +const ( + BindModeNone BindMode = "None" + BindModeNodeIP BindMode = "NodeIP" +) + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// BGPConfigurationList is a list of BGPConfiguration resources. +type BGPConfigurationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []BGPConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type BGPConfiguration struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec BGPConfigurationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// BGPConfigurationSpec contains the values of the BGP configuration. +type BGPConfigurationSpec struct { + // LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: INFO] + LogSeverityScreen string `json:"logSeverityScreen,omitempty" validate:"omitempty,logLevel" confignamev1:"loglevel"` + + // NodeToNodeMeshEnabled sets whether full node to node BGP mesh is enabled. [Default: true] + NodeToNodeMeshEnabled *bool `json:"nodeToNodeMeshEnabled,omitempty" validate:"omitempty" confignamev1:"node_mesh"` + + // ASNumber is the default AS number used by a node. [Default: 64512] + ASNumber *numorstring.ASNumber `json:"asNumber,omitempty" validate:"omitempty" confignamev1:"as_num"` + + // ServiceLoadBalancerIPs are the CIDR blocks for Kubernetes Service LoadBalancer IPs. + // Kubernetes Service status.LoadBalancer.Ingress IPs will only be advertised if they are within one of these blocks. + ServiceLoadBalancerIPs []ServiceLoadBalancerIPBlock `json:"serviceLoadBalancerIPs,omitempty" validate:"omitempty,dive" confignamev1:"svc_loadbalancer_ips"` + + // ServiceExternalIPs are the CIDR blocks for Kubernetes Service External IPs. + // Kubernetes Service ExternalIPs will only be advertised if they are within one of these blocks. + ServiceExternalIPs []ServiceExternalIPBlock `json:"serviceExternalIPs,omitempty" validate:"omitempty,dive" confignamev1:"svc_external_ips"` + + // ServiceClusterIPs are the CIDR blocks from which service cluster IPs are allocated. + // If specified, Calico will advertise these blocks, as well as any cluster IPs within them. + ServiceClusterIPs []ServiceClusterIPBlock `json:"serviceClusterIPs,omitempty" validate:"omitempty,dive" confignamev1:"svc_cluster_ips"` + + // Communities is a list of BGP community values and their arbitrary names for tagging routes. + Communities []Community `json:"communities,omitempty" validate:"omitempty,dive" confignamev1:"communities"` + + // PrefixAdvertisements contains per-prefix advertisement configuration. + PrefixAdvertisements []PrefixAdvertisement `json:"prefixAdvertisements,omitempty" validate:"omitempty,dive" confignamev1:"prefix_advertisements"` + + // ListenPort is the port where BGP protocol should listen. Defaults to 179 + // +kubebuilder:validation:Minimum:=1 + // +kubebuilder:validation:Maximum:=65535 + ListenPort uint16 `json:"listenPort,omitempty" validate:"omitempty,gt=0" confignamev1:"listen_port"` + + // Optional BGP password for full node-to-mesh peerings. + // This field can only be set on the default BGPConfiguration instance and requires that NodeMesh is enabled + // +optional + NodeMeshPassword *BGPPassword `json:"nodeMeshPassword,omitempty" validate:"omitempty" confignamev1:"node_mesh_password"` + + // Time to allow for software restart for node-to-mesh peerings. When specified, this is configured + // as the graceful restart timeout. When not specified, the BIRD default of 120s is used. + // This field can only be set on the default BGPConfiguration instance and requires that NodeMesh is enabled + // +optional + NodeMeshMaxRestartTime *metav1.Duration `json:"nodeMeshMaxRestartTime,omitempty" confignamev1:"node_mesh_restart_time"` + + // BindMode indicates whether to listen for BGP connections on all addresses (None) + // or only on the node's canonical IP address Node.Spec.BGP.IPvXAddress (NodeIP). + // Default behaviour is to listen for BGP connections on all addresses. + // +optional + BindMode *BindMode `json:"bindMode,omitempty"` + + // IgnoredInterfaces indicates the network interfaces that needs to be excluded when reading device routes. + // +optional + IgnoredInterfaces []string `json:"ignoredInterfaces,omitempty" validate:"omitempty,dive,ignoredInterface"` +} + +// ServiceLoadBalancerIPBlock represents a single allowed LoadBalancer IP CIDR block. +type ServiceLoadBalancerIPBlock struct { + CIDR string `json:"cidr,omitempty" validate:"omitempty,net"` +} + +// ServiceExternalIPBlock represents a single allowed External IP CIDR block. +type ServiceExternalIPBlock struct { + CIDR string `json:"cidr,omitempty" validate:"omitempty,net"` +} + +// ServiceClusterIPBlock represents a single allowed ClusterIP CIDR block. +type ServiceClusterIPBlock struct { + CIDR string `json:"cidr,omitempty" validate:"omitempty,net"` +} + +// Community contains standard or large community value and its name. +type Community struct { + // Name given to community value. + Name string `json:"name,omitempty" validate:"required,name"` + // Value must be of format `aa:nn` or `aa:nn:mm`. + // For standard community use `aa:nn` format, where `aa` and `nn` are 16 bit number. + // For large community use `aa:nn:mm` format, where `aa`, `nn` and `mm` are 32 bit number. + // Where, `aa` is an AS Number, `nn` and `mm` are per-AS identifier. + // +kubebuilder:validation:Pattern=`^(\d+):(\d+)$|^(\d+):(\d+):(\d+)$` + Value string `json:"value,omitempty" validate:"required"` +} + +// PrefixAdvertisement configures advertisement properties for the specified CIDR. +type PrefixAdvertisement struct { + // CIDR for which properties should be advertised. + CIDR string `json:"cidr,omitempty" validate:"required,net"` + // Communities can be list of either community names already defined in `Specs.Communities` or community value of format `aa:nn` or `aa:nn:mm`. + // For standard community use `aa:nn` format, where `aa` and `nn` are 16 bit number. + // For large community use `aa:nn:mm` format, where `aa`, `nn` and `mm` are 32 bit number. + // Where,`aa` is an AS Number, `nn` and `mm` are per-AS identifier. + Communities []string `json:"communities,omitempty" validate:"required"` +} + +// New BGPConfiguration creates a new (zeroed) BGPConfiguration struct with the TypeMetadata +// initialized to the current version. +func NewBGPConfiguration() *BGPConfiguration { + return &BGPConfiguration{ + TypeMeta: metav1.TypeMeta{ + Kind: KindBGPConfiguration, + APIVersion: GroupVersionCurrent, + }, + } +} diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/bgpfilter.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/bgpfilter.go new file mode 100644 index 000000000..ebd1510ad --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/bgpfilter.go @@ -0,0 +1,106 @@ +// Copyright (c) 2022 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + KindBGPFilter = "BGPFilter" + KindBGPFilterList = "BGPFilterList" +) + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// BGPFilterList is a list of BGPFilter resources. +type BGPFilterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []BGPFilter `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type BGPFilter struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec BGPFilterSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// BGPFilterSpec contains the IPv4 and IPv6 filter rules of the BGP Filter. +type BGPFilterSpec struct { + // The ordered set of IPv4 BGPFilter rules acting on exporting routes to a peer. + ExportV4 []BGPFilterRuleV4 `json:"exportV4,omitempty" validate:"omitempty,dive"` + + // The ordered set of IPv4 BGPFilter rules acting on importing routes from a peer. + ImportV4 []BGPFilterRuleV4 `json:"importV4,omitempty" validate:"omitempty,dive"` + + // The ordered set of IPv6 BGPFilter rules acting on exporting routes to a peer. + ExportV6 []BGPFilterRuleV6 `json:"exportV6,omitempty" validate:"omitempty,dive"` + + // The ordered set of IPv6 BGPFilter rules acting on importing routes from a peer. + ImportV6 []BGPFilterRuleV6 `json:"importV6,omitempty" validate:"omitempty,dive"` +} + +// BGPFilterRuleV4 defines a BGP filter rule consisting a single IPv4 CIDR block and a filter action for this CIDR. +type BGPFilterRuleV4 struct { + CIDR string `json:"cidr" validate:"required,netv4"` + + MatchOperator BGPFilterMatchOperator `json:"matchOperator" validate:"required,matchOperator"` + + Action BGPFilterAction `json:"action" validate:"required,filterAction"` +} + +// BGPFilterRuleV6 defines a BGP filter rule consisting a single IPv6 CIDR block and a filter action for this CIDR. +type BGPFilterRuleV6 struct { + CIDR string `json:"cidr" validate:"required,netv6"` + + MatchOperator BGPFilterMatchOperator `json:"matchOperator" validate:"required,matchOperator"` + + Action BGPFilterAction `json:"action" validate:"required,filterAction"` +} + +type BGPFilterMatchOperator string + +const ( + Equal BGPFilterMatchOperator = "Equal" + NotEqual = "NotEqual" + In = "In" + NotIn = "NotIn" +) + +type BGPFilterAction string + +const ( + Accept BGPFilterAction = "Accept" + Reject = "Reject" +) + +// New BGPFilter creates a new (zeroed) BGPFilter struct with the TypeMetadata +// initialized to the current version. +func NewBGPFilter() *BGPFilter { + return &BGPFilter{ + TypeMeta: metav1.TypeMeta{ + Kind: KindBGPFilter, + APIVersion: GroupVersionCurrent, + }, + } +} diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/bgppeer.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/bgppeer.go new file mode 100644 index 000000000..0b75b0163 --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/bgppeer.go @@ -0,0 +1,141 @@ +// Copyright (c) 2017,2020-2021 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + k8sv1 "k8s.io/api/core/v1" + + "github.com/projectcalico/api/pkg/lib/numorstring" +) + +const ( + KindBGPPeer = "BGPPeer" + KindBGPPeerList = "BGPPeerList" +) + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// BGPPeerList is a list of BGPPeer resources. +type BGPPeerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []BGPPeer `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type BGPPeer struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec BGPPeerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// BGPPeerSpec contains the specification for a BGPPeer resource. +type BGPPeerSpec struct { + // The node name identifying the Calico node instance that is targeted by this peer. + // If this is not set, and no nodeSelector is specified, then this BGP peer selects all + // nodes in the cluster. + // +optional + Node string `json:"node,omitempty" validate:"omitempty,name"` + + // Selector for the nodes that should have this peering. When this is set, the Node + // field must be empty. + // +optional + NodeSelector string `json:"nodeSelector,omitempty" validate:"omitempty,selector"` + + // The IP address of the peer followed by an optional port number to peer with. + // If port number is given, format should be `[]:port` or `:` for IPv4. + // If optional port number is not set, and this peer IP and ASNumber belongs to a calico/node + // with ListenPort set in BGPConfiguration, then we use that port to peer. + // +optional + PeerIP string `json:"peerIP,omitempty" validate:"omitempty,IP:port"` + + // The AS Number of the peer. + // +optional + ASNumber numorstring.ASNumber `json:"asNumber,omitempty"` + + // Selector for the remote nodes to peer with. When this is set, the PeerIP and + // ASNumber fields must be empty. For each peering between the local node and + // selected remote nodes, we configure an IPv4 peering if both ends have + // NodeBGPSpec.IPv4Address specified, and an IPv6 peering if both ends have + // NodeBGPSpec.IPv6Address specified. The remote AS number comes from the remote + // node's NodeBGPSpec.ASNumber, or the global default if that is not set. + // +optional + PeerSelector string `json:"peerSelector,omitempty" validate:"omitempty,selector"` + + // Option to keep the original nexthop field when routes are sent to a BGP Peer. + // Setting "true" configures the selected BGP Peers node to use the "next hop keep;" + // instead of "next hop self;"(default) in the specific branch of the Node on "bird.cfg". + KeepOriginalNextHop bool `json:"keepOriginalNextHop,omitempty"` + + // Optional BGP password for the peerings generated by this BGPPeer resource. + Password *BGPPassword `json:"password,omitempty" validate:"omitempty"` + // Specifies whether and how to configure a source address for the peerings generated by + // this BGPPeer resource. Default value "UseNodeIP" means to configure the node IP as the + // source address. "None" means not to configure a source address. + SourceAddress SourceAddress `json:"sourceAddress,omitempty" validate:"omitempty,sourceAddress"` + // Time to allow for software restart. When specified, this is configured as the graceful + // restart timeout. When not specified, the BIRD default of 120s is used. + MaxRestartTime *metav1.Duration `json:"maxRestartTime,omitempty"` + // Maximum number of local AS numbers that are allowed in the AS path for received routes. + // This removes BGP loop prevention and should only be used if absolutely necesssary. + // +optional + NumAllowedLocalASNumbers *int32 `json:"numAllowedLocalASNumbers,omitempty"` + // TTLSecurity enables the generalized TTL security mechanism (GTSM) which protects against spoofed packets by + // ignoring received packets with a smaller than expected TTL value. The provided value is the number of hops + // (edges) between the peers. + // +optional + TTLSecurity *uint8 `json:"ttlSecurity,omitempty"` + + // Add an exact, i.e. /32, static route toward peer IP in order to prevent route flapping. + // ReachableBy contains the address of the gateway which peer can be reached by. + // +optional + ReachableBy string `json:"reachableBy,omitempty" validate:"omitempty,reachableBy"` + + // The ordered set of BGPFilters applied on this BGP peer. + // +optional + Filters []string `json:"filters,omitempty" validate:"omitempty,dive,name"` +} + +type SourceAddress string + +const ( + SourceAddressUseNodeIP SourceAddress = "UseNodeIP" + SourceAddressNone = "None" +) + +// BGPPassword contains ways to specify a BGP password. +type BGPPassword struct { + // Selects a key of a secret in the node pod's namespace. + SecretKeyRef *k8sv1.SecretKeySelector `json:"secretKeyRef,omitempty"` +} + +// NewBGPPeer creates a new (zeroed) BGPPeer struct with the TypeMetadata initialised to the current +// version. +func NewBGPPeer() *BGPPeer { + return &BGPPeer{ + TypeMeta: metav1.TypeMeta{ + Kind: KindBGPPeer, + APIVersion: GroupVersionCurrent, + }, + } +} diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/blockaffinity.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/blockaffinity.go new file mode 100644 index 000000000..c90de6bbe --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/blockaffinity.go @@ -0,0 +1,94 @@ +// Copyright (c) 2022 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + KindBlockAffinity = "BlockAffinity" + KindBlockAffinityList = "BlockAffinityList" +) + +type BlockAffinityState string + +const ( + StateConfirmed BlockAffinityState = "confirmed" + StatePending BlockAffinityState = "pending" + StatePendingDeletion BlockAffinityState = "pendingDeletion" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// BlockAffinity maintains a block affinity's state +type BlockAffinity struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + // Specification of the BlockAffinity. + Spec BlockAffinitySpec `json:"spec,omitempty"` +} + +// BlockAffinitySpec contains the specification for a BlockAffinity resource. +type BlockAffinitySpec struct { + // The state of the block affinity with regard to any referenced IPAM blocks. + State BlockAffinityState `json:"state"` + + // The node that this block affinity is assigned to. + Node string `json:"node"` + + // The CIDR range this block affinity references. + CIDR string `json:"cidr"` + + // Deleted indicates whether or not this block affinity is disabled and is + // used as part of race-condition prevention. When set to true, clients + // should treat this block as if it does not exist. + Deleted bool `json:"deleted,omitempty"` +} + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// BlockAffinityList contains a list of BlockAffinity resources. +type BlockAffinityList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + Items []BlockAffinity `json:"items"` +} + +// NewBlockAffinity creates a new (zeroed) BlockAffinity struct with the TypeMetadata initialised to the current +// version. +func NewBlockAffinity() *BlockAffinity { + return &BlockAffinity{ + TypeMeta: metav1.TypeMeta{ + Kind: KindBlockAffinity, + APIVersion: GroupVersionCurrent, + }, + } +} + +// NewBlockAffinityList creates a new (zeroed) BlockAffinityList struct with the TypeMetadata initialised to the current +// version. +func NewBlockAffinityList() *BlockAffinityList { + return &BlockAffinityList{ + TypeMeta: metav1.TypeMeta{ + Kind: KindBlockAffinityList, + APIVersion: GroupVersionCurrent, + }, + } +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/clusterinfo.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/clusterinfo.go similarity index 68% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/clusterinfo.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/clusterinfo.go index 9c3402328..c28d81b22 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/clusterinfo.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/clusterinfo.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017, 2020-2021 Tigera, 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. @@ -23,16 +23,26 @@ const ( KindClusterInformationList = "ClusterInformationList" ) -// +genclient +// +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// ClusterInformation contains the cluster specific information. -type ClusterInformation struct { +// ClusterInformationList is a list of ClusterInformation objects. +type ClusterInformationList struct { metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the ClusterInformation. - Spec ClusterInformationSpec `json:"spec,omitempty"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []ClusterInformation `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterInformation struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec ClusterInformationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // ClusterInformationSpec contains the values of describing the cluster. @@ -45,17 +55,9 @@ type ClusterInformationSpec struct { CalicoVersion string `json:"calicoVersion,omitempty" validate:"omitempty"` // DatastoreReady is used during significant datastore migrations to signal to components // such as Felix that it should wait before accessing the datastore. - DatastoreReady *bool `json:"datastoreReady"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterInformationList contains a list of ClusterInformation resources -// (even though there should only be one). -type ClusterInformationList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []ClusterInformation `json:"items"` + DatastoreReady *bool `json:"datastoreReady,omitempty"` + // Variant declares which variant of Calico should be active. + Variant string `json:"variant,omitempty"` } // New ClusterInformation creates a new (zeroed) ClusterInformation struct with the TypeMetadata @@ -68,14 +70,3 @@ func NewClusterInformation() *ClusterInformation { }, } } - -// NewClusterInformationList creates a new 9zeroed) ClusterInformationList struct with the TypeMetadata -// initialized to the current version. -func NewClusterInformationList() *ClusterInformationList { - return &ClusterInformationList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindClusterInformationList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/constants.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/constants.go similarity index 92% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/constants.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/constants.go index 2f4d63513..b596efe82 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/constants.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/constants.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Tigera, Inc. All rights reserved. +// Copyright (c) 2017-2021 Tigera, 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. @@ -45,4 +45,8 @@ const ( OrchestratorCNI = "cni" OrchestratorDocker = "libnetwork" OrchestratorOpenStack = "openstack" + + // Enum options for enable/disable fields + Enabled = "Enabled" + Disabled = "Disabled" ) diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/conversion.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/conversion.go new file mode 100644 index 000000000..c68f4e98f --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/conversion.go @@ -0,0 +1,183 @@ +// Copyright (c) 2019-2021 Tigera, Inc. All rights reserved. + +package v3 + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + // Add non-generated conversion functions + err := scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "NetworkPolicy"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "metadata.namespace": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "GlobalNetworkPolicy"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "GlobalNetworkSet"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "NetworkSet"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", "metadata.namespace": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "HostEndpoint"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "IPPool"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "BGPConfiguration"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "BGPPeer"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "Profile"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "FelixConfiguration"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "KubeControllersConfiguration"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + err = scheme.AddFieldLabelConversionFunc(schema.GroupVersionKind{"projectcalico.org", "v3", "ClusterInformation"}, + func(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) + if err != nil { + return err + } + + return nil +} diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/doc.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/doc.go new file mode 100644 index 000000000..ddeef25ca --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/doc.go @@ -0,0 +1,9 @@ +// Copyright (c) 2021 Tigera, Inc. All rights reserved. + +// +k8s:deepcopy-gen=package,register +// +k8s:openapi-gen=true + +// Package v3 is the v3 version of the API. +// +groupName=projectcalico.org + +package v3 // import "github.com/projectcalico/api/pkg/apis/projectcalico/v3" diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/felixconfig.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/felixconfig.go new file mode 100644 index 000000000..618918305 --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/felixconfig.go @@ -0,0 +1,557 @@ +// Copyright (c) 2017-2022 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/projectcalico/api/pkg/lib/numorstring" +) + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// FelixConfigurationList contains a list of FelixConfiguration object. +type FelixConfigurationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []FelixConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type FelixConfiguration struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec FelixConfigurationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +type IptablesBackend string + +const ( + KindFelixConfiguration = "FelixConfiguration" + KindFelixConfigurationList = "FelixConfigurationList" + IptablesBackendLegacy = "Legacy" + IptablesBackendNFTables = "NFT" + IptablesBackendAuto = "Auto" +) + +// +kubebuilder:validation:Enum=DoNothing;Enable;Disable +type AWSSrcDstCheckOption string + +const ( + AWSSrcDstCheckOptionDoNothing AWSSrcDstCheckOption = "DoNothing" + AWSSrcDstCheckOptionEnable = "Enable" + AWSSrcDstCheckOptionDisable = "Disable" +) + +// +kubebuilder:validation:Enum=Enabled;Disabled +type FloatingIPType string + +const ( + FloatingIPsEnabled FloatingIPType = "Enabled" + FloatingIPsDisabled FloatingIPType = "Disabled" +) + +// FelixConfigurationSpec contains the values of the Felix configuration. +type FelixConfigurationSpec struct { + // UseInternalDataplaneDriver, if true, Felix will use its internal dataplane programming logic. If false, it + // will launch an external dataplane driver and communicate with it over protobuf. + UseInternalDataplaneDriver *bool `json:"useInternalDataplaneDriver,omitempty"` + // DataplaneDriver filename of the external dataplane driver to use. Only used if UseInternalDataplaneDriver + // is set to false. + DataplaneDriver string `json:"dataplaneDriver,omitempty"` + + // DataplaneWatchdogTimeout is the readiness/liveness timeout used for Felix's (internal) dataplane driver. + // Increase this value if you experience spurious non-ready or non-live events when Felix is under heavy load. + // Decrease the value to get felix to report non-live or non-ready more quickly. [Default: 90s] + // + // Deprecated: replaced by the generic HealthTimeoutOverrides. + DataplaneWatchdogTimeout *metav1.Duration `json:"dataplaneWatchdogTimeout,omitempty" configv1timescale:"seconds"` + + // IPv6Support controls whether Felix enables support for IPv6 (if supported by the in-use dataplane). + IPv6Support *bool `json:"ipv6Support,omitempty" confignamev1:"Ipv6Support"` + + // RouteRefreshInterval is the period at which Felix re-checks the routes + // in the dataplane to ensure that no other process has accidentally broken Calico's rules. + // Set to 0 to disable route refresh. [Default: 90s] + RouteRefreshInterval *metav1.Duration `json:"routeRefreshInterval,omitempty" configv1timescale:"seconds"` + // InterfaceRefreshInterval is the period at which Felix rescans local interfaces to verify their state. + // The rescan can be disabled by setting the interval to 0. + InterfaceRefreshInterval *metav1.Duration `json:"interfaceRefreshInterval,omitempty" configv1timescale:"seconds"` + // IptablesRefreshInterval is the period at which Felix re-checks the IP sets + // in the dataplane to ensure that no other process has accidentally broken Calico's rules. + // Set to 0 to disable IP sets refresh. Note: the default for this value is lower than the + // other refresh intervals as a workaround for a Linux kernel bug that was fixed in kernel + // version 4.11. If you are using v4.11 or greater you may want to set this to, a higher value + // to reduce Felix CPU usage. [Default: 10s] + IptablesRefreshInterval *metav1.Duration `json:"iptablesRefreshInterval,omitempty" configv1timescale:"seconds"` + // IptablesPostWriteCheckInterval is the period after Felix has done a write + // to the dataplane that it schedules an extra read back in order to check the write was not + // clobbered by another process. This should only occur if another application on the system + // doesn't respect the iptables lock. [Default: 1s] + IptablesPostWriteCheckInterval *metav1.Duration `json:"iptablesPostWriteCheckInterval,omitempty" configv1timescale:"seconds" confignamev1:"IptablesPostWriteCheckIntervalSecs"` + // IptablesLockFilePath is the location of the iptables lock file. You may need to change this + // if the lock file is not in its standard location (for example if you have mapped it into Felix's + // container at a different path). [Default: /run/xtables.lock] + IptablesLockFilePath string `json:"iptablesLockFilePath,omitempty"` + // IptablesLockTimeout is the time that Felix will wait for the iptables lock, + // or 0, to disable. To use this feature, Felix must share the iptables lock file with all other + // processes that also take the lock. When running Felix inside a container, this requires the + // /run directory of the host to be mounted into the calico/node or calico/felix container. + // [Default: 0s disabled] + IptablesLockTimeout *metav1.Duration `json:"iptablesLockTimeout,omitempty" configv1timescale:"seconds" confignamev1:"IptablesLockTimeoutSecs"` + // IptablesLockProbeInterval is the time that Felix will wait between + // attempts to acquire the iptables lock if it is not available. Lower values make Felix more + // responsive when the lock is contended, but use more CPU. [Default: 50ms] + IptablesLockProbeInterval *metav1.Duration `json:"iptablesLockProbeInterval,omitempty" configv1timescale:"milliseconds" confignamev1:"IptablesLockProbeIntervalMillis"` + // FeatureDetectOverride is used to override feature detection based on auto-detected platform + // capabilities. Values are specified in a comma separated list with no spaces, example; + // "SNATFullyRandom=true,MASQFullyRandom=false,RestoreSupportsLock=". "true" or "false" will + // force the feature, empty or omitted values are auto-detected. + FeatureDetectOverride string `json:"featureDetectOverride,omitempty" validate:"omitempty,keyValueList"` + // FeatureGates is used to enable or disable tech-preview Calico features. + // Values are specified in a comma separated list with no spaces, example; + // "BPFConnectTimeLoadBalancingWorkaround=enabled,XyZ=false". This is + // used to enable features that are not fully production ready. + FeatureGates string `json:"featureGates,omitempty" validate:"omitempty,keyValueList"` + // IpsetsRefreshInterval is the period at which Felix re-checks all iptables + // state to ensure that no other process has accidentally broken Calico's rules. Set to 0 to + // disable iptables refresh. [Default: 90s] + IpsetsRefreshInterval *metav1.Duration `json:"ipsetsRefreshInterval,omitempty" configv1timescale:"seconds"` + MaxIpsetSize *int `json:"maxIpsetSize,omitempty"` + // IptablesBackend specifies which backend of iptables will be used. The default is Auto. + IptablesBackend *IptablesBackend `json:"iptablesBackend,omitempty" validate:"omitempty,iptablesBackend"` + + // XDPRefreshInterval is the period at which Felix re-checks all XDP state to ensure that no + // other process has accidentally broken Calico's BPF maps or attached programs. Set to 0 to + // disable XDP refresh. [Default: 90s] + XDPRefreshInterval *metav1.Duration `json:"xdpRefreshInterval,omitempty" configv1timescale:"seconds"` + + NetlinkTimeout *metav1.Duration `json:"netlinkTimeout,omitempty" configv1timescale:"seconds" confignamev1:"NetlinkTimeoutSecs"` + + // MetadataAddr is the IP address or domain name of the server that can answer VM queries for + // cloud-init metadata. In OpenStack, this corresponds to the machine running nova-api (or in + // Ubuntu, nova-api-metadata). A value of none (case insensitive) means that Felix should not + // set up any NAT rule for the metadata path. [Default: 127.0.0.1] + MetadataAddr string `json:"metadataAddr,omitempty"` + // MetadataPort is the port of the metadata server. This, combined with global.MetadataAddr (if + // not 'None'), is used to set up a NAT rule, from 169.254.169.254:80 to MetadataAddr:MetadataPort. + // In most cases this should not need to be changed [Default: 8775]. + MetadataPort *int `json:"metadataPort,omitempty"` + + // OpenstackRegion is the name of the region that a particular Felix belongs to. In a multi-region + // Calico/OpenStack deployment, this must be configured somehow for each Felix (here in the datamodel, + // or in felix.cfg or the environment on each compute node), and must match the [calico] + // openstack_region value configured in neutron.conf on each node. [Default: Empty] + OpenstackRegion string `json:"openstackRegion,omitempty"` + + // InterfacePrefix is the interface name prefix that identifies workload endpoints and so distinguishes + // them from host endpoint interfaces. Note: in environments other than bare metal, the orchestrators + // configure this appropriately. For example our Kubernetes and Docker integrations set the 'cali' value, + // and our OpenStack integration sets the 'tap' value. [Default: cali] + InterfacePrefix string `json:"interfacePrefix,omitempty"` + // InterfaceExclude is a comma-separated list of interfaces that Felix should exclude when monitoring for host + // endpoints. The default value ensures that Felix ignores Kubernetes' IPVS dummy interface, which is used + // internally by kube-proxy. If you want to exclude multiple interface names using a single value, the list + // supports regular expressions. For regular expressions you must wrap the value with '/'. For example + // having values '/^kube/,veth1' will exclude all interfaces that begin with 'kube' and also the interface + // 'veth1'. [Default: kube-ipvs0] + InterfaceExclude string `json:"interfaceExclude,omitempty"` + + // ChainInsertMode controls whether Felix hooks the kernel's top-level iptables chains by inserting a rule + // at the top of the chain or by appending a rule at the bottom. insert is the safe default since it prevents + // Calico's rules from being bypassed. If you switch to append mode, be sure that the other rules in the chains + // signal acceptance by falling through to the Calico rules, otherwise the Calico policy will be bypassed. + // [Default: insert] + ChainInsertMode string `json:"chainInsertMode,omitempty"` + // DefaultEndpointToHostAction controls what happens to traffic that goes from a workload endpoint to the host + // itself (after the traffic hits the endpoint egress policy). By default Calico blocks traffic from workload + // endpoints to the host itself with an iptables "DROP" action. If you want to allow some or all traffic from + // endpoint to host, set this parameter to RETURN or ACCEPT. Use RETURN if you have your own rules in the iptables + // "INPUT" chain; Calico will insert its rules at the top of that chain, then "RETURN" packets to the "INPUT" chain + // once it has completed processing workload endpoint egress policy. Use ACCEPT to unconditionally accept packets + // from workloads after processing workload endpoint egress policy. [Default: Drop] + DefaultEndpointToHostAction string `json:"defaultEndpointToHostAction,omitempty" validate:"omitempty,dropAcceptReturn"` + IptablesFilterAllowAction string `json:"iptablesFilterAllowAction,omitempty" validate:"omitempty,acceptReturn"` + IptablesMangleAllowAction string `json:"iptablesMangleAllowAction,omitempty" validate:"omitempty,acceptReturn"` + // IptablesFilterDenyAction controls what happens to traffic that is denied by network policy. By default Calico blocks traffic + // with an iptables "DROP" action. If you want to use "REJECT" action instead you can configure it in here. + IptablesFilterDenyAction string `json:"iptablesFilterDenyAction,omitempty" validate:"omitempty,dropReject"` + // LogPrefix is the log prefix that Felix uses when rendering LOG rules. [Default: calico-packet] + LogPrefix string `json:"logPrefix,omitempty"` + + // LogFilePath is the full path to the Felix log. Set to none to disable file logging. [Default: /var/log/calico/felix.log] + LogFilePath string `json:"logFilePath,omitempty"` + + // LogSeverityFile is the log severity above which logs are sent to the log file. [Default: Info] + LogSeverityFile string `json:"logSeverityFile,omitempty" validate:"omitempty,logLevel"` + // LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: Info] + LogSeverityScreen string `json:"logSeverityScreen,omitempty" validate:"omitempty,logLevel"` + // LogSeveritySys is the log severity above which logs are sent to the syslog. Set to None for no logging to syslog. + // [Default: Info] + LogSeveritySys string `json:"logSeveritySys,omitempty" validate:"omitempty,logLevel"` + // LogDebugFilenameRegex controls which source code files have their Debug log output included in the logs. + // Only logs from files with names that match the given regular expression are included. The filter only applies + // to Debug level logs. + LogDebugFilenameRegex string `json:"logDebugFilenameRegex,omitempty" validate:"omitempty,regexp"` + + // IPIPEnabled overrides whether Felix should configure an IPIP interface on the host. Optional as Felix determines this based on the existing IP pools. [Default: nil (unset)] + IPIPEnabled *bool `json:"ipipEnabled,omitempty" confignamev1:"IpInIpEnabled"` + // IPIPMTU is the MTU to set on the tunnel device. See Configuring MTU [Default: 1440] + IPIPMTU *int `json:"ipipMTU,omitempty" confignamev1:"IpInIpMtu"` + + // VXLANEnabled overrides whether Felix should create the VXLAN tunnel device for IPv4 VXLAN networking. Optional as Felix determines this based on the existing IP pools. [Default: nil (unset)] + VXLANEnabled *bool `json:"vxlanEnabled,omitempty" confignamev1:"VXLANEnabled"` + // VXLANMTU is the MTU to set on the IPv4 VXLAN tunnel device. See Configuring MTU [Default: 1410] + VXLANMTU *int `json:"vxlanMTU,omitempty"` + // VXLANMTUV6 is the MTU to set on the IPv6 VXLAN tunnel device. See Configuring MTU [Default: 1390] + VXLANMTUV6 *int `json:"vxlanMTUV6,omitempty"` + VXLANPort *int `json:"vxlanPort,omitempty"` + VXLANVNI *int `json:"vxlanVNI,omitempty"` + + // AllowVXLANPacketsFromWorkloads controls whether Felix will add a rule to drop VXLAN encapsulated traffic + // from workloads [Default: false] + // +optional + AllowVXLANPacketsFromWorkloads *bool `json:"allowVXLANPacketsFromWorkloads,omitempty"` + // AllowIPIPPacketsFromWorkloads controls whether Felix will add a rule to drop IPIP encapsulated traffic + // from workloads [Default: false] + // +optional + AllowIPIPPacketsFromWorkloads *bool `json:"allowIPIPPacketsFromWorkloads,omitempty"` + + // ReportingInterval is the interval at which Felix reports its status into the datastore or 0 to disable. + // Must be non-zero in OpenStack deployments. [Default: 30s] + ReportingInterval *metav1.Duration `json:"reportingInterval,omitempty" configv1timescale:"seconds" confignamev1:"ReportingIntervalSecs"` + // ReportingTTL is the time-to-live setting for process-wide status reports. [Default: 90s] + ReportingTTL *metav1.Duration `json:"reportingTTL,omitempty" configv1timescale:"seconds" confignamev1:"ReportingTTLSecs"` + + EndpointReportingEnabled *bool `json:"endpointReportingEnabled,omitempty"` + EndpointReportingDelay *metav1.Duration `json:"endpointReportingDelay,omitempty" configv1timescale:"seconds" confignamev1:"EndpointReportingDelaySecs"` + + // IptablesMarkMask is the mask that Felix selects its IPTables Mark bits from. Should be a 32 bit hexadecimal + // number with at least 8 bits set, none of which clash with any other mark bits in use on the system. + // [Default: 0xff000000] + IptablesMarkMask *uint32 `json:"iptablesMarkMask,omitempty"` + + DisableConntrackInvalidCheck *bool `json:"disableConntrackInvalidCheck,omitempty"` + + HealthEnabled *bool `json:"healthEnabled,omitempty"` + HealthHost *string `json:"healthHost,omitempty"` + HealthPort *int `json:"healthPort,omitempty"` + // HealthTimeoutOverrides allows the internal watchdog timeouts of individual subcomponents to be + // overridden. This is useful for working around "false positive" liveness timeouts that can occur + // in particularly stressful workloads or if CPU is constrained. For a list of active + // subcomponents, see Felix's logs. + HealthTimeoutOverrides []HealthTimeoutOverride `json:"healthTimeoutOverrides,omitempty" validate:"omitempty,dive"` + + // PrometheusMetricsEnabled enables the Prometheus metrics server in Felix if set to true. [Default: false] + PrometheusMetricsEnabled *bool `json:"prometheusMetricsEnabled,omitempty"` + // PrometheusMetricsHost is the host that the Prometheus metrics server should bind to. [Default: empty] + PrometheusMetricsHost string `json:"prometheusMetricsHost,omitempty" validate:"omitempty,prometheusHost"` + // PrometheusMetricsPort is the TCP port that the Prometheus metrics server should bind to. [Default: 9091] + PrometheusMetricsPort *int `json:"prometheusMetricsPort,omitempty"` + // PrometheusGoMetricsEnabled disables Go runtime metrics collection, which the Prometheus client does by default, when + // set to false. This reduces the number of metrics reported, reducing Prometheus load. [Default: true] + PrometheusGoMetricsEnabled *bool `json:"prometheusGoMetricsEnabled,omitempty"` + // PrometheusProcessMetricsEnabled disables process metrics collection, which the Prometheus client does by default, when + // set to false. This reduces the number of metrics reported, reducing Prometheus load. [Default: true] + PrometheusProcessMetricsEnabled *bool `json:"prometheusProcessMetricsEnabled,omitempty"` + // PrometheusWireGuardMetricsEnabled disables wireguard metrics collection, which the Prometheus client does by default, when + // set to false. This reduces the number of metrics reported, reducing Prometheus load. [Default: true] + PrometheusWireGuardMetricsEnabled *bool `json:"prometheusWireGuardMetricsEnabled,omitempty"` + + // FailsafeInboundHostPorts is a list of UDP/TCP ports and CIDRs that Felix will allow incoming traffic to host endpoints + // on irrespective of the security policy. This is useful to avoid accidentally cutting off a host with incorrect configuration. + // For back-compatibility, if the protocol is not specified, it defaults to "tcp". If a CIDR is not specified, it will allow + // traffic from all addresses. To disable all inbound host ports, use the value none. The default value allows ssh access + // and DHCP. + // [Default: tcp:22, udp:68, tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666, tcp:6667] + FailsafeInboundHostPorts *[]ProtoPort `json:"failsafeInboundHostPorts,omitempty"` + // FailsafeOutboundHostPorts is a list of UDP/TCP ports and CIDRs that Felix will allow outgoing traffic from host endpoints + // to irrespective of the security policy. This is useful to avoid accidentally cutting off a host with incorrect configuration. + // For back-compatibility, if the protocol is not specified, it defaults to "tcp". If a CIDR is not specified, it will allow + // traffic from all addresses. To disable all outbound host ports, use the value none. The default value opens etcd's standard + // ports to ensure that Felix does not get cut off from etcd as well as allowing DHCP and DNS. + // [Default: tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666, tcp:6667, udp:53, udp:67] + FailsafeOutboundHostPorts *[]ProtoPort `json:"failsafeOutboundHostPorts,omitempty"` + + // KubeNodePortRanges holds list of port ranges used for service node ports. Only used if felix detects kube-proxy running in ipvs mode. + // Felix uses these ranges to separate host and workload traffic. [Default: 30000:32767]. + KubeNodePortRanges *[]numorstring.Port `json:"kubeNodePortRanges,omitempty" validate:"omitempty,dive"` + + // PolicySyncPathPrefix is used to by Felix to communicate policy changes to external services, + // like Application layer policy. [Default: Empty] + PolicySyncPathPrefix string `json:"policySyncPathPrefix,omitempty"` + + // UsageReportingEnabled reports anonymous Calico version number and cluster size to projectcalico.org. Logs warnings returned by the usage + // server. For example, if a significant security vulnerability has been discovered in the version of Calico being used. [Default: true] + UsageReportingEnabled *bool `json:"usageReportingEnabled,omitempty"` + // UsageReportingInitialDelay controls the minimum delay before Felix makes a report. [Default: 300s] + UsageReportingInitialDelay *metav1.Duration `json:"usageReportingInitialDelay,omitempty" configv1timescale:"seconds" confignamev1:"UsageReportingInitialDelaySecs"` + // UsageReportingInterval controls the interval at which Felix makes reports. [Default: 86400s] + UsageReportingInterval *metav1.Duration `json:"usageReportingInterval,omitempty" configv1timescale:"seconds" confignamev1:"UsageReportingIntervalSecs"` + + // NATPortRange specifies the range of ports that is used for port mapping when doing outgoing NAT. When unset the default behavior of the + // network stack is used. + NATPortRange *numorstring.Port `json:"natPortRange,omitempty"` + + // NATOutgoingAddress specifies an address to use when performing source NAT for traffic in a natOutgoing pool that + // is leaving the network. By default the address used is an address on the interface the traffic is leaving on + // (ie it uses the iptables MASQUERADE target) + NATOutgoingAddress string `json:"natOutgoingAddress,omitempty"` + + // This is the IPv4 source address to use on programmed device routes. By default the source address is left blank, + // leaving the kernel to choose the source address used. + DeviceRouteSourceAddress string `json:"deviceRouteSourceAddress,omitempty"` + + // This is the IPv6 source address to use on programmed device routes. By default the source address is left blank, + // leaving the kernel to choose the source address used. + DeviceRouteSourceAddressIPv6 string `json:"deviceRouteSourceAddressIPv6,omitempty"` + + // This defines the route protocol added to programmed device routes, by default this will be RTPROT_BOOT + // when left blank. + DeviceRouteProtocol *int `json:"deviceRouteProtocol,omitempty"` + // Whether or not to remove device routes that have not been programmed by Felix. Disabling this will allow external + // applications to also add device routes. This is enabled by default which means we will remove externally added routes. + RemoveExternalRoutes *bool `json:"removeExternalRoutes,omitempty"` + + // ExternalNodesCIDRList is a list of CIDR's of external-non-calico-nodes which may source tunnel traffic and have + // the tunneled traffic be accepted at calico nodes. + ExternalNodesCIDRList *[]string `json:"externalNodesList,omitempty"` + + DebugMemoryProfilePath string `json:"debugMemoryProfilePath,omitempty"` + DebugDisableLogDropping *bool `json:"debugDisableLogDropping,omitempty"` + DebugSimulateCalcGraphHangAfter *metav1.Duration `json:"debugSimulateCalcGraphHangAfter,omitempty" configv1timescale:"seconds"` + DebugSimulateDataplaneHangAfter *metav1.Duration `json:"debugSimulateDataplaneHangAfter,omitempty" configv1timescale:"seconds"` + + IptablesNATOutgoingInterfaceFilter string `json:"iptablesNATOutgoingInterfaceFilter,omitempty" validate:"omitempty,ifaceFilter"` + + // SidecarAccelerationEnabled enables experimental sidecar acceleration [Default: false] + SidecarAccelerationEnabled *bool `json:"sidecarAccelerationEnabled,omitempty"` + + // XDPEnabled enables XDP acceleration for suitable untracked incoming deny rules. [Default: true] + XDPEnabled *bool `json:"xdpEnabled,omitempty" confignamev1:"XDPEnabled"` + + // GenericXDPEnabled enables Generic XDP so network cards that don't support XDP offload or driver + // modes can use XDP. This is not recommended since it doesn't provide better performance than + // iptables. [Default: false] + GenericXDPEnabled *bool `json:"genericXDPEnabled,omitempty" confignamev1:"GenericXDPEnabled"` + + // BPFEnabled, if enabled Felix will use the BPF dataplane. [Default: false] + BPFEnabled *bool `json:"bpfEnabled,omitempty" validate:"omitempty"` + // BPFDisableUnprivileged, if enabled, Felix sets the kernel.unprivileged_bpf_disabled sysctl to disable + // unprivileged use of BPF. This ensures that unprivileged users cannot access Calico's BPF maps and + // cannot insert their own BPF programs to interfere with Calico's. [Default: true] + BPFDisableUnprivileged *bool `json:"bpfDisableUnprivileged,omitempty" validate:"omitempty"` + // BPFLogLevel controls the log level of the BPF programs when in BPF dataplane mode. One of "Off", "Info", or + // "Debug". The logs are emitted to the BPF trace pipe, accessible with the command `tc exec bpf debug`. + // [Default: Off]. + // +optional + BPFLogLevel string `json:"bpfLogLevel" validate:"omitempty,bpfLogLevel"` + // BPFDataIfacePattern is a regular expression that controls which interfaces Felix should attach BPF programs to + // in order to catch traffic to/from the network. This needs to match the interfaces that Calico workload traffic + // flows over as well as any interfaces that handle incoming traffic to nodeports and services from outside the + // cluster. It should not match the workload interfaces (usually named cali...). + BPFDataIfacePattern string `json:"bpfDataIfacePattern,omitempty" validate:"omitempty,regexp"` + // BPFL3IfacePattern is a regular expression that allows to list tunnel devices like wireguard or vxlan (i.e., L3 devices) + // in addition to BPFDataIfacePattern. That is, tunnel interfaces not created by Calico, that Calico workload traffic flows + // over as well as any interfaces that handle incoming traffic to nodeports and services from outside the cluster. + BPFL3IfacePattern string `json:"bpfL3IfacePattern,omitempty" validate:"omitempty,regexp"` + // BPFConnectTimeLoadBalancingEnabled when in BPF mode, controls whether Felix installs the connection-time load + // balancer. The connect-time load balancer is required for the host to be able to reach Kubernetes services + // and it improves the performance of pod-to-service connections. The only reason to disable it is for debugging + // purposes. [Default: true] + BPFConnectTimeLoadBalancingEnabled *bool `json:"bpfConnectTimeLoadBalancingEnabled,omitempty" validate:"omitempty"` + // BPFExternalServiceMode in BPF mode, controls how connections from outside the cluster to services (node ports + // and cluster IPs) are forwarded to remote workloads. If set to "Tunnel" then both request and response traffic + // is tunneled to the remote node. If set to "DSR", the request traffic is tunneled but the response traffic + // is sent directly from the remote node. In "DSR" mode, the remote node appears to use the IP of the ingress + // node; this requires a permissive L2 network. [Default: Tunnel] + BPFExternalServiceMode string `json:"bpfExternalServiceMode,omitempty" validate:"omitempty,bpfServiceMode"` + // BPFDSROptoutCIDRs is a list of CIDRs which are excluded from DSR. That is, clients + // in those CIDRs will accesses nodeports as if BPFExternalServiceMode was set to + // Tunnel. + BPFDSROptoutCIDRs *[]string `json:"bpfDSROptoutCIDRs,omitempty" validate:"omitempty,cidrs"` + // BPFExtToServiceConnmark in BPF mode, control a 32bit mark that is set on connections from an + // external client to a local service. This mark allows us to control how packets of that + // connection are routed within the host and how is routing interpreted by RPF check. [Default: 0] + BPFExtToServiceConnmark *int `json:"bpfExtToServiceConnmark,omitempty" validate:"omitempty,gte=0,lte=4294967295"` + // BPFKubeProxyIptablesCleanupEnabled, if enabled in BPF mode, Felix will proactively clean up the upstream + // Kubernetes kube-proxy's iptables chains. Should only be enabled if kube-proxy is not running. [Default: true] + BPFKubeProxyIptablesCleanupEnabled *bool `json:"bpfKubeProxyIptablesCleanupEnabled,omitempty" validate:"omitempty"` + // BPFKubeProxyMinSyncPeriod, in BPF mode, controls the minimum time between updates to the dataplane for Felix's + // embedded kube-proxy. Lower values give reduced set-up latency. Higher values reduce Felix CPU usage by + // batching up more work. [Default: 1s] + BPFKubeProxyMinSyncPeriod *metav1.Duration `json:"bpfKubeProxyMinSyncPeriod,omitempty" validate:"omitempty" configv1timescale:"seconds"` + // BPFKubeProxyEndpointSlicesEnabled in BPF mode, controls whether Felix's + // embedded kube-proxy accepts EndpointSlices or not. + BPFKubeProxyEndpointSlicesEnabled *bool `json:"bpfKubeProxyEndpointSlicesEnabled,omitempty" validate:"omitempty"` + // BPFPSNATPorts sets the range from which we randomly pick a port if there is a source port + // collision. This should be within the ephemeral range as defined by RFC 6056 (1024–65535) and + // preferably outside the ephemeral ranges used by common operating systems. Linux uses + // 32768–60999, while others mostly use the IANA defined range 49152–65535. It is not necessarily + // a problem if this range overlaps with the operating systems. Both ends of the range are + // inclusive. [Default: 20000:29999] + BPFPSNATPorts *numorstring.Port `json:"bpfPSNATPorts,omitempty"` + // BPFMapSizeNATFrontend sets the size for nat front end map. + // FrontendMap should be large enough to hold an entry for each nodeport, + // external IP and each port in each service. + BPFMapSizeNATFrontend *int `json:"bpfMapSizeNATFrontend,omitempty"` + // BPFMapSizeNATBackend sets the size for nat back end map. + // This is the total number of endpoints. This is mostly + // more than the size of the number of services. + BPFMapSizeNATBackend *int `json:"bpfMapSizeNATBackend,omitempty"` + BPFMapSizeNATAffinity *int `json:"bpfMapSizeNATAffinity,omitempty"` + // BPFMapSizeRoute sets the size for the routes map. The routes map should be large enough + // to hold one entry per workload and a handful of entries per host (enough to cover its own IPs and + // tunnel IPs). + BPFMapSizeRoute *int `json:"bpfMapSizeRoute,omitempty"` + // BPFMapSizeConntrack sets the size for the conntrack map. This map must be large enough to hold + // an entry for each active connection. Warning: changing the size of the conntrack map can cause disruption. + BPFMapSizeConntrack *int `json:"bpfMapSizeConntrack,omitempty"` + // BPFMapSizeIPSets sets the size for ipsets map. The IP sets map must be large enough to hold an entry + // for each endpoint matched by every selector in the source/destination matches in network policy. Selectors + // such as "all()" can result in large numbers of entries (one entry per endpoint in that case). + BPFMapSizeIPSets *int `json:"bpfMapSizeIPSets,omitempty"` + // BPFMapSizeIfState sets the size for ifstate map. The ifstate map must be large enough to hold an entry + // for each device (host + workloads) on a host. + BPFMapSizeIfState *int `json:"bpfMapSizeIfState,omitempty"` + // BPFHostConntrackBypass Controls whether to bypass Linux conntrack in BPF mode for + // workloads and services. [Default: true - bypass Linux conntrack] + BPFHostConntrackBypass *bool `json:"bpfHostConntrackBypass,omitempty"` + // BPFEnforceRPF enforce strict RPF on all host interfaces with BPF programs regardless of + // what is the per-interfaces or global setting. Possible values are Disabled, Strict + // or Loose. [Default: Strict] + BPFEnforceRPF string `json:"bpfEnforceRPF,omitempty"` + // BPFPolicyDebugEnabled when true, Felix records detailed information + // about the BPF policy programs, which can be examined with the calico-bpf command-line tool. + BPFPolicyDebugEnabled *bool `json:"bpfPolicyDebugEnabled,omitempty"` + // RouteSource configures where Felix gets its routing information. + // - WorkloadIPs: use workload endpoints to construct routes. + // - CalicoIPAM: the default - use IPAM data to construct routes. + RouteSource string `json:"routeSource,omitempty" validate:"omitempty,routeSource"` + + // Calico programs additional Linux route tables for various purposes. + // RouteTableRanges specifies a set of table index ranges that Calico should use. + // Deprecates`RouteTableRange`, overrides `RouteTableRange`. + RouteTableRanges *RouteTableRanges `json:"routeTableRanges,omitempty" validate:"omitempty,dive"` + + // Deprecated in favor of RouteTableRanges. + // Calico programs additional Linux route tables for various purposes. + // RouteTableRange specifies the indices of the route tables that Calico should use. + RouteTableRange *RouteTableRange `json:"routeTableRange,omitempty" validate:"omitempty"` + + // RouteSyncDisabled will disable all operations performed on the route table. Set to true to + // run in network-policy mode only. + RouteSyncDisabled *bool `json:"routeSyncDisabled,omitempty"` + + // WireguardEnabled controls whether Wireguard is enabled for IPv4 (encapsulating IPv4 traffic over an IPv4 underlay network). [Default: false] + WireguardEnabled *bool `json:"wireguardEnabled,omitempty"` + // WireguardEnabledV6 controls whether Wireguard is enabled for IPv6 (encapsulating IPv6 traffic over an IPv6 underlay network). [Default: false] + WireguardEnabledV6 *bool `json:"wireguardEnabledV6,omitempty"` + // WireguardListeningPort controls the listening port used by IPv4 Wireguard. [Default: 51820] + WireguardListeningPort *int `json:"wireguardListeningPort,omitempty" validate:"omitempty,gt=0,lte=65535"` + // WireguardListeningPortV6 controls the listening port used by IPv6 Wireguard. [Default: 51821] + WireguardListeningPortV6 *int `json:"wireguardListeningPortV6,omitempty" validate:"omitempty,gt=0,lte=65535"` + // WireguardRoutingRulePriority controls the priority value to use for the Wireguard routing rule. [Default: 99] + WireguardRoutingRulePriority *int `json:"wireguardRoutingRulePriority,omitempty" validate:"omitempty,gt=0,lt=32766"` + // WireguardInterfaceName specifies the name to use for the IPv4 Wireguard interface. [Default: wireguard.cali] + WireguardInterfaceName string `json:"wireguardInterfaceName,omitempty" validate:"omitempty,interface"` + // WireguardInterfaceNameV6 specifies the name to use for the IPv6 Wireguard interface. [Default: wg-v6.cali] + WireguardInterfaceNameV6 string `json:"wireguardInterfaceNameV6,omitempty" validate:"omitempty,interface"` + // WireguardMTU controls the MTU on the IPv4 Wireguard interface. See Configuring MTU [Default: 1440] + WireguardMTU *int `json:"wireguardMTU,omitempty"` + // WireguardMTUV6 controls the MTU on the IPv6 Wireguard interface. See Configuring MTU [Default: 1420] + WireguardMTUV6 *int `json:"wireguardMTUV6,omitempty"` + // WireguardHostEncryptionEnabled controls whether Wireguard host-to-host encryption is enabled. [Default: false] + WireguardHostEncryptionEnabled *bool `json:"wireguardHostEncryptionEnabled,omitempty"` + // WireguardKeepAlive controls Wireguard PersistentKeepalive option. Set 0 to disable. [Default: 0] + WireguardPersistentKeepAlive *metav1.Duration `json:"wireguardKeepAlive,omitempty"` + + // Set source-destination-check on AWS EC2 instances. Accepted value must be one of "DoNothing", "Enable" or "Disable". + // [Default: DoNothing] + AWSSrcDstCheck *AWSSrcDstCheckOption `json:"awsSrcDstCheck,omitempty" validate:"omitempty,oneof=DoNothing Enable Disable"` + + // When service IP advertisement is enabled, prevent routing loops to service IPs that are + // not in use, by dropping or rejecting packets that do not get DNAT'd by kube-proxy. + // Unless set to "Disabled", in which case such routing loops continue to be allowed. + // [Default: Drop] + ServiceLoopPrevention string `json:"serviceLoopPrevention,omitempty" validate:"omitempty,oneof=Drop Reject Disabled"` + + // WorkloadSourceSpoofing controls whether pods can use the allowedSourcePrefixes annotation to send traffic with a source IP + // address that is not theirs. This is disabled by default. When set to "Any", pods can request any prefix. + WorkloadSourceSpoofing string `json:"workloadSourceSpoofing,omitempty" validate:"omitempty,oneof=Disabled Any"` + + // MTUIfacePattern is a regular expression that controls which interfaces Felix should scan in order + // to calculate the host's MTU. + // This should not match workload interfaces (usually named cali...). + // +optional + MTUIfacePattern string `json:"mtuIfacePattern,omitempty" validate:"omitempty,regexp"` + + // FloatingIPs configures whether or not Felix will program non-OpenStack floating IP addresses. (OpenStack-derived + // floating IPs are always programmed, regardless of this setting.) + // + // +optional + FloatingIPs *FloatingIPType `json:"floatingIPs,omitempty" validate:"omitempty"` +} + +type HealthTimeoutOverride struct { + Name string `json:"name"` + Timeout metav1.Duration `json:"timeout"` +} + +type RouteTableRange struct { + Min int `json:"min"` + Max int `json:"max"` +} + +type RouteTableIDRange struct { + Min int `json:"min"` + Max int `json:"max"` +} + +type RouteTableRanges []RouteTableIDRange + +func (r RouteTableRanges) NumDesignatedTables() int { + var len int = 0 + for _, rng := range r { + len += (rng.Max - rng.Min) + 1 // add one, since range is inclusive + } + + return len +} + +// ProtoPort is combination of protocol, port, and CIDR. Protocol and port must be specified. +type ProtoPort struct { + Protocol string `json:"protocol"` + Port uint16 `json:"port"` + // +optional + Net string `json:"net"` +} + +// New FelixConfiguration creates a new (zeroed) FelixConfiguration struct with the TypeMetadata +// initialized to the current version. +func NewFelixConfiguration() *FelixConfiguration { + return &FelixConfiguration{ + TypeMeta: metav1.TypeMeta{ + Kind: KindFelixConfiguration, + APIVersion: GroupVersionCurrent, + }, + } +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/globalnetworkpolicy.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/globalnetworkpolicy.go similarity index 70% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/globalnetworkpolicy.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/globalnetworkpolicy.go index 131a30e9e..3a8f598ed 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/globalnetworkpolicy.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/globalnetworkpolicy.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017,2019-2021 Tigera, 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,42 +14,35 @@ package v3 -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) const ( KindGlobalNetworkPolicy = "GlobalNetworkPolicy" KindGlobalNetworkPolicyList = "GlobalNetworkPolicyList" ) -// +genclient +// +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// GlobalNetworkPolicy contains information about a security Policy resource. This contains a set of -// security rules to apply. Security policies allow a selector-based security model which can override -// the security profiles directly referenced by an endpoint. -// -// Each policy must do one of the following: -// -// - Match the packet and apply an “allow” action; this immediately accepts the packet, skipping -// all further policies and profiles. This is not recommended in general, because it prevents -// further policy from being executed. -// - Match the packet and apply a “deny” action; this drops the packet immediately, skipping all -// further policy and profiles. -// - Fail to match the packet; in which case the packet proceeds to the next policy. If there -// are no more policies then the packet is dropped. -// -// Calico implements the security policy for each endpoint individually and only the policies that -// have matching selectors are implemented. This ensures that the number of rules that actually need -// to be inserted into the kernel is proportional to the number of local endpoints rather than the -// total amount of policy. -// -// GlobalNetworkPolicy is globally-scoped (i.e. not Namespaced). -type GlobalNetworkPolicy struct { +// GlobalNetworkPolicyList is a list of Policy objects. +type GlobalNetworkPolicyList struct { metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the Policy. - Spec GlobalNetworkPolicySpec `json:"spec,omitempty"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []GlobalNetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type GlobalNetworkPolicy struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec GlobalNetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } type GlobalNetworkPolicySpec struct { @@ -90,7 +83,7 @@ type GlobalNetworkPolicySpec struct { // type in {"frontend", "backend"} // deployment != "dev" // ! has(label_name) - Selector string `json:"selector" validate:"selector"` + Selector string `json:"selector,omitempty" validate:"selector"` // Types indicates whether this policy applies to ingress, or to egress, or to both. When // not explicitly specified (and so the value on creation is empty or nil), Calico defaults // Types according to what Ingress and Egress rules are present in the policy. The @@ -121,16 +114,7 @@ type GlobalNetworkPolicySpec struct { ServiceAccountSelector string `json:"serviceAccountSelector,omitempty" validate:"selector"` // NamespaceSelector is an optional field for an expression used to select a pod based on namespaces. - NamespaceSelector string `json:"namespaceSelector,omitempty" validate"selector"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GlobalNetworkPolicyList contains a list of GlobalNetworkPolicy resources. -type GlobalNetworkPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []GlobalNetworkPolicy `json:"items"` + NamespaceSelector string `json:"namespaceSelector,omitempty" validate:"selector"` } // NewGlobalNetworkPolicy creates a new (zeroed) GlobalNetworkPolicy struct with the TypeMetadata initialised to the current @@ -143,14 +127,3 @@ func NewGlobalNetworkPolicy() *GlobalNetworkPolicy { }, } } - -// NewGlobalNetworkPolicyList creates a new (zeroed) GlobalNetworkPolicyList struct with the TypeMetadata initialised to the current -// version. -func NewGlobalNetworkPolicyList() *GlobalNetworkPolicyList { - return &GlobalNetworkPolicyList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindGlobalNetworkPolicyList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/globalnetworkset.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/globalnetworkset.go similarity index 62% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/globalnetworkset.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/globalnetworkset.go index 4980b58d0..136d8edbc 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/globalnetworkset.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/globalnetworkset.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Tigera, Inc. All rights reserved. +// Copyright (c) 2018, 2021 Tigera, 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. @@ -23,17 +23,26 @@ const ( KindGlobalNetworkSetList = "GlobalNetworkSetList" ) -// +genclient +// +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// GlobalNetworkSet contains a set of arbitrary IP sub-networks/CIDRs that share labels to -// allow rules to refer to them via selectors. The labels of GlobalNetworkSet are not namespaced. -type GlobalNetworkSet struct { +// GlobalNetworkSetList is a list of NetworkSet objects. +type GlobalNetworkSetList struct { metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the NetworkSet. - Spec GlobalNetworkSetSpec `json:"spec,omitempty"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []GlobalNetworkSet `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type GlobalNetworkSet struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec GlobalNetworkSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // GlobalNetworkSetSpec contains the specification for a NetworkSet resource. @@ -42,15 +51,6 @@ type GlobalNetworkSetSpec struct { Nets []string `json:"nets,omitempty" validate:"omitempty,dive,cidr"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GlobalNetworkSetList contains a list of NetworkSet resources. -type GlobalNetworkSetList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []GlobalNetworkSet `json:"items"` -} - // NewGlobalNetworkSet creates a new (zeroed) NetworkSet struct with the TypeMetadata initialised to the current // version. func NewGlobalNetworkSet() *GlobalNetworkSet { @@ -61,14 +61,3 @@ func NewGlobalNetworkSet() *GlobalNetworkSet { }, } } - -// NewNetworkSetList creates a new (zeroed) NetworkSetList struct with the TypeMetadata initialised to the current -// version. -func NewGlobalNetworkSetList() *GlobalNetworkSetList { - return &GlobalNetworkSetList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindGlobalNetworkSetList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/hostendpoint.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/hostendpoint.go similarity index 77% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/hostendpoint.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/hostendpoint.go index f52b7a840..5b8027e5e 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/hostendpoint.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/hostendpoint.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017,2020-2021 Tigera, 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. @@ -15,8 +15,9 @@ package v3 import ( - "github.com/projectcalico/libcalico-go/lib/numorstring" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/projectcalico/api/pkg/lib/numorstring" ) const ( @@ -24,18 +25,26 @@ const ( KindHostEndpointList = "HostEndpointList" ) -// +genclient +// +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// HostEndpoint contains information about a HostEndpoint resource that represents a “bare-metal” -// interface attached to the host that is running Calico’s agent, Felix. By default, Calico doesn’t -// apply any policy to such interfaces. -type HostEndpoint struct { +// HostEndpointList is a list of HostEndpoint objects. +type HostEndpointList struct { metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the HostEndpoint. - Spec HostEndpointSpec `json:"spec,omitempty"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []HostEndpoint `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type HostEndpoint struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec HostEndpointSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // HostEndpointSpec contains the specification for a HostEndpoint resource. @@ -51,7 +60,7 @@ type HostEndpointSpec struct { // the host through the specific interface named by InterfaceName, or - when InterfaceName // is empty - through the specific interface that has one of the IPs in ExpectedIPs. // Therefore, when InterfaceName is empty, at least one expected IP must be specified. Only - // external interfaces (such as “eth0”) are supported here; it isn't possible for a + // external interfaces (such as "eth0") are supported here; it isn't possible for a // HostEndpoint to protect traffic through a specific local workload interface. // // Note: Only some kinds of policy are implemented for "*" HostEndpoints; initially just @@ -81,15 +90,6 @@ type EndpointPort struct { Port uint16 `json:"port" validate:"gt=0"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// HostEndpointList contains a list of HostEndpoint resources. -type HostEndpointList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []HostEndpoint `json:"items"` -} - // NewHostEndpoint creates a new (zeroed) HostEndpoint struct with the TypeMetadata initialised to the current // version. func NewHostEndpoint() *HostEndpoint { @@ -100,14 +100,3 @@ func NewHostEndpoint() *HostEndpoint { }, } } - -// NewHostEndpointList creates a new (zeroed) HostEndpointList struct with the TypeMetadata initialised to the current -// version. -func NewHostEndpointList() *HostEndpointList { - return &HostEndpointList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindHostEndpointList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/ipamconfig.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/ipamconfig.go new file mode 100644 index 000000000..d6e16847d --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/ipamconfig.go @@ -0,0 +1,68 @@ +// Copyright (c) 2022 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + KindIPAMConfiguration = "IPAMConfiguration" + KindIPAMConfigurationList = "IPAMConfigurationList" +) + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IPAMConfigurationList contains a list of IPAMConfiguration resources. +type IPAMConfigurationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []IPAMConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IPAMConfiguration contains information about a block for IP address assignment. +type IPAMConfiguration struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec IPAMConfigurationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// IPAMConfigurationSpec contains the specification for an IPPool resource. +type IPAMConfigurationSpec struct { + // When StrictAffinity is true, borrowing IP addresses is not allowed. + StrictAffinity bool `json:"strictAffinity" validate:"required"` + + // MaxBlocksPerHost, if non-zero, is the max number of blocks that can be + // affine to each host. + MaxBlocksPerHost int32 `json:"maxBlocksPerHost,omitempty"` +} + +// NewIPAMConfiguration creates a new (zeroed) IPAMConfiguration struct with the TypeMetadata initialised to the current +// version. +func NewIPAMConfiguration() *IPAMConfiguration { + return &IPAMConfiguration{ + TypeMeta: metav1.TypeMeta{ + Kind: KindIPPool, + APIVersion: GroupVersionCurrent, + }, + } +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ippool.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/ippool.go similarity index 57% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ippool.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/ippool.go index 77d9b70d4..76cc2557b 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ippool.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/ippool.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017, 2021 Tigera, 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. @@ -16,9 +16,6 @@ package v3 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - apiv1 "github.com/projectcalico/libcalico-go/lib/apis/v1" - "github.com/projectcalico/libcalico-go/lib/selector" ) const ( @@ -26,16 +23,26 @@ const ( KindIPPoolList = "IPPoolList" ) -// +genclient +// +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// IPPool contains information about a IPPool resource. -type IPPool struct { +// IPPoolList contains a list of IPPool resources. +type IPPoolList struct { metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the IPPool. - Spec IPPoolSpec `json:"spec,omitempty"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []IPPool `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type IPPool struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec IPPoolSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // IPPoolSpec contains the specification for an IPPool resource. @@ -44,21 +51,24 @@ type IPPoolSpec struct { CIDR string `json:"cidr" validate:"net"` // Contains configuration for VXLAN tunneling for this pool. If not specified, - // then this is defaulted to "Never" (i.e. VXLAN tunelling is disabled). + // then this is defaulted to "Never" (i.e. VXLAN tunneling is disabled). VXLANMode VXLANMode `json:"vxlanMode,omitempty" validate:"omitempty,vxlanMode"` // Contains configuration for IPIP tunneling for this pool. If not specified, - // then this is defaulted to "Never" (i.e. IPIP tunelling is disabled). + // then this is defaulted to "Never" (i.e. IPIP tunneling is disabled). IPIPMode IPIPMode `json:"ipipMode,omitempty" validate:"omitempty,ipIpMode"` - // When nat-outgoing is true, packets sent from Calico networked containers in + // When natOutgoing is true, packets sent from Calico networked containers in // this pool to destinations outside of this pool will be masqueraded. NATOutgoing bool `json:"natOutgoing,omitempty"` // When disabled is true, Calico IPAM will not assign addresses from this pool. Disabled bool `json:"disabled,omitempty"` - // The block size to use for IP address assignments from this pool. Defaults to 26 for IPv4 and 112 for IPv6. + // Disable exporting routes from this IP Pool's CIDR over BGP. [Default: false] + DisableBGPExport bool `json:"disableBGPExport,omitempty" validate:"omitempty"` + + // The block size to use for IP address assignments from this pool. Defaults to 26 for IPv4 and 122 for IPv6. BlockSize int `json:"blockSize,omitempty"` // Allows IPPool to allocate for a specific node by label selector. @@ -66,28 +76,23 @@ type IPPoolSpec struct { // Deprecated: this field is only used for APIv1 backwards compatibility. // Setting this field is not allowed, this field is for internal use only. - IPIP *apiv1.IPIPConfiguration `json:"ipip,omitempty" validate:"omitempty,mustBeNil"` + IPIP *IPIPConfiguration `json:"ipip,omitempty" validate:"omitempty,mustBeNil"` // Deprecated: this field is only used for APIv1 backwards compatibility. // Setting this field is not allowed, this field is for internal use only. NATOutgoingV1 bool `json:"nat-outgoing,omitempty" validate:"omitempty,mustBeFalse"` + + // AllowedUse controls what the IP pool will be used for. If not specified or empty, defaults to + // ["Tunnel", "Workload"] for back-compatibility + AllowedUses []IPPoolAllowedUse `json:"allowedUses,omitempty" validate:"omitempty"` } -// SelectsNode determines whether or not the IPPool's nodeSelector -// matches the labels on the given node. -func (pool IPPool) SelectsNode(n Node) (bool, error) { - // No node selector means that the pool matches the node. - if len(pool.Spec.NodeSelector) == 0 { - return true, nil - } - // Check for valid selector syntax. - sel, err := selector.Parse(pool.Spec.NodeSelector) - if err != nil { - return false, err - } - // Return whether or not the selector matches. - return sel.Evaluate(n.Labels), nil -} +type IPPoolAllowedUse string + +const ( + IPPoolAllowedUseWorkload IPPoolAllowedUse = "Workload" + IPPoolAllowedUseTunnel = "Tunnel" +) type VXLANMode string @@ -105,13 +110,29 @@ const ( IPIPModeCrossSubnet = "CrossSubnet" ) -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// The following definitions are only used for APIv1 backwards compatibility. +// They are for internal use only. +type EncapMode string -// IPPoolList contains a list of IPPool resources. -type IPPoolList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []IPPool `json:"items"` +const ( + Undefined EncapMode = "" + Always = "always" + CrossSubnet = "cross-subnet" +) + +const DefaultMode = Always + +type IPIPConfiguration struct { + // When enabled is true, ipip tunneling will be used to deliver packets to + // destinations within this pool. + Enabled bool `json:"enabled,omitempty"` + + // The IPIP mode. This can be one of "always" or "cross-subnet". A mode + // of "always" will also use IPIP tunneling for routing to destination IP + // addresses within this pool. A mode of "cross-subnet" will only use IPIP + // tunneling when the destination node is on a different subnet to the + // originating node. The default value (if not specified) is "always". + Mode EncapMode `json:"mode,omitempty" validate:"ipIpMode"` } // NewIPPool creates a new (zeroed) IPPool struct with the TypeMetadata initialised to the current @@ -124,14 +145,3 @@ func NewIPPool() *IPPool { }, } } - -// NewIPPoolList creates a new (zeroed) IPPoolList struct with the TypeMetadata initialised to the current -// version. -func NewIPPoolList() *IPPoolList { - return &IPPoolList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindIPPoolList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/ipreservation.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/ipreservation.go new file mode 100644 index 000000000..f8b43e96c --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/ipreservation.go @@ -0,0 +1,68 @@ +// Copyright (c) 2017, 2021 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + KindIPReservation = "IPReservation" + KindIPReservationList = "IPReservationList" +) + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IPReservationList contains a list of IPReservation resources. +type IPReservationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []IPReservation `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IPReservation allows certain IP addresses to be reserved (i.e. prevented from being allocated) by Calico +// IPAM. Reservations only block new allocations, they do not cause existing IP allocations to be released. +// The current implementation is only suitable for reserving small numbers of IP addresses relative to the +// size of the IP pool. If large portions of an IP pool are reserved, Calico IPAM may hunt for a long time +// to find a non-reserved IP. +type IPReservation struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec IPReservationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// IPReservationSpec contains the specification for an IPReservation resource. +type IPReservationSpec struct { + // ReservedCIDRs is a list of CIDRs and/or IP addresses that Calico IPAM will exclude from new allocations. + ReservedCIDRs []string `json:"reservedCIDRs,omitempty" validate:"cidrs,omitempty"` +} + +// NewIPReservation creates a new (zeroed) IPReservation struct with the TypeMetadata initialised to the current +// version. +func NewIPReservation() *IPReservation { + return &IPReservation{ + TypeMeta: metav1.TypeMeta{ + Kind: KindIPReservation, + APIVersion: GroupVersionCurrent, + }, + } +} diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/kubecontrollersconfig.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/kubecontrollersconfig.go new file mode 100644 index 000000000..d2805b7ca --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/kubecontrollersconfig.go @@ -0,0 +1,162 @@ +// Copyright (c) 2020-2021 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + KindKubeControllersConfiguration = "KubeControllersConfiguration" + KindKubeControllersConfigurationList = "KubeControllersConfigurationList" +) + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// KubeControllersConfigurationList contains a list of KubeControllersConfiguration object. +type KubeControllersConfigurationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []KubeControllersConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type KubeControllersConfiguration struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec KubeControllersConfigurationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + Status KubeControllersConfigurationStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// KubeControllersConfigurationSpec contains the values of the Kubernetes controllers configuration. +type KubeControllersConfigurationSpec struct { + // LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: Info] + LogSeverityScreen string `json:"logSeverityScreen,omitempty" validate:"omitempty,logLevel"` + + // HealthChecks enables or disables support for health checks [Default: Enabled] + HealthChecks string `json:"healthChecks,omitempty" validate:"omitempty,oneof=Enabled Disabled"` + + // EtcdV3CompactionPeriod is the period between etcdv3 compaction requests. Set to 0 to disable. [Default: 10m] + EtcdV3CompactionPeriod *metav1.Duration `json:"etcdV3CompactionPeriod,omitempty" validate:"omitempty"` + + // PrometheusMetricsPort is the TCP port that the Prometheus metrics server should bind to. Set to 0 to disable. [Default: 9094] + PrometheusMetricsPort *int `json:"prometheusMetricsPort,omitempty"` + + // Controllers enables and configures individual Kubernetes controllers + Controllers ControllersConfig `json:"controllers"` + + // DebugProfilePort configures the port to serve memory and cpu profiles on. If not specified, profiling + // is disabled. + DebugProfilePort *int32 `json:"debugProfilePort,omitempty"` +} + +// ControllersConfig enables and configures individual Kubernetes controllers +type ControllersConfig struct { + // Node enables and configures the node controller. Enabled by default, set to nil to disable. + Node *NodeControllerConfig `json:"node,omitempty"` + + // Policy enables and configures the policy controller. Enabled by default, set to nil to disable. + Policy *PolicyControllerConfig `json:"policy,omitempty"` + + // WorkloadEndpoint enables and configures the workload endpoint controller. Enabled by default, set to nil to disable. + WorkloadEndpoint *WorkloadEndpointControllerConfig `json:"workloadEndpoint,omitempty"` + + // ServiceAccount enables and configures the service account controller. Enabled by default, set to nil to disable. + ServiceAccount *ServiceAccountControllerConfig `json:"serviceAccount,omitempty"` + + // Namespace enables and configures the namespace controller. Enabled by default, set to nil to disable. + Namespace *NamespaceControllerConfig `json:"namespace,omitempty"` +} + +// NodeControllerConfig configures the node controller, which automatically cleans up configuration +// for nodes that no longer exist. Optionally, it can create host endpoints for all Kubernetes nodes. +type NodeControllerConfig struct { + // ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m] + ReconcilerPeriod *metav1.Duration `json:"reconcilerPeriod,omitempty" validate:"omitempty"` + + // SyncLabels controls whether to copy Kubernetes node labels to Calico nodes. [Default: Enabled] + SyncLabels string `json:"syncLabels,omitempty" validate:"omitempty,oneof=Enabled Disabled"` + + // HostEndpoint controls syncing nodes to host endpoints. Disabled by default, set to nil to disable. + HostEndpoint *AutoHostEndpointConfig `json:"hostEndpoint,omitempty"` + + // LeakGracePeriod is the period used by the controller to determine if an IP address has been leaked. + // Set to 0 to disable IP garbage collection. [Default: 15m] + // +optional + LeakGracePeriod *metav1.Duration `json:"leakGracePeriod,omitempty"` +} + +type AutoHostEndpointConfig struct { + // AutoCreate enables automatic creation of host endpoints for every node. [Default: Disabled] + AutoCreate string `json:"autoCreate,omitempty" validate:"omitempty,oneof=Enabled Disabled"` +} + +// PolicyControllerConfig configures the network policy controller, which syncs Kubernetes policies +// to Calico policies (only used for etcdv3 datastore). +type PolicyControllerConfig struct { + // ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m] + ReconcilerPeriod *metav1.Duration `json:"reconcilerPeriod,omitempty" validate:"omitempty"` +} + +// WorkloadEndpointControllerConfig configures the workload endpoint controller, which syncs Kubernetes +// labels to Calico workload endpoints (only used for etcdv3 datastore). +type WorkloadEndpointControllerConfig struct { + // ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m] + ReconcilerPeriod *metav1.Duration `json:"reconcilerPeriod,omitempty" validate:"omitempty"` +} + +// ServiceAccountControllerConfig configures the service account controller, which syncs Kubernetes +// service accounts to Calico profiles (only used for etcdv3 datastore). +type ServiceAccountControllerConfig struct { + // ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m] + ReconcilerPeriod *metav1.Duration `json:"reconcilerPeriod,omitempty" validate:"omitempty"` +} + +// NamespaceControllerConfig configures the service account controller, which syncs Kubernetes +// service accounts to Calico profiles (only used for etcdv3 datastore). +type NamespaceControllerConfig struct { + // ReconcilerPeriod is the period to perform reconciliation with the Calico datastore. [Default: 5m] + ReconcilerPeriod *metav1.Duration `json:"reconcilerPeriod,omitempty" validate:"omitempty"` +} + +// KubeControllersConfigurationStatus represents the status of the configuration. It's useful for admins to +// be able to see the actual config that was applied, which can be modified by environment variables on the +// kube-controllers process. +type KubeControllersConfigurationStatus struct { + // RunningConfig contains the effective config that is running in the kube-controllers pod, after + // merging the API resource with any environment variables. + RunningConfig KubeControllersConfigurationSpec `json:"runningConfig,omitempty"` + + // EnvironmentVars contains the environment variables on the kube-controllers that influenced + // the RunningConfig. + EnvironmentVars map[string]string `json:"environmentVars,omitempty"` +} + +// New KubeControllersConfiguration creates a new (zeroed) KubeControllersConfiguration struct with +// the TypeMetadata initialized to the current version. +func NewKubeControllersConfiguration() *KubeControllersConfiguration { + return &KubeControllersConfiguration{ + TypeMeta: metav1.TypeMeta{ + Kind: KindKubeControllersConfiguration, + APIVersion: GroupVersionCurrent, + }, + } +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/networkpolicy.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/networkpolicy.go similarity index 82% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/networkpolicy.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/networkpolicy.go index 6e5dcec14..5b69959ec 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/networkpolicy.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/networkpolicy.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017,2019,2021 Tigera, 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,23 +14,33 @@ package v3 -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) const ( KindNetworkPolicy = "NetworkPolicy" KindNetworkPolicyList = "NetworkPolicyList" ) +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NetworkPolicyList is a list of Policy objects. +type NetworkPolicyList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// NetworkPolicy is the Namespaced-equivalent of the GlobalNetworkPolicy. type NetworkPolicy struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the Policy. - Spec NetworkPolicySpec `json:"spec,omitempty"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } type NetworkPolicySpec struct { @@ -71,7 +81,7 @@ type NetworkPolicySpec struct { // type in {"frontend", "backend"} // deployment != "dev" // ! has(label_name) - Selector string `json:"selector" validate:"selector"` + Selector string `json:"selector,omitempty" validate:"selector"` // Types indicates whether this policy applies to ingress, or to egress, or to both. When // not explicitly specified (and so the value on creation is empty or nil), Calico defaults // Types according to what Ingress and Egress are present in the policy. The @@ -92,15 +102,6 @@ type NetworkPolicySpec struct { ServiceAccountSelector string `json:"serviceAccountSelector,omitempty" validate:"selector"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NetworkPolicyList contains a list of NetworkPolicy resources. -type NetworkPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []NetworkPolicy `json:"items"` -} - // NewNetworkPolicy creates a new (zeroed) NetworkPolicy struct with the TypeMetadata initialised to the current // version. func NewNetworkPolicy() *NetworkPolicy { @@ -111,14 +112,3 @@ func NewNetworkPolicy() *NetworkPolicy { }, } } - -// NewNetworkPolicyList creates a new (zeroed) NetworkPolicyList struct with the TypeMetadata initialised to the current -// version. -func NewNetworkPolicyList() *NetworkPolicyList { - return &NetworkPolicyList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindNetworkPolicyList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/networkset.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/networkset.go similarity index 65% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/networkset.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/networkset.go index a25f5c0f8..2d1630f33 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/networkset.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/networkset.go @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Tigera, Inc. All rights reserved. +// Copyright (c) 2019,2021 Tigera, 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. @@ -23,16 +23,24 @@ const ( KindNetworkSetList = "NetworkSetList" ) +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NetworkSetList is a list of NetworkSet objects. +type NetworkSetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []NetworkSet `json:"items" protobuf:"bytes,2,rep,name=items"` +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// NetworkSet is the Namespaced-equivalent of the GlobalNetworkSet. type NetworkSet struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the NetworkSet. - Spec NetworkSetSpec `json:"spec,omitempty"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec NetworkSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // NetworkSetSpec contains the specification for a NetworkSet resource. @@ -41,15 +49,6 @@ type NetworkSetSpec struct { Nets []string `json:"nets,omitempty" validate:"omitempty,dive,cidr"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NetworkSetList contains a list of NetworkSet resources. -type NetworkSetList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []NetworkSet `json:"items"` -} - // NewNetworkSet creates a new (zeroed) NetworkSet struct with the TypeMetadata initialised to the current version. func NewNetworkSet() *NetworkSet { return &NetworkSet{ @@ -59,14 +58,3 @@ func NewNetworkSet() *NetworkSet { }, } } - -// NewNetworkSetList creates a new (zeroed) NetworkSetList struct with the TypeMetadata initialised to the current -// version. -func NewNetworkSetList() *NetworkSetList { - return &NetworkSetList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindNetworkSetList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/nodestatus.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/nodestatus.go new file mode 100644 index 000000000..c3382024e --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/nodestatus.go @@ -0,0 +1,242 @@ +// Copyright (c) 2021 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + KindCalicoNodeStatus = "CalicoNodeStatus" + KindCalicoNodeStatusList = "CalicoNodeStatusList" +) + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CalicoNodeStatusList is a list of CalicoNodeStatus resources. +type CalicoNodeStatusList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []CalicoNodeStatus `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type CalicoNodeStatus struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec CalicoNodeStatusSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + Status CalicoNodeStatusStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` +} + +// CalicoNodeStatusSpec contains the specification for a CalicoNodeStatus resource. +type CalicoNodeStatusSpec struct { + // The node name identifies the Calico node instance for node status. + Node string `json:"node,omitempty" validate:"required,name"` + + // Classes declares the types of information to monitor for this calico/node, + // and allows for selective status reporting about certain subsets of information. + Classes []NodeStatusClassType `json:"classes,omitempty" validate:"required,unique"` + + // UpdatePeriodSeconds is the period at which CalicoNodeStatus should be updated. + // Set to 0 to disable CalicoNodeStatus refresh. Maximum update period is one day. + UpdatePeriodSeconds *uint32 `json:"updatePeriodSeconds,omitempty" validate:"required,gte=0,lte=86400"` +} + +// CalicoNodeStatusStatus defines the observed state of CalicoNodeStatus. +// No validation needed for status since it is updated by Calico. +type CalicoNodeStatusStatus struct { + // LastUpdated is a timestamp representing the server time when CalicoNodeStatus object + // last updated. It is represented in RFC3339 form and is in UTC. + // +nullable + LastUpdated metav1.Time `json:"lastUpdated,omitempty"` + + // Agent holds agent status on the node. + Agent CalicoNodeAgentStatus `json:"agent,omitempty"` + + // BGP holds node BGP status. + BGP CalicoNodeBGPStatus `json:"bgp,omitempty"` + + // Routes reports routes known to the Calico BGP daemon on the node. + Routes CalicoNodeBGPRouteStatus `json:"routes,omitempty"` +} + +// CalicoNodeAgentStatus defines the observed state of agent status on the node. +type CalicoNodeAgentStatus struct { + // BIRDV4 represents the latest observed status of bird4. + BIRDV4 BGPDaemonStatus `json:"birdV4,omitempty"` + + // BIRDV6 represents the latest observed status of bird6. + BIRDV6 BGPDaemonStatus `json:"birdV6,omitempty"` +} + +// CalicoNodeBGPStatus defines the observed state of BGP status on the node. +type CalicoNodeBGPStatus struct { + // The total number of IPv4 established bgp sessions. + NumberEstablishedV4 int `json:"numberEstablishedV4"` + + // The total number of IPv4 non-established bgp sessions. + NumberNotEstablishedV4 int `json:"numberNotEstablishedV4"` + + // The total number of IPv6 established bgp sessions. + NumberEstablishedV6 int `json:"numberEstablishedV6"` + + // The total number of IPv6 non-established bgp sessions. + NumberNotEstablishedV6 int `json:"numberNotEstablishedV6"` + + // PeersV4 represents IPv4 BGP peers status on the node. + PeersV4 []CalicoNodePeer `json:"peersV4,omitempty"` + + // PeersV6 represents IPv6 BGP peers status on the node. + PeersV6 []CalicoNodePeer `json:"peersV6,omitempty"` +} + +// CalicoNodeBGPRouteStatus defines the observed state of routes status on the node. +type CalicoNodeBGPRouteStatus struct { + // RoutesV4 represents IPv4 routes on the node. + RoutesV4 []CalicoNodeRoute `json:"routesV4,omitempty"` + + // RoutesV6 represents IPv6 routes on the node. + RoutesV6 []CalicoNodeRoute `json:"routesV6,omitempty"` +} + +// BGPDaemonStatus defines the observed state of BGP daemon. +type BGPDaemonStatus struct { + // The state of the BGP Daemon. + State BGPDaemonState `json:"state,omitempty"` + + // Version of the BGP daemon + Version string `json:"version,omitempty"` + + // Router ID used by bird. + RouterID string `json:"routerID,omitempty"` + + // LastBootTime holds the value of lastBootTime from bird.ctl output. + LastBootTime string `json:"lastBootTime,omitempty"` + + // LastReconfigurationTime holds the value of lastReconfigTime from bird.ctl output. + LastReconfigurationTime string `json:"lastReconfigurationTime,omitempty"` +} + +// CalicoNodePeer contains the status of BGP peers on the node. +type CalicoNodePeer struct { + // IP address of the peer whose condition we are reporting. + PeerIP string `json:"peerIP,omitempty" validate:"omitempty,ip"` + + // Type indicates whether this peer is configured via the node-to-node mesh, + // or via en explicit global or per-node BGPPeer object. + Type BGPPeerType `json:"type,omitempty"` + + // State is the BGP session state. + State BGPSessionState `json:"state,omitempty"` + + // Since the state or reason last changed. + Since string `json:"since,omitempty"` +} + +// CalicoNodeRoute contains the status of BGP routes on the node. +type CalicoNodeRoute struct { + // Type indicates if the route is being used for forwarding or not. + Type CalicoNodeRouteType `json:"type,omitempty"` + + // Destination of the route. + Destination string `json:"destination,omitempty"` + + // Gateway for the destination. + Gateway string `json:"gateway,omitempty"` + + // Interface for the destination + Interface string `json:"interface,omitempty"` + + // LearnedFrom contains information regarding where this route originated. + LearnedFrom CalicoNodeRouteLearnedFrom `json:"learnedFrom,omitempty"` +} + +// CalicoNodeRouteLearnedFrom contains the information of the source from which a routes has been learned. +type CalicoNodeRouteLearnedFrom struct { + // Type of the source where a route is learned from. + SourceType CalicoNodeRouteSourceType `json:"sourceType,omitempty"` + + // If sourceType is NodeMesh or BGPPeer, IP address of the router that sent us this route. + PeerIP string `json:"peerIP,omitempty, validate:"omitempty,ip"` +} + +// NewCalicoNodeStatus creates a new (zeroed) CalicoNodeStatus struct with the TypeMetadata initialised to the current +// version. +func NewCalicoNodeStatus() *CalicoNodeStatus { + return &CalicoNodeStatus{ + TypeMeta: metav1.TypeMeta{ + Kind: KindCalicoNodeStatus, + APIVersion: GroupVersionCurrent, + }, + } +} + +type CalicoNodeRouteType string + +const ( + RouteTypeFIB CalicoNodeRouteType = "FIB" + RouteTypeRIB = "RIB" +) + +type CalicoNodeRouteSourceType string + +const ( + RouteSourceTypeKernel CalicoNodeRouteSourceType = "Kernel" + RouteSourceTypeStatic = "Static" + RouteSourceTypeDirect = "Direct" + RouteSourceTypeNodeMesh = "NodeMesh" + RouteSourceTypeBGPPeer = "BGPPeer" +) + +type NodeStatusClassType string + +const ( + NodeStatusClassTypeAgent NodeStatusClassType = "Agent" + NodeStatusClassTypeBGP = "BGP" + NodeStatusClassTypeRoutes = "Routes" +) + +type BGPPeerType string + +const ( + BGPPeerTypeNodeMesh BGPPeerType = "NodeMesh" + BGPPeerTypeNodePeer = "NodePeer" + BGPPeerTypeGlobalPeer = "GlobalPeer" +) + +type BGPDaemonState string + +const ( + BGPDaemonStateReady BGPDaemonState = "Ready" + BGPDaemonStateNotReady = "NotReady" +) + +type BGPSessionState string + +const ( + BGPSessionStateIdle BGPSessionState = "Idle" + BGPSessionStateConnect = "Connect" + BGPSessionStateActive = "Active" + BGPSessionStateOpenSent = "OpenSent" + BGPSessionStateOpenConfirm = "OpenConfirm" + BGPSessionStateEstablished = "Established" + BGPSessionStateClose = "Close" +) diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/policy.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/policy_common.go similarity index 82% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/policy.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/policy_common.go index 471d15b7f..74830a60b 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/policy.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/policy_common.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2018 Tigera, Inc. All rights reserved. +// Copyright (c) 2017-2018,2020-2021 Tigera, 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. @@ -15,7 +15,7 @@ package v3 import ( - "github.com/projectcalico/libcalico-go/lib/numorstring" + "github.com/projectcalico/api/pkg/lib/numorstring" ) // PolicyType enumerates the possible values of the PolicySpec Types field. @@ -30,7 +30,7 @@ const ( // and security Profiles reference rules - separated out as a list of rules for both // ingress and egress packet matching. // -// Each positive match criteria has a negated version, prefixed with ”Not”. All the match +// Each positive match criteria has a negated version, prefixed with "Not". All the match // criteria within a rule must be satisfied for a packet to match. A single rule can contain // the positive and negative version of a match and both must be satisfied for the rule to match. type Rule struct { @@ -60,6 +60,9 @@ type Rule struct { // HTTP contains match criteria that apply to HTTP requests. HTTP *HTTPMatch `json:"http,omitempty" validate:"omitempty"` + + // Metadata contains additional information for this rule + Metadata *RuleMetadata `json:"metadata,omitempty" validate:"omitempty"` } // HTTPPath specifies an HTTP path to match. It may be either of the form: @@ -93,7 +96,7 @@ type ICMPFields struct { // (i.e. pings). Type *int `json:"type,omitempty" validate:"omitempty,gte=0,lte=254"` // Match on a specific ICMP code. If specified, the Type value must also be specified. - // This is a technical limitation imposed by the kernel’s iptables firewall, which + // This is a technical limitation imposed by the kernel's iptables firewall, which // Calico uses to enforce the rule. Code *int `json:"code,omitempty" validate:"omitempty,gte=0,lte=255"` } @@ -117,10 +120,10 @@ type EntityRule struct { // different. One negates the set of matched endpoints, the other negates the whole match: // // Selector = "!has(my_label)" matches packets that are from other Calico-controlled - // endpoints that do not have the label “my_label”. + // endpoints that do not have the label "my_label". // // NotSelector = "has(my_label)" matches packets that are not from Calico-controlled - // endpoints that do have the label “my_label”. + // endpoints that do have the label "my_label". // // The effect is that the latter will accept packets from non-Calico sources whereas the // former is limited to packets from Calico-controlled endpoints. @@ -128,16 +131,29 @@ type EntityRule struct { // NamespaceSelector is an optional field that contains a selector expression. Only traffic // that originates from (or terminates at) endpoints within the selected namespaces will be - // matched. When both NamespaceSelector and Selector are defined on the same rule, then only + // matched. When both NamespaceSelector and another selector are defined on the same rule, then only // workload endpoints that are matched by both selectors will be selected by the rule. // // For NetworkPolicy, an empty NamespaceSelector implies that the Selector is limited to selecting // only workload endpoints in the same namespace as the NetworkPolicy. // + // For NetworkPolicy, `global()` NamespaceSelector implies that the Selector is limited to selecting + // only GlobalNetworkSet or HostEndpoint. + // // For GlobalNetworkPolicy, an empty NamespaceSelector implies the Selector applies to workload // endpoints across all namespaces. NamespaceSelector string `json:"namespaceSelector,omitempty" validate:"omitempty,selector"` + // Services is an optional field that contains options for matching Kubernetes Services. + // If specified, only traffic that originates from or terminates at endpoints within the selected + // service(s) will be matched, and only to/from each endpoint's port. + // + // Services cannot be specified on the same rule as Selector, NotSelector, NamespaceSelector, Nets, + // NotNets or ServiceAccounts. + // + // Ports and NotPorts can only be specified with Services on ingress rules. + Services *ServiceMatch `json:"services,omitempty" validate:"omitempty"` + // Ports is an optional field that restricts the rule to only apply to traffic that has a // source (destination) port that matches one of these ranges/values. This value is a // list of integers or strings that represent ranges of ports. @@ -163,6 +179,15 @@ type EntityRule struct { ServiceAccounts *ServiceAccountMatch `json:"serviceAccounts,omitempty" validate:"omitempty"` } +type ServiceMatch struct { + // Name specifies the name of a Kubernetes Service to match. + Name string `json:"name,omitempty" validate:"omitempty,name"` + + // Namespace specifies the namespace of the given Service. If left empty, the rule + // will match within this policy's namespace. + Namespace string `json:"namespace,omitempty" validate:"omitempty,name"` +} + type ServiceAccountMatch struct { // Names is an optional field that restricts the rule to only apply to traffic that originates from (or terminates // at) a pod running as a service account whose name is in the list. @@ -182,3 +207,8 @@ const ( Log = "Log" Pass = "Pass" ) + +type RuleMetadata struct { + // Annotations is a set of key value pairs that give extra information about the rule + Annotations map[string]string `json:"annotations,omitempty"` +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/profile.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/profile.go similarity index 64% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/profile.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/profile.go index df001d32e..cb296de7e 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/profile.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/profile.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017,2021 Tigera, 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,27 +14,35 @@ package v3 -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) const ( KindProfile = "Profile" KindProfileList = "ProfileList" ) -// +genclient +// +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// Profile contains the details a security profile resource. A profile is set of security rules -// to apply on an endpoint. An endpoint (either a host endpoint or an endpoint on a workload) can -// reference zero or more profiles. The profile rules are applied directly to the endpoint *after* -// the selector-based security policy has been applied, and in the order the profiles are declared on the -// endpoint. -type Profile struct { +// ProfileList is a list of Profile objects. +type ProfileList struct { metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the Profile. - Spec ProfileSpec `json:"spec,omitempty"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []Profile `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type Profile struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec ProfileSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // ProfileSpec contains the specification for a security Profile resource. @@ -51,15 +59,6 @@ type ProfileSpec struct { LabelsToApply map[string]string `json:"labelsToApply,omitempty" validate:"omitempty,labels"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ProfileList contains a list of Profile resources. -type ProfileList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []Profile `json:"items"` -} - // NewProfile creates a new (zeroed) Profile struct with the TypeMetadata initialised to the current // version. func NewProfile() *Profile { @@ -70,14 +69,3 @@ func NewProfile() *Profile { }, } } - -// NewProfileList creates a new (zeroed) ProfileList struct with the TypeMetadata initialised to the current -// version. -func NewProfileList() *ProfileList { - return &ProfileList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindProfileList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/register.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/register.go new file mode 100644 index 000000000..870be0cdb --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/register.go @@ -0,0 +1,79 @@ +// Copyright (c) 2019-2022 Tigera, Inc. All rights reserved. + +package v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "projectcalico.org" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v3"} +var SchemeGroupVersionInternal = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme + AllKnownTypes = []runtime.Object{ + &NetworkPolicy{}, + &NetworkPolicyList{}, + &GlobalNetworkPolicy{}, + &GlobalNetworkPolicyList{}, + &GlobalNetworkSet{}, + &GlobalNetworkSetList{}, + &HostEndpoint{}, + &HostEndpointList{}, + &IPPool{}, + &IPPoolList{}, + &IPReservation{}, + &IPReservationList{}, + &BGPConfiguration{}, + &BGPConfigurationList{}, + &BGPFilter{}, + &BGPFilterList{}, + &BGPPeer{}, + &BGPPeerList{}, + &Profile{}, + &ProfileList{}, + &FelixConfiguration{}, + &FelixConfigurationList{}, + &KubeControllersConfiguration{}, + &KubeControllersConfigurationList{}, + &ClusterInformation{}, + &ClusterInformationList{}, + &NetworkSet{}, + &NetworkSetList{}, + &CalicoNodeStatus{}, + &CalicoNodeStatusList{}, + &IPAMConfiguration{}, + &IPAMConfigurationList{}, + &BlockAffinity{}, + &BlockAffinityList{}, + &BGPFilter{}, + &BGPFilterList{}, + } +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addConversionFuncs) +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, AllKnownTypes...) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/zz_generated.deepcopy.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/zz_generated.deepcopy.go similarity index 63% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/zz_generated.deepcopy.go rename to vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/zz_generated.deepcopy.go index 632548855..ec83d669f 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/zz_generated.deepcopy.go +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/zz_generated.deepcopy.go @@ -1,54 +1,31 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated -// Copyright (c) 2016-2017 Tigera, 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. +// Copyright (c) 2023 Tigera, Inc. All rights reserved. // Code generated by deepcopy-gen. DO NOT EDIT. package v3 import ( - apisv1 "github.com/projectcalico/libcalico-go/lib/apis/v1" - numorstring "github.com/projectcalico/libcalico-go/lib/numorstring" + numorstring "github.com/projectcalico/api/pkg/lib/numorstring" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AllocationAttribute) DeepCopyInto(out *AllocationAttribute) { +func (in *AutoHostEndpointConfig) DeepCopyInto(out *AutoHostEndpointConfig) { *out = *in - if in.AttrPrimary != nil { - in, out := &in.AttrPrimary, &out.AttrPrimary - *out = new(string) - **out = **in - } - if in.AttrSecondary != nil { - in, out := &in.AttrSecondary, &out.AttrSecondary - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationAttribute. -func (in *AllocationAttribute) DeepCopy() *AllocationAttribute { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoHostEndpointConfig. +func (in *AutoHostEndpointConfig) DeepCopy() *AutoHostEndpointConfig { if in == nil { return nil } - out := new(AllocationAttribute) + out := new(AutoHostEndpointConfig) in.DeepCopyInto(out) return out } @@ -126,6 +103,11 @@ func (in *BGPConfigurationSpec) DeepCopyInto(out *BGPConfigurationSpec) { *out = new(numorstring.ASNumber) **out = **in } + if in.ServiceLoadBalancerIPs != nil { + in, out := &in.ServiceLoadBalancerIPs, &out.ServiceLoadBalancerIPs + *out = make([]ServiceLoadBalancerIPBlock, len(*in)) + copy(*out, *in) + } if in.ServiceExternalIPs != nil { in, out := &in.ServiceExternalIPs, &out.ServiceExternalIPs *out = make([]ServiceExternalIPBlock, len(*in)) @@ -136,6 +118,38 @@ func (in *BGPConfigurationSpec) DeepCopyInto(out *BGPConfigurationSpec) { *out = make([]ServiceClusterIPBlock, len(*in)) copy(*out, *in) } + if in.Communities != nil { + in, out := &in.Communities, &out.Communities + *out = make([]Community, len(*in)) + copy(*out, *in) + } + if in.PrefixAdvertisements != nil { + in, out := &in.PrefixAdvertisements, &out.PrefixAdvertisements + *out = make([]PrefixAdvertisement, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NodeMeshPassword != nil { + in, out := &in.NodeMeshPassword, &out.NodeMeshPassword + *out = new(BGPPassword) + (*in).DeepCopyInto(*out) + } + if in.NodeMeshMaxRestartTime != nil { + in, out := &in.NodeMeshMaxRestartTime, &out.NodeMeshMaxRestartTime + *out = new(v1.Duration) + **out = **in + } + if in.BindMode != nil { + in, out := &in.BindMode, &out.BindMode + *out = new(BindMode) + **out = **in + } + if in.IgnoredInterfaces != nil { + in, out := &in.IgnoredInterfaces, &out.IgnoredInterfaces + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -149,12 +163,177 @@ func (in *BGPConfigurationSpec) DeepCopy() *BGPConfigurationSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BGPDaemonStatus) DeepCopyInto(out *BGPDaemonStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPDaemonStatus. +func (in *BGPDaemonStatus) DeepCopy() *BGPDaemonStatus { + if in == nil { + return nil + } + out := new(BGPDaemonStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BGPFilter) DeepCopyInto(out *BGPFilter) { + *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 BGPFilter. +func (in *BGPFilter) DeepCopy() *BGPFilter { + if in == nil { + return nil + } + out := new(BGPFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BGPFilter) 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 *BGPFilterList) DeepCopyInto(out *BGPFilterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BGPFilter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPFilterList. +func (in *BGPFilterList) DeepCopy() *BGPFilterList { + if in == nil { + return nil + } + out := new(BGPFilterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BGPFilterList) 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 *BGPFilterRuleV4) DeepCopyInto(out *BGPFilterRuleV4) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPFilterRuleV4. +func (in *BGPFilterRuleV4) DeepCopy() *BGPFilterRuleV4 { + if in == nil { + return nil + } + out := new(BGPFilterRuleV4) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BGPFilterRuleV6) DeepCopyInto(out *BGPFilterRuleV6) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPFilterRuleV6. +func (in *BGPFilterRuleV6) DeepCopy() *BGPFilterRuleV6 { + if in == nil { + return nil + } + out := new(BGPFilterRuleV6) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BGPFilterSpec) DeepCopyInto(out *BGPFilterSpec) { + *out = *in + if in.ExportV4 != nil { + in, out := &in.ExportV4, &out.ExportV4 + *out = make([]BGPFilterRuleV4, len(*in)) + copy(*out, *in) + } + if in.ImportV4 != nil { + in, out := &in.ImportV4, &out.ImportV4 + *out = make([]BGPFilterRuleV4, len(*in)) + copy(*out, *in) + } + if in.ExportV6 != nil { + in, out := &in.ExportV6, &out.ExportV6 + *out = make([]BGPFilterRuleV6, len(*in)) + copy(*out, *in) + } + if in.ImportV6 != nil { + in, out := &in.ImportV6, &out.ImportV6 + *out = make([]BGPFilterRuleV6, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPFilterSpec. +func (in *BGPFilterSpec) DeepCopy() *BGPFilterSpec { + if in == nil { + return nil + } + out := new(BGPFilterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BGPPassword) DeepCopyInto(out *BGPPassword) { + *out = *in + if in.SecretKeyRef != nil { + in, out := &in.SecretKeyRef, &out.SecretKeyRef + *out = new(corev1.SecretKeySelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPPassword. +func (in *BGPPassword) DeepCopy() *BGPPassword { + if in == nil { + return nil + } + out := new(BGPPassword) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BGPPeer) DeepCopyInto(out *BGPPeer) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) return } @@ -212,6 +391,31 @@ func (in *BGPPeerList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BGPPeerSpec) DeepCopyInto(out *BGPPeerSpec) { *out = *in + if in.Password != nil { + in, out := &in.Password, &out.Password + *out = new(BGPPassword) + (*in).DeepCopyInto(*out) + } + if in.MaxRestartTime != nil { + in, out := &in.MaxRestartTime, &out.MaxRestartTime + *out = new(v1.Duration) + **out = **in + } + if in.NumAllowedLocalASNumbers != nil { + in, out := &in.NumAllowedLocalASNumbers, &out.NumAllowedLocalASNumbers + *out = new(int32) + **out = **in + } + if in.TTLSecurity != nil { + in, out := &in.TTLSecurity, &out.TTLSecurity + *out = new(byte) + **out = **in + } + if in.Filters != nil { + in, out := &in.Filters, &out.Filters + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -301,6 +505,232 @@ func (in *BlockAffinitySpec) DeepCopy() *BlockAffinitySpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CalicoNodeAgentStatus) DeepCopyInto(out *CalicoNodeAgentStatus) { + *out = *in + out.BIRDV4 = in.BIRDV4 + out.BIRDV6 = in.BIRDV6 + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNodeAgentStatus. +func (in *CalicoNodeAgentStatus) DeepCopy() *CalicoNodeAgentStatus { + if in == nil { + return nil + } + out := new(CalicoNodeAgentStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CalicoNodeBGPRouteStatus) DeepCopyInto(out *CalicoNodeBGPRouteStatus) { + *out = *in + if in.RoutesV4 != nil { + in, out := &in.RoutesV4, &out.RoutesV4 + *out = make([]CalicoNodeRoute, len(*in)) + copy(*out, *in) + } + if in.RoutesV6 != nil { + in, out := &in.RoutesV6, &out.RoutesV6 + *out = make([]CalicoNodeRoute, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNodeBGPRouteStatus. +func (in *CalicoNodeBGPRouteStatus) DeepCopy() *CalicoNodeBGPRouteStatus { + if in == nil { + return nil + } + out := new(CalicoNodeBGPRouteStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CalicoNodeBGPStatus) DeepCopyInto(out *CalicoNodeBGPStatus) { + *out = *in + if in.PeersV4 != nil { + in, out := &in.PeersV4, &out.PeersV4 + *out = make([]CalicoNodePeer, len(*in)) + copy(*out, *in) + } + if in.PeersV6 != nil { + in, out := &in.PeersV6, &out.PeersV6 + *out = make([]CalicoNodePeer, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNodeBGPStatus. +func (in *CalicoNodeBGPStatus) DeepCopy() *CalicoNodeBGPStatus { + if in == nil { + return nil + } + out := new(CalicoNodeBGPStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CalicoNodePeer) DeepCopyInto(out *CalicoNodePeer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNodePeer. +func (in *CalicoNodePeer) DeepCopy() *CalicoNodePeer { + if in == nil { + return nil + } + out := new(CalicoNodePeer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CalicoNodeRoute) DeepCopyInto(out *CalicoNodeRoute) { + *out = *in + out.LearnedFrom = in.LearnedFrom + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNodeRoute. +func (in *CalicoNodeRoute) DeepCopy() *CalicoNodeRoute { + if in == nil { + return nil + } + out := new(CalicoNodeRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CalicoNodeRouteLearnedFrom) DeepCopyInto(out *CalicoNodeRouteLearnedFrom) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNodeRouteLearnedFrom. +func (in *CalicoNodeRouteLearnedFrom) DeepCopy() *CalicoNodeRouteLearnedFrom { + if in == nil { + return nil + } + out := new(CalicoNodeRouteLearnedFrom) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CalicoNodeStatus) DeepCopyInto(out *CalicoNodeStatus) { + *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 CalicoNodeStatus. +func (in *CalicoNodeStatus) DeepCopy() *CalicoNodeStatus { + if in == nil { + return nil + } + out := new(CalicoNodeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CalicoNodeStatus) 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 *CalicoNodeStatusList) DeepCopyInto(out *CalicoNodeStatusList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CalicoNodeStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNodeStatusList. +func (in *CalicoNodeStatusList) DeepCopy() *CalicoNodeStatusList { + if in == nil { + return nil + } + out := new(CalicoNodeStatusList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CalicoNodeStatusList) 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 *CalicoNodeStatusSpec) DeepCopyInto(out *CalicoNodeStatusSpec) { + *out = *in + if in.Classes != nil { + in, out := &in.Classes, &out.Classes + *out = make([]NodeStatusClassType, len(*in)) + copy(*out, *in) + } + if in.UpdatePeriodSeconds != nil { + in, out := &in.UpdatePeriodSeconds, &out.UpdatePeriodSeconds + *out = new(uint32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNodeStatusSpec. +func (in *CalicoNodeStatusSpec) DeepCopy() *CalicoNodeStatusSpec { + if in == nil { + return nil + } + out := new(CalicoNodeStatusSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CalicoNodeStatusStatus) DeepCopyInto(out *CalicoNodeStatusStatus) { + *out = *in + in.LastUpdated.DeepCopyInto(&out.LastUpdated) + out.Agent = in.Agent + in.BGP.DeepCopyInto(&out.BGP) + in.Routes.DeepCopyInto(&out.Routes) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNodeStatusStatus. +func (in *CalicoNodeStatusStatus) DeepCopy() *CalicoNodeStatusStatus { + if in == nil { + return nil + } + out := new(CalicoNodeStatusStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterInformation) DeepCopyInto(out *ClusterInformation) { *out = *in @@ -382,6 +812,63 @@ func (in *ClusterInformationSpec) DeepCopy() *ClusterInformationSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Community) DeepCopyInto(out *Community) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Community. +func (in *Community) DeepCopy() *Community { + if in == nil { + return nil + } + out := new(Community) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllersConfig) DeepCopyInto(out *ControllersConfig) { + *out = *in + if in.Node != nil { + in, out := &in.Node, &out.Node + *out = new(NodeControllerConfig) + (*in).DeepCopyInto(*out) + } + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(PolicyControllerConfig) + (*in).DeepCopyInto(*out) + } + if in.WorkloadEndpoint != nil { + in, out := &in.WorkloadEndpoint, &out.WorkloadEndpoint + *out = new(WorkloadEndpointControllerConfig) + (*in).DeepCopyInto(*out) + } + if in.ServiceAccount != nil { + in, out := &in.ServiceAccount, &out.ServiceAccount + *out = new(ServiceAccountControllerConfig) + (*in).DeepCopyInto(*out) + } + if in.Namespace != nil { + in, out := &in.Namespace, &out.Namespace + *out = new(NamespaceControllerConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllersConfig. +func (in *ControllersConfig) DeepCopy() *ControllersConfig { + if in == nil { + return nil + } + out := new(ControllersConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EndpointPort) DeepCopyInto(out *EndpointPort) { *out = *in @@ -407,6 +894,11 @@ func (in *EntityRule) DeepCopyInto(out *EntityRule) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = new(ServiceMatch) + **out = **in + } if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]numorstring.Port, len(*in)) @@ -508,21 +1000,26 @@ func (in *FelixConfigurationSpec) DeepCopyInto(out *FelixConfigurationSpec) { *out = new(bool) **out = **in } + if in.DataplaneWatchdogTimeout != nil { + in, out := &in.DataplaneWatchdogTimeout, &out.DataplaneWatchdogTimeout + *out = new(v1.Duration) + **out = **in + } if in.IPv6Support != nil { in, out := &in.IPv6Support, &out.IPv6Support *out = new(bool) **out = **in } - if in.IgnoreLooseRPF != nil { - in, out := &in.IgnoreLooseRPF, &out.IgnoreLooseRPF - *out = new(bool) - **out = **in - } if in.RouteRefreshInterval != nil { in, out := &in.RouteRefreshInterval, &out.RouteRefreshInterval *out = new(v1.Duration) **out = **in } + if in.InterfaceRefreshInterval != nil { + in, out := &in.InterfaceRefreshInterval, &out.InterfaceRefreshInterval + *out = new(v1.Duration) + **out = **in + } if in.IptablesRefreshInterval != nil { in, out := &in.IptablesRefreshInterval, &out.IptablesRefreshInterval *out = new(v1.Duration) @@ -593,6 +1090,11 @@ func (in *FelixConfigurationSpec) DeepCopyInto(out *FelixConfigurationSpec) { *out = new(int) **out = **in } + if in.VXLANMTUV6 != nil { + in, out := &in.VXLANMTUV6, &out.VXLANMTUV6 + *out = new(int) + **out = **in + } if in.VXLANPort != nil { in, out := &in.VXLANPort, &out.VXLANPort *out = new(int) @@ -603,6 +1105,16 @@ func (in *FelixConfigurationSpec) DeepCopyInto(out *FelixConfigurationSpec) { *out = new(int) **out = **in } + if in.AllowVXLANPacketsFromWorkloads != nil { + in, out := &in.AllowVXLANPacketsFromWorkloads, &out.AllowVXLANPacketsFromWorkloads + *out = new(bool) + **out = **in + } + if in.AllowIPIPPacketsFromWorkloads != nil { + in, out := &in.AllowIPIPPacketsFromWorkloads, &out.AllowIPIPPacketsFromWorkloads + *out = new(bool) + **out = **in + } if in.ReportingInterval != nil { in, out := &in.ReportingInterval, &out.ReportingInterval *out = new(v1.Duration) @@ -648,6 +1160,11 @@ func (in *FelixConfigurationSpec) DeepCopyInto(out *FelixConfigurationSpec) { *out = new(int) **out = **in } + if in.HealthTimeoutOverrides != nil { + in, out := &in.HealthTimeoutOverrides, &out.HealthTimeoutOverrides + *out = make([]HealthTimeoutOverride, len(*in)) + copy(*out, *in) + } if in.PrometheusMetricsEnabled != nil { in, out := &in.PrometheusMetricsEnabled, &out.PrometheusMetricsEnabled *out = new(bool) @@ -668,6 +1185,11 @@ func (in *FelixConfigurationSpec) DeepCopyInto(out *FelixConfigurationSpec) { *out = new(bool) **out = **in } + if in.PrometheusWireGuardMetricsEnabled != nil { + in, out := &in.PrometheusWireGuardMetricsEnabled, &out.PrometheusWireGuardMetricsEnabled + *out = new(bool) + **out = **in + } if in.FailsafeInboundHostPorts != nil { in, out := &in.FailsafeInboundHostPorts, &out.FailsafeInboundHostPorts *out = new([]ProtoPort) @@ -764,6 +1286,174 @@ func (in *FelixConfigurationSpec) DeepCopyInto(out *FelixConfigurationSpec) { *out = new(bool) **out = **in } + if in.BPFEnabled != nil { + in, out := &in.BPFEnabled, &out.BPFEnabled + *out = new(bool) + **out = **in + } + if in.BPFDisableUnprivileged != nil { + in, out := &in.BPFDisableUnprivileged, &out.BPFDisableUnprivileged + *out = new(bool) + **out = **in + } + if in.BPFConnectTimeLoadBalancingEnabled != nil { + in, out := &in.BPFConnectTimeLoadBalancingEnabled, &out.BPFConnectTimeLoadBalancingEnabled + *out = new(bool) + **out = **in + } + if in.BPFDSROptoutCIDRs != nil { + in, out := &in.BPFDSROptoutCIDRs, &out.BPFDSROptoutCIDRs + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) + } + } + if in.BPFExtToServiceConnmark != nil { + in, out := &in.BPFExtToServiceConnmark, &out.BPFExtToServiceConnmark + *out = new(int) + **out = **in + } + if in.BPFKubeProxyIptablesCleanupEnabled != nil { + in, out := &in.BPFKubeProxyIptablesCleanupEnabled, &out.BPFKubeProxyIptablesCleanupEnabled + *out = new(bool) + **out = **in + } + if in.BPFKubeProxyMinSyncPeriod != nil { + in, out := &in.BPFKubeProxyMinSyncPeriod, &out.BPFKubeProxyMinSyncPeriod + *out = new(v1.Duration) + **out = **in + } + if in.BPFKubeProxyEndpointSlicesEnabled != nil { + in, out := &in.BPFKubeProxyEndpointSlicesEnabled, &out.BPFKubeProxyEndpointSlicesEnabled + *out = new(bool) + **out = **in + } + if in.BPFPSNATPorts != nil { + in, out := &in.BPFPSNATPorts, &out.BPFPSNATPorts + *out = new(numorstring.Port) + **out = **in + } + if in.BPFMapSizeNATFrontend != nil { + in, out := &in.BPFMapSizeNATFrontend, &out.BPFMapSizeNATFrontend + *out = new(int) + **out = **in + } + if in.BPFMapSizeNATBackend != nil { + in, out := &in.BPFMapSizeNATBackend, &out.BPFMapSizeNATBackend + *out = new(int) + **out = **in + } + if in.BPFMapSizeNATAffinity != nil { + in, out := &in.BPFMapSizeNATAffinity, &out.BPFMapSizeNATAffinity + *out = new(int) + **out = **in + } + if in.BPFMapSizeRoute != nil { + in, out := &in.BPFMapSizeRoute, &out.BPFMapSizeRoute + *out = new(int) + **out = **in + } + if in.BPFMapSizeConntrack != nil { + in, out := &in.BPFMapSizeConntrack, &out.BPFMapSizeConntrack + *out = new(int) + **out = **in + } + if in.BPFMapSizeIPSets != nil { + in, out := &in.BPFMapSizeIPSets, &out.BPFMapSizeIPSets + *out = new(int) + **out = **in + } + if in.BPFMapSizeIfState != nil { + in, out := &in.BPFMapSizeIfState, &out.BPFMapSizeIfState + *out = new(int) + **out = **in + } + if in.BPFHostConntrackBypass != nil { + in, out := &in.BPFHostConntrackBypass, &out.BPFHostConntrackBypass + *out = new(bool) + **out = **in + } + if in.BPFPolicyDebugEnabled != nil { + in, out := &in.BPFPolicyDebugEnabled, &out.BPFPolicyDebugEnabled + *out = new(bool) + **out = **in + } + if in.RouteTableRanges != nil { + in, out := &in.RouteTableRanges, &out.RouteTableRanges + *out = new(RouteTableRanges) + if **in != nil { + in, out := *in, *out + *out = make([]RouteTableIDRange, len(*in)) + copy(*out, *in) + } + } + if in.RouteTableRange != nil { + in, out := &in.RouteTableRange, &out.RouteTableRange + *out = new(RouteTableRange) + **out = **in + } + if in.RouteSyncDisabled != nil { + in, out := &in.RouteSyncDisabled, &out.RouteSyncDisabled + *out = new(bool) + **out = **in + } + if in.WireguardEnabled != nil { + in, out := &in.WireguardEnabled, &out.WireguardEnabled + *out = new(bool) + **out = **in + } + if in.WireguardEnabledV6 != nil { + in, out := &in.WireguardEnabledV6, &out.WireguardEnabledV6 + *out = new(bool) + **out = **in + } + if in.WireguardListeningPort != nil { + in, out := &in.WireguardListeningPort, &out.WireguardListeningPort + *out = new(int) + **out = **in + } + if in.WireguardListeningPortV6 != nil { + in, out := &in.WireguardListeningPortV6, &out.WireguardListeningPortV6 + *out = new(int) + **out = **in + } + if in.WireguardRoutingRulePriority != nil { + in, out := &in.WireguardRoutingRulePriority, &out.WireguardRoutingRulePriority + *out = new(int) + **out = **in + } + if in.WireguardMTU != nil { + in, out := &in.WireguardMTU, &out.WireguardMTU + *out = new(int) + **out = **in + } + if in.WireguardMTUV6 != nil { + in, out := &in.WireguardMTUV6, &out.WireguardMTUV6 + *out = new(int) + **out = **in + } + if in.WireguardHostEncryptionEnabled != nil { + in, out := &in.WireguardHostEncryptionEnabled, &out.WireguardHostEncryptionEnabled + *out = new(bool) + **out = **in + } + if in.WireguardPersistentKeepAlive != nil { + in, out := &in.WireguardPersistentKeepAlive, &out.WireguardPersistentKeepAlive + *out = new(v1.Duration) + **out = **in + } + if in.AWSSrcDstCheck != nil { + in, out := &in.AWSSrcDstCheck, &out.AWSSrcDstCheck + *out = new(AWSSrcDstCheckOption) + **out = **in + } + if in.FloatingIPs != nil { + in, out := &in.FloatingIPs, &out.FloatingIPs + *out = new(FloatingIPType) + **out = **in + } return } @@ -1000,6 +1690,23 @@ func (in *HTTPPath) DeepCopy() *HTTPPath { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HealthTimeoutOverride) DeepCopyInto(out *HealthTimeoutOverride) { + *out = *in + out.Timeout = in.Timeout + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthTimeoutOverride. +func (in *HealthTimeoutOverride) DeepCopy() *HealthTimeoutOverride { + if in == nil { + return nil + } + out := new(HealthTimeoutOverride) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HostEndpoint) DeepCopyInto(out *HostEndpoint) { *out = *in @@ -1118,111 +1825,7 @@ func (in *ICMPFields) DeepCopy() *ICMPFields { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMBlock) DeepCopyInto(out *IPAMBlock) { - *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 IPAMBlock. -func (in *IPAMBlock) DeepCopy() *IPAMBlock { - if in == nil { - return nil - } - out := new(IPAMBlock) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IPAMBlock) 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 *IPAMBlockList) DeepCopyInto(out *IPAMBlockList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]IPAMBlock, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockList. -func (in *IPAMBlockList) DeepCopy() *IPAMBlockList { - if in == nil { - return nil - } - out := new(IPAMBlockList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IPAMBlockList) 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 *IPAMBlockSpec) DeepCopyInto(out *IPAMBlockSpec) { - *out = *in - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(string) - **out = **in - } - if in.Allocations != nil { - in, out := &in.Allocations, &out.Allocations - *out = make([]*int, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(int) - **out = **in - } - } - } - if in.Unallocated != nil { - in, out := &in.Unallocated, &out.Unallocated - *out = make([]int, len(*in)) - copy(*out, *in) - } - if in.Attributes != nil { - in, out := &in.Attributes, &out.Attributes - *out = make([]AllocationAttribute, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockSpec. -func (in *IPAMBlockSpec) DeepCopy() *IPAMBlockSpec { - if in == nil { - return nil - } - out := new(IPAMBlockSpec) - 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) { +func (in *IPAMConfiguration) DeepCopyInto(out *IPAMConfiguration) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -1230,18 +1833,18 @@ func (in *IPAMConfig) DeepCopyInto(out *IPAMConfig) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfig. -func (in *IPAMConfig) DeepCopy() *IPAMConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfiguration. +func (in *IPAMConfiguration) DeepCopy() *IPAMConfiguration { if in == nil { return nil } - out := new(IPAMConfig) + out := new(IPAMConfiguration) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IPAMConfig) DeepCopyObject() runtime.Object { +func (in *IPAMConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1249,13 +1852,13 @@ func (in *IPAMConfig) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMConfigList) DeepCopyInto(out *IPAMConfigList) { +func (in *IPAMConfigurationList) DeepCopyInto(out *IPAMConfigurationList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]IPAMConfig, len(*in)) + *out = make([]IPAMConfiguration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1263,18 +1866,18 @@ func (in *IPAMConfigList) DeepCopyInto(out *IPAMConfigList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfigList. -func (in *IPAMConfigList) DeepCopy() *IPAMConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfigurationList. +func (in *IPAMConfigurationList) DeepCopy() *IPAMConfigurationList { if in == nil { return nil } - out := new(IPAMConfigList) + out := new(IPAMConfigurationList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IPAMConfigList) DeepCopyObject() runtime.Object { +func (in *IPAMConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1282,116 +1885,33 @@ func (in *IPAMConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMConfigSpec) DeepCopyInto(out *IPAMConfigSpec) { +func (in *IPAMConfigurationSpec) DeepCopyInto(out *IPAMConfigurationSpec) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfigSpec. -func (in *IPAMConfigSpec) DeepCopy() *IPAMConfigSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfigurationSpec. +func (in *IPAMConfigurationSpec) DeepCopy() *IPAMConfigurationSpec { if in == nil { return nil } - out := new(IPAMConfigSpec) + out := new(IPAMConfigurationSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMHandle) DeepCopyInto(out *IPAMHandle) { - *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 IPAMHandle. -func (in *IPAMHandle) DeepCopy() *IPAMHandle { - if in == nil { - return nil - } - out := new(IPAMHandle) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IPAMHandle) 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 *IPAMHandleList) DeepCopyInto(out *IPAMHandleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]IPAMHandle, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleList. -func (in *IPAMHandleList) DeepCopy() *IPAMHandleList { - if in == nil { - return nil - } - out := new(IPAMHandleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IPAMHandleList) 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 *IPAMHandleSpec) DeepCopyInto(out *IPAMHandleSpec) { - *out = *in - if in.Block != nil { - in, out := &in.Block, &out.Block - *out = make(map[string]int, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleSpec. -func (in *IPAMHandleSpec) DeepCopy() *IPAMHandleSpec { - if in == nil { - return nil - } - out := new(IPAMHandleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPNAT) DeepCopyInto(out *IPNAT) { +func (in *IPIPConfiguration) DeepCopyInto(out *IPIPConfiguration) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPNAT. -func (in *IPNAT) DeepCopy() *IPNAT { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPIPConfiguration. +func (in *IPIPConfiguration) DeepCopy() *IPIPConfiguration { if in == nil { return nil } - out := new(IPNAT) + out := new(IPIPConfiguration) in.DeepCopyInto(out) return out } @@ -1461,9 +1981,14 @@ func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec) { *out = *in if in.IPIP != nil { in, out := &in.IPIP, &out.IPIP - *out = new(apisv1.IPIPConfiguration) + *out = new(IPIPConfiguration) **out = **in } + if in.AllowedUses != nil { + in, out := &in.AllowedUses, &out.AllowedUses + *out = make([]IPPoolAllowedUse, len(*in)) + copy(*out, *in) + } return } @@ -1477,6 +2002,225 @@ func (in *IPPoolSpec) DeepCopy() *IPPoolSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPReservation) DeepCopyInto(out *IPReservation) { + *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 IPReservation. +func (in *IPReservation) DeepCopy() *IPReservation { + if in == nil { + return nil + } + out := new(IPReservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPReservation) 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 *IPReservationList) DeepCopyInto(out *IPReservationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IPReservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPReservationList. +func (in *IPReservationList) DeepCopy() *IPReservationList { + if in == nil { + return nil + } + out := new(IPReservationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPReservationList) 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 *IPReservationSpec) DeepCopyInto(out *IPReservationSpec) { + *out = *in + if in.ReservedCIDRs != nil { + in, out := &in.ReservedCIDRs, &out.ReservedCIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPReservationSpec. +func (in *IPReservationSpec) DeepCopy() *IPReservationSpec { + if in == nil { + return nil + } + out := new(IPReservationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeControllersConfiguration) DeepCopyInto(out *KubeControllersConfiguration) { + *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 KubeControllersConfiguration. +func (in *KubeControllersConfiguration) DeepCopy() *KubeControllersConfiguration { + if in == nil { + return nil + } + out := new(KubeControllersConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeControllersConfiguration) 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 *KubeControllersConfigurationList) DeepCopyInto(out *KubeControllersConfigurationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KubeControllersConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllersConfigurationList. +func (in *KubeControllersConfigurationList) DeepCopy() *KubeControllersConfigurationList { + if in == nil { + return nil + } + out := new(KubeControllersConfigurationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeControllersConfigurationList) 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 *KubeControllersConfigurationSpec) DeepCopyInto(out *KubeControllersConfigurationSpec) { + *out = *in + if in.EtcdV3CompactionPeriod != nil { + in, out := &in.EtcdV3CompactionPeriod, &out.EtcdV3CompactionPeriod + *out = new(v1.Duration) + **out = **in + } + if in.PrometheusMetricsPort != nil { + in, out := &in.PrometheusMetricsPort, &out.PrometheusMetricsPort + *out = new(int) + **out = **in + } + in.Controllers.DeepCopyInto(&out.Controllers) + if in.DebugProfilePort != nil { + in, out := &in.DebugProfilePort, &out.DebugProfilePort + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllersConfigurationSpec. +func (in *KubeControllersConfigurationSpec) DeepCopy() *KubeControllersConfigurationSpec { + if in == nil { + return nil + } + out := new(KubeControllersConfigurationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeControllersConfigurationStatus) DeepCopyInto(out *KubeControllersConfigurationStatus) { + *out = *in + in.RunningConfig.DeepCopyInto(&out.RunningConfig) + if in.EnvironmentVars != nil { + in, out := &in.EnvironmentVars, &out.EnvironmentVars + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllersConfigurationStatus. +func (in *KubeControllersConfigurationStatus) DeepCopy() *KubeControllersConfigurationStatus { + if in == nil { + return nil + } + out := new(KubeControllersConfigurationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespaceControllerConfig) DeepCopyInto(out *NamespaceControllerConfig) { + *out = *in + if in.ReconcilerPeriod != nil { + in, out := &in.ReconcilerPeriod, &out.ReconcilerPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceControllerConfig. +func (in *NamespaceControllerConfig) DeepCopy() *NamespaceControllerConfig { + if in == nil { + return nil + } + out := new(NamespaceControllerConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy) { *out = *in @@ -1659,124 +2403,74 @@ func (in *NetworkSetSpec) DeepCopy() *NetworkSetSpec { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Node) DeepCopyInto(out *Node) { +func (in *NodeControllerConfig) DeepCopyInto(out *NodeControllerConfig) { *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 Node. -func (in *Node) DeepCopy() *Node { - if in == nil { - return nil + if in.ReconcilerPeriod != nil { + in, out := &in.ReconcilerPeriod, &out.ReconcilerPeriod + *out = new(v1.Duration) + **out = **in } - out := new(Node) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Node) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c + if in.HostEndpoint != nil { + in, out := &in.HostEndpoint, &out.HostEndpoint + *out = new(AutoHostEndpointConfig) + **out = **in } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeBGPSpec) DeepCopyInto(out *NodeBGPSpec) { - *out = *in - if in.ASNumber != nil { - in, out := &in.ASNumber, &out.ASNumber - *out = new(numorstring.ASNumber) + if in.LeakGracePeriod != nil { + in, out := &in.LeakGracePeriod, &out.LeakGracePeriod + *out = new(v1.Duration) **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeBGPSpec. -func (in *NodeBGPSpec) DeepCopy() *NodeBGPSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeControllerConfig. +func (in *NodeControllerConfig) DeepCopy() *NodeControllerConfig { if in == nil { return nil } - out := new(NodeBGPSpec) + out := new(NodeControllerConfig) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeList) DeepCopyInto(out *NodeList) { +func (in *PolicyControllerConfig) DeepCopyInto(out *PolicyControllerConfig) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Node, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.ReconcilerPeriod != nil { + in, out := &in.ReconcilerPeriod, &out.ReconcilerPeriod + *out = new(v1.Duration) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList. -func (in *NodeList) DeepCopy() *NodeList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyControllerConfig. +func (in *PolicyControllerConfig) DeepCopy() *PolicyControllerConfig { if in == nil { return nil } - out := new(NodeList) + out := new(PolicyControllerConfig) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeList) 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 *NodeSpec) DeepCopyInto(out *NodeSpec) { +func (in *PrefixAdvertisement) DeepCopyInto(out *PrefixAdvertisement) { *out = *in - if in.BGP != nil { - in, out := &in.BGP, &out.BGP - *out = new(NodeBGPSpec) - (*in).DeepCopyInto(*out) - } - if in.OrchRefs != nil { - in, out := &in.OrchRefs, &out.OrchRefs - *out = make([]OrchRef, len(*in)) + if in.Communities != nil { + in, out := &in.Communities, &out.Communities + *out = make([]string, len(*in)) copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec. -func (in *NodeSpec) DeepCopy() *NodeSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrefixAdvertisement. +func (in *PrefixAdvertisement) DeepCopy() *PrefixAdvertisement { if in == nil { return nil } - out := new(NodeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrchRef) DeepCopyInto(out *OrchRef) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrchRef. -func (in *OrchRef) DeepCopy() *OrchRef { - if in == nil { - return nil - } - out := new(OrchRef) + out := new(PrefixAdvertisement) in.DeepCopyInto(out) return out } @@ -1894,6 +2588,58 @@ func (in *ProtoPort) DeepCopy() *ProtoPort { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouteTableIDRange) DeepCopyInto(out *RouteTableIDRange) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteTableIDRange. +func (in *RouteTableIDRange) DeepCopy() *RouteTableIDRange { + if in == nil { + return nil + } + out := new(RouteTableIDRange) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RouteTableRange) DeepCopyInto(out *RouteTableRange) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteTableRange. +func (in *RouteTableRange) DeepCopy() *RouteTableRange { + if in == nil { + return nil + } + out := new(RouteTableRange) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in RouteTableRanges) DeepCopyInto(out *RouteTableRanges) { + { + in := &in + *out = make(RouteTableRanges, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteTableRanges. +func (in RouteTableRanges) DeepCopy() RouteTableRanges { + if in == nil { + return nil + } + out := new(RouteTableRanges) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Rule) DeepCopyInto(out *Rule) { *out = *in @@ -1929,6 +2675,11 @@ func (in *Rule) DeepCopyInto(out *Rule) { *out = new(HTTPMatch) (*in).DeepCopyInto(*out) } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = new(RuleMetadata) + (*in).DeepCopyInto(*out) + } return } @@ -1942,6 +2693,50 @@ func (in *Rule) DeepCopy() *Rule { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RuleMetadata) DeepCopyInto(out *RuleMetadata) { + *out = *in + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleMetadata. +func (in *RuleMetadata) DeepCopy() *RuleMetadata { + if in == nil { + return nil + } + out := new(RuleMetadata) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceAccountControllerConfig) DeepCopyInto(out *ServiceAccountControllerConfig) { + *out = *in + if in.ReconcilerPeriod != nil { + in, out := &in.ReconcilerPeriod, &out.ReconcilerPeriod + *out = new(v1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountControllerConfig. +func (in *ServiceAccountControllerConfig) DeepCopy() *ServiceAccountControllerConfig { + if in == nil { + return nil + } + out := new(ServiceAccountControllerConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceAccountMatch) DeepCopyInto(out *ServiceAccountMatch) { *out = *in @@ -1996,97 +2791,54 @@ func (in *ServiceExternalIPBlock) DeepCopy() *ServiceExternalIPBlock { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkloadEndpoint) DeepCopyInto(out *WorkloadEndpoint) { +func (in *ServiceLoadBalancerIPBlock) DeepCopyInto(out *ServiceLoadBalancerIPBlock) { *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 WorkloadEndpoint. -func (in *WorkloadEndpoint) DeepCopy() *WorkloadEndpoint { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceLoadBalancerIPBlock. +func (in *ServiceLoadBalancerIPBlock) DeepCopy() *ServiceLoadBalancerIPBlock { if in == nil { return nil } - out := new(WorkloadEndpoint) + out := new(ServiceLoadBalancerIPBlock) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *WorkloadEndpoint) 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 *WorkloadEndpointList) DeepCopyInto(out *WorkloadEndpointList) { +func (in *ServiceMatch) DeepCopyInto(out *ServiceMatch) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]WorkloadEndpoint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointList. -func (in *WorkloadEndpointList) DeepCopy() *WorkloadEndpointList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMatch. +func (in *ServiceMatch) DeepCopy() *ServiceMatch { if in == nil { return nil } - out := new(WorkloadEndpointList) + out := new(ServiceMatch) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *WorkloadEndpointList) 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 *WorkloadEndpointSpec) DeepCopyInto(out *WorkloadEndpointSpec) { +func (in *WorkloadEndpointControllerConfig) DeepCopyInto(out *WorkloadEndpointControllerConfig) { *out = *in - if in.IPNetworks != nil { - in, out := &in.IPNetworks, &out.IPNetworks - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.IPNATs != nil { - in, out := &in.IPNATs, &out.IPNATs - *out = make([]IPNAT, len(*in)) - copy(*out, *in) - } - if in.Profiles != nil { - in, out := &in.Profiles, &out.Profiles - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]EndpointPort, len(*in)) - copy(*out, *in) + if in.ReconcilerPeriod != nil { + in, out := &in.ReconcilerPeriod, &out.ReconcilerPeriod + *out = new(v1.Duration) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointSpec. -func (in *WorkloadEndpointSpec) DeepCopy() *WorkloadEndpointSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointControllerConfig. +func (in *WorkloadEndpointControllerConfig) DeepCopy() *WorkloadEndpointControllerConfig { if in == nil { return nil } - out := new(WorkloadEndpointSpec) + out := new(WorkloadEndpointControllerConfig) in.DeepCopyInto(out) return out } diff --git a/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/zz_generated.defaults.go b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/zz_generated.defaults.go new file mode 100644 index 000000000..c5cf25862 --- /dev/null +++ b/vendor/github.com/projectcalico/api/pkg/apis/projectcalico/v3/zz_generated.defaults.go @@ -0,0 +1,19 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright (c) 2023 Tigera, Inc. All rights reserved. + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v3 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/asnumber.go b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/asnumber.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/numorstring/asnumber.go rename to vendor/github.com/projectcalico/api/pkg/lib/numorstring/asnumber.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/doc.go b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/doc.go similarity index 96% rename from vendor/github.com/projectcalico/libcalico-go/lib/numorstring/doc.go rename to vendor/github.com/projectcalico/api/pkg/lib/numorstring/doc.go index f37ce6efc..532a7e81f 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/doc.go +++ b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/doc.go @@ -16,4 +16,7 @@ Package numorstring implements a set of type definitions that in YAML or JSON format may be represented by either a number or a string. */ + +// +k8s:openapi-gen=true + package numorstring diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/port.go b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/port.go similarity index 80% rename from vendor/github.com/projectcalico/libcalico-go/lib/numorstring/port.go rename to vendor/github.com/projectcalico/api/pkg/lib/numorstring/port.go index 23372e0ad..e07bc2591 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/port.go +++ b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/port.go @@ -24,14 +24,14 @@ import ( // Port represents either a range of numeric ports or a named port. // -// - For a named port, set the PortName, leaving MinPort and MaxPort as 0. -// - For a port range, set MinPort and MaxPort to the (inclusive) port numbers. Set -// PortName to "". -// - For a single port, set MinPort = MaxPort and PortName = "". +// - For a named port, set the PortName, leaving MinPort and MaxPort as 0. +// - For a port range, set MinPort and MaxPort to the (inclusive) port numbers. Set +// PortName to "". +// - For a single port, set MinPort = MaxPort and PortName = "". type Port struct { - MinPort uint16 - MaxPort uint16 - PortName string `validate:"omitempty,portName"` + MinPort uint16 `json:"minPort,omitempty"` + MaxPort uint16 `json:"maxPort,omitempty"` + PortName string `json:"portName" validate:"omitempty,portName"` } // SinglePort creates a Port struct representing a single port. @@ -142,3 +142,13 @@ func (p Port) String() string { return fmt.Sprintf("%d:%d", p.MinPort, p.MaxPort) } } + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ Port) OpenAPISchemaType() []string { return []string{"string"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ Port) OpenAPISchemaFormat() string { return "int-or-string" } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/protocol.go b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/protocol.go similarity index 78% rename from vendor/github.com/projectcalico/libcalico-go/lib/numorstring/protocol.go rename to vendor/github.com/projectcalico/api/pkg/lib/numorstring/protocol.go index e0a9ec58d..1a639f910 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/protocol.go +++ b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/protocol.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Tigera, Inc. All rights reserved. +// Copyright (c) 2016-2020 Tigera, 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. @@ -24,8 +24,9 @@ const ( ProtocolSCTP = "SCTP" ProtocolUDPLite = "UDPLite" - ProtocolUDPV1 = "udp" - ProtocolTCPV1 = "tcp" + ProtocolUDPV1 = "udp" + ProtocolTCPV1 = "tcp" + ProtocolSCTPV1 = "sctp" ) var ( @@ -119,16 +120,26 @@ func (p Protocol) NumValue() (uint8, error) { } // SupportsProtocols returns whether this protocol supports ports. This returns true if -// the numerical or string verion of the protocol indicates TCP (6) or UDP (17). +// the numerical or string version of the protocol indicates TCP (6), UDP (17), or SCTP (132). func (p Protocol) SupportsPorts() bool { num, err := p.NumValue() if err == nil { - return num == 6 || num == 17 + return num == 6 || num == 17 || num == 132 } else { switch p.StrVal { - case ProtocolTCP, ProtocolUDP, ProtocolTCPV1, ProtocolUDPV1: + case ProtocolTCP, ProtocolUDP, ProtocolTCPV1, ProtocolUDPV1, ProtocolSCTP, ProtocolSCTPV1: return true } return false } } + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ Protocol) OpenAPISchemaType() []string { return []string{"string"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ Protocol) OpenAPISchemaFormat() string { return "int-or-string" } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/type.go b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/type.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/numorstring/type.go rename to vendor/github.com/projectcalico/api/pkg/lib/numorstring/type.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/uint8orstring.go b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/uint8orstring.go similarity index 76% rename from vendor/github.com/projectcalico/libcalico-go/lib/numorstring/uint8orstring.go rename to vendor/github.com/projectcalico/api/pkg/lib/numorstring/uint8orstring.go index 626a904b6..16820af42 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/numorstring/uint8orstring.go +++ b/vendor/github.com/projectcalico/api/pkg/lib/numorstring/uint8orstring.go @@ -24,9 +24,9 @@ import ( // inner type. This allows you to have, for example, a JSON field that can // accept a name or number. type Uint8OrString struct { - Type NumOrStringType - NumVal uint8 - StrVal string + Type NumOrStringType `json:"type"` + NumVal uint8 `json:"numVal"` + StrVal string `json:"strVal"` } // UnmarshalJSON implements the json.Unmarshaller interface. @@ -78,3 +78,13 @@ func (i Uint8OrString) NumValue() (uint8, error) { } return i.NumVal, nil } + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ Uint8OrString) OpenAPISchemaType() []string { return []string{"string"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ Uint8OrString) OpenAPISchemaFormat() string { return "int-or-string" } diff --git a/vendor/github.com/projectcalico/calico/AUTHORS.md b/vendor/github.com/projectcalico/calico/AUTHORS.md new file mode 100644 index 000000000..6e3edcca0 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/AUTHORS.md @@ -0,0 +1,557 @@ +# Calico authors + +This file is auto-generated based on contribution records reported +by GitHub for the core repositories within the projectcalico/ organization. It is ordered alphabetically. + +| Name | Email | +|--------|--------| +| Aalaesar | aalaesar@gmail.com | +| Aaron Roydhouse | aaron@roydhouse.com | +| Abhijeet Kasurde | akasurde@redhat.com | +| Abhinav Dahiya | abhinav.dahiya@coreos.com | +| Abhishek Jaisingh | abhi2254015@gmail.com | +| Adam Hoheisel | adam.hoheisel99@gmail.com | +| Adam Leskis | leskis@gmail.com | +| Adam Szecówka | adam.szecowka@sap.com | +| ahrkrak | andrew.randall@gmail.com | +| Alan | zg.zhu@daocloud.io | +| Alban Crequy | alban@kinvolk.io | +| Albert Vaca | albertvaka@gmail.com | +| Alejo Carballude | alejocarballude@gmail.com | +| Aleksandr Didenko | adidenko@mirantis.com | +| Aleksandr Dubinsky | almson@users.noreply.github.com | +| Alessandro Rossi | 4215912+kubealex@users.noreply.github.com | +| Alex Altair | alexanderaltair@gmail.com | +| Alex Chan | github@alexwlchan.fastmail.co.uk | +| Alex Hersh | alexander.hersh@metaswitch.com | +| Alex Nauda | alex@alexnauda.com | +| Alex O Regan | alexsoregan@gmail.com | +| Alex Pollitt | lxpollitt@users.noreply.github.com | +| Alex Rowley | rowleyaj@gmail.com | +| Alexander Brand | alexbrand09@gmail.com | +| Alexander Gama Espinosa | algamaes@microsoft.com | +| Alexander Golovko | alexandro@ankalagon.ru | +| Alexander Saprykin | asaprykin@mirantis.com | +| Alexander Varshavsky | alex.varshavsky@tigera.io | +| Alexey Magdich | itechart.aliaksei.mahdzich@tigera.io | +| Alexey Makhov | makhov.alex@gmail.com | +| Alexey Medvedchikov | alexey.medvedchikov@gmail.com | +| alexeymagdich-tigera | 56426143+alexeymagdich-tigera@users.noreply.github.com | +| alexhersh | hersh.a@husky.neu.edu | +| Alina Militaru | alina@tigera.io | +| Aloys Augustin | aloaugus@cisco.com | +| Aloÿs | aloys.augustin@polytechnique.org | +| Amim Knabben | amim.knabben@gmail.com | +| amq | amq@users.noreply.github.com | +| Anatoly Popov | aensidhe@users.noreply.github.com | +| Anders Janmyr | anders@janmyr.com | +| Andreas Jaeger | aj@suse.com | +| Andrei Nistor | andrei_nistor@smart-x.net | +| Andrew Donald Kennedy | andrew.international@gmail.com | +| Andrew Gaffney | andrew@agaffney.org | +| Andy Randall | andy@tigera.io | +| Anthony ARNAUD | aarnaud@eidosmontreal.com | +| Anthony BESCOND | anthony.bescond@kiln.fi | +| Anthony T | 25327116+anthonytwh@users.noreply.github.com | +| Anton Antonov | anton.synd.antonov@gmail.com | +| Anton Klokau | anton.klokau@gmail.com | +| anton-klokau | 54411589+anton-klokau@users.noreply.github.com | +| Antony Guinard | antony@tigera.io | +| Aram Alipoor | aram.alipoor@gmail.com | +| arikachen | eaglesora@gmail.com | +| Armon Dadgar | armon.dadgar@gmail.com | +| Artem Panchenko | apanchenko@mirantis.com | +| Artem Roma | aroma@mirantis.com | +| Artem Rymarchik | artemrymarchik@gmail.com | +| Artyom Rymarchik | artsiom.rymarchyk@itechart-group.com | +| Arundhati Surpur | arundhati@nectechnologies.in | +| Ashley Reese | ashley@victorianfox.com | +| asincu | alinamilitaru@Alinas-MacBook-Pro.local | +| Atkins | atkinschang@gmail.com | +| Avi Deitcher | avi@deitcher.net | +| Ayoub Elhamdani | a.elhamdani90@gmail.com | +| Barbara McKercher | barbara@tigera.io | +| bartek-lopatka | 54111388+bartek-lopatka@users.noreply.github.com | +| Bassam Tabbara | bassam@symform.com | +| Behnam Shobiri | behnam.shobeiri@gmail.com | +| Behnam-Shobiri | Behnam.shobeiri@gmail.com | +| Ben Schwartz | benschw@gmail.com | +| Benjamin | info@diffus.org | +| Benjamin S. Allen | bsallen@alcf.anl.gov | +| Bertrand Lallau | bertrand.lallau@gmail.com | +| Bill Hathaway | bill.hathaway@gmail.com | +| Bill Maxwell | bill@rancher.com | +| Billie Cleek | bcleek@monsooncommerce.com | +| bingshen.wbs | bingshen.wbs@alibaba-inc.com | +| bjhaid | abejideayodele@gmail.com | +| Blake Covarrubias | blake.covarrubias@gmail.com | +| Blucher | yfg44fox@126.com | +| bmckercher123 | 48458529+bmckercher123@users.noreply.github.com | +| Bogdan Dobrelya | bdobrelia@mirantis.com | +| Brad Beam | brad.beam@b-rad.info | +| Brad Behle | behle@us.ibm.com | +| Brendan Creane | brendan@tigera.io | +| Brian Ketelsen | bketelsen@gmail.com | +| Brian Kim | brian@tigera.io | +| Brian McMahon | brianmcmahon135@gmail.com | +| briansan | bkimstunnaboss@gmail.com | +| Brook-Roberts | brook.roberts@metaswitch.com | +| Bryan Reese | bryan.mreese@gmail.com | +| Cao Shufeng | caosf.fnst@cn.fujitsu.com | +| Cao Xuan Hoang | hoangcx@vn.fujitsu.com | +| Carlos Alberto | euprogramador@gmail.com | +| Casey D | casey.davenport@metaswitch.com | +| Casey Davenport | davenport.cas@gmail.com | +| Cezar Sa Espinola | cezarsa@gmail.com | +| Chakravarthy Gopi | cgopi@us.ibm.com | +| Chance Zibolski | chance.zibolski@gmail.com | +| Chen Donghui | chendh521@gmail.com | +| Chengwei Yang | yangchengwei@qiyi.com | +| chenqijun | chenqijun@corp.netease.com | +| Chris Armstrong | chris@opdemand.com | +| Chris Church | chris.church@gmail.com | +| Chris Hoge | chris@hogepodge.com | +| Chris McNabb | raizyr@gmail.com | +| Chris Tomkins | chris.tomkins@tigera.io | +| Christian Klauser | christianklauser@outlook.com | +| Christian Simon | simon@swine.de | +| Christopher | chris.tauchen@tigera.io | +| Christopher Grim | christopher.grim@gmail.com | +| Christopher LIJLENSTOLPE | github@cdl.asgaard.org | +| Christopher LILJENSTOLPE | cdl@asgaard.org | +| cinience | cinience@qq.com | +| Ciprian Hacman | ciprian@hakman.dev | +| Clement Laforet | sheepkiller@cotds.org | +| Cody McCain | cody@tigera.io | +| Cookie | luckymrwang@163.com | +| Cory Benfield | lukasaoz@gmail.com | +| crandl201 | christopher_randles@cable.comcast.com | +| Cristian Vrabie | cristian.vrabie@gmail.com | +| Cyclinder | qifeng.guo@daocloud.io | +| Dalton Hubble | dghubble@gmail.com | +| Dan | djosborne@users.noreply.github.com | +| Dan (Turk) | dan@projectcalico.org | +| Dan Bond | pm@danbond.io | +| Dan O'Brien | dobrien.nj@gmail.com | +| Dan Osborne | djosborne10@gmail.com | +| Daniel Hoherd | daniel.hoherd@gmail.com | +| Daniel Megyesi | daniel.megyesi@liligo.com | +| Dario Nieuwenhuis | dirbaio@dirbaio.net | +| Darren Chin | dc@darrench.in | +| Dave Hay | david_hay@uk.ibm.com | +| Dave Langridge | dave@calico.com | +| David Haupt | dhaupt@redhat.com | +| David Igou | igou.david@gmail.com | +| David J. Wilder | wilder@us.ibm.com | +| David Tesar | david.tesar@microsoft.com | +| Denis Iskandarov | d.iskandarov@gmail.com | +| depay | depay19@163.com | +| derek mcquay | derek@tigera.io | +| Derk Muenchhausen | derk@muenchhausen.de | +| Didier Durand | durand.didier@gmail.com | +| Dominic DeMarco | ddemarc@us.ibm.com | +| Doug Collier | doug@tigera.io | +| Doug Davis | duglin@users.noreply.github.com | +| Doug Hellmann | doug@doughellmann.com | +| Doug Wiegley | dwiegley@salesforce.com | +| Dries Harnie | dries+github@harnie.be | +| du | du@njtech.edu.cn | +| Duan Jiong | djduanjiong@gmail.com | +| Duong Ha-Quang | duonghq@vn.fujitsu.com | +| Dylan Pindur | dylanpindur@gmail.com | +| Ed Harrison | eepyaich@users.noreply.github.com | +| Edbert | ecandra@protonmail.com | +| Elson Rodriguez | elson.rodriguez@gmail.com | +| emanic | emily@tigera.io | +| Emma Gordon | emma@projectcalico.org | +| EmmEff | mikef17@gmail.com | +| Eran Reshef | eran.reshef@arm.com | +| Eric Anderson | anderson@stackengine.com | +| Eric Barch | ericb@ericbarch.com | +| Eric Hoffmann | 31017077+2ffs2nns@users.noreply.github.com | +| Erik Stidham | estidham@gmail.com | +| Ernest Wong | chuwon@microsoft.com | +| Ernesto Jiménez | me@ernesto-jimenez.com | +| Ethan Chu | xychu2008@gmail.com | +| Eugen Mayer | 136934+EugenMayer@users.noreply.github.com | +| F41gh7 | info@fght.net | +| Fabian Ruff | fabian@progra.de | +| Fahad Arshad | fahadaliarshad@gmail.com | +| fcuello-fudo | 51087976+fcuello-fudo@users.noreply.github.com | +| Feilong Wang | flwang@catalyst.net.nz | +| fen4o | martin.vladev@gmail.com | +| Fernando Alvarez | methadato@gmail.com | +| Fernando Cainelli | fernando.cainelli@gmail.com | +| Fionera | fionera@fionera.de | +| Flavio Percoco | flaper87@gmail.com | +| Foivos Filippopoulos | foivosfilip@gmail.com | +| frank | frank@tigera.io | +| Frank Greco Jr | frankgreco@northwesternmutual.com | +| François PICOT | fpicot@users.noreply.github.com | +| Fredrik Steen | stone4x4@gmail.com | +| freecaykes | edbert@tigera.io | +| frnkdny | frank.danyo@gmail.com | +| fumihiko kakuma | kakuma@valinux.co.jp | +| Gabriel Monroy | gabriel@opdemand.com | +| Gaurav | 48036489+realgaurav@users.noreply.github.com | +| Gaurav Khatri | gaurav@tigera.io | +| Gaurav Sinha | gaurav.sinha@tigera.io | +| Gautam K | gautam.nitheesh@gmail.com | +| gdziwoki | gdziwoki@gmail.com | +| gengchc2 | geng.changcai2@zte.com.cn | +| Gerard Hickey | hickey@kinetic-compute.com | +| Giancarlo Rubio | gianrubio@gmail.com | +| Gianluca | 52940363+gianlucam76@users.noreply.github.com | +| Gianluca Mardente | gianluca@tigera.io | +| Gobinath Krishnamoorthy | gobinath@tigera.io | +| Guang Ya Liu | gyliu513@gmail.com | +| Guangming Wang | guangming.wang@daocloud.io | +| Guillaume LECERF | glecerf@gmail.com | +| guirish | guirish | +| gunboe | guntherboeckmann@gmail.com | +| Gunjan "Grass-fed Rabbit" Patel | patelgunjan5@gmail.com | +| GuyTempleton | guy.templeton@skyscanner.net | +| Hagen Kuehn | hagen.kuehn@quater.io | +| halfcrazy | hackzhuyan@gmail.com | +| Hanamantagoud | hanamantagoud.v.kandagal@est.tech | +| hanamantagoudvk | 68010010+hanamantagoudvk@users.noreply.github.com | +| hedi bouattour | hbouatto@cisco.com | +| Helen Chang | c6h3un@gmail.com | +| Henry Gessau | gessau@gmail.com | +| huang.zhiping | huang.zhiping@99cloud.net | +| Huanle Han | hanhuanle@caicloud.io | +| Hui Kang | kangh@us.ibm.com | +| Huo Qi Feng | huoqif@cn.ibm.com | +| Iago López Galeiras | iago@kinvolk.io | +| ialidzhikov | i.alidjikov@gmail.com | +| Ian Wienand | iwienand@redhat.com | +| Icarus9913 | icaruswu66@qq.com | +| Igor Kapkov | igasgeek@me.com | +| Ihar Hrachyshka | ihrachys@redhat.com | +| ijumps | “bigerjump@gmail.com” | +| ISHIDA Wataru | ishida.wataru@lab.ntt.co.jp | +| Ivar Larsson | ivar@bloglovin.com | +| IWAMOTO Toshihiro | iwamoto@valinux.co.jp | +| J. Grizzard | jgrizzard@box.com | +| Jack Kleeman | jackkleeman@gmail.com | +| Jacob Hayes | jacob.r.hayes@gmail.com | +| Jade Chunnananda | jade.jch@gmail.com | +| Jak | 44370243+jak-sdk@users.noreply.github.com | +| James E. Blair | jeblair@redhat.com | +| James Lucktaylor | jlucktay@users.noreply.github.com | +| James Pollard | james@leapyear.io | +| James Sturtevant | jsturtevant@gmail.com | +| Jamie | 91jme@users.noreply.github.com | +| Jan Brauer | jan@jimdo.com | +| Jan Ivar Beddari | code@beddari.net | +| janonymous | janonymous.codevulture@gmail.com | +| jay vyas | jvyas@vmware.com | +| Jean-Sebastien Mouret | js.mouret@gmail.com | +| Jeff Schroeder | jeffschroeder@computer.org | +| Jenkins | jenkins@review.openstack.org | +| Jens Henrik Hertz | jens@treatwell.nl | +| Jesper Dangaard Brouer | brouer@redhat.com | +| Jiawei Huang | jiawei@tigera.io | +| Jimmy McCrory | jimmy.mccrory@gmail.com | +| jinglinax@163.com | jinglinax@163.com | +| jmjoy | 918734043@qq.com | +| Joanna Solmon | joanna.solmon@gmail.com | +| Joel Bastos | kintoandar@users.noreply.github.com | +| Johan Fleury | jfleury+github@arcaik.net | +| Johannes M. Scheuermann | joh.scheuer@gmail.com | +| Johannes Scheerer | johannes.scheerer@sap.com | +| johanneswuerbach | johannes.wuerbach@googlemail.com | +| John Engelman | john.r.engelman@gmail.com | +| jolestar | jolestar@gmail.com | +| Jonah Back | jonah@jonahback.com | +| Jonathan Boulle | jonathanboulle@gmail.com | +| Jonathan M. Wilbur | jonathan@wilbur.space | +| Jonathan Palardy | jonathan.palardy@gmail.com | +| Jonathan Sabo | jonathan@sabo.io | +| Jonathan Sokolowski | jonathan.sokolowski@gmail.com | +| jose-bigio | jose.bigio@docker.com | +| Joseph Gu | aceralon@outlook.com | +| Josh Conant | deathbeforedishes@gmail.com | +| Josh Lucas | josh.lucas@tigera.io | +| joshti | 56737865+joshti@users.noreply.github.com | +| Joshua Allard | josh@tigera.io | +| joshuactm | joshua.colvin@ticketmaster.com | +| Julien Dehee | PrFalken@users.noreply.github.com | +| Jussi Nummelin | jussi.nummelin@digia.com | +| Justin | justin@tigera.io | +| Justin Burnham | justin@jburnham.net | +| Justin Cattle | j@ocado.com | +| Justin Nauman | justin.r.nauman+github@gmail.com | +| Justin Pacheco | jpacheco39@bloomberg.net | +| Justin Sievenpiper | justin@sievenpiper.co | +| JW Bell | bjwbell@gmail.com | +| Kamil Madac | kamil.madac@gmail.com | +| Karl Matthias | karl.matthias@gonitro.com | +| Karthik Gaekwad | karthik.gaekwad@gmail.com | +| Karthik Krishnan Ramasubramanian | mail@karthikkrishnan.me | +| Kashif Saadat | kashifsaadat@gmail.com | +| Kelsey Hightower | kelsey.hightower@gmail.com | +| Ketan Kulkarni | ketkulka@gmail.com | +| Kevin Benton | blak111@gmail.com | +| Kevin Lynch | klynch@gmail.com | +| Kiran Divekar | calsoft.kiran.divekar@tigera.io | +| Kirill Buev | kirill.buev@pm.me | +| Kris Gambirazzi | kris.gambirazzi@transferwise.com | +| Krzesimir Nowak | krzesimir@kinvolk.io | +| Krzysztof Cieplucha | krisiasty@users.noreply.github.com | +| l1b0k | libokang.dev@gmail.com | +| Lance Robson | lancelot.robson@gmail.com | +| Lancelot Robson | lancelot.robson@metaswitch.com | +| Lars Ekman | lars.g.ekman@est.tech | +| Laurence Man | laurence@tigera.io | +| Le Hou | houl7@chinaunicom.cn | +| Lee Briggs | lbriggs@apptio.com | +| Leo Ochoa | leo8a@users.noreply.github.com | +| Li-zhigang | li.zhigang3@zte.com.cn | +| libby kent | viskcode@gmail.com | +| lilintan | lintan.li@easystack.cn | +| LinYushen | linyushen@qiniu.com | +| lippertmarkus | lippertmarkus@gmx.de | +| LittleBoy18 | 2283985296@qq.com | +| liubog2008 | liubog2008@gmail.com | +| Liz Rice | liz@lizrice.com | +| llr | nightmeng@gmail.com | +| Logan Davis | 38335829+logand22@users.noreply.github.com | +| Logan V | logan2211@gmail.com | +| lou-lan | loulan@loulan.me | +| Luiz Filho | luizbafilho@gmail.com | +| Luke Mino-Altherr | luke.mino-altherr@metaswitch.com | +| luobily | luobily@gmail.com | +| Luthfi Anandra | luthfi.anandra@gmail.com | +| Lv Jiawei | lvjiawei@cmss.chinamobile.com | +| maao | maao@cmss.chinamobile.com | +| Manjunath A Kumatagi | mkumatag@in.ibm.com | +| Manuel Buil | mbuil@suse.com | +| Marga Millet | marga.sfo@gmail.com | +| Marius Grigaitis | marius.grigaitis@home24.de | +| Mark Fermor | markfermor@holidayextras.com | +| Mark Petrovic | mspetrovic@gmail.com | +| markruler | csu0414@gmail.com | +| Marlin Cremers | marlinc@marlinc.nl | +| Marshall Ford | inbox@marshallford.me | +| Martijn Koster | mak-github@greenhills.co.uk | +| Martin Evgeniev | suizman@users.noreply.github.com | +| marvin-tigera | marvin-tigera@users.noreply.github.com | +| Mat Meredith | matthew.meredith@metaswitch.net | +| Mateusz Gozdek | mgozdek@microsoft.com | +| Mathias Lafeldt | mathias.lafeldt@gmail.com | +| Matt | matt@projectcalico.org | +| Matt Boersma | matt@opdemand.com | +| Matt Dupre | matthewdupre@users.noreply.github.com | +| Matt Kelly | Matthew.Joseph.Kelly@gmail.com | +| Matt Leung | mleung975@gmail.com | +| Matthew | mfisher@engineyard.com | +| Matthew Fenwick | mfenwick100@gmail.com | +| Matthew Fisher | matthewf@opdemand.com | +| Max Kudosh | max_kudosh@hotmail.com | +| Max S | maxstr@users.noreply.github.com | +| Max Stritzinger | mstritzinger@bloomberg.net | +| Maxim Ivanov | ivanov.maxim@gmail.com | +| Maximilian Bischoff | maximilian.bischoff@inovex.de | +| Mayo | mayocream39@yahoo.co.jp | +| Mazdak Nasab | mazdak@tigera.io | +| mchtech | michu_an@126.com | +| meeee | michael+git@frister.net | +| meijin | meijin@tiduyun.com | +| melissaml | ma.lei@99cloud.net | +| Michael Dong | michael.dong@vrviu.com | +| Michael Stowe | me@mikestowe.com | +| Michael Vierling | michael@tigera.io | +| Micheal Waltz | ecliptik@gmail.com | +| Mikalai Kastsevich | kostevich-kolya@mail.ru | +| Mike Kostersitz | mikek@microsoft.com | +| Mike Palmer | mike@mikepalmer.net | +| Mike Scherbakov | mihgen@gmail.com | +| Mike Spreitzer | mspreitz@us.ibm.com | +| Mike Stephen | mike.stephen@tigera.io | +| Mike Stowe | mikestowe@Mikes-MBP.sfo.tigera.io | +| mikev | mvierling@gmail.com | +| Miouge1 | Miouge1@users.noreply.github.com | +| ml | 6209465+ml-@users.noreply.github.com | +| mlbarrow | michael@barrow.me | +| MofeLee | mofe@me.com | +| Mohamed | mohamed.elzarei@motius.de | +| Molnigt | jan.munkhammar@safespring.com | +| Monty Taylor | mordred@inaugust.com | +| Mridul Gain | mridulgain@gmail.com | +| Muhammad Saghir | msagheer92@gmail.com | +| Muhammet Arslan | muhammet.arsln@gmail.com | +| Murali Paluru | leodotcloud@gmail.com | +| Mészáros Mihály | misi@majd.eu | +| Nate Taylor | ntaylor1781@gmail.com | +| Nathan Fritz | fritzy@netflint.net | +| Nathan Skrzypczak | nathan.skrzypczak@gmail.com | +| Nathan Wouda | nwouda@users.noreply.github.com | +| Neil Jerram | nj@metaswitch.com | +| Nic Doye | nic@worldofnic.org | +| Nick Bartos | nick@pistoncloud.com | +| Nick Wood | nwood@microsoft.com | +| Nikkau | nikkau@nikkau.net | +| Nirman Narang | narang@us.ibm.com | +| njuptlzf | njuptlzf@163.com | +| Noah Treuhaft | noah.treuhaft@docker.com | +| nohajc | nohajc@gmail.com | +| nuczzz | 33566732+nuczzz@users.noreply.github.com | +| nuxeric | 48699932+nuxeric@users.noreply.github.com | +| Oded Lazar | odedlaz@gmail.com | +| oldtree2k | oldtree2k@users.noreply.github.com | +| Olivier Bourdon | obourdon@mirantis.com | +| Onong Tayeng | onong.tayeng@gmail.com | +| OpenDev Sysadmins | openstack-infra@lists.openstack.org | +| Otto Sulin | otto.sulin@gmail.com | +| Owen Tuz | owen@segfault.re | +| pasanw | pasanweerasinghe@gmail.com | +| Patrick Marques | pmarques@users.noreply.github.com | +| Patrik Lundin | patrik@sigterm.se | +| Paul Tiplady | symmetricone@gmail.com | +| Pavel Khusainov | pkhusainov@mz.com | +| Pedro Coutinho | pedro@tigera.io | +| Penkey Suresh | penkeysuresh@users.noreply.github.com | +| penkeysuresh | penkeysuresh@gmail.com | +| peter | peterkellyonline@gmail.com | +| Peter Kelly | 659713+petercork@users.noreply.github.com | +| Peter Nordquist | peter.nordquist@pnnl.gov | +| Peter Salanki | peter@salanki.st | +| Peter White | peter.white@metaswitch.com | +| Phil Kates | me@philkates.com | +| Philip Southam | philip.southam@jpl.nasa.gov | +| Phu Kieu | pkieu@jpl.nasa.gov | +| Pierre Grimaud | grimaud.pierre@gmail.com | +| Pike.SZ.fish | pikeszfish@gmail.com | +| Prayag Verma | prayag.verma@gmail.com | +| Pushkar Joglekar | pjoglekar@vmware.com | +| PythonSyntax1 | 51872355+PythonSyntax1@users.noreply.github.com | +| Qiu Yu | qiuyu@ebaysf.com | +| Rafael | rafael@tigera.io | +| Rafal Borczuch | rafalq.b+github@gmail.com | +| Rafe Colton | r.colton@modcloth.com | +| Rahul Krishna Upadhyaya | rakrup@gmail.com | +| rao yunkun | yunkunrao@gmail.com | +| Renan Gonçalves | renan.saddam@gmail.com | +| Rene Dekker | rene@tigera.io | +| Rene Kaufmann | kaufmann.r@gmail.com | +| Reza R | 54559947+frozenprocess@users.noreply.github.com | +| Ricardo Katz | rikatz@users.noreply.github.com | +| Ricardo Pchevuzinske Katz | ricardo.katz@serpro.gov.br | +| Richard Kovacs | kovacsricsi@gmail.com | +| Richard Laughlin | richardwlaughlin@gmail.com | +| Richard Marshall | richard.marshall@ask.com | +| Ripta Pasay | ripta@users.noreply.github.com | +| Rob Brockbank | robbrockbank@gmail.com | +| Rob Terhaar | robbyt@robbyt.net | +| Robert Brockbank | rob.brockbank@metswitch.com | +| Robert Coleman | github@robert.net.nz | +| Roberto Alcantara | roberto@eletronica.org | +| Robin Müller | robin.mueller@outlook.de | +| Rodrigo Barbieri | rodrigo.barbieri2010@gmail.com | +| Roman Danko | elcomtik@users.noreply.github.com | +| Roman Sokolkov | roman@giantswarm.io | +| Ronnie P. Thomas | rpthms@users.noreply.github.com | +| Roshani Rathi | rrroshani227@gmail.com | +| roshanirathi | 42164609+roshanirathi@users.noreply.github.com | +| Rui Chen | rchen@meetup.com | +| rushtehrani | r@inven.io | +| Rustam Zagirov | stammru@gmail.com | +| Ryan Zhang | ryan.zhang@docker.com | +| rymarchikbot | 43807162+rymarchikbot@users.noreply.github.com | +| Saeid Askari | askari.saeed@gmail.com | +| Satish Matti | smatti@google.com | +| Satoru Takeuchi | sat@cybozu.co.jp | +| Saurabh Mohan | saurabh@tigera.io | +| Sean Kilgore | logikal@users.noreply.github.com | +| Sedef | ssavas@vmware.com | +| Semaphore Automatic Update | tom@tigera.io | +| Sergey Kulanov | skulanov@mirantis.com | +| Sergey Melnik | sergey.melnik@commercetools.de | +| Seth | sethpmccombs@gmail.com | +| Seth Malaki | seth@tigera.io | +| Shatrugna Sadhu | shatrugna.sadhu@gmail.com | +| Shaun Crampton | smc@metaswitch.com | +| shouheng.lei | shouheng.lei@easystack.cn | +| Simão Reis | smnrsti@gmail.com | +| SONG JIANG | song@tigera.io | +| SongmingYan | yan.songming@zte.com.cn | +| spdfnet | 32593931+spdfnet@users.noreply.github.com | +| Spike Curtis | spike@tigera.io | +| squ94wk | squ94wk@googlemail.com | +| sridhar | sridhar@tigera.io | +| sridhartigera | 63839878+sridhartigera@users.noreply.github.com | +| Sriram Yagnaraman | sriram.yagnaraman@est.tech | +| Stanislav Yotov | 29090864+svyotov@users.noreply.github.com | +| Stanislav-Galchynski | Stanislav.Galchynski@itechart-group.com | +| Stefan Breunig | stefan.breunig@xing.com | +| Stefan Bueringer | sbueringer@gmail.com | +| Stephen Schlie | schlie@tigera.io | +| Steve Gao | steve@tigera.io | +| Stéphane Cottin | stephane.cottin@vixns.com | +| Suraiya Hameed | 22776421+Suraiya-Hameed@users.noreply.github.com | +| Suraj Narwade | surajnarwade353@gmail.com | +| svInfra17 | vinayak@infracloud.io | +| Szymon Pyżalski | spyzalski@mirantis.com | +| TAKAHASHI Shuuji | shuuji3@gmail.com | +| Tamal Saha | tamal@appscode.com | +| Tathagata Chowdhury | calsoft.tathagata.chowdhury@tigera.io | +| tathagatachowdhury | tathagata.chowdhury@calsoftinc.com | +| Teller-Ulam | 2749404+Teller-Ulam@users.noreply.github.com | +| Thijs Scheepers | tscheepers@users.noreply.github.com | +| Thilo Fromm | thilo@kinvolk.io | +| Thomas Lohner | tl@scale.sc | +| Tim Bart | tim@pims.me | +| Tim Briggs | timothydbriggs@gmail.com | +| Timo Beckers | timo.beckers@klarrio.com | +| Todd Nine | tnine@apigee.com | +| Tom Denham | tom@tomdee.co.uk | +| Tom Pointon | tom@teepeestudios.net | +| Tomas Hruby | tomas@tigera.io | +| Tomas Mazak | tomas@valec.net | +| Tommaso Pozzetti | tommypozzetti@hotmail.it | +| tonic | tonicbupt@gmail.com | +| ToroNZ | tomasmaggio@gmail.com | +| Trapier Marshall | trapier.marshall@docker.com | +| Trevor Tao | trevor.tao@arm.com | +| Trond Hasle Amundsen | t.h.amundsen@usit.uio.no | +| turekt | 32360115+turekt@users.noreply.github.com | +| tuti | tuti@tigera.io | +| Tyler Stachecki | tstachecki@bloomberg.net | +| Uwe Dauernheim | uwe@dauernheim.net | +| Uwe Krueger | uwe.krueger@sap.com | +| vagrant | vagrant@mesos.vm | +| Valentin Ouvrard | valentin.ouvrard@nautile.sarl | +| Viacheslav Vasilyev | avoidik@gmail.com | +| Vieri | 15050873171@163.com | +| Vincent Schwarzer | vincent.schwarzer@yahoo.de | +| Vivek Thrivikraman | vivek.thrivikraman@est.tech | +| wangwengang | wangwengang@inspur.com | +| Wei Kin Huang | weikin.huang04@gmail.com | +| Wei.ZHAO | zhaowei@qiyi.com | +| weizhouBlue | 45163302+weizhouBlue@users.noreply.github.com | +| Wietse Muizelaar | wmuizelaar@bol.com | +| Will Rouesnel | w.rouesnel@gmail.com | +| Wouter Schoot | wouter@schoot.org | +| wuranbo | wuranbo@gmail.com | +| wwgfhf | 51694849+wwgfhf@users.noreply.github.com | +| Xiang Dai | 764524258@qq.com | +| Xiang Liu | lx1036@126.com | +| xieyanker | xjsisnice@gmail.com | +| Xin He | he_xinworld@126.com | +| YAMAMOTO Takashi | yamamoto@midokura.com | +| Yan Zhu | yanzhu@alauda.io | +| yang59324 | yang59324@163.com | +| yanyan8566 | 62531742+yanyan8566@users.noreply.github.com | +| yassan | yassan0627@gmail.com | +| Yecheng Fu | cofyc.jackson@gmail.com | +| Yi He | yi.he@arm.com | +| Yi Tao | yitao@qiniu.com | +| ymyang | yangym9@lenovo.com | +| Yongkun Gui | ygui@google.com | +| Yuji Azama | yuji.azama@gmail.com | +| zealic | zealic@gmail.com | +| zhangjie | zhangjie0619@yeah.net | +| zhouxinyong | zhouxinyong@inspur.com | +| Zopanix | zopanix@gmail.com | +| Zuul | zuul@review.openstack.org | diff --git a/vendor/github.com/projectcalico/calico/LICENSE b/vendor/github.com/projectcalico/calico/LICENSE new file mode 100644 index 000000000..68c771a09 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/LICENSE @@ -0,0 +1,176 @@ + + 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. + diff --git a/vendor/github.com/projectcalico/kube-controllers/LICENSE b/vendor/github.com/projectcalico/calico/kube-controllers/LICENSE similarity index 100% rename from vendor/github.com/projectcalico/kube-controllers/LICENSE rename to vendor/github.com/projectcalico/calico/kube-controllers/LICENSE diff --git a/vendor/github.com/projectcalico/kube-controllers/pkg/cache/cache.go b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/cache/cache.go similarity index 99% rename from vendor/github.com/projectcalico/kube-controllers/pkg/cache/cache.go rename to vendor/github.com/projectcalico/calico/kube-controllers/pkg/cache/cache.go index 1f5e7e425..ee197556c 100644 --- a/vendor/github.com/projectcalico/kube-controllers/pkg/cache/cache.go +++ b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/cache/cache.go @@ -124,7 +124,7 @@ func NewResourceCache(args ResourceCacheArgs) ResourceCache { func (c *calicoCache) Set(key string, newObj interface{}) { if reflect.TypeOf(newObj) != c.ObjectType { - c.log.Fatalf("Wrong object type recieved to store in cache. Expected: %s, Found: %s", c.ObjectType, reflect.TypeOf(newObj)) + c.log.Fatalf("Wrong object type received to store in cache. Expected: %s, Found: %s", c.ObjectType, reflect.TypeOf(newObj)) } // Check if the object exists in the cache already. If it does and hasn't changed, diff --git a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/converter.go b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/converter.go similarity index 96% rename from vendor/github.com/projectcalico/kube-controllers/pkg/converter/converter.go rename to vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/converter.go index 2a63787c4..6c9a1d041 100644 --- a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/converter.go +++ b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/converter.go @@ -19,7 +19,7 @@ type Converter interface { // Converts kubernetes object to calico representation of it. Convert(k8sObj interface{}) (interface{}, error) - // Returns apporpriate key for the object + // Returns appropriate key for the object GetKey(obj interface{}) string // DeleteArgsFromKey returns name and namespace of the object to pass to Delete diff --git a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/namespace_converter.go b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/namespace_converter.go similarity index 86% rename from vendor/github.com/projectcalico/kube-controllers/pkg/converter/namespace_converter.go rename to vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/namespace_converter.go index 09c926a5a..02bba85bd 100644 --- a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/namespace_converter.go +++ b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/namespace_converter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017-2021 Tigera, 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. @@ -17,10 +17,11 @@ package converter import ( "fmt" - api "github.com/projectcalico/libcalico-go/lib/apis/v3" - "github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion" + api "github.com/projectcalico/api/pkg/apis/projectcalico/v3" - "k8s.io/api/core/v1" + "github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion" + + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" ) @@ -33,7 +34,7 @@ func NewNamespaceConverter() Converter { return &namespaceConverter{} } func (nc *namespaceConverter) Convert(k8sObj interface{}) (interface{}, error) { - var c conversion.Converter + c := conversion.NewConverter() namespace, ok := k8sObj.(*v1.Namespace) if !ok { tombstone, ok := k8sObj.(cache.DeletedFinalStateUnknown) @@ -52,7 +53,7 @@ func (nc *namespaceConverter) Convert(k8sObj interface{}) (interface{}, error) { profile := kvp.Value.(*api.Profile) // Isolate the metadata fields that we care about. ResourceVersion, CreationTimeStamp, etc are - // not relevant so we ignore them. This prevents uncessary updates. + // not relevant so we ignore them. This prevents unnecessary updates. profile.ObjectMeta = metav1.ObjectMeta{Name: profile.Name} return *profile, nil diff --git a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/networkpolicy_converter.go b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/networkpolicy_converter.go similarity index 74% rename from vendor/github.com/projectcalico/kube-controllers/pkg/converter/networkpolicy_converter.go rename to vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/networkpolicy_converter.go index 63a877082..d76022b28 100644 --- a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/networkpolicy_converter.go +++ b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/networkpolicy_converter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017-2021 Tigera, 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. @@ -15,11 +15,14 @@ package converter import ( + "errors" "fmt" "strings" - api "github.com/projectcalico/libcalico-go/lib/apis/v3" - "github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion" + api "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + + "github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion" + cerrors "github.com/projectcalico/calico/libcalico-go/lib/errors" networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -49,15 +52,19 @@ func (p *policyConverter) Convert(k8sObj interface{}) (interface{}, error) { } } - var c conversion.Converter + c := conversion.NewConverter() kvp, err := c.K8sNetworkPolicyToCalico(np) - if err != nil { + // Silently ignore rule conversion errors. We don't expect any conversion errors + // since the data given to us here is validated by the Kubernetes API. The conversion + // code ignores any rules that it cannot parse, and we will pass the valid ones to Felix. + var e *cerrors.ErrorPolicyConversion + if err != nil && !errors.As(err, &e) { return nil, err } cnp := kvp.Value.(*api.NetworkPolicy) // Isolate the metadata fields that we care about. ResourceVersion, CreationTimeStamp, etc are - // not relevant so we ignore them. This prevents uncessary updates. + // not relevant so we ignore them. This prevents unnecessary updates. cnp.ObjectMeta = metav1.ObjectMeta{Name: cnp.Name, Namespace: cnp.Namespace} return *cnp, err diff --git a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/pod_converter.go b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/pod_converter.go similarity index 53% rename from vendor/github.com/projectcalico/kube-controllers/pkg/converter/pod_converter.go rename to vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/pod_converter.go index 9b892ab0a..5ec341853 100644 --- a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/pod_converter.go +++ b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/pod_converter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017-2020 Tigera, 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. @@ -18,34 +18,49 @@ import ( "errors" "fmt" + "github.com/projectcalico/calico/libcalico-go/lib/backend/model" + log "github.com/sirupsen/logrus" - api "github.com/projectcalico/libcalico-go/lib/apis/v3" - "github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion" + api "github.com/projectcalico/calico/libcalico-go/lib/apis/v3" + "github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/client-go/tools/cache" ) // WorkloadEndpointData is an internal struct used to store the various bits // of information that the policy controller cares about on a workload endpoint. type WorkloadEndpointData struct { - PodName string - Namespace string - Labels map[string]string + PodName string + Namespace string + Labels map[string]string + ServiceAccount string } -type podConverter struct { +type PodConverter interface { + Convert(k8sObj interface{}) ([]WorkloadEndpointData, error) + GetKey(obj WorkloadEndpointData) string + DeleteArgsFromKey(key string) (string, string) } +type podConverter struct{} + // BuildWorkloadEndpointData generates the correct WorkloadEndpointData for the given -// WorkloadEndpoint, extracting fields that the policy controller is responsible for syncing. -func BuildWorkloadEndpointData(wep api.WorkloadEndpoint) WorkloadEndpointData { - return WorkloadEndpointData{ - PodName: wep.Spec.Pod, - Namespace: wep.Namespace, - Labels: wep.Labels, +// list of WorkloadEndpoints, extracting fields that the policy controller is responsible +// for syncing. +func BuildWorkloadEndpointData(weps ...api.WorkloadEndpoint) []WorkloadEndpointData { + var retWEPs []WorkloadEndpointData + for _, wep := range weps { + retWEPs = append(retWEPs, WorkloadEndpointData{ + PodName: wep.Spec.Pod, + Namespace: wep.Namespace, + Labels: wep.Labels, + ServiceAccount: wep.Spec.ServiceAccountName, + }) } + + return retWEPs } // MergeWorkloadEndpointData applies the given WorkloadEndpointData to the provided @@ -55,26 +70,20 @@ func MergeWorkloadEndpointData(wep *api.WorkloadEndpoint, upd WorkloadEndpointDa log.Fatalf("Bad attempt to merge data for %s/%s into wep %s/%s", upd.PodName, upd.Namespace, wep.Name, wep.Namespace) } wep.Labels = upd.Labels + wep.Spec.ServiceAccountName = upd.ServiceAccount } // NewPodConverter Constructor for podConverter -func NewPodConverter() Converter { +func NewPodConverter() PodConverter { return &podConverter{} } -func (p *podConverter) Convert(k8sObj interface{}) (interface{}, error) { +func (p *podConverter) Convert(k8sObj interface{}) ([]WorkloadEndpointData, error) { // Convert Pod into a workload endpoint. - var c conversion.Converter - pod, ok := k8sObj.(*v1.Pod) - if !ok { - tombstone, ok := k8sObj.(cache.DeletedFinalStateUnknown) - if !ok { - return nil, errors.New("couldn't get object from tombstone") - } - pod, ok = tombstone.Obj.(*v1.Pod) - if !ok { - return nil, errors.New("tombstone contained object that is not a Pod") - } + c := conversion.NewConverter() + pod, err := ExtractPodFromUpdate(k8sObj) + if err != nil { + return nil, err } // The conversion logic always requires a node, but we don't always have one. We don't actually @@ -83,21 +92,31 @@ func (p *podConverter) Convert(k8sObj interface{}) (interface{}, error) { pod.Spec.NodeName = "unknown.node" } - kvp, err := c.PodToWorkloadEndpoint(pod) + kvps, err := c.PodToWorkloadEndpoints(pod) if err != nil { return nil, err } - wep := kvp.Value.(*api.WorkloadEndpoint) // Build and return a WorkloadEndpointData struct using the data. - return BuildWorkloadEndpointData(*wep), nil + return BuildWorkloadEndpointData(kvpsToWEPs(kvps)...), nil +} + +func kvpsToWEPs(kvps []*model.KVPair) []api.WorkloadEndpoint { + var weps []api.WorkloadEndpoint + for _, kvp := range kvps { + wep := kvp.Value.(*api.WorkloadEndpoint) + if wep != nil { + weps = append(weps, *wep) + } + } + + return weps } // GetKey takes a WorkloadEndpointData and returns the key which // identifies it - namespace/name -func (p *podConverter) GetKey(obj interface{}) string { - e := obj.(WorkloadEndpointData) - return fmt.Sprintf("%s/%s", e.Namespace, e.PodName) +func (p *podConverter) GetKey(obj WorkloadEndpointData) string { + return fmt.Sprintf("%s/%s", obj.Namespace, obj.PodName) } func (p *podConverter) DeleteArgsFromKey(key string) (string, string) { @@ -107,3 +126,21 @@ func (p *podConverter) DeleteArgsFromKey(key string) (string, string) { log.Panicf("DeleteArgsFromKey call for WorkloadEndpoints is not allowed") return "", "" } + +// ExtractPodFromUpdate takes an update as received from the informer and returns the pod object, if present. +// some updates (particularly deletes) can include tombstone placeholders rather than an exact pod object. This +// function should be called in order to safely handles those cases. +func ExtractPodFromUpdate(obj interface{}) (*v1.Pod, error) { + pod, ok := obj.(*v1.Pod) + if !ok { + tombstone, ok := obj.(cache.DeletedFinalStateUnknown) + if !ok { + return nil, errors.New("couldn't get object from tombstone") + } + pod, ok = tombstone.Obj.(*v1.Pod) + if !ok { + return nil, errors.New("tombstone contained object that is not a Pod") + } + } + return pod, nil +} diff --git a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/serviceaccount_converter.go b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/serviceaccount_converter.go similarity index 86% rename from vendor/github.com/projectcalico/kube-controllers/pkg/converter/serviceaccount_converter.go rename to vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/serviceaccount_converter.go index 5cd9157f0..b4f796940 100644 --- a/vendor/github.com/projectcalico/kube-controllers/pkg/converter/serviceaccount_converter.go +++ b/vendor/github.com/projectcalico/calico/kube-controllers/pkg/converter/serviceaccount_converter.go @@ -1,4 +1,4 @@ -// Copyright (c) 2018 Tigera, Inc. All rights reserved. +// Copyright (c) 2018-2020 Tigera, 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. @@ -17,10 +17,11 @@ package converter import ( "fmt" - api "github.com/projectcalico/libcalico-go/lib/apis/v3" - "github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion" + api "github.com/projectcalico/api/pkg/apis/projectcalico/v3" - "k8s.io/api/core/v1" + "github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion" + + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" ) @@ -34,7 +35,7 @@ func NewServiceAccountConverter() Converter { } func (nc *serviceAccountConverter) Convert(k8sObj interface{}) (interface{}, error) { - var c conversion.Converter + c := conversion.NewConverter() serviceAccount, ok := k8sObj.(*v1.ServiceAccount) if !ok { tombstone, ok := k8sObj.(cache.DeletedFinalStateUnknown) @@ -53,7 +54,7 @@ func (nc *serviceAccountConverter) Convert(k8sObj interface{}) (interface{}, err profile := kvp.Value.(*api.Profile) // Isolate the metadata fields that we care about. ResourceVersion, CreationTimeStamp, etc are - // not relevant so we ignore them. This prevents uncessary updates. + // not relevant so we ignore them. This prevents unnecessary updates. profile.ObjectMeta = metav1.ObjectMeta{Name: profile.Name} return *profile, nil diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/LICENSE b/vendor/github.com/projectcalico/calico/libcalico-go/LICENSE new file mode 100644 index 000000000..68c771a09 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/LICENSE @@ -0,0 +1,176 @@ + + 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. + diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/blockaffinity.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/blockaffinity.go similarity index 83% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/blockaffinity.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/blockaffinity.go index 5f6435b71..3da822162 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/blockaffinity.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/blockaffinity.go @@ -16,6 +16,8 @@ package v3 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" ) const ( @@ -37,9 +39,13 @@ type BlockAffinity struct { // BlockAffinitySpec contains the specification for a BlockAffinity resource. type BlockAffinitySpec struct { - State string `json:"state"` - Node string `json:"node"` - CIDR string `json:"cidr"` + State string `json:"state"` + Node string `json:"node"` + CIDR string `json:"cidr"` + + // Deleted indicates that this block affinity is being deleted. + // This field is a string for compatibility with older releases that + // mistakenly treat this field as a string. Deleted string `json:"deleted"` } @@ -58,7 +64,7 @@ func NewBlockAffinity() *BlockAffinity { return &BlockAffinity{ TypeMeta: metav1.TypeMeta{ Kind: KindBlockAffinity, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } @@ -69,7 +75,7 @@ func NewBlockAffinityList() *BlockAffinityList { return &BlockAffinityList{ TypeMeta: metav1.TypeMeta{ Kind: KindBlockAffinityList, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/doc.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/doc.go similarity index 87% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/doc.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/doc.go index 4cbf3cba6..32518b340 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/doc.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/doc.go @@ -15,20 +15,12 @@ /* Package v3 implements the resource definitions used on the Calico client API. -The valid resource types are: - - BGPPeer - - GlobalNetworkPolicy - - HostEndpoint - - IPPool - - NetworkPolicy - - Profile - - WorkloadEndpoint - The resource structures include the JSON tags for each exposed field. These are standard golang tags that define the JSON format of the structures as used by calicoctl. The YAML format also used by calicoctl is directly mapped from the JSON. */ // +k8s:deepcopy-gen=package,register +// +k8s:openapi-gen=true package v3 diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_block.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_block.go new file mode 100644 index 000000000..4ef27efbd --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_block.go @@ -0,0 +1,121 @@ +// Copyright (c) 2019 Tigera, 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 v3 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" +) + +const ( + KindIPAMBlock = "IPAMBlock" + KindIPAMBlockList = "IPAMBlockList" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IPAMBlock contains information about a block for IP address assignment. +type IPAMBlock struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + // Specification of the IPAMBlock. + Spec IPAMBlockSpec `json:"spec,omitempty"` +} + +// IPAMBlockSpec contains the specification for an IPAMBlock resource. +type IPAMBlockSpec struct { + // The block's CIDR. + CIDR string `json:"cidr"` + + // Affinity of the block, if this block has one. If set, it will be of the form + // "host:". If not set, this block is not affine to a host. + Affinity *string `json:"affinity,omitempty"` + + // Array of allocations in-use within this block. nil entries mean the allocation is free. + // For non-nil entries at index i, the index is the ordinal of the allocation within this block + // and the value is the index of the associated attributes in the Attributes array. + Allocations []*int `json:"allocations"` + + // Unallocated is an ordered list of allocations which are free in the block. + Unallocated []int `json:"unallocated"` + + // Attributes is an array of arbitrary metadata associated with allocations in the block. To find + // attributes for a given allocation, use the value of the allocation's entry in the Allocations array + // as the index of the element in this array. + Attributes []AllocationAttribute `json:"attributes"` + + // We store a sequence number that is updated each time the block is written. + // Each allocation will also store the sequence number of the block at the time of its creation. + // When releasing an IP, passing the sequence number associated with the allocation allows us + // to protect against a race condition and ensure the IP hasn't been released and re-allocated + // since the release request. + // + // +kubebuilder:default=0 + // +optional + SequenceNumber uint64 `json:"sequenceNumber"` + + // Map of allocated ordinal within the block to sequence number of the block at + // the time of allocation. Kubernetes does not allow numerical keys for maps, so + // the key is cast to a string. + // +optional + SequenceNumberForAllocation map[string]uint64 `json:"sequenceNumberForAllocation"` + + // Deleted is an internal boolean used to workaround a limitation in the Kubernetes API whereby + // deletion will not return a conflict error if the block has been updated. It should not be set manually. + // +optional + Deleted bool `json:"deleted"` + + // StrictAffinity on the IPAMBlock is deprecated and no longer used by the code. Use IPAMConfig StrictAffinity instead. + DeprecatedStrictAffinity bool `json:"strictAffinity"` +} + +type AllocationAttribute struct { + AttrPrimary *string `json:"handle_id,omitempty"` + AttrSecondary map[string]string `json:"secondary,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IPAMBlockList contains a list of IPAMBlock resources. +type IPAMBlockList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + Items []IPAMBlock `json:"items"` +} + +// NewIPAMBlock creates a new (zeroed) IPAMBlock struct with the TypeMetadata initialised to the current +// version. +func NewIPAMBlock() *IPAMBlock { + return &IPAMBlock{ + TypeMeta: metav1.TypeMeta{ + Kind: KindIPAMBlock, + APIVersion: apiv3.GroupVersionCurrent, + }, + } +} + +// NewIPAMBlockList creates a new (zeroed) IPAMBlockList struct with the TypeMetadata initialised to the current +// version. +func NewIPAMBlockList() *IPAMBlockList { + return &IPAMBlockList{ + TypeMeta: metav1.TypeMeta{ + Kind: KindIPAMBlockList, + APIVersion: apiv3.GroupVersionCurrent, + }, + } +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ipam_config.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_config.go similarity index 77% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ipam_config.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_config.go index e5938fd11..2c9141723 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ipam_config.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_config.go @@ -16,11 +16,14 @@ package v3 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" ) const ( - KindIPAMConfig = "IPAMConfig" - KindIPAMConfigList = "IPAMConfigList" + KindIPAMConfig = "IPAMConfig" + KindIPAMConfigList = "IPAMConfigList" + GlobalIPAMConfigName = "default" ) // +genclient @@ -29,16 +32,25 @@ const ( // IPAMConfig contains information about a block for IP address assignment. type IPAMConfig struct { metav1.TypeMeta `json:",inline"` + // Standard object's metadata. metav1.ObjectMeta `json:"metadata,omitempty"` + // Specification of the IPAMConfig. Spec IPAMConfigSpec `json:"spec,omitempty"` } -// IPAMConfigSpec contains the specification for a IPAMConfig resource. +// IPAMConfigSpec contains the specification for an IPAMConfig resource. type IPAMConfigSpec struct { StrictAffinity bool `json:"strictAffinity"` AutoAllocateBlocks bool `json:"autoAllocateBlocks"` + + // MaxBlocksPerHost, if non-zero, is the max number of blocks that can be + // affine to each host. + // +kubebuilder:validation:Minimum:=0 + // +kubebuilder:validation:Maximum:=2147483647 + // +optional + MaxBlocksPerHost int `json:"maxBlocksPerHost,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -56,7 +68,7 @@ func NewIPAMConfig() *IPAMConfig { return &IPAMConfig{ TypeMeta: metav1.TypeMeta{ Kind: KindIPAMConfig, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } @@ -67,7 +79,7 @@ func NewIPAMConfigList() *IPAMConfigList { return &IPAMConfigList{ TypeMeta: metav1.TypeMeta{ Kind: KindIPAMConfigList, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ipam_handle.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_handle.go similarity index 85% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ipam_handle.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_handle.go index 0717955e3..e9b96ff23 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ipam_handle.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_handle.go @@ -16,6 +16,8 @@ package v3 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" ) const ( @@ -26,7 +28,7 @@ const ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// IPAMHandle contains information about a IPAMHandle resource. +// IPAMHandle contains information about an IPAMHandle resource. type IPAMHandle struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -35,10 +37,13 @@ type IPAMHandle struct { Spec IPAMHandleSpec `json:"spec,omitempty"` } -// IPAMHandleSpec contains the specification for a IPAMHandle resource. +// IPAMHandleSpec contains the specification for an IPAMHandle resource. type IPAMHandleSpec struct { HandleID string `json:"handleID"` Block map[string]int `json:"block"` + + // +optional + Deleted bool `json:"deleted"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -56,7 +61,7 @@ func NewIPAMHandle() *IPAMHandle { return &IPAMHandle{ TypeMeta: metav1.TypeMeta{ Kind: KindIPAMHandle, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } @@ -67,7 +72,7 @@ func NewIPAMHandleList() *IPAMHandleList { return &IPAMHandleList{ TypeMeta: metav1.TypeMeta{ Kind: KindIPAMHandleList, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/node.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/node.go similarity index 60% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/node.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/node.go index 7cf0ae59d..8588444c9 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/node.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/node.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017,2020 Tigera, 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. @@ -17,12 +17,17 @@ package v3 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/projectcalico/libcalico-go/lib/numorstring" + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + + "github.com/projectcalico/api/pkg/lib/numorstring" ) const ( KindNode = "Node" KindNodeList = "NodeList" + CalicoNodeIP = "CalicoNodeIP" + InternalIP = "InternalIP" + ExternalIP = "ExternalIP" ) // +genclient @@ -35,6 +40,8 @@ type Node struct { metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the Node. Spec NodeSpec `json:"spec,omitempty"` + // Status of the Node. + Status NodeStatus `json:"status,omitempty"` } // NodeSpec contains the specification for a Node resource. @@ -48,8 +55,42 @@ type NodeSpec struct { // VXLANTunnelMACAddr is the MAC address of the VXLAN tunnel. VXLANTunnelMACAddr string `json:"vxlanTunnelMACAddr,omitempty" validate:"omitempty,mac"` + // IPv6VXLANTunnelAddr is the address of the IPv6 VXLAN tunnel. + IPv6VXLANTunnelAddr string `json:"ipv6VXLANTunnelAddr,omitempty" validate:"omitempty,ipv6"` + + // VXLANTunnelMACAddrV6 is the MAC address of the IPv6 VXLAN tunnel. + VXLANTunnelMACAddrV6 string `json:"vxlanTunnelMACAddrV6,omitempty" validate:"omitempty,mac"` + // OrchRefs for this node. OrchRefs []OrchRef `json:"orchRefs,omitempty" validate:"omitempty"` + + // Wireguard configuration for this node. + Wireguard *NodeWireguardSpec `json:"wireguard,omitempty" validate:"omitempty"` + + // Addresses list address that a client can reach the node at. + Addresses []NodeAddress `json:"addresses,omitempty" validate:"omitempty"` +} + +// NodeAddress represents an address assigned to a node. +type NodeAddress struct { + // Address is a string representation of the actual address. + Address string `json:"address" validate:"net"` + + // Type is the node IP type + Type string `json:"type,omitempty" validate:"omitempty,ipType"` +} + +type NodeStatus struct { + // WireguardPublicKey is the IPv4 Wireguard public-key for this node. + // wireguardPublicKey validates if the string is a valid base64 encoded key. + WireguardPublicKey string `json:"wireguardPublicKey,omitempty" validate:"omitempty,wireguardPublicKey"` + + // WireguardPublicKeyV6 is the IPv6 Wireguard public-key for this node. + // wireguardPublicKey validates if the string is a valid base64 encoded key. + WireguardPublicKeyV6 string `json:"wireguardPublicKeyV6,omitempty" validate:"omitempty,wireguardPublicKey"` + + // PodCIDR is a reflection of the Kubernetes node's spec.PodCIDRs field. + PodCIDRs []string `json:"podCIDRs,omitempty" validate:"omitempty"` } // OrchRef is used to correlate a Calico node to its corresponding representation in a given orchestrator @@ -78,6 +119,15 @@ type NodeBGPSpec struct { RouteReflectorClusterID string `json:"routeReflectorClusterID,omitempty" validate:"omitempty,ipv4"` } +// NodeWireguardSpec contains the specification for the Node wireguard configuration. +type NodeWireguardSpec struct { + // InterfaceIPv4Address is the IP address for the IPv4 Wireguard interface. + InterfaceIPv4Address string `json:"interfaceIPv4Address,omitempty" validate:"omitempty,ipv4"` + + // InterfaceIPv6Address is the IP address for the IPv6 Wireguard interface. + InterfaceIPv6Address string `json:"interfaceIPv6Address,omitempty" validate:"omitempty,ipv6"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // NodeList contains a list of Node resources. @@ -93,7 +143,7 @@ func NewNode() *Node { return &Node{ TypeMeta: metav1.TypeMeta{ Kind: KindNode, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } @@ -104,7 +154,7 @@ func NewNodeList() *NodeList { return &NodeList{ TypeMeta: metav1.TypeMeta{ Kind: KindNodeList, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/openapi_generated.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/openapi_generated.go new file mode 100644 index 000000000..5da82a769 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/openapi_generated.go @@ -0,0 +1,3276 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright (c) 2016-2021 Tigera, 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. + +// Code generated by openapi-gen. DO NOT EDIT. + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package v3 + +import ( + common "k8s.io/kube-openapi/pkg/common" + spec "k8s.io/kube-openapi/pkg/validation/spec" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeer": schema_libcalico_go_lib_apis_v1_BGPPeer(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeerList": schema_libcalico_go_lib_apis_v1_BGPPeerList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeerMetadata": schema_libcalico_go_lib_apis_v1_BGPPeerMetadata(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeerSpec": schema_libcalico_go_lib_apis_v1_BGPPeerSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.CalicoAPIConfig": schema_libcalico_go_lib_apis_v1_CalicoAPIConfig(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigMetadata": schema_libcalico_go_lib_apis_v1_CalicoAPIConfigMetadata(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigSpec": schema_libcalico_go_lib_apis_v1_CalicoAPIConfigSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EndpointPort": schema_libcalico_go_lib_apis_v1_EndpointPort(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EntityRule": schema_libcalico_go_lib_apis_v1_EntityRule(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EtcdConfig": schema_libcalico_go_lib_apis_v1_EtcdConfig(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpoint": schema_libcalico_go_lib_apis_v1_HostEndpoint(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpointList": schema_libcalico_go_lib_apis_v1_HostEndpointList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpointMetadata": schema_libcalico_go_lib_apis_v1_HostEndpointMetadata(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpointSpec": schema_libcalico_go_lib_apis_v1_HostEndpointSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ICMPFields": schema_libcalico_go_lib_apis_v1_ICMPFields(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPIPConfiguration": schema_libcalico_go_lib_apis_v1_IPIPConfiguration(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPNAT": schema_libcalico_go_lib_apis_v1_IPNAT(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPool": schema_libcalico_go_lib_apis_v1_IPPool(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPoolList": schema_libcalico_go_lib_apis_v1_IPPoolList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPoolMetadata": schema_libcalico_go_lib_apis_v1_IPPoolMetadata(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPoolSpec": schema_libcalico_go_lib_apis_v1_IPPoolSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.KubeConfig": schema_libcalico_go_lib_apis_v1_KubeConfig(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Node": schema_libcalico_go_lib_apis_v1_Node(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeBGPSpec": schema_libcalico_go_lib_apis_v1_NodeBGPSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeList": schema_libcalico_go_lib_apis_v1_NodeList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeMetadata": schema_libcalico_go_lib_apis_v1_NodeMetadata(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeSpec": schema_libcalico_go_lib_apis_v1_NodeSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.OrchRef": schema_libcalico_go_lib_apis_v1_OrchRef(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Policy": schema_libcalico_go_lib_apis_v1_Policy(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.PolicyList": schema_libcalico_go_lib_apis_v1_PolicyList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.PolicyMetadata": schema_libcalico_go_lib_apis_v1_PolicyMetadata(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.PolicySpec": schema_libcalico_go_lib_apis_v1_PolicySpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Profile": schema_libcalico_go_lib_apis_v1_Profile(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ProfileList": schema_libcalico_go_lib_apis_v1_ProfileList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ProfileMetadata": schema_libcalico_go_lib_apis_v1_ProfileMetadata(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ProfileSpec": schema_libcalico_go_lib_apis_v1_ProfileSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Rule": schema_libcalico_go_lib_apis_v1_Rule(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpoint": schema_libcalico_go_lib_apis_v1_WorkloadEndpoint(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpointList": schema_libcalico_go_lib_apis_v1_WorkloadEndpointList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpointMetadata": schema_libcalico_go_lib_apis_v1_WorkloadEndpointMetadata(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpointSpec": schema_libcalico_go_lib_apis_v1_WorkloadEndpointSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.AllocationAttribute": schema_libcalico_go_lib_apis_v3_AllocationAttribute(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.BlockAffinity": schema_libcalico_go_lib_apis_v3_BlockAffinity(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.BlockAffinityList": schema_libcalico_go_lib_apis_v3_BlockAffinityList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.BlockAffinitySpec": schema_libcalico_go_lib_apis_v3_BlockAffinitySpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMBlock": schema_libcalico_go_lib_apis_v3_IPAMBlock(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMBlockList": schema_libcalico_go_lib_apis_v3_IPAMBlockList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMBlockSpec": schema_libcalico_go_lib_apis_v3_IPAMBlockSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMConfig": schema_libcalico_go_lib_apis_v3_IPAMConfig(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMConfigList": schema_libcalico_go_lib_apis_v3_IPAMConfigList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMConfigSpec": schema_libcalico_go_lib_apis_v3_IPAMConfigSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMHandle": schema_libcalico_go_lib_apis_v3_IPAMHandle(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMHandleList": schema_libcalico_go_lib_apis_v3_IPAMHandleList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMHandleSpec": schema_libcalico_go_lib_apis_v3_IPAMHandleSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPNAT": schema_libcalico_go_lib_apis_v3_IPNAT(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.Node": schema_libcalico_go_lib_apis_v3_Node(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeAddress": schema_libcalico_go_lib_apis_v3_NodeAddress(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeBGPSpec": schema_libcalico_go_lib_apis_v3_NodeBGPSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeList": schema_libcalico_go_lib_apis_v3_NodeList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeSpec": schema_libcalico_go_lib_apis_v3_NodeSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeStatus": schema_libcalico_go_lib_apis_v3_NodeStatus(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeWireguardSpec": schema_libcalico_go_lib_apis_v3_NodeWireguardSpec(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.OrchRef": schema_libcalico_go_lib_apis_v3_OrchRef(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpoint": schema_libcalico_go_lib_apis_v3_WorkloadEndpoint(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpointList": schema_libcalico_go_lib_apis_v3_WorkloadEndpointList(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpointPort": schema_libcalico_go_lib_apis_v3_WorkloadEndpointPort(ref), + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpointSpec": schema_libcalico_go_lib_apis_v3_WorkloadEndpointSpec(ref), + } +} + +func schema_libcalico_go_lib_apis_v1_BGPPeer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BGPPeer contains information about a BGP peer resource that is a peer of a Calico compute node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Metadata for a BGPPeer.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeerMetadata"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification for a BGPPeer.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeerSpec"), + }, + }, + }, + Required: []string{"TypeMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeerMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeerSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_BGPPeerList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BGPPeerList contains a list of BGP Peer resources. List types are returned from List() enumerations in the client interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeer"), + }, + }, + }, + }, + }, + }, + Required: []string{"TypeMetadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.BGPPeer", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_BGPPeerMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BGPPeerMetadata contains the metadata for a BGPPeer resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ObjectMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"), + }, + }, + "scope": { + SchemaProps: spec.SchemaProps{ + Description: "The scope of the peer. This may be global or node. A global peer is a BGP device that peers with all Calico nodes. A node peer is a BGP device that peers with the specified Calico node (specified by the node hostname).", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "node": { + SchemaProps: spec.SchemaProps{ + Description: "The node name identifying the Calico node instance that is peering with this peer. When modifying a BGP peer, the node must be specified when the scope is `node`, and must be omitted when the scope is `global`.", + Type: []string{"string"}, + Format: "", + }, + }, + "peerIP": { + SchemaProps: spec.SchemaProps{ + Description: "The IP address of the peer.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IP"), + }, + }, + }, + Required: []string{"ObjectMetadata", "scope", "peerIP"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata", "github.com/projectcalico/calico/libcalico-go/lib/net.IP"}, + } +} + +func schema_libcalico_go_lib_apis_v1_BGPPeerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BGPPeerSpec contains the specification for a BGPPeer resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "asNumber": { + SchemaProps: spec.SchemaProps{ + Description: "The AS Number of the peer.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"asNumber"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v1_CalicoAPIConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CalicoAPIConfig contains the connection information for a Calico CalicoAPIConfig resource", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigMetadata"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigSpec"), + }, + }, + }, + Required: []string{"TypeMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.CalicoAPIConfigSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_CalicoAPIConfigMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CalicoAPIConfigMetadata contains the metadata for a Calico CalicoAPIConfig resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ObjectMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"), + }, + }, + }, + Required: []string{"ObjectMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_CalicoAPIConfigSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CalicoAPIConfigSpec contains the specification for a Calico CalicoAPIConfig resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "datastoreType": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "EtcdConfig": { + SchemaProps: spec.SchemaProps{ + Description: "Inline the ectd config fields", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EtcdConfig"), + }, + }, + "KubeConfig": { + SchemaProps: spec.SchemaProps{ + Description: "Inline the k8s config fields.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.KubeConfig"), + }, + }, + }, + Required: []string{"datastoreType", "EtcdConfig", "KubeConfig"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EtcdConfig", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.KubeConfig"}, + } +} + +func schema_libcalico_go_lib_apis_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/api/pkg/lib/numorstring.Protocol"), + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"name", "protocol", "port"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/api/pkg/lib/numorstring.Protocol"}, + } +} + +func schema_libcalico_go_lib_apis_v1_EntityRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "An EntityRule is a sub-component of a Rule comprising the match criteria specific to a particular entity (that is either the source or destination).\n\nA source EntityRule matches the source endpoint and originating traffic. A destination EntityRule matches the destination endpoint and terminating traffic.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "tag": { + SchemaProps: spec.SchemaProps{ + Description: "Tag is an optional field that restricts the rule to only apply to traffic that originates from (or terminates at) endpoints that have profiles with the given tag in them.", + Type: []string{"string"}, + Format: "", + }, + }, + "net": { + SchemaProps: spec.SchemaProps{ + Description: "Net is an optional field that restricts the rule to only apply to traffic that originates from (or terminates at) IP addresses in the given subnet. Deprecated: superseded by the Nets field.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"), + }, + }, + "nets": { + SchemaProps: spec.SchemaProps{ + Description: "Nets is an optional field that restricts the rule to only apply to traffic that originates from (or terminates at) IP addresses in any of the given subnets.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"), + }, + }, + }, + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "Selector is an optional field that contains a selector expression (see Policy for sample syntax). Only traffic that originates from (terminates at) endpoints matching the selector will be matched.\n\nNote that: in addition to the negated version of the Selector (see NotSelector below), the selector expression syntax itself supports negation. The two types of negation are subtly different. One negates the set of matched endpoints, the other negates the whole match:\n\n\tSelector = \"!has(my_label)\" matches packets that are from other Calico-controlled\n\tendpoints that do not have the label \"my_label\".\n\n\tNotSelector = \"has(my_label)\" matches packets that are not from Calico-controlled\n\tendpoints that do have the label \"my_label\".\n\nThe effect is that the latter will accept packets from non-Calico sources whereas the former is limited to packets from Calico-controlled endpoints.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Ports is an optional field that restricts the rule to only apply to traffic that has a source (destination) port that matches one of these ranges/values. This value is a list of integers or strings that represent ranges of ports.\n\nSince only some protocols have ports, if any ports are specified it requires the Protocol match in the Rule to be set to \"tcp\" or \"udp\".", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/api/pkg/lib/numorstring.Port"), + }, + }, + }, + }, + }, + "notTag": { + SchemaProps: spec.SchemaProps{ + Description: "NotTag is the negated version of the Tag field.", + Type: []string{"string"}, + Format: "", + }, + }, + "notNet": { + SchemaProps: spec.SchemaProps{ + Description: "NotNet is an optional field that restricts the rule to only apply to traffic that does not originate from (or terminate at) an IP address in the given subnet. Deprecated: superseded by NotNets.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"), + }, + }, + "notNets": { + SchemaProps: spec.SchemaProps{ + Description: "NotNets is an optional field that restricts the rule to only apply to traffic that does not originate from (or terminate at) an IP address in any of the given subnets.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"), + }, + }, + }, + }, + }, + "notSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NotSelector is the negated version of the Selector field. See Selector field for subtleties with negated selectors.", + Type: []string{"string"}, + Format: "", + }, + }, + "notPorts": { + SchemaProps: spec.SchemaProps{ + Description: "NotPorts is the negated version of the Ports field.\n\nSince only some protocols have ports, if any ports are specified it requires the Protocol match in the Rule to be set to \"tcp\" or \"udp\".", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/api/pkg/lib/numorstring.Port"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/api/pkg/lib/numorstring.Port", "github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"}, + } +} + +func schema_libcalico_go_lib_apis_v1_EtcdConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "etcdScheme": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "etcdAuthority": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "etcdEndpoints": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "etcdDiscoverySrv": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "etcdUsername": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "etcdPassword": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "etcdKeyFile": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "etcdCertFile": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "etcdCACertFile": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"etcdScheme", "etcdAuthority", "etcdEndpoints", "etcdDiscoverySrv", "etcdUsername", "etcdPassword", "etcdKeyFile", "etcdCertFile", "etcdCACertFile"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v1_HostEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HostEndpoint contains information about a \"bare-metal\" interfaces attached to the host that is running Calico's agent, Felix. By default, Calico doesn't apply any policy to such interfaces.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpointMetadata"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpointSpec"), + }, + }, + }, + Required: []string{"TypeMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpointMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpointSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_HostEndpointList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HostEndpointList contains a list of Host Endpoint resources. List types are returned from List() enumerations in the client interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpoint"), + }, + }, + }, + }, + }, + }, + Required: []string{"TypeMetadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.HostEndpoint", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_HostEndpointMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HostEndpointMetadata contains the Metadata for a HostEndpoint resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ObjectMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"), + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the endpoint.", + Type: []string{"string"}, + Format: "", + }, + }, + "node": { + SchemaProps: spec.SchemaProps{ + Description: "The node name identifying the Calico node instance.", + Type: []string{"string"}, + Format: "", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "The labels applied to the host endpoint. It is expected that many endpoints share the same labels. For example, they could be used to label all \"production\" workloads with \"deployment=prod\" so that security policy can be applied to production workloads.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"ObjectMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_HostEndpointSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HostEndpointSpec contains the specification for a HostEndpoint resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "interfaceName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the linux interface to apply policy to; for example \"eth0\". If \"InterfaceName\" is not present then at least one expected IP must be specified.", + Type: []string{"string"}, + Format: "", + }, + }, + "expectedIPs": { + SchemaProps: spec.SchemaProps{ + Description: "The expected IP addresses (IPv4 and IPv6) of the endpoint. If \"InterfaceName\" is not present, Calico will look for an interface matching any of the IPs in the list and apply policy to that.\n\nNote:\n\tWhen using the selector|tag match criteria in an ingress or egress security Policy\n\tor Profile, Calico converts the selector into a set of IP addresses. For host\n\tendpoints, the ExpectedIPs field is used for that purpose. (If only the interface\n\tname is specified, Calico does not learn the IPs of the interface for use in match\n\tcriteria.)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IP"), + }, + }, + }, + }, + }, + "profiles": { + SchemaProps: spec.SchemaProps{ + Description: "A list of identifiers of security Profile objects that apply to this endpoint. Each profile is applied in the order that they appear in this list. Profile rules are applied after the selector-based security policy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Ports contains the endpoint's named ports, which may be referenced in security policy rules.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EndpointPort"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EndpointPort", "github.com/projectcalico/calico/libcalico-go/lib/net.IP"}, + } +} + +func schema_libcalico_go_lib_apis_v1_ICMPFields(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ICMPFields defines structure for ICMP and NotICMP sub-struct for ICMP code and type", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request (i.e. pings).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "code": { + SchemaProps: spec.SchemaProps{ + Description: "Match on a specific ICMP code. If specified, the Type value must also be specified. This is a technical limitation imposed by the kernel's iptables firewall, which Calico uses to enforce the rule.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v1_IPIPConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "When enabled is true, ipip tunneling will be used to deliver packets to destinations within this pool.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "mode": { + SchemaProps: spec.SchemaProps{ + Description: "The IPIP mode. This can be one of \"always\" or \"cross-subnet\". A mode of \"always\" will also use IPIP tunneling for routing to destination IP addresses within this pool. A mode of \"cross-subnet\" will only use IPIP tunneling when the destination node is on a different subnet to the originating node. The default value (if not specified) is \"always\".", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v1_IPNAT(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPNat contains a single NAT mapping for a WorkloadEndpoint resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "internalIP": { + SchemaProps: spec.SchemaProps{ + Description: "The internal IP address which must be associated with the owning endpoint via the configured IPNetworks for the endpoint.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IP"), + }, + }, + "externalIP": { + SchemaProps: spec.SchemaProps{ + Description: "The external IP address.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IP"), + }, + }, + }, + Required: []string{"internalIP", "externalIP"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/net.IP"}, + } +} + +func schema_libcalico_go_lib_apis_v1_IPPool(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPPool contains the details of a Calico IP pool resource. A pool resource is used by Calico in two ways:\n - to provide a set of IP addresses from which Calico IPAM assigns addresses\n for workloads.\n - to provide configuration specific to IP address range, such as configuration\n for the BGP daemon (e.g. when to use a GRE tunnel to encapsulate packets\n between compute hosts).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPoolMetadata"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPoolSpec"), + }, + }, + }, + Required: []string{"TypeMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPoolMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPoolSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_IPPoolList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPPoolList contains a list of IP pool resources. List types are returned from List() enumerations in the client interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPool"), + }, + }, + }, + }, + }, + }, + Required: []string{"TypeMetadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPPool", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_IPPoolMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPPoolMetadata contains the metadata for an IP pool resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ObjectMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"), + }, + }, + "cidr": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"), + }, + }, + }, + Required: []string{"ObjectMetadata", "cidr"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata", "github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"}, + } +} + +func schema_libcalico_go_lib_apis_v1_IPPoolSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPPoolSpec contains the specification for an IP pool resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ipip": { + SchemaProps: spec.SchemaProps{ + Description: "Contains configuration for ipip tunneling for this pool. If not specified, then ipip tunneling is disabled for this pool.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPIPConfiguration"), + }, + }, + "nat-outgoing": { + SchemaProps: spec.SchemaProps{ + Description: "When nat-outgoing is true, packets sent from Calico networked containers in this pool to destinations outside of this pool will be masqueraded.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "disabled": { + SchemaProps: spec.SchemaProps{ + Description: "When disabled is true, Calico IPAM will not assign addresses from this pool.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPIPConfiguration"}, + } +} + +func schema_libcalico_go_lib_apis_v1_KubeConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kubeconfig": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "k8sAPIEndpoint": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "k8sKeyFile": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "k8sCertFile": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "k8sCAFile": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "k8sAPIToken": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "k8sInsecureSkipTLSVerify": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "k8sDisableNodePoll": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"kubeconfig", "k8sAPIEndpoint", "k8sKeyFile", "k8sCertFile", "k8sCAFile", "k8sAPIToken", "k8sInsecureSkipTLSVerify", "k8sDisableNodePoll"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v1_Node(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Node contains the details of a node resource which contains the configuration for a Calico node instance running on a compute host.\n\nIn addition to creating a Node resource through calicoctl or the Calico API, the Calico node instance must also be running on the specific host and should be provided the same Name as that configured on the Node resource. Note that, by default, the Calico node instance uses the hostname of the compute host when it is not explicitly specified - in this case, the equivalent Node resource should be created using the same hostname as the Name of the Node resource.\n\nOperations on the Node resources is expected to be required when adding a new host into a Calico network, and when removing a host from a Calico network, and occasionally to modify certain configuration. Care should be taken when operating on Node resources: deleting a Node resource will remove all Node specific data.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeMetadata"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeSpec"), + }, + }, + }, + Required: []string{"TypeMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_NodeBGPSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeSpec contains the specification for a Calico Node resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "asNumber": { + SchemaProps: spec.SchemaProps{ + Description: "The AS Number of the node. If this is not specified, the global default value will be used.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "ipv4Address": { + SchemaProps: spec.SchemaProps{ + Description: "IPv4Address is the IPv4 address and network of this node. At least one of the IPv4 and IPv6 addresses should be specified.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"), + }, + }, + "ipv6Address": { + SchemaProps: spec.SchemaProps{ + Description: "IPv6Address is the IPv6 address and network of this node. At least one of the IPv4 and IPv6 addresses should be specified.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"}, + } +} + +func schema_libcalico_go_lib_apis_v1_NodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A NodeList contains a list of Node resources. List types are returned from List() enumerations on the client interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Node"), + }, + }, + }, + }, + }, + }, + Required: []string{"TypeMetadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Node", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_NodeMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeMetadata contains the metadata for a Calico Node resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ObjectMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"), + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the node.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"ObjectMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_NodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeSpec contains the specification for a Calico Node resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bgp": { + SchemaProps: spec.SchemaProps{ + Description: "BGP configuration for this node. If this omitted, the Calico node will be run in policy-only mode.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeBGPSpec"), + }, + }, + "orchRefs": { + SchemaProps: spec.SchemaProps{ + Description: "OrchRefs for this node.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.OrchRef"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.NodeBGPSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.OrchRef"}, + } +} + +func schema_libcalico_go_lib_apis_v1_OrchRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OrchRef is used to correlate a Calico node to its corresponding representation in a given orchestrator", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "NodeName represents the name for this node according to the orchestrator.", + Type: []string{"string"}, + Format: "", + }, + }, + "orchestrator": { + SchemaProps: spec.SchemaProps{ + Description: "Orchestrator represents the orchestrator using this node.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"orchestrator"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Policy contains information about a security Policy resource. This contains a set of security rules to apply. Security policies allow a selector-based security model which can override the security profiles directly referenced by an endpoint.\n\nEach policy must do one of the following:\n\n - Match the packet and apply an \"allow\" action; this immediately accepts the packet, skipping\n all further policies and profiles. This is not recommended in general, because it prevents\n further policy from being executed.\n - Match the packet and apply a \"deny\" action; this drops the packet immediately, skipping all\n further policy and profiles.\n - Fail to match the packet; in which case the packet proceeds to the next policy. If there\n are no more policies then the packet is dropped.\n\nCalico implements the security policy for each endpoint individually and only the policies that have matching selectors are implemented. This ensures that the number of rules that actually need to be inserted into the kernel is proportional to the number of local endpoints rather than the total amount of policy.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.PolicyMetadata"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.PolicySpec"), + }, + }, + }, + Required: []string{"TypeMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.PolicyMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.PolicySpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_PolicyList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyList contains a list of selector-based security Policy resources. List types are returned from List() enumerations on the client interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Policy"), + }, + }, + }, + }, + }, + }, + Required: []string{"TypeMetadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Policy", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_PolicyMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyMetadata contains the metadata for a selector-based security Policy resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ObjectMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"), + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the selector-based security policy.", + Type: []string{"string"}, + Format: "", + }, + }, + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "Arbitrary key-value information to be used by clients.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"ObjectMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_PolicySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicySpec contains the specification for a selector-based security Policy resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "order": { + SchemaProps: spec.SchemaProps{ + Description: "Order is an optional field that specifies the order in which the policy is applied. Policies with higher \"order\" are applied after those with lower order. If the order is omitted, it may be considered to be \"infinite\" - i.e. the policy will be applied last. Policies with identical order will be applied in alphanumerical order based on the Policy \"Name\".", + Type: []string{"number"}, + Format: "double", + }, + }, + "ingress": { + SchemaProps: spec.SchemaProps{ + Description: "The ordered set of ingress rules. Each rule contains a set of packet match criteria and a corresponding action to apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Rule"), + }, + }, + }, + }, + }, + "egress": { + SchemaProps: spec.SchemaProps{ + Description: "The ordered set of egress rules. Each rule contains a set of packet match criteria and a corresponding action to apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Rule"), + }, + }, + }, + }, + }, + "selector": { + SchemaProps: spec.SchemaProps{ + Description: "The selector is an expression used to pick pick out the endpoints that the policy should be applied to.\n\nSelector expressions follow this syntax:\n\n\tlabel == \"string_literal\" -> comparison, e.g. my_label == \"foo bar\"\n\tlabel != \"string_literal\" -> not equal; also matches if label is not present\n\tlabel in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is one of \"a\", \"b\", \"c\"\n\tlabel not in { \"a\", \"b\", \"c\", ... } -> true if the value of label X is not one of \"a\", \"b\", \"c\"\n\thas(label_name) -> True if that label is present\n\t! expr -> negation of expr\n\texpr && expr -> Short-circuit and\n\texpr || expr -> Short-circuit or\n\t( expr ) -> parens for grouping\n\tall() or the empty selector -> matches all endpoints.\n\nLabel names are allowed to contain alphanumerics, -, _ and /. String literals are more permissive but they do not support escape characters.\n\nExamples (with made-up labels):\n\n\ttype == \"webserver\" && deployment == \"prod\"\n\ttype in {\"frontend\", \"backend\"}\n\tdeployment != \"dev\"\n\t! has(label_name)", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "doNotTrack": { + SchemaProps: spec.SchemaProps{ + Description: "DoNotTrack indicates whether packets matched by the rules in this policy should go through the data plane's connection tracking, such as Linux conntrack. If True, the rules in this policy are applied before any data plane connection tracking, and packets allowed by this policy are marked as not to be tracked.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "preDNAT": { + SchemaProps: spec.SchemaProps{ + Description: "PreDNAT indicates to apply the rules in this policy before any DNAT.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "types": { + SchemaProps: spec.SchemaProps{ + Description: "Types indicates whether this policy applies to ingress, or to egress, or to both. When not explicitly specified (and so the value on creation is empty or nil), Calico defaults Types according to what IngressRules and EgressRules are present in the policy. The default is:\n\n- [ PolicyTypeIngress ], if there are no EgressRules (including the case where there are\n also no IngressRules)\n\n- [ PolicyTypeEgress ], if there are EgressRules but no IngressRules\n\n- [ PolicyTypeIngress, PolicyTypeEgress ], if there are both IngressRules and EgressRules.\n\nWhen the policy is read back again, Types will always be one of these values, never empty or nil.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"selector"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Rule"}, + } +} + +func schema_libcalico_go_lib_apis_v1_Profile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Profile contains the details a security profile resource. A profile is set of security rules to apply on an endpoint. An endpoint (either a host endpoint or an endpoint on a workload) can reference zero or more profiles. The profile rules are applied directly to the endpoint *after* the selector-based security policy has been applied, and in the order the profiles are declared on the endpoint.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ProfileMetadata"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ProfileSpec"), + }, + }, + }, + Required: []string{"TypeMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ProfileMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ProfileSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_ProfileList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A ProfileList contains a list of security Profile resources. List types are returned from List() enumerations on the client interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Profile"), + }, + }, + }, + }, + }, + }, + Required: []string{"TypeMetadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Profile", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_ProfileMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ProfileMetadata contains the metadata for a security Profile resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ObjectMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"), + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the endpoint.", + Type: []string{"string"}, + Format: "", + }, + }, + "tags": { + SchemaProps: spec.SchemaProps{ + Description: "A list of tags that are applied to each endpoint that references this profile.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "The labels to apply to each endpoint that references this profile. It is expected that many endpoints share the same labels. For example, they could be used to label all \"production\" workloads with \"deployment=prod\" so that security policy can be applied to production workloads.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"ObjectMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_ProfileSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ProfileSpec contains the specification for a security Profile resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ingress": { + SchemaProps: spec.SchemaProps{ + Description: "The ordered set of ingress rules. Each rule contains a set of packet match criteria and a corresponding action to apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Rule"), + }, + }, + }, + }, + }, + "egress": { + SchemaProps: spec.SchemaProps{ + Description: "The ordered set of egress rules. Each rule contains a set of packet match criteria and a corresponding action to apply.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Rule"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.Rule"}, + } +} + +func schema_libcalico_go_lib_apis_v1_Rule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy and security Profiles reference rules - separated out as a list of rules for both ingress and egress packet matching.\n\nEach positive match criteria has a negated version, prefixed with \"Not\". All the match criteria within a rule must be satisfied for a packet to match. A single rule can contain the positive and negative version of a match and both must be satisfied for the rule to match.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "action": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ipVersion": { + SchemaProps: spec.SchemaProps{ + Description: "IPVersion is an optional field that restricts the rule to only match a specific IP version.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "Protocol is an optional field that restricts the rule to only apply to traffic of a specific IP protocol. Required if any of the EntityRules contain Ports (because ports only apply to certain protocols).\n\nMust be one of these string values: \"tcp\", \"udp\", \"icmp\", \"icmpv6\", \"sctp\", \"udplite\" or an integer in the range 1-255.", + Ref: ref("github.com/projectcalico/api/pkg/lib/numorstring.Protocol"), + }, + }, + "icmp": { + SchemaProps: spec.SchemaProps{ + Description: "ICMP is an optional field that restricts the rule to apply to a specific type and code of ICMP traffic. This should only be specified if the Protocol field is set to \"icmp\" or \"icmpv6\".", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ICMPFields"), + }, + }, + "notProtocol": { + SchemaProps: spec.SchemaProps{ + Description: "NotProtocol is the negated version of the Protocol field.", + Ref: ref("github.com/projectcalico/api/pkg/lib/numorstring.Protocol"), + }, + }, + "notICMP": { + SchemaProps: spec.SchemaProps{ + Description: "NotICMP is the negated version of the ICMP field.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ICMPFields"), + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source contains the match criteria that apply to source entity.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EntityRule"), + }, + }, + "destination": { + SchemaProps: spec.SchemaProps{ + Description: "Destination contains the match criteria that apply to destination entity.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EntityRule"), + }, + }, + }, + Required: []string{"action"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/api/pkg/lib/numorstring.Protocol", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EntityRule", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.ICMPFields"}, + } +} + +func schema_libcalico_go_lib_apis_v1_WorkloadEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpointMetadata"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpointSpec"), + }, + }, + }, + Required: []string{"TypeMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpointMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpointSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_WorkloadEndpointList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadEndpointList contains a list of Workload Endpoint resources. List types are returned from List() enumerations in the client interface.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TypeMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"), + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpoint"), + }, + }, + }, + }, + }, + }, + Required: []string{"TypeMetadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.WorkloadEndpoint", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ListMetadata", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.TypeMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_WorkloadEndpointMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadEndpointMetadata contains the Metadata for a WorkloadEndpoint resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ObjectMetadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"), + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the endpoint. This may be omitted on a create, in which case an endpoint ID will be automatically created, and the endpoint ID will be included in the response.", + Type: []string{"string"}, + Format: "", + }, + }, + "workload": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the workload.", + Type: []string{"string"}, + Format: "", + }, + }, + "orchestrator": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the orchestrator.", + Type: []string{"string"}, + Format: "", + }, + }, + "node": { + SchemaProps: spec.SchemaProps{ + Description: "The node name identifying the Calico node instance.", + Type: []string{"string"}, + Format: "", + }, + }, + "activeInstanceID": { + SchemaProps: spec.SchemaProps{ + Description: "ActiveInstanceID is an optional field that orchestrators may use to store additional information about the endpoint. The primary use case is to store a unique identifier for the active instance of a container. For example, with Calico CNI, a re-spawned container may use the same endpoint indexing (Node, Orchestrator, Workload, Endpoint) for the new container as for the old - the ActiveInstanceID is used to store an additional unique ID which the CNI plugin uses to determine whether the DEL operation needs to delete the Calico WorkloadEndpoint. This field is not an index field of the WorkloadEndpoint resource.", + Type: []string{"string"}, + Format: "", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "The labels applied to the workload endpoint. It is expected that many endpoints share the same labels. For example, they could be used to label all \"production\" workloads with \"deployment=prod\" so that security policy can be applied to production workloads.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"ObjectMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1/unversioned.ObjectMetadata"}, + } +} + +func schema_libcalico_go_lib_apis_v1_WorkloadEndpointSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadEndpointMetadata contains the specification for a WorkloadEndpoint resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ipNetworks": { + SchemaProps: spec.SchemaProps{ + Description: "IPNetworks is a list of subnets allocated to this endpoint. IP packets will only be allowed to leave this interface if they come from an address in one of these subnets.\n\nCurrently only /32 for IPv4 and /128 for IPv6 networks are supported.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"), + }, + }, + }, + }, + }, + "ipNATs": { + SchemaProps: spec.SchemaProps{ + Description: "IPNATs is a list of 1:1 NAT mappings to apply to the endpoint. Inbound connections to the external IP will be forwarded to the internal IP. Connections initiated from the internal IP will not have their source address changed, except when an endpoint attempts to connect one of its own external IPs. Each internal IP must be associated with the same endpoint via the configured IPNetworks.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPNAT"), + }, + }, + }, + }, + }, + "ipv4Gateway": { + SchemaProps: spec.SchemaProps{ + Description: "IPv4Gateway is the gateway IPv4 address for traffic from the workload.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IP"), + }, + }, + "ipv6Gateway": { + SchemaProps: spec.SchemaProps{ + Description: "IPv6Gateway is the gateway IPv6 address for traffic from the workload.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IP"), + }, + }, + "profiles": { + SchemaProps: spec.SchemaProps{ + Description: "A list of security Profile resources that apply to this endpoint. Each profile is applied in the order that they appear in this list. Profile rules are applied after the selector-based security policy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "interfaceName": { + SchemaProps: spec.SchemaProps{ + Description: "InterfaceName the name of the Linux interface on the host: for example, tap80.", + Type: []string{"string"}, + Format: "", + }, + }, + "mac": { + SchemaProps: spec.SchemaProps{ + Description: "MAC is the MAC address of the endpoint interface.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.MAC"), + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Ports contains the endpoint's named ports, which may be referenced in security policy rules.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EndpointPort"), + }, + }, + }, + }, + }, + "allow_spoofed_source_prefixes": { + SchemaProps: spec.SchemaProps{ + Description: "AllowSpoofedSourcePrefixes is a list of CIDRs this workload endpoint is allowed to send traffic from, i.e. this allows the workload endpoint to spoof its IP address using addresses in these prefixes", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/net.IPNet"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.EndpointPort", "github.com/projectcalico/calico/libcalico-go/lib/apis/v1.IPNAT", "github.com/projectcalico/calico/libcalico-go/lib/net.IP", "github.com/projectcalico/calico/libcalico-go/lib/net.IPNet", "github.com/projectcalico/calico/libcalico-go/lib/net.MAC"}, + } +} + +func schema_libcalico_go_lib_apis_v3_AllocationAttribute(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "handle_id": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "secondary": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_BlockAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BlockAffinity maintains a block affinity's state", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the BlockAffinity.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.BlockAffinitySpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.BlockAffinitySpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_BlockAffinityList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BlockAffinityList contains a list of BlockAffinity resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.BlockAffinity"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.BlockAffinity", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_BlockAffinitySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BlockAffinitySpec contains the specification for a BlockAffinity resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "state": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "node": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "cidr": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "deleted": { + SchemaProps: spec.SchemaProps{ + Description: "Deleted indicates that this block affinity is being deleted. This field is a string for compatibility with older releases that mistakenly treat this field as a string.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"state", "node", "cidr", "deleted"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_IPAMBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAMBlock contains information about a block for IP address assignment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the IPAMBlock.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMBlockSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMBlockSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_IPAMBlockList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAMBlockList contains a list of IPAMBlock resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMBlock"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMBlock", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_IPAMBlockSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAMBlockSpec contains the specification for an IPAMBlock resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "cidr": { + SchemaProps: spec.SchemaProps{ + Description: "The block's CIDR.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "affinity": { + SchemaProps: spec.SchemaProps{ + Description: "Affinity of the block, if this block has one. If set, it will be of the form \"host:\". If not set, this block is not affine to a host.", + Type: []string{"string"}, + Format: "", + }, + }, + "allocations": { + SchemaProps: spec.SchemaProps{ + Description: "Array of allocations in-use within this block. nil entries mean the allocation is free. For non-nil entries at index i, the index is the ordinal of the allocation within this block and the value is the index of the associated attributes in the Attributes array.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + "unallocated": { + SchemaProps: spec.SchemaProps{ + Description: "Unallocated is an ordered list of allocations which are free in the block.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + "attributes": { + SchemaProps: spec.SchemaProps{ + Description: "Attributes is an array of arbitrary metadata associated with allocations in the block. To find attributes for a given allocation, use the value of the allocation's entry in the Allocations array as the index of the element in this array.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.AllocationAttribute"), + }, + }, + }, + }, + }, + "sequenceNumber": { + SchemaProps: spec.SchemaProps{ + Description: "We store a sequence number that is updated each time the block is written. Each allocation will also store the sequence number of the block at the time of its creation. When releasing an IP, passing the sequence number associated with the allocation allows us to protect against a race condition and ensure the IP hasn't been released and re-allocated since the release request.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", + }, + }, + "sequenceNumberForAllocation": { + SchemaProps: spec.SchemaProps{ + Description: "Map of allocated ordinal within the block to sequence number of the block at the time of allocation. Kubernetes does not allow numerical keys for maps, so the key is cast to a string.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + "deleted": { + SchemaProps: spec.SchemaProps{ + Description: "Deleted is an internal boolean used to workaround a limitation in the Kubernetes API whereby deletion will not return a conflict error if the block has been updated. It should not be set manually.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "strictAffinity": { + SchemaProps: spec.SchemaProps{ + Description: "StrictAffinity on the IPAMBlock is deprecated and no longer used by the code. Use IPAMConfig StrictAffinity instead.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"cidr", "allocations", "unallocated", "attributes", "strictAffinity"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.AllocationAttribute"}, + } +} + +func schema_libcalico_go_lib_apis_v3_IPAMConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAMConfig contains information about a block for IP address assignment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the IPAMConfig.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMConfigSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMConfigSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_IPAMConfigList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAMConfigList contains a list of IPAMConfig resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMConfig"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_IPAMConfigSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAMConfigSpec contains the specification for an IPAMConfig resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "strictAffinity": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "autoAllocateBlocks": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + "maxBlocksPerHost": { + SchemaProps: spec.SchemaProps{ + Description: "MaxBlocksPerHost, if non-zero, is the max number of blocks that can be affine to each host.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"strictAffinity", "autoAllocateBlocks"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_IPAMHandle(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAMHandle contains information about an IPAMHandle resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the IPAMHandle.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMHandleSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMHandleSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_IPAMHandleList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAMHandleList contains a list of IPAMHandle resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMHandle"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPAMHandle", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_IPAMHandleSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPAMHandleSpec contains the specification for an IPAMHandle resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "handleID": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "block": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + "deleted": { + SchemaProps: spec.SchemaProps{ + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"handleID", "block"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_IPNAT(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IPNat contains a single NAT mapping for a WorkloadEndpoint resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "internalIP": { + SchemaProps: spec.SchemaProps{ + Description: "The internal IP address which must be associated with the owning endpoint via the configured IPNetworks for the endpoint.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "externalIP": { + SchemaProps: spec.SchemaProps{ + Description: "The external IP address.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"internalIP", "externalIP"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_Node(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Node contains information about a Node resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the Node.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status of the Node.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_NodeAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeAddress represents an address assigned to a node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "address": { + SchemaProps: spec.SchemaProps{ + Description: "Address is a string representation of the actual address.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is the node IP type", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"address"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_NodeBGPSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeBGPSpec contains the specification for the Node BGP configuration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "asNumber": { + SchemaProps: spec.SchemaProps{ + Description: "The AS Number of the node. If this is not specified, the global default value will be used.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "ipv4Address": { + SchemaProps: spec.SchemaProps{ + Description: "IPv4Address is the IPv4 address and network of this node. The IPv4 address should always be specified if you are using BGP.", + Type: []string{"string"}, + Format: "", + }, + }, + "ipv6Address": { + SchemaProps: spec.SchemaProps{ + Description: "IPv6Address is the IPv6 address and network of this node. Not required if you are not using BGP or you do not require IPv6 routing.", + Type: []string{"string"}, + Format: "", + }, + }, + "ipv4IPIPTunnelAddr": { + SchemaProps: spec.SchemaProps{ + Description: "IPv4IPIPTunnelAddr is the IPv4 address of the IP in IP tunnel.", + Type: []string{"string"}, + Format: "", + }, + }, + "routeReflectorClusterID": { + SchemaProps: spec.SchemaProps{ + Description: "RouteReflectorClusterID enables this node as a route reflector within the given cluster.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_NodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeList contains a list of Node resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.Node"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.Node", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_NodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeSpec contains the specification for a Node resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bgp": { + SchemaProps: spec.SchemaProps{ + Description: "BGP configuration for this node.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeBGPSpec"), + }, + }, + "ipv4VXLANTunnelAddr": { + SchemaProps: spec.SchemaProps{ + Description: "IPv4VXLANTunnelAddr is the IPv4 address of the VXLAN tunnel.", + Type: []string{"string"}, + Format: "", + }, + }, + "vxlanTunnelMACAddr": { + SchemaProps: spec.SchemaProps{ + Description: "VXLANTunnelMACAddr is the MAC address of the VXLAN tunnel.", + Type: []string{"string"}, + Format: "", + }, + }, + "ipv6VXLANTunnelAddr": { + SchemaProps: spec.SchemaProps{ + Description: "IPv6VXLANTunnelAddr is the address of the IPv6 VXLAN tunnel.", + Type: []string{"string"}, + Format: "", + }, + }, + "vxlanTunnelMACAddrV6": { + SchemaProps: spec.SchemaProps{ + Description: "VXLANTunnelMACAddrV6 is the MAC address of the IPv6 VXLAN tunnel.", + Type: []string{"string"}, + Format: "", + }, + }, + "orchRefs": { + SchemaProps: spec.SchemaProps{ + Description: "OrchRefs for this node.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.OrchRef"), + }, + }, + }, + }, + }, + "wireguard": { + SchemaProps: spec.SchemaProps{ + Description: "Wireguard configuration for this node.", + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeWireguardSpec"), + }, + }, + "addresses": { + SchemaProps: spec.SchemaProps{ + Description: "Addresses list address that a client can reach the node at.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeAddress"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeAddress", "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeBGPSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.NodeWireguardSpec", "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.OrchRef"}, + } +} + +func schema_libcalico_go_lib_apis_v3_NodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "wireguardPublicKey": { + SchemaProps: spec.SchemaProps{ + Description: "WireguardPublicKey is the IPv4 Wireguard public-key for this node. wireguardPublicKey validates if the string is a valid base64 encoded key.", + Type: []string{"string"}, + Format: "", + }, + }, + "wireguardPublicKeyV6": { + SchemaProps: spec.SchemaProps{ + Description: "WireguardPublicKeyV6 is the IPv6 Wireguard public-key for this node. wireguardPublicKey validates if the string is a valid base64 encoded key.", + Type: []string{"string"}, + Format: "", + }, + }, + "podCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "PodCIDR is a reflection of the Kubernetes node's spec.PodCIDRs field.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_NodeWireguardSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeWireguardSpec contains the specification for the Node wireguard configuration.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "interfaceIPv4Address": { + SchemaProps: spec.SchemaProps{ + Description: "InterfaceIPv4Address is the IP address for the IPv4 Wireguard interface.", + Type: []string{"string"}, + Format: "", + }, + }, + "interfaceIPv6Address": { + SchemaProps: spec.SchemaProps{ + Description: "InterfaceIPv6Address is the IP address for the IPv6 Wireguard interface.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_OrchRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OrchRef is used to correlate a Calico node to its corresponding representation in a given orchestrator", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "NodeName represents the name for this node according to the orchestrator.", + Type: []string{"string"}, + Format: "", + }, + }, + "orchestrator": { + SchemaProps: spec.SchemaProps{ + Description: "Orchestrator represents the orchestrator using this node.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"orchestrator"}, + }, + }, + } +} + +func schema_libcalico_go_lib_apis_v3_WorkloadEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadEndpoint contains information about a WorkloadEndpoint resource that is a peer of a Calico compute node.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "Specification of the WorkloadEndpoint.", + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpointSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpointSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_WorkloadEndpointList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadEndpointList contains a list of WorkloadEndpoint resources.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpoint"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpoint", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_libcalico_go_lib_apis_v3_WorkloadEndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadEndpointPort represents one endpoint's named or mapped port", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "protocol": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/api/pkg/lib/numorstring.Protocol"), + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "hostPort": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "hostIP": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "protocol", "port", "hostPort", "hostIP"}, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/api/pkg/lib/numorstring.Protocol"}, + } +} + +func schema_libcalico_go_lib_apis_v3_WorkloadEndpointSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadEndpointMetadata contains the specification for a WorkloadEndpoint resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "orchestrator": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the orchestrator.", + Type: []string{"string"}, + Format: "", + }, + }, + "workload": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the workload.", + Type: []string{"string"}, + Format: "", + }, + }, + "node": { + SchemaProps: spec.SchemaProps{ + Description: "The node name identifying the Calico node instance.", + Type: []string{"string"}, + Format: "", + }, + }, + "containerID": { + SchemaProps: spec.SchemaProps{ + Description: "The container ID.", + Type: []string{"string"}, + Format: "", + }, + }, + "pod": { + SchemaProps: spec.SchemaProps{ + Description: "The Pod name.", + Type: []string{"string"}, + Format: "", + }, + }, + "endpoint": { + SchemaProps: spec.SchemaProps{ + Description: "The Endpoint name.", + Type: []string{"string"}, + Format: "", + }, + }, + "serviceAccountName": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountName, if specified, is the name of the k8s ServiceAccount for this pod.", + Type: []string{"string"}, + Format: "", + }, + }, + "ipNetworks": { + SchemaProps: spec.SchemaProps{ + Description: "IPNetworks is a list of subnets allocated to this endpoint. IP packets will only be allowed to leave this interface if they come from an address in one of these subnets. Currently only /32 for IPv4 and /128 for IPv6 networks are supported.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ipNATs": { + SchemaProps: spec.SchemaProps{ + Description: "IPNATs is a list of 1:1 NAT mappings to apply to the endpoint. Inbound connections to the external IP will be forwarded to the internal IP. Connections initiated from the internal IP will not have their source address changed, except when an endpoint attempts to connect one of its own external IPs. Each internal IP must be associated with the same endpoint via the configured IPNetworks.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPNAT"), + }, + }, + }, + }, + }, + "ipv4Gateway": { + SchemaProps: spec.SchemaProps{ + Description: "IPv4Gateway is the gateway IPv4 address for traffic from the workload.", + Type: []string{"string"}, + Format: "", + }, + }, + "ipv6Gateway": { + SchemaProps: spec.SchemaProps{ + Description: "IPv6Gateway is the gateway IPv6 address for traffic from the workload.", + Type: []string{"string"}, + Format: "", + }, + }, + "profiles": { + SchemaProps: spec.SchemaProps{ + Description: "A list of security Profile resources that apply to this endpoint. Each profile is applied in the order that they appear in this list. Profile rules are applied after the selector-based security policy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "interfaceName": { + SchemaProps: spec.SchemaProps{ + Description: "InterfaceName the name of the Linux interface on the host: for example, tap80.", + Type: []string{"string"}, + Format: "", + }, + }, + "mac": { + SchemaProps: spec.SchemaProps{ + Description: "MAC is the MAC address of the endpoint interface.", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "Ports contains the endpoint's named ports, which may be referenced in security policy rules.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpointPort"), + }, + }, + }, + }, + }, + "allowSpoofedSourcePrefixes": { + SchemaProps: spec.SchemaProps{ + Description: "AllowSpoofedSourcePrefixes is a list of CIDRs that the endpoint should be able to send traffic from, bypassing the RPF check.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.IPNAT", "github.com/projectcalico/calico/libcalico-go/lib/apis/v3.WorkloadEndpointPort"}, + } +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/register.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/register.go similarity index 98% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/register.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/register.go index 1d112e377..66d1891d1 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/register.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/register.go @@ -19,7 +19,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -var SchemeGroupVersion = schema.GroupVersion{Group: "crd.projectcalico.org", Version: "v3"} +var SchemeGroupVersion = schema.GroupVersion{Group: "crd.projectcalico.org", Version: "v1"} var ( SchemeBuilder runtime.SchemeBuilder diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/workloadendpoint.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/workloadendpoint.go similarity index 80% rename from vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/workloadendpoint.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/workloadendpoint.go index bbcdd4caa..5921e5548 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/workloadendpoint.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/workloadendpoint.go @@ -14,7 +14,12 @@ package v3 -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + "github.com/projectcalico/api/pkg/lib/numorstring" +) const ( KindWorkloadEndpoint = "WorkloadEndpoint" @@ -48,6 +53,8 @@ type WorkloadEndpointSpec struct { Pod string `json:"pod,omitempty" validate:"omitempty,name"` // The Endpoint name. Endpoint string `json:"endpoint,omitempty" validate:"omitempty,name"` + // ServiceAccountName, if specified, is the name of the k8s ServiceAccount for this pod. + ServiceAccountName string `json:"serviceAccountName,omitempty" validate:"omitempty,name"` // IPNetworks is a list of subnets allocated to this endpoint. IP packets will only be // allowed to leave this interface if they come from an address in one of these subnets. // Currently only /32 for IPv4 and /128 for IPv6 networks are supported. @@ -71,7 +78,19 @@ type WorkloadEndpointSpec struct { // MAC is the MAC address of the endpoint interface. MAC string `json:"mac,omitempty" validate:"omitempty,mac"` // Ports contains the endpoint's named ports, which may be referenced in security policy rules. - Ports []EndpointPort `json:"ports,omitempty" validate:"dive,omitempty"` + Ports []WorkloadEndpointPort `json:"ports,omitempty" validate:"dive,omitempty"` + // AllowSpoofedSourcePrefixes is a list of CIDRs that the endpoint should be able to send traffic from, + // bypassing the RPF check. + AllowSpoofedSourcePrefixes []string `json:"allowSpoofedSourcePrefixes,omitempty" validate:"omitempty,dive,cidr"` +} + +// WorkloadEndpointPort represents one endpoint's named or mapped port +type WorkloadEndpointPort struct { + Name string `json:"name" validate:"omitempty,portName"` + Protocol numorstring.Protocol `json:"protocol"` + Port uint16 `json:"port" validate:"gt=0"` + HostPort uint16 `json:"hostPort"` + HostIP string `json:"hostIP" validate:"omitempty,net"` } // IPNat contains a single NAT mapping for a WorkloadEndpoint resource. @@ -98,7 +117,7 @@ func NewWorkloadEndpoint() *WorkloadEndpoint { return &WorkloadEndpoint{ TypeMeta: metav1.TypeMeta{ Kind: KindWorkloadEndpoint, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } @@ -109,7 +128,7 @@ func NewWorkloadEndpointList() *WorkloadEndpointList { return &WorkloadEndpointList{ TypeMeta: metav1.TypeMeta{ Kind: KindWorkloadEndpointList, - APIVersion: GroupVersionCurrent, + APIVersion: apiv3.GroupVersionCurrent, }, } } diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/zz_generated.deepcopy.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/zz_generated.deepcopy.go new file mode 100644 index 000000000..4416d47f2 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/zz_generated.deepcopy.go @@ -0,0 +1,720 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright (c) 2016-2021 Tigera, 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. + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v3 + +import ( + numorstring "github.com/projectcalico/api/pkg/lib/numorstring" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocationAttribute) DeepCopyInto(out *AllocationAttribute) { + *out = *in + if in.AttrPrimary != nil { + in, out := &in.AttrPrimary, &out.AttrPrimary + *out = new(string) + **out = **in + } + if in.AttrSecondary != nil { + in, out := &in.AttrSecondary, &out.AttrSecondary + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationAttribute. +func (in *AllocationAttribute) DeepCopy() *AllocationAttribute { + if in == nil { + return nil + } + out := new(AllocationAttribute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BlockAffinity) DeepCopyInto(out *BlockAffinity) { + *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 BlockAffinity. +func (in *BlockAffinity) DeepCopy() *BlockAffinity { + if in == nil { + return nil + } + out := new(BlockAffinity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BlockAffinity) 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 *BlockAffinityList) DeepCopyInto(out *BlockAffinityList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]BlockAffinity, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockAffinityList. +func (in *BlockAffinityList) DeepCopy() *BlockAffinityList { + if in == nil { + return nil + } + out := new(BlockAffinityList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *BlockAffinityList) 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 *BlockAffinitySpec) DeepCopyInto(out *BlockAffinitySpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockAffinitySpec. +func (in *BlockAffinitySpec) DeepCopy() *BlockAffinitySpec { + if in == nil { + return nil + } + out := new(BlockAffinitySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPAMBlock) DeepCopyInto(out *IPAMBlock) { + *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 IPAMBlock. +func (in *IPAMBlock) DeepCopy() *IPAMBlock { + if in == nil { + return nil + } + out := new(IPAMBlock) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPAMBlock) 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 *IPAMBlockList) DeepCopyInto(out *IPAMBlockList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IPAMBlock, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockList. +func (in *IPAMBlockList) DeepCopy() *IPAMBlockList { + if in == nil { + return nil + } + out := new(IPAMBlockList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPAMBlockList) 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 *IPAMBlockSpec) DeepCopyInto(out *IPAMBlockSpec) { + *out = *in + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(string) + **out = **in + } + if in.Allocations != nil { + in, out := &in.Allocations, &out.Allocations + *out = make([]*int, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int) + **out = **in + } + } + } + if in.Unallocated != nil { + in, out := &in.Unallocated, &out.Unallocated + *out = make([]int, len(*in)) + copy(*out, *in) + } + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make([]AllocationAttribute, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SequenceNumberForAllocation != nil { + in, out := &in.SequenceNumberForAllocation, &out.SequenceNumberForAllocation + *out = make(map[string]uint64, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockSpec. +func (in *IPAMBlockSpec) DeepCopy() *IPAMBlockSpec { + if in == nil { + return nil + } + out := new(IPAMBlockSpec) + 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 + 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 IPAMConfig. +func (in *IPAMConfig) DeepCopy() *IPAMConfig { + if in == nil { + return nil + } + out := new(IPAMConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPAMConfig) 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 *IPAMConfigList) DeepCopyInto(out *IPAMConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IPAMConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfigList. +func (in *IPAMConfigList) DeepCopy() *IPAMConfigList { + if in == nil { + return nil + } + out := new(IPAMConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPAMConfigList) 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 *IPAMConfigSpec) DeepCopyInto(out *IPAMConfigSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfigSpec. +func (in *IPAMConfigSpec) DeepCopy() *IPAMConfigSpec { + if in == nil { + return nil + } + out := new(IPAMConfigSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPAMHandle) DeepCopyInto(out *IPAMHandle) { + *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 IPAMHandle. +func (in *IPAMHandle) DeepCopy() *IPAMHandle { + if in == nil { + return nil + } + out := new(IPAMHandle) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPAMHandle) 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 *IPAMHandleList) DeepCopyInto(out *IPAMHandleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IPAMHandle, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleList. +func (in *IPAMHandleList) DeepCopy() *IPAMHandleList { + if in == nil { + return nil + } + out := new(IPAMHandleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IPAMHandleList) 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 *IPAMHandleSpec) DeepCopyInto(out *IPAMHandleSpec) { + *out = *in + if in.Block != nil { + in, out := &in.Block, &out.Block + *out = make(map[string]int, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleSpec. +func (in *IPAMHandleSpec) DeepCopy() *IPAMHandleSpec { + if in == nil { + return nil + } + out := new(IPAMHandleSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPNAT) DeepCopyInto(out *IPNAT) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPNAT. +func (in *IPNAT) DeepCopy() *IPNAT { + if in == nil { + return nil + } + out := new(IPNAT) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Node) DeepCopyInto(out *Node) { + *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 Node. +func (in *Node) DeepCopy() *Node { + if in == nil { + return nil + } + out := new(Node) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Node) 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 *NodeAddress) DeepCopyInto(out *NodeAddress) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAddress. +func (in *NodeAddress) DeepCopy() *NodeAddress { + if in == nil { + return nil + } + out := new(NodeAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeBGPSpec) DeepCopyInto(out *NodeBGPSpec) { + *out = *in + if in.ASNumber != nil { + in, out := &in.ASNumber, &out.ASNumber + *out = new(numorstring.ASNumber) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeBGPSpec. +func (in *NodeBGPSpec) DeepCopy() *NodeBGPSpec { + if in == nil { + return nil + } + out := new(NodeBGPSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeList) DeepCopyInto(out *NodeList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Node, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList. +func (in *NodeList) DeepCopy() *NodeList { + if in == nil { + return nil + } + out := new(NodeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeList) 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 *NodeSpec) DeepCopyInto(out *NodeSpec) { + *out = *in + if in.BGP != nil { + in, out := &in.BGP, &out.BGP + *out = new(NodeBGPSpec) + (*in).DeepCopyInto(*out) + } + if in.OrchRefs != nil { + in, out := &in.OrchRefs, &out.OrchRefs + *out = make([]OrchRef, len(*in)) + copy(*out, *in) + } + if in.Wireguard != nil { + in, out := &in.Wireguard, &out.Wireguard + *out = new(NodeWireguardSpec) + **out = **in + } + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]NodeAddress, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec. +func (in *NodeSpec) DeepCopy() *NodeSpec { + if in == nil { + return nil + } + out := new(NodeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { + *out = *in + if in.PodCIDRs != nil { + in, out := &in.PodCIDRs, &out.PodCIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. +func (in *NodeStatus) DeepCopy() *NodeStatus { + if in == nil { + return nil + } + out := new(NodeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeWireguardSpec) DeepCopyInto(out *NodeWireguardSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeWireguardSpec. +func (in *NodeWireguardSpec) DeepCopy() *NodeWireguardSpec { + if in == nil { + return nil + } + out := new(NodeWireguardSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrchRef) DeepCopyInto(out *OrchRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrchRef. +func (in *OrchRef) DeepCopy() *OrchRef { + if in == nil { + return nil + } + out := new(OrchRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkloadEndpoint) DeepCopyInto(out *WorkloadEndpoint) { + *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 WorkloadEndpoint. +func (in *WorkloadEndpoint) DeepCopy() *WorkloadEndpoint { + if in == nil { + return nil + } + out := new(WorkloadEndpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *WorkloadEndpoint) 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 *WorkloadEndpointList) DeepCopyInto(out *WorkloadEndpointList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]WorkloadEndpoint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointList. +func (in *WorkloadEndpointList) DeepCopy() *WorkloadEndpointList { + if in == nil { + return nil + } + out := new(WorkloadEndpointList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *WorkloadEndpointList) 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 *WorkloadEndpointPort) DeepCopyInto(out *WorkloadEndpointPort) { + *out = *in + out.Protocol = in.Protocol + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointPort. +func (in *WorkloadEndpointPort) DeepCopy() *WorkloadEndpointPort { + if in == nil { + return nil + } + out := new(WorkloadEndpointPort) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkloadEndpointSpec) DeepCopyInto(out *WorkloadEndpointSpec) { + *out = *in + if in.IPNetworks != nil { + in, out := &in.IPNetworks, &out.IPNetworks + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.IPNATs != nil { + in, out := &in.IPNATs, &out.IPNATs + *out = make([]IPNAT, len(*in)) + copy(*out, *in) + } + if in.Profiles != nil { + in, out := &in.Profiles, &out.Profiles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]WorkloadEndpointPort, len(*in)) + copy(*out, *in) + } + if in.AllowSpoofedSourcePrefixes != nil { + in, out := &in.AllowSpoofedSourcePrefixes, &out.AllowSpoofedSourcePrefixes + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointSpec. +func (in *WorkloadEndpointSpec) DeepCopy() *WorkloadEndpointSpec { + if in == nil { + return nil + } + out := new(WorkloadEndpointSpec) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/encap/doc.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/encap/doc.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/encap/doc.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/encap/doc.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/encap/ipip.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/encap/ipip.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/encap/ipip.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/encap/ipip.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion/constants.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/constants.go similarity index 55% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion/constants.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/constants.go index ea48eafd4..504f4d4fe 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion/constants.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/constants.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2017-2021 Tigera, 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. @@ -25,5 +25,23 @@ const ( // duplicates the value of the Pod.Status.PodIP field, which is set by kubelet but, // since we write it ourselves, we can make sure that it is written synchronously // and quickly. + // + // We set this annotation to the empty string when the WEP is deleted by the CNI plugin. + // That signals that the IP no longer belongs to this pod. AnnotationPodIP = "cni.projectcalico.org/podIP" + + // AnnotationPodIPs is similar for the plural PodIPs field. + AnnotationPodIPs = "cni.projectcalico.org/podIPs" + + // AnnotationPodIPs is the annotation set by the Amazon VPC CNI plugin. + AnnotationAWSPodIPs = "vpc.amazonaws.com/pod-ips" + + // AnnotationContainerID stores the container ID of the pod. This allows us to disambiguate different pods + // that have the same name and namespace. For example, stateful set pod that is restarted. May be missing + // on older Pods. + AnnotationContainerID = "cni.projectcalico.org/containerID" + + // NameLabel is a label that can be used to match a serviceaccount or namespace + // name exactly. + NameLabel = "projectcalico.org/name" ) diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion/conversion.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/conversion.go similarity index 60% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion/conversion.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/conversion.go index 8b0c9dec2..4f30f6687 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion/conversion.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/conversion.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Tigera, Inc. All rights reserved. +// Copyright (c) 2016-2021 Tigera, 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. @@ -15,11 +15,7 @@ package conversion import ( - "crypto/sha1" - "encoding/hex" - "encoding/json" "fmt" - "os" "sort" "strings" @@ -27,13 +23,17 @@ import ( kapiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apiv3 "github.com/projectcalico/libcalico-go/lib/apis/v3" - "github.com/projectcalico/libcalico-go/lib/backend/model" - "github.com/projectcalico/libcalico-go/lib/names" - cnet "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/numorstring" + discovery "k8s.io/api/discovery/v1" networkingv1 "k8s.io/api/networking/v1" "k8s.io/apimachinery/pkg/util/intstr" + + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + "github.com/projectcalico/api/pkg/lib/numorstring" + + "github.com/projectcalico/calico/libcalico-go/lib/backend/model" + cerrors "github.com/projectcalico/calico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/names" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" ) var ( @@ -47,40 +47,47 @@ const ( SelectorPod ) -// TODO: make this private and expose a public conversion interface instead -type Converter struct{} +type Converter interface { + WorkloadEndpointConverter + ParseWorkloadEndpointName(workloadName string) (names.WorkloadEndpointIdentifiers, error) + NamespaceToProfile(ns *kapiv1.Namespace) (*model.KVPair, error) + IsValidCalicoWorkloadEndpoint(pod *kapiv1.Pod) bool + IsReadyCalicoPod(pod *kapiv1.Pod) bool + IsScheduled(pod *kapiv1.Pod) bool + IsHostNetworked(pod *kapiv1.Pod) bool + HasIPAddress(pod *kapiv1.Pod) bool + StagedKubernetesNetworkPolicyToStagedName(stagedK8sName string) string + K8sNetworkPolicyToCalico(np *networkingv1.NetworkPolicy) (*model.KVPair, error) + EndpointSliceToKVP(svc *discovery.EndpointSlice) (*model.KVPair, error) + ServiceToKVP(service *kapiv1.Service) (*model.KVPair, error) + ProfileNameToNamespace(profileName string) (string, error) + ServiceAccountToProfile(sa *kapiv1.ServiceAccount) (*model.KVPair, error) + ProfileNameToServiceAccount(profileName string) (ns, sa string, err error) + JoinProfileRevisions(nsRev, saRev string) string + SplitProfileRevision(rev string) (nsRev string, saRev string, err error) +} -// VethNameForWorkload returns a deterministic veth name -// for the given Kubernetes workload (WEP) name and namespace. -func VethNameForWorkload(namespace, podname string) string { - // A SHA1 is always 20 bytes long, and so is sufficient for generating the - // veth name and mac addr. - h := sha1.New() - h.Write([]byte(fmt.Sprintf("%s.%s", namespace, podname))) - prefix := os.Getenv("FELIX_INTERFACEPREFIX") - if prefix == "" { - // Prefix is not set. Default to "cali" - prefix = "cali" - } else { - // Prefix is set - use the first value in the list. - splits := strings.Split(prefix, ",") - prefix = splits[0] +type converter struct { + WorkloadEndpointConverter +} + +func NewConverter() Converter { + return &converter{ + WorkloadEndpointConverter: NewWorkloadEndpointConverter(), } - log.WithField("prefix", prefix).Debugf("Using prefix to create a WorkloadEndpoint veth name") - return fmt.Sprintf("%s%s", prefix, hex.EncodeToString(h.Sum(nil))[:11]) } // ParseWorkloadName extracts the Node name, Orchestrator, Pod name and endpoint from the // given WorkloadEndpoint name. // The expected format for k8s is -k8s-- -func (c Converter) ParseWorkloadEndpointName(workloadName string) (names.WorkloadEndpointIdentifiers, error) { +func (c converter) ParseWorkloadEndpointName(workloadName string) (names.WorkloadEndpointIdentifiers, error) { return names.ParseWorkloadEndpointName(workloadName) } // NamespaceToProfile converts a Namespace to a Calico Profile. The Profile stores // labels from the Namespace which are inherited by the WorkloadEndpoints within // the Profile. This Profile also has the default ingress and egress rules, which are both 'allow'. -func (c Converter) NamespaceToProfile(ns *kapiv1.Namespace) (*model.KVPair, error) { +func (c converter) NamespaceToProfile(ns *kapiv1.Namespace) (*model.KVPair, error) { // Generate the labels to apply to the profile, using a special prefix // to indicate that these are the labels from the parent Kubernetes Namespace. labels := map[string]string{} @@ -88,6 +95,10 @@ func (c Converter) NamespaceToProfile(ns *kapiv1.Namespace) (*model.KVPair, erro labels[NamespaceLabelPrefix+k] = v } + // Add a label for the namespace's name. This allows exact namespace matching + // based on name within the namespaceSelector. + labels[NamespaceLabelPrefix+NameLabel] = ns.Name + // Create the profile object. name := NamespaceProfileNamePrefix + ns.Name profile := apiv3.NewProfile() @@ -97,15 +108,9 @@ func (c Converter) NamespaceToProfile(ns *kapiv1.Namespace) (*model.KVPair, erro UID: ns.UID, } profile.Spec = apiv3.ProfileSpec{ - Ingress: []apiv3.Rule{{Action: apiv3.Allow}}, - Egress: []apiv3.Rule{{Action: apiv3.Allow}}, - } - - // Only set labels to apply when there are actually labels. This makes the - // result of this function consistent with the struct as loaded directly - // from etcd, which uses nil for the empty map. - if len(labels) != 0 { - profile.Spec.LabelsToApply = labels + Ingress: []apiv3.Rule{{Action: apiv3.Allow}}, + Egress: []apiv3.Rule{{Action: apiv3.Allow}}, + LabelsToApply: labels, } // Embed the profile in a KVPair. @@ -125,7 +130,7 @@ func (c Converter) NamespaceToProfile(ns *kapiv1.Namespace) (*model.KVPair, erro // invalid Pods, it is important that pods can only transition from not-valid to valid and not // the other way. If they transition from valid to invalid, we'll fail to emit a deletion // event in the watcher. -func (c Converter) IsValidCalicoWorkloadEndpoint(pod *kapiv1.Pod) bool { +func (c converter) IsValidCalicoWorkloadEndpoint(pod *kapiv1.Pod) bool { if c.IsHostNetworked(pod) { log.WithField("pod", pod.Name).Debug("Pod is host networked.") return false @@ -138,7 +143,7 @@ func (c Converter) IsValidCalicoWorkloadEndpoint(pod *kapiv1.Pod) bool { // IsReadyCalicoPod returns true if the pod is a valid Calico WorkloadEndpoint and has // an IP address assigned (i.e. it's ready for Calico networking). -func (c Converter) IsReadyCalicoPod(pod *kapiv1.Pod) bool { +func (c converter) IsReadyCalicoPod(pod *kapiv1.Pod) bool { if !c.IsValidCalicoWorkloadEndpoint(pod) { return false } else if !c.HasIPAddress(pod) { @@ -154,204 +159,116 @@ const ( podCompleted kapiv1.PodPhase = "Completed" ) -func (c Converter) IsFinished(pod *kapiv1.Pod) bool { +func IsFinished(pod *kapiv1.Pod) bool { + if pod.DeletionTimestamp != nil { + // Pod is being deleted but it may still be in its termination grace period. If Calico CNI + // was used, then we use AnnotationPodIP to signal the moment that the pod actually loses its + // IP by setting the annotation to "". (Otherwise, just fall back on the status of the pod.) + if ip, ok := pod.Annotations[AnnotationPodIP]; ok && ip == "" { + // AnnotationPodIP is explicitly set to empty string, Calico CNI has removed the network + // from the pod. + log.Debug("Pod is being deleted and IPs have been removed by Calico CNI.") + return true + } else if ips, ok := pod.Annotations[AnnotationAWSPodIPs]; ok && ips == "" { + // AnnotationAWSPodIPs is explicitly set to empty string, AWS CNI has removed the network + // from the pod. + log.Debug("Pod is being deleted and IPs have been removed by AWS CNI.") + return true + } + } switch pod.Status.Phase { case kapiv1.PodFailed, kapiv1.PodSucceeded, podCompleted: + log.Debug("Pod phase is failed/succeeded/completed.") return true } return false } -func (c Converter) IsScheduled(pod *kapiv1.Pod) bool { +func (c converter) IsScheduled(pod *kapiv1.Pod) bool { return pod.Spec.NodeName != "" } -func (c Converter) IsHostNetworked(pod *kapiv1.Pod) bool { +func (c converter) IsHostNetworked(pod *kapiv1.Pod) bool { return pod.Spec.HostNetwork } -func (c Converter) HasIPAddress(pod *kapiv1.Pod) bool { - return pod.Status.PodIP != "" || pod.Annotations[AnnotationPodIP] != "" +func (c converter) HasIPAddress(pod *kapiv1.Pod) bool { + return pod.Status.PodIP != "" || pod.Annotations[AnnotationPodIP] != "" || pod.Annotations[AnnotationAWSPodIPs] != "" + // Note: we don't need to check PodIPs and AnnotationPodIPs here, because those cannot be + // non-empty if the corresponding singular field is empty. } -// GetPodIPs extracts the IP addresses from a Kubernetes Pod. At present, only a single IP -// is expected/supported. GetPodIPs loads the IP either from the PodIP field, if present, or -// the calico podIP annotation. -func (c Converter) GetPodIPs(pod *kapiv1.Pod) ([]string, error) { - var podIP string - if podIP = pod.Status.PodIP; podIP != "" { - log.WithField("ip", podIP).Debug("PodIP field filled in.") - } else if podIP = pod.Annotations[AnnotationPodIP]; podIP != "" { - log.WithField("ip", podIP).Debug("PodIP missing, falling back on Calico annotation.") +// getPodIPs extracts the IP addresses from a Kubernetes Pod. We support a single IPv4 address +// and/or a single IPv6. getPodIPs loads the IPs either from the PodIPs and PodIP field, if +// present, or the calico podIP annotation. +func getPodIPs(pod *kapiv1.Pod) ([]*cnet.IPNet, error) { + logc := log.WithFields(log.Fields{"pod": pod.Name, "namespace": pod.Namespace}) + var podIPs []string + if ips := pod.Status.PodIPs; len(ips) != 0 { + logc.WithField("ips", ips).Debug("PodIPs field filled in") + for _, ip := range ips { + podIPs = append(podIPs, ip.IP) + } + } else if ip := pod.Status.PodIP; ip != "" { + logc.WithField("ip", ip).Debug("PodIP field filled in") + podIPs = append(podIPs, ip) + } else if ips := pod.Annotations[AnnotationPodIPs]; ips != "" { + logc.WithField("ips", ips).Debug("No PodStatus IPs, use Calico plural annotation") + podIPs = append(podIPs, strings.Split(ips, ",")...) + } else if ip := pod.Annotations[AnnotationPodIP]; ip != "" { + logc.WithField("ip", ip).Debug("No PodStatus IPs, use Calico singular annotation") + podIPs = append(podIPs, ip) + } else if ips := pod.Annotations[AnnotationAWSPodIPs]; ips != "" { + logc.WithField("ips", ips).Debug("No PodStatus IPs, use AWS VPC annotation") + podIPs = append(podIPs, strings.Split(ips, ",")...) } else { - log.WithField("ip", podIP).Debug("Pod has no IP.") + logc.Debug("Pod has no IP") return nil, nil } - _, ipNet, err := cnet.ParseCIDROrIP(podIP) - if err != nil { - log.WithFields(log.Fields{"ip": podIP, "pod": pod.Name}).WithError(err).Error("Failed to parse pod IP") - return nil, err + var podIPNets []*cnet.IPNet + for _, ip := range podIPs { + _, ipNet, err := cnet.ParseCIDROrIP(ip) + if err != nil { + logc.WithFields(log.Fields{"ip": ip}).WithError(err).Error("Failed to parse pod IP") + return nil, err + } + podIPNets = append(podIPNets, ipNet) } - return []string{ipNet.String()}, nil + return podIPNets, nil } -// PodToWorkloadEndpoint converts a Pod to a WorkloadEndpoint. It assumes the calling code -// has verified that the provided Pod is valid to convert to a WorkloadEndpoint. -// PodToWorkloadEndpoint requires a Pods Name and Node Name to be populated. It will -// fail to convert from a Pod to WorkloadEndpoint otherwise. -func (c Converter) PodToWorkloadEndpoint(pod *kapiv1.Pod) (*model.KVPair, error) { - log.WithField("pod", pod).Debug("Converting pod to WorkloadEndpoint") - // Get all the profiles that apply - var profiles []string +// StagedKubernetesNetworkPolicyToStagedName converts a StagedKubernetesNetworkPolicy name into a StagedNetworkPolicy name +func (c converter) StagedKubernetesNetworkPolicyToStagedName(stagedK8sName string) string { + return fmt.Sprintf(K8sNetworkPolicyNamePrefix + stagedK8sName) +} - // Pull out the Namespace based profile off the pod name and Namespace. - profiles = append(profiles, NamespaceProfileNamePrefix+pod.Namespace) - - // Pull out the Serviceaccount based profile off the pod SA and namespace - if pod.Spec.ServiceAccountName != "" { - profiles = append(profiles, serviceAccountNameToProfileName(pod.Spec.ServiceAccountName, pod.Namespace)) - } - - wepids := names.WorkloadEndpointIdentifiers{ - Node: pod.Spec.NodeName, - Orchestrator: apiv3.OrchestratorKubernetes, - Endpoint: "eth0", - Pod: pod.Name, - } - wepName, err := wepids.CalculateWorkloadEndpointName(false) - if err != nil { - return nil, err - } - - ipNets, err := c.GetPodIPs(pod) - if err != nil { - // IP address was present but malformed in some way, handle as an explicit failure. - return nil, err - } - - if c.IsFinished(pod) { - // Pod is finished but not yet deleted. In this state the IP will have been freed and returned to the pool - // so we need to make sure we don't let the caller believe it still belongs to this endpoint. - // Pods with no IPs will get filtered out before they get to Felix in the watcher syncer cache layer. - // We can't pretend the workload endpoint is deleted _here_ because that would confuse users of the - // native v3 Watch() API. - ipNets = nil - } - - // Generate the interface name based on workload. This must match - // the host-side veth configured by the CNI plugin. - interfaceName := VethNameForWorkload(pod.Namespace, pod.Name) - - // Build the labels map. Start with the pod labels, and append two additional labels for - // namespace and orchestrator matches. - labels := pod.Labels - if labels == nil { - labels = make(map[string]string, 2) - } - labels[apiv3.LabelNamespace] = pod.Namespace - labels[apiv3.LabelOrchestrator] = apiv3.OrchestratorKubernetes - - if pod.Spec.ServiceAccountName != "" { - labels[apiv3.LabelServiceAccount] = pod.Spec.ServiceAccountName - } - - // Pull out floating IP annotation - var floatingIPs []apiv3.IPNAT - if annotation, ok := pod.Annotations["cni.projectcalico.org/floatingIPs"]; ok && len(ipNets) > 0 { - - // Parse Annotation data - var ips []string - err := json.Unmarshal([]byte(annotation), &ips) - if err != nil { - return nil, fmt.Errorf("failed to parse '%s' as JSON: %s", annotation, err) - } - - // Get target for NAT - podip, podnet, err := cnet.ParseCIDROrIP(ipNets[0]) - if err != nil { - return nil, fmt.Errorf("Failed to parse pod IP: %s", err) - } - - netmask, _ := podnet.Mask.Size() - - if netmask != 32 && netmask != 128 { - return nil, fmt.Errorf("PodIP is not a valid IP: Mask size is %d, not 32 or 128", netmask) - } - - for _, ip := range ips { - floatingIPs = append(floatingIPs, apiv3.IPNAT{ - InternalIP: podip.String(), - ExternalIP: ip, - }) - } - } - - // Map any named ports through. - var endpointPorts []apiv3.EndpointPort - for _, container := range pod.Spec.Containers { - for _, containerPort := range container.Ports { - if containerPort.Name != "" && containerPort.ContainerPort != 0 { - var modelProto numorstring.Protocol - switch containerPort.Protocol { - case kapiv1.ProtocolUDP: - modelProto = numorstring.ProtocolFromString("udp") - case kapiv1.ProtocolTCP, kapiv1.Protocol("") /* K8s default is TCP. */ : - modelProto = numorstring.ProtocolFromString("tcp") - default: - log.WithFields(log.Fields{ - "protocol": containerPort.Protocol, - "pod": pod, - "port": containerPort, - }).Debug("Ignoring named port with unknown protocol") - continue - } - - endpointPorts = append(endpointPorts, apiv3.EndpointPort{ - Name: containerPort.Name, - Protocol: modelProto, - Port: uint16(containerPort.ContainerPort), - }) - } - } - } - - // Create the workload endpoint. - wep := apiv3.NewWorkloadEndpoint() - wep.ObjectMeta = metav1.ObjectMeta{ - Name: wepName, - Namespace: pod.Namespace, - CreationTimestamp: pod.CreationTimestamp, - UID: pod.UID, - Labels: labels, - GenerateName: pod.GenerateName, - } - wep.Spec = apiv3.WorkloadEndpointSpec{ - Orchestrator: "k8s", - Node: pod.Spec.NodeName, - Pod: pod.Name, - Endpoint: "eth0", - InterfaceName: interfaceName, - Profiles: profiles, - IPNetworks: ipNets, - Ports: endpointPorts, - IPNATs: floatingIPs, - } - - // Embed the workload endpoint into a KVPair. - kvp := model.KVPair{ +// EndpointSliceToKVP converts a k8s EndpointSlice to a model.KVPair. +func (c converter) EndpointSliceToKVP(slice *discovery.EndpointSlice) (*model.KVPair, error) { + return &model.KVPair{ Key: model.ResourceKey{ - Name: wepName, - Namespace: pod.Namespace, - Kind: apiv3.KindWorkloadEndpoint, + Name: slice.Name, + Namespace: slice.Namespace, + Kind: model.KindKubernetesEndpointSlice, }, - Value: wep, - Revision: pod.ResourceVersion, - } - return &kvp, nil + Value: slice.DeepCopy(), + Revision: slice.ResourceVersion, + }, nil +} + +func (c converter) ServiceToKVP(service *kapiv1.Service) (*model.KVPair, error) { + return &model.KVPair{ + Key: model.ResourceKey{ + Name: service.Name, + Namespace: service.Namespace, + Kind: model.KindKubernetesService, + }, + Value: service.DeepCopy(), + Revision: service.ResourceVersion, + }, nil } // K8sNetworkPolicyToCalico converts a k8s NetworkPolicy to a model.KVPair. -func (c Converter) K8sNetworkPolicyToCalico(np *networkingv1.NetworkPolicy) (*model.KVPair, error) { +func (c converter) K8sNetworkPolicyToCalico(np *networkingv1.NetworkPolicy) (*model.KVPair, error) { // Pull out important fields. policyName := fmt.Sprintf(K8sNetworkPolicyNamePrefix + np.Name) @@ -359,12 +276,16 @@ func (c Converter) K8sNetworkPolicyToCalico(np *networkingv1.NetworkPolicy) (*mo // This order might change in future. order := float64(1000.0) + errorTracker := cerrors.ErrorPolicyConversion{PolicyName: np.Name} + // Generate the ingress rules list. var ingressRules []apiv3.Rule for _, r := range np.Spec.Ingress { rules, err := c.k8sRuleToCalico(r.From, r.Ports, np.Namespace, true) if err != nil { log.WithError(err).Warn("dropping k8s rule that couldn't be converted.") + // Add rule to conversion error slice + errorTracker.BadIngressRule(&r, fmt.Sprintf("k8s rule couldn't be converted: %s", err)) } else { ingressRules = append(ingressRules, rules...) } @@ -376,6 +297,8 @@ func (c Converter) K8sNetworkPolicyToCalico(np *networkingv1.NetworkPolicy) (*mo rules, err := c.k8sRuleToCalico(r.To, r.Ports, np.Namespace, false) if err != nil { log.WithError(err).Warn("dropping k8s rule that couldn't be converted") + // Add rule to conversion error slice + errorTracker.BadEgressRule(&r, fmt.Sprintf("k8s rule couldn't be converted: %s", err)) } else { egressRules = append(egressRules, rules...) } @@ -419,6 +342,7 @@ func (c Converter) K8sNetworkPolicyToCalico(np *networkingv1.NetworkPolicy) (*mo Namespace: np.Namespace, CreationTimestamp: np.CreationTimestamp, UID: np.UID, + ResourceVersion: np.ResourceVersion, } policy.Spec = apiv3.NetworkPolicySpec{ Order: &order, @@ -428,8 +352,8 @@ func (c Converter) K8sNetworkPolicyToCalico(np *networkingv1.NetworkPolicy) (*mo Types: types, } - // Build and return the KVPair. - return &model.KVPair{ + // Build the KVPair. + kvp := &model.KVPair{ Key: model.ResourceKey{ Name: policyName, Namespace: np.Namespace, @@ -437,12 +361,15 @@ func (c Converter) K8sNetworkPolicyToCalico(np *networkingv1.NetworkPolicy) (*mo }, Value: policy, Revision: np.ResourceVersion, - }, nil + } + + // Return the KVPair with conversion errors if applicable + return kvp, errorTracker.GetError() } // k8sSelectorToCalico takes a namespaced k8s label selector and returns the Calico // equivalent. -func (c Converter) k8sSelectorToCalico(s *metav1.LabelSelector, selectorType selectorType) string { +func (c converter) k8sSelectorToCalico(s *metav1.LabelSelector, selectorType selectorType) string { // Only prefix pod selectors - this won't work for namespace selectors. selectors := []string{} if selectorType == SelectorPod { @@ -492,7 +419,7 @@ func (c Converter) k8sSelectorToCalico(s *metav1.LabelSelector, selectorType sel return strings.Join(selectors, " && ") } -func (c Converter) k8sRuleToCalico(rPeers []networkingv1.NetworkPolicyPeer, rPorts []networkingv1.NetworkPolicyPort, ns string, ingress bool) ([]apiv3.Rule, error) { +func (c converter) k8sRuleToCalico(rPeers []networkingv1.NetworkPolicyPeer, rPorts []networkingv1.NetworkPolicyPort, ns string, ingress bool) ([]apiv3.Rule, error) { rules := []apiv3.Rule{} peers := []*networkingv1.NetworkPolicyPeer{} ports := []*networkingv1.NetworkPolicyPort{} @@ -514,15 +441,19 @@ func (c Converter) k8sRuleToCalico(rPeers []networkingv1.NetworkPolicyPeer, rPor if p.Port != nil { portval := intstr.FromString(p.Port.String()) port.Port = &portval - + } + if p.Protocol != nil { + protval := kapiv1.Protocol(fmt.Sprintf("%s", *p.Protocol)) + port.Protocol = &protval + } else { // TCP is the implicit default (as per the definition of NetworkPolicyPort). // Make the default explicit here because our data-model always requires // the protocol to be specified if we're doing a port match. port.Protocol = &protoTCP } - if p.Protocol != nil { - protval := kapiv1.Protocol(fmt.Sprintf("%s", *p.Protocol)) - port.Protocol = &protval + + if p.EndPort != nil { + port.EndPort = p.EndPort } ports = append(ports, &port) } @@ -543,7 +474,6 @@ func (c Converter) k8sRuleToCalico(rPeers []networkingv1.NetworkPolicyPeer, rPor return nil, fmt.Errorf("failed to parse k8s port: %s", err) } - // These are either both present or both nil if protocol == nil && calicoPorts == nil { // If nil, no ports were specified, or an empty port struct was provided, which we translate to allowing all. // We want to use a nil protocol and a nil list of ports, which will allow any destination (for ingress). @@ -553,7 +483,14 @@ func (c Converter) k8sRuleToCalico(rPeers []networkingv1.NetworkPolicyPeer, rPor } pStr := protocol.String() - protocolPorts[pStr] = append(protocolPorts[pStr], calicoPorts...) + // treat nil as 'all ports' + if calicoPorts == nil { + protocolPorts[pStr] = nil + } else if _, ok := protocolPorts[pStr]; !ok || len(protocolPorts[pStr]) > 0 { + // don't overwrite a nil (allow all ports) if present; if no ports yet for this protocol + // or 1+ ports which aren't 'all ports', then add the present ports + protocolPorts[pStr] = append(protocolPorts[pStr], calicoPorts...) + } } protocols := make([]string, 0, len(protocolPorts)) @@ -567,6 +504,7 @@ func (c Converter) k8sRuleToCalico(rPeers []networkingv1.NetworkPolicyPeer, rPor // with each rule containing all the allowed ports. for _, protocolStr := range protocols { calicoPorts := protocolPorts[protocolStr] + calicoPorts = SimplifyPorts(calicoPorts) var protocol *numorstring.Protocol if protocolStr != "" { @@ -610,7 +548,77 @@ func (c Converter) k8sRuleToCalico(rPeers []networkingv1.NetworkPolicyPeer, rPor return rules, nil } -func (c Converter) k8sPortToCalicoFields(port *networkingv1.NetworkPolicyPort) (protocol *numorstring.Protocol, dstPorts []numorstring.Port, err error) { +// SimplifyPorts calculates a minimum set of port ranges that cover the given set of ports. +// For example, if the input was [80, 81, 82, 9090, "foo"] the output would consist of +// [80-82, 9090, "foo"] in some order. +func SimplifyPorts(ports []numorstring.Port) []numorstring.Port { + if len(ports) <= 1 { + return ports + } + var numericPorts []int + var outputPorts []numorstring.Port + for _, p := range ports { + if p.PortName != "" { + // Pass named ports through immediately, there's nothing to be done for them. + outputPorts = append(outputPorts, p) + } else { + // Work with ints to avoid overflow with the uint16 port type. + // In practice, we currently only get single ports here so this + // loop should run exactly once. + for i := int(p.MinPort); i <= int(p.MaxPort); i++ { + numericPorts = append(numericPorts, i) + } + } + } + + if len(numericPorts) <= 1 { + // We have nothing to combine, short-circuit. + return ports + } + + // Sort the ports so it will be easy to find ranges. + sort.Ints(numericPorts) + + // Each pass around this outer loop extracts one port range from the sorted slice + // and it moves the slice along to the start of the next range. + for len(numericPorts) > 0 { + // Initialise the next range to the contain only the first port in the slice. + firstPortInRange := numericPorts[0] + lastPortInRange := firstPortInRange + + // Scan ahead, looking for ports that can be combined into this range. + numericPorts = numericPorts[1:] + for len(numericPorts) > 0 { + nextPort := numericPorts[0] + if nextPort > lastPortInRange+1 { + // This port can't be coalesced with the existing range, break out so + // that we record the range; then we'll loop again and pick up this + // port as the start of a new range. + break + } + // The next port is either equal to the last port (due to a duplicate port + // in the input) or it is exactly one greater. Extend the range to include + // it. + lastPortInRange = nextPort + numericPorts = numericPorts[1:] + } + + // Record the port. + outputPorts = appendPortRange(outputPorts, firstPortInRange, lastPortInRange) + } + + return outputPorts +} + +func appendPortRange(ports []numorstring.Port, first, last int) []numorstring.Port { + portRange, err := numorstring.PortFromRange(uint16(first), uint16(last)) + if err != nil { + log.WithError(err).Panic("Failed to make port range from ports that should have been pre-validated.") + } + return append(ports, portRange) +} + +func (c converter) k8sPortToCalicoFields(port *networkingv1.NetworkPolicyPort) (protocol *numorstring.Protocol, dstPorts []numorstring.Port, err error) { // If no port info, return zero values for all fields (protocol, dstPorts). if port == nil { return @@ -624,7 +632,7 @@ func (c Converter) k8sPortToCalicoFields(port *networkingv1.NetworkPolicyPort) ( return } -func (c Converter) k8sProtocolToCalico(protocol *kapiv1.Protocol) *numorstring.Protocol { +func (c converter) k8sProtocolToCalico(protocol *kapiv1.Protocol) *numorstring.Protocol { if protocol != nil { p := numorstring.ProtocolFromString(string(*protocol)) return &p @@ -632,7 +640,7 @@ func (c Converter) k8sProtocolToCalico(protocol *kapiv1.Protocol) *numorstring.P return nil } -func (c Converter) k8sPeerToCalicoFields(peer *networkingv1.NetworkPolicyPeer, ns string) (selector, nsSelector string, nets []string, notNets []string) { +func (c converter) k8sPeerToCalicoFields(peer *networkingv1.NetworkPolicyPeer, ns string) (selector, nsSelector string, nets []string, notNets []string) { // If no peer, return zero values for all fields (selector, nets and !nets). if peer == nil { return @@ -668,12 +676,16 @@ func (c Converter) k8sPeerToCalicoFields(peer *networkingv1.NetworkPolicyPeer, n return } -func (c Converter) k8sPortToCalico(port networkingv1.NetworkPolicyPort) ([]numorstring.Port, error) { +func (c converter) k8sPortToCalico(port networkingv1.NetworkPolicyPort) ([]numorstring.Port, error) { var portList []numorstring.Port if port.Port != nil { - p, err := numorstring.PortFromString(port.Port.String()) + calicoPort := port.Port.String() + if port.EndPort != nil { + calicoPort = fmt.Sprintf("%s:%d", calicoPort, *port.EndPort) + } + p, err := numorstring.PortFromString(calicoPort) if err != nil { - return nil, fmt.Errorf("invalid port %+v: %s", port.Port, err) + return nil, fmt.Errorf("invalid port %+v: %s", calicoPort, err) } return append(portList, p), nil } @@ -683,7 +695,7 @@ func (c Converter) k8sPortToCalico(port networkingv1.NetworkPolicyPort) ([]numor } // ProfileNameToNamespace extracts the Namespace name from the given Profile name. -func (c Converter) ProfileNameToNamespace(profileName string) (string, error) { +func (c converter) ProfileNameToNamespace(profileName string) (string, error) { // Profile objects backed by Namespaces have form "kns." if !strings.HasPrefix(profileName, NamespaceProfileNamePrefix) { // This is not backed by a Kubernetes Namespace. @@ -693,30 +705,6 @@ func (c Converter) ProfileNameToNamespace(profileName string) (string, error) { return strings.TrimPrefix(profileName, NamespaceProfileNamePrefix), nil } -// JoinNetworkPolicyRevisions constructs the revision from the individual CRD and K8s NetworkPolicy -// revisions. -func (c Converter) JoinNetworkPolicyRevisions(crdNPRev, k8sNPRev string) string { - return crdNPRev + "/" + k8sNPRev -} - -// SplitNetworkPolicyRevision extracts the CRD and K8s NetworkPolicy revisions from the combined -// revision returned on the KDD NetworkPolicy client. -func (c Converter) SplitNetworkPolicyRevision(rev string) (crdNPRev string, k8sNPRev string, err error) { - if rev == "" { - return - } - - revs := strings.Split(rev, "/") - if len(revs) != 2 { - err = fmt.Errorf("ResourceVersion is not valid: %s", rev) - return - } - - crdNPRev = revs[0] - k8sNPRev = revs[1] - return -} - // serviceAccountNameToProfileName creates a profile name that is a join // of 'ksa.' + namespace + "." + serviceaccount name. func serviceAccountNameToProfileName(sa, namespace string) string { @@ -731,7 +719,7 @@ func serviceAccountNameToProfileName(sa, namespace string) string { // ServiceAccountToProfile converts a ServiceAccount to a Calico Profile. The Profile stores // labels from the ServiceAccount which are inherited by the WorkloadEndpoints within // the Profile. -func (c Converter) ServiceAccountToProfile(sa *kapiv1.ServiceAccount) (*model.KVPair, error) { +func (c converter) ServiceAccountToProfile(sa *kapiv1.ServiceAccount) (*model.KVPair, error) { // Generate the labels to apply to the profile, using a special prefix // to indicate that these are the labels from the parent Kubernetes ServiceAccount. labels := map[string]string{} @@ -739,6 +727,10 @@ func (c Converter) ServiceAccountToProfile(sa *kapiv1.ServiceAccount) (*model.KV labels[ServiceAccountLabelPrefix+k] = v } + // Add a label for the serviceaccount's name. This allows exact namespace matching + // based on name within the serviceAccountSelector. + labels[ServiceAccountLabelPrefix+NameLabel] = sa.Name + name := serviceAccountNameToProfileName(sa.Name, sa.Namespace) profile := apiv3.NewProfile() profile.ObjectMeta = metav1.ObjectMeta{ @@ -746,15 +738,7 @@ func (c Converter) ServiceAccountToProfile(sa *kapiv1.ServiceAccount) (*model.KV CreationTimestamp: sa.CreationTimestamp, UID: sa.UID, } - - // Only set labels to apply when there are actually labels. This makes the - // result of this function consistent with the struct as loaded directly - // from etcd, which uses nil for the empty map. - if len(labels) != 0 { - profile.Spec.LabelsToApply = labels - } else { - profile.Spec.LabelsToApply = nil - } + profile.Spec.LabelsToApply = labels // Embed the profile in a KVPair. kvp := model.KVPair{ @@ -769,7 +753,7 @@ func (c Converter) ServiceAccountToProfile(sa *kapiv1.ServiceAccount) (*model.KV } // ProfileNameToServiceAccount extracts the ServiceAccount name from the given Profile name. -func (c Converter) ProfileNameToServiceAccount(profileName string) (ns, sa string, err error) { +func (c converter) ProfileNameToServiceAccount(profileName string) (ns, sa string, err error) { // Profile objects backed by ServiceAccounts have form "ksa.." if !strings.HasPrefix(profileName, ServiceAccountProfileNamePrefix) { @@ -792,15 +776,15 @@ func (c Converter) ProfileNameToServiceAccount(profileName string) (ns, sa strin // JoinProfileRevisions constructs the revision from the individual namespace and serviceaccount // revisions. // This is conditional on the feature flag for serviceaccount set or not. -func (c Converter) JoinProfileRevisions(nsRev, saRev string) string { +func (c converter) JoinProfileRevisions(nsRev, saRev string) string { return nsRev + "/" + saRev } // SplitProfileRevision extracts the namespace and serviceaccount revisions from the combined // revision returned on the KDD service account based profile. // This is conditional on the feature flag for serviceaccount set or not. -func (c Converter) SplitProfileRevision(rev string) (nsRev string, saRev string, err error) { - if rev == "" { +func (c converter) SplitProfileRevision(rev string) (nsRev string, saRev string, err error) { + if rev == "" || rev == "0" { return } @@ -809,8 +793,19 @@ func (c Converter) SplitProfileRevision(rev string) (nsRev string, saRev string, err = fmt.Errorf("ResourceVersion is not valid: %s", rev) return } - nsRev = revs[0] saRev = revs[1] return } + +func stringsToIPNets(ipStrings []string) ([]*cnet.IPNet, error) { + var podIPNets []*cnet.IPNet + for _, ip := range ipStrings { + _, ipNet, err := cnet.ParseCIDROrIP(ip) + if err != nil { + return nil, err + } + podIPNets = append(podIPNets, ipNet) + } + return podIPNets, nil +} diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/workload_endpoint.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/workload_endpoint.go new file mode 100644 index 000000000..04c33b8e7 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/workload_endpoint.go @@ -0,0 +1,32 @@ +// Copyright (c) 2016-2020 Tigera, 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. + +// TODO move the WorkloadEndpoint converters to is own package. Some refactoring of the annotation and label constants +// is necessary to avoid circular imports, which is why this has been deferred. +package conversion + +import ( + kapiv1 "k8s.io/api/core/v1" + + "github.com/projectcalico/calico/libcalico-go/lib/backend/model" +) + +type WorkloadEndpointConverter interface { + VethNameForWorkload(namespace, podName string) string + PodToWorkloadEndpoints(pod *kapiv1.Pod) ([]*model.KVPair, error) +} + +func NewWorkloadEndpointConverter() WorkloadEndpointConverter { + return &defaultWorkloadEndpointConverter{} +} diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/workload_endpoint_default.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/workload_endpoint_default.go new file mode 100644 index 000000000..c25783f4e --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion/workload_endpoint_default.go @@ -0,0 +1,285 @@ +// Copyright (c) 2016-2021 Tigera, 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 conversion + +import ( + "crypto/sha1" + "encoding/hex" + "fmt" + "os" + "strings" + + log "github.com/sirupsen/logrus" + kapiv1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + "github.com/projectcalico/api/pkg/lib/numorstring" + + libapiv3 "github.com/projectcalico/calico/libcalico-go/lib/apis/v3" + "github.com/projectcalico/calico/libcalico-go/lib/backend/model" + "github.com/projectcalico/calico/libcalico-go/lib/json" + "github.com/projectcalico/calico/libcalico-go/lib/names" + cnet "github.com/projectcalico/calico/libcalico-go/lib/net" +) + +type defaultWorkloadEndpointConverter struct{} + +// VethNameForWorkload returns a deterministic veth name +// for the given Kubernetes workload (WEP) name and namespace. +func (wc defaultWorkloadEndpointConverter) VethNameForWorkload(namespace, podname string) string { + // A SHA1 is always 20 bytes long, and so is sufficient for generating the + // veth name and mac addr. + h := sha1.New() + h.Write([]byte(fmt.Sprintf("%s.%s", namespace, podname))) + prefix := os.Getenv("FELIX_INTERFACEPREFIX") + if prefix == "" { + // Prefix is not set. Default to "cali" + prefix = "cali" + } else { + // Prefix is set - use the first value in the list. + splits := strings.Split(prefix, ",") + prefix = splits[0] + } + log.WithField("prefix", prefix).Debugf("Using prefix to create a WorkloadEndpoint veth name") + return fmt.Sprintf("%s%s", prefix, hex.EncodeToString(h.Sum(nil))[:11]) +} + +func (wc defaultWorkloadEndpointConverter) PodToWorkloadEndpoints(pod *kapiv1.Pod) ([]*model.KVPair, error) { + wep, err := wc.podToDefaultWorkloadEndpoint(pod) + if err != nil { + return nil, err + } + + return []*model.KVPair{wep}, nil +} + +// PodToWorkloadEndpoint converts a Pod to a WorkloadEndpoint. It assumes the calling code +// has verified that the provided Pod is valid to convert to a WorkloadEndpoint. +// PodToWorkloadEndpoint requires a Pods Name and Node Name to be populated. It will +// fail to convert from a Pod to WorkloadEndpoint otherwise. +func (wc defaultWorkloadEndpointConverter) podToDefaultWorkloadEndpoint(pod *kapiv1.Pod) (*model.KVPair, error) { + log.WithField("pod", pod).Debug("Converting pod to WorkloadEndpoint") + // Get all the profiles that apply + var profiles []string + + // Pull out the Namespace based profile off the pod name and Namespace. + profiles = append(profiles, NamespaceProfileNamePrefix+pod.Namespace) + + // Pull out the Serviceaccount based profile off the pod SA and namespace + if pod.Spec.ServiceAccountName != "" { + profiles = append(profiles, serviceAccountNameToProfileName(pod.Spec.ServiceAccountName, pod.Namespace)) + } + + wepids := names.WorkloadEndpointIdentifiers{ + Node: pod.Spec.NodeName, + Orchestrator: apiv3.OrchestratorKubernetes, + Endpoint: "eth0", + Pod: pod.Name, + } + wepName, err := wepids.CalculateWorkloadEndpointName(false) + if err != nil { + return nil, err + } + + podIPNets, err := getPodIPs(pod) + if err != nil { + // IP address was present but malformed in some way, handle as an explicit failure. + return nil, err + } + + if IsFinished(pod) { + // Pod is finished but not yet deleted. In this state the IP will have been freed and returned to the pool + // so we need to make sure we don't let the caller believe it still belongs to this endpoint. + // Pods with no IPs will get filtered out before they get to Felix in the watcher syncer cache layer. + // We can't pretend the workload endpoint is deleted _here_ because that would confuse users of the + // native v3 Watch() API. + log.Debug("Pod is in a 'finished' state so no longer owns its IP(s).") + podIPNets = nil + } + + ipNets := []string{} + for _, ipNet := range podIPNets { + ipNets = append(ipNets, ipNet.String()) + } + + // Generate the interface name based on workload. This must match + // the host-side veth configured by the CNI plugin. + interfaceName := wc.VethNameForWorkload(pod.Namespace, pod.Name) + + // Build the labels map. Start with the pod labels, and append two additional labels for + // namespace and orchestrator matches. + labels := pod.Labels + if labels == nil { + labels = make(map[string]string, 2) + } + labels[apiv3.LabelNamespace] = pod.Namespace + labels[apiv3.LabelOrchestrator] = apiv3.OrchestratorKubernetes + + if pod.Spec.ServiceAccountName != "" && len(pod.Spec.ServiceAccountName) < 63 { + // For backwards compatibility, include the label if less than 63 characters. + labels[apiv3.LabelServiceAccount] = pod.Spec.ServiceAccountName + } + + // Pull out floating IP annotation + var floatingIPs []libapiv3.IPNAT + if annotation, ok := pod.Annotations["cni.projectcalico.org/floatingIPs"]; ok && len(podIPNets) > 0 { + + // Parse Annotation data + var ips []string + err := json.Unmarshal([]byte(annotation), &ips) + if err != nil { + return nil, fmt.Errorf("failed to parse '%s' as JSON: %s", annotation, err) + } + + // Get IPv4 and IPv6 targets for NAT + var podnetV4, podnetV6 *cnet.IPNet + for _, ipNet := range podIPNets { + if ipNet.IP.To4() != nil { + podnetV4 = ipNet + netmask, _ := podnetV4.Mask.Size() + if netmask != 32 { + return nil, fmt.Errorf("PodIP %v is not a valid IPv4: Mask size is %d, not 32", ipNet, netmask) + } + } else { + podnetV6 = ipNet + netmask, _ := podnetV6.Mask.Size() + if netmask != 128 { + return nil, fmt.Errorf("PodIP %v is not a valid IPv6: Mask size is %d, not 128", ipNet, netmask) + } + } + } + + for _, ip := range ips { + if strings.Contains(ip, ":") { + if podnetV6 != nil { + floatingIPs = append(floatingIPs, libapiv3.IPNAT{ + InternalIP: podnetV6.IP.String(), + ExternalIP: ip, + }) + } + } else { + if podnetV4 != nil { + floatingIPs = append(floatingIPs, libapiv3.IPNAT{ + InternalIP: podnetV4.IP.String(), + ExternalIP: ip, + }) + } + } + } + } + + // Handle source IP spoofing annotation + var sourcePrefixes []string + if annotation, ok := pod.Annotations["cni.projectcalico.org/allowedSourcePrefixes"]; ok && annotation != "" { + // Parse Annotation data + var requestedSourcePrefixes []string + err := json.Unmarshal([]byte(annotation), &requestedSourcePrefixes) + if err != nil { + return nil, fmt.Errorf("failed to parse '%s' as JSON: %s", annotation, err) + } + + // Filter out any invalid entries and normalize the CIDRs. + for _, prefix := range requestedSourcePrefixes { + if _, n, err := cnet.ParseCIDR(prefix); err != nil { + return nil, fmt.Errorf("failed to parse '%s' as a CIDR: %s", prefix, err) + } else { + sourcePrefixes = append(sourcePrefixes, n.String()) + } + } + + } + + // Map any named ports through. + var endpointPorts []libapiv3.WorkloadEndpointPort + for _, container := range pod.Spec.Containers { + for _, containerPort := range container.Ports { + if containerPort.ContainerPort != 0 && (containerPort.HostPort != 0 || containerPort.Name != "") { + var modelProto numorstring.Protocol + switch containerPort.Protocol { + case kapiv1.ProtocolUDP: + modelProto = numorstring.ProtocolFromString("udp") + case kapiv1.ProtocolSCTP: + modelProto = numorstring.ProtocolFromString("sctp") + case kapiv1.ProtocolTCP, kapiv1.Protocol("") /* K8s default is TCP. */ : + modelProto = numorstring.ProtocolFromString("tcp") + default: + log.WithFields(log.Fields{ + "protocol": containerPort.Protocol, + "pod": pod, + "port": containerPort, + }).Debug("Ignoring named port with unknown protocol") + continue + } + + endpointPorts = append(endpointPorts, libapiv3.WorkloadEndpointPort{ + Name: containerPort.Name, + Protocol: modelProto, + Port: uint16(containerPort.ContainerPort), + HostPort: uint16(containerPort.HostPort), + HostIP: containerPort.HostIP, + }) + } + } + } + + // Get the container ID if present. This is used in the CNI plugin to distinguish different pods that have + // the same name. For example, restarted stateful set pods. + containerID := pod.Annotations[AnnotationContainerID] + + // Create the workload endpoint. + wep := libapiv3.NewWorkloadEndpoint() + wep.ObjectMeta = metav1.ObjectMeta{ + Name: wepName, + Namespace: pod.Namespace, + CreationTimestamp: pod.CreationTimestamp, + UID: pod.UID, + Labels: labels, + GenerateName: pod.GenerateName, + } + wep.Spec = libapiv3.WorkloadEndpointSpec{ + Orchestrator: "k8s", + Node: pod.Spec.NodeName, + Pod: pod.Name, + ContainerID: containerID, + Endpoint: "eth0", + InterfaceName: interfaceName, + Profiles: profiles, + IPNetworks: ipNets, + Ports: endpointPorts, + IPNATs: floatingIPs, + ServiceAccountName: pod.Spec.ServiceAccountName, + AllowSpoofedSourcePrefixes: sourcePrefixes, + } + + if v, ok := pod.Annotations["k8s.v1.cni.cncf.io/network-status"]; ok { + if wep.Annotations == nil { + wep.Annotations = make(map[string]string) + } + wep.Annotations["k8s.v1.cni.cncf.io/network-status"] = v + } + + // Embed the workload endpoint into a KVPair. + kvp := model.KVPair{ + Key: model.ResourceKey{ + Name: wepName, + Namespace: pod.Namespace, + Kind: libapiv3.KindWorkloadEndpoint, + }, + Value: wep, + Revision: pod.ResourceVersion, + } + return &kvp, nil +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/bgp_node.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/bgp_node.go similarity index 95% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/bgp_node.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/bgp_node.go index 5f18e012c..b0ecfb519 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/bgp_node.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/bgp_node.go @@ -18,7 +18,7 @@ import ( "fmt" "reflect" - "github.com/projectcalico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/bgpconfig.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/bgpconfig.go similarity index 98% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/bgpconfig.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/bgpconfig.go index f6c3f44a0..f6aef1caa 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/bgpconfig.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/bgpconfig.go @@ -21,7 +21,7 @@ import ( log "github.com/sirupsen/logrus" - "github.com/projectcalico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/bgppeer.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/bgppeer.go similarity index 65% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/bgppeer.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/bgppeer.go index e0a012edc..548e735da 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/bgppeer.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/bgppeer.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Tigera, Inc. All rights reserved. +// Copyright (c) 2020 Tigera, 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. @@ -16,25 +16,31 @@ package model import ( "fmt" - "regexp" - "reflect" + "regexp" + "strconv" + "strings" - "github.com/projectcalico/libcalico-go/lib/errors" - "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/numorstring" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/api/pkg/lib/numorstring" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/net" ) var ( - matchGlobalBGPPeer = regexp.MustCompile("^/?calico/bgp/v1/global/peer_v./([^/]+)$") - matchHostBGPPeer = regexp.MustCompile("^/?calico/bgp/v1/host/([^/]+)/peer_v./([^/]+)$") - typeBGPPeer = reflect.TypeOf(BGPPeer{}) + matchGlobalBGPPeer = regexp.MustCompile("^/?calico/bgp/v1/global/peer_v./([^/]+)$") + matchHostBGPPeer = regexp.MustCompile("^/?calico/bgp/v1/host/([^/]+)/peer_v./([^/]+)$") + typeBGPPeer = reflect.TypeOf(BGPPeer{}) + ipPortSeparator = "-" + defaultPort uint16 = 179 ) type NodeBGPPeerKey struct { Nodename string `json:"-" validate:"omitempty"` PeerIP net.IP `json:"-" validate:"required"` + Port uint16 `json:"-" validate:"omitempty"` } func (key NodeBGPPeerKey) defaultPath() (string, error) { @@ -45,7 +51,7 @@ func (key NodeBGPPeerKey) defaultPath() (string, error) { return "", errors.ErrorInsufficientIdentifiers{Name: "node"} } e := fmt.Sprintf("/calico/bgp/v1/host/%s/peer_v%d/%s", - key.Nodename, key.PeerIP.Version(), key.PeerIP) + key.Nodename, key.PeerIP.Version(), combineIPAndPort(key.PeerIP, key.Port)) return e, nil } @@ -62,12 +68,13 @@ func (key NodeBGPPeerKey) valueType() (reflect.Type, error) { } func (key NodeBGPPeerKey) String() string { - return fmt.Sprintf("BGPPeer(node=%s, ip=%s)", key.Nodename, key.PeerIP) + return fmt.Sprintf("BGPPeer(node=%s, ip=%s, port=%d)", key.Nodename, key.PeerIP, key.Port) } type NodeBGPPeerListOptions struct { Nodename string PeerIP net.IP + Port uint16 } func (options NodeBGPPeerListOptions) defaultPathRoot() string { @@ -78,19 +85,21 @@ func (options NodeBGPPeerListOptions) defaultPathRoot() string { options.Nodename) } else { return fmt.Sprintf("/calico/bgp/v1/host/%s/peer_v%d/%s", - options.Nodename, options.PeerIP.Version(), options.PeerIP) + options.Nodename, options.PeerIP.Version(), combineIPAndPort(options.PeerIP, options.Port)) } } func (options NodeBGPPeerListOptions) KeyFromDefaultPath(path string) Key { log.Debugf("Get BGPPeer key from %s", path) nodename := "" + var port uint16 peerIP := net.IP{} ekeyb := []byte(path) - if r := matchHostBGPPeer.FindAllSubmatch(ekeyb, -1); len(r) == 1 { + var ipBytes []byte + ipBytes, port = extractIPAndPort(string(r[0][2])) nodename = string(r[0][1]) - if err := peerIP.UnmarshalText(r[0][2]); err != nil { + if err := peerIP.UnmarshalText(ipBytes); err != nil { log.WithError(err).WithField("PeerIP", r[0][2]).Error("Error unmarshalling GlobalBGPPeer IP address") return nil } @@ -107,11 +116,16 @@ func (options NodeBGPPeerListOptions) KeyFromDefaultPath(path string) Key { log.Debugf("Didn't match hostname %s != %s", options.Nodename, nodename) return nil } - return NodeBGPPeerKey{PeerIP: peerIP, Nodename: nodename} + + if port == 0 { + return NodeBGPPeerKey{PeerIP: peerIP, Nodename: nodename} + } + return NodeBGPPeerKey{PeerIP: peerIP, Nodename: nodename, Port: port} } type GlobalBGPPeerKey struct { PeerIP net.IP `json:"-" validate:"required"` + Port uint16 `json:"-" validate:"omitempty"` } func (key GlobalBGPPeerKey) defaultPath() (string, error) { @@ -119,7 +133,7 @@ func (key GlobalBGPPeerKey) defaultPath() (string, error) { return "", errors.ErrorInsufficientIdentifiers{Name: "peerIP"} } e := fmt.Sprintf("/calico/bgp/v1/global/peer_v%d/%s", - key.PeerIP.Version(), key.PeerIP) + key.PeerIP.Version(), combineIPAndPort(key.PeerIP, key.Port)) return e, nil } @@ -136,11 +150,12 @@ func (key GlobalBGPPeerKey) valueType() (reflect.Type, error) { } func (key GlobalBGPPeerKey) String() string { - return fmt.Sprintf("BGPPeer(global, ip=%s)", key.PeerIP) + return fmt.Sprintf("BGPPeer(global, ip=%s, port=%d)", key.PeerIP, key.Port) } type GlobalBGPPeerListOptions struct { PeerIP net.IP + Port uint16 } func (options GlobalBGPPeerListOptions) defaultPathRoot() string { @@ -148,7 +163,7 @@ func (options GlobalBGPPeerListOptions) defaultPathRoot() string { return "/calico/bgp/v1/global" } else { return fmt.Sprintf("/calico/bgp/v1/global/peer_v%d/%s", - options.PeerIP.Version(), options.PeerIP) + options.PeerIP.Version(), combineIPAndPort(options.PeerIP, options.Port)) } } @@ -156,9 +171,12 @@ func (options GlobalBGPPeerListOptions) KeyFromDefaultPath(path string) Key { log.Debugf("Get BGPPeer key from %s", path) peerIP := net.IP{} ekeyb := []byte(path) + var port uint16 if r := matchGlobalBGPPeer.FindAllSubmatch(ekeyb, -1); len(r) == 1 { - if err := peerIP.UnmarshalText(r[0][1]); err != nil { + var ipBytes []byte + ipBytes, port = extractIPAndPort(string(r[0][1])) + if err := peerIP.UnmarshalText(ipBytes); err != nil { log.WithError(err).WithField("PeerIP", r[0][1]).Error("Error unmarshalling GlobalBGPPeer IP address") return nil } @@ -171,7 +189,11 @@ func (options GlobalBGPPeerListOptions) KeyFromDefaultPath(path string) Key { log.Debugf("Didn't match peerIP %s != %s", options.PeerIP.String(), peerIP.String()) return nil } - return GlobalBGPPeerKey{PeerIP: peerIP} + + if port == 0 { + return GlobalBGPPeerKey{PeerIP: peerIP, Port: port} + } + return GlobalBGPPeerKey{PeerIP: peerIP, Port: port} } type BGPPeer struct { @@ -184,3 +206,25 @@ type BGPPeer struct { // configuration. ASNum numorstring.ASNumber `json:"as_num,string"` } + +func extractIPAndPort(ipPort string) ([]byte, uint16) { + arr := strings.Split(ipPort, ipPortSeparator) + if len(arr) == 2 { + port, err := strconv.ParseUint(arr[1], 0, 16) + if err != nil { + log.Warningf("Error extracting port. %#v", err) + return []byte(ipPort), defaultPort + } + return []byte(arr[0]), uint16(port) + } + return []byte(ipPort), defaultPort +} + +func combineIPAndPort(ip net.IP, port uint16) string { + if port == 0 || port == defaultPort { + return ip.String() + } else { + strPort := strconv.Itoa(int(port)) + return ip.String() + ipPortSeparator + strPort + } +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/block.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/block.go similarity index 56% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/block.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/block.go index 10f55a603..e06b46d59 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/block.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/block.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Tigera, Inc. All rights reserved. +// Copyright (c) 2016-2021 Tigera, 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. @@ -23,18 +23,22 @@ import ( log "github.com/sirupsen/logrus" - "github.com/projectcalico/libcalico-go/lib/errors" - "github.com/projectcalico/libcalico-go/lib/net" + "github.com/projectcalico/calico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/net" ) const ( // Common attributes which may be set on allocations by clients. - IPAMBlockAttributePod = "pod" - IPAMBlockAttributeNamespace = "namespace" - IPAMBlockAttributeNode = "node" - IPAMBlockAttributeType = "type" - IPAMBlockAttributeTypeIPIP = "ipipTunnelAddress" - IPAMBlockAttributeTypeVXLAN = "vxlanTunnelAddress" + IPAMBlockAttributePod = "pod" + IPAMBlockAttributeNamespace = "namespace" + IPAMBlockAttributeNode = "node" + IPAMBlockAttributeType = "type" + IPAMBlockAttributeTypeIPIP = "ipipTunnelAddress" + IPAMBlockAttributeTypeVXLAN = "vxlanTunnelAddress" + IPAMBlockAttributeTypeVXLANV6 = "vxlanV6TunnelAddress" + IPAMBlockAttributeTypeWireguard = "wireguardTunnelAddress" + IPAMBlockAttributeTypeWireguardV6 = "wireguardV6TunnelAddress" + IPAMBlockAttributeTimestamp = "timestamp" ) var ( @@ -91,18 +95,50 @@ func (options BlockListOptions) KeyFromDefaultPath(path string) Key { return nil } cidrStr := strings.Replace(r[0][1], "-", "/", 1) - _, cidr, _ := net.ParseCIDR(cidrStr) + _, cidr, err := net.ParseCIDR(cidrStr) + if err != nil { + log.Debugf("find an invalid cidr %s for path=%v , info=%v ", r[0][1], path, err) + return nil + } return BlockKey{CIDR: *cidr} } type AllocationBlock struct { - CIDR net.IPNet `json:"cidr"` - Affinity *string `json:"affinity"` - StrictAffinity bool `json:"strictAffinity"` - Allocations []*int `json:"allocations"` - Unallocated []int `json:"unallocated"` - Attributes []AllocationAttribute `json:"attributes"` - Deleted bool `json:"deleted"` + // The block's CIDR. + CIDR net.IPNet `json:"cidr"` + + // Affinity of the block, if this block has one. If set, it will be of the form + // "host:". If not set, this block is not affine to a host. + Affinity *string `json:"affinity"` + + // Array of allocations in-use within this block. nil entries mean the allocation is free. + // For non-nil entries at index i, the index is the ordinal of the allocation within this block + // and the value is the index of the associated attributes in the Attributes array. + Allocations []*int `json:"allocations"` + + // Unallocated is an ordered list of allocations which are free in the block. + Unallocated []int `json:"unallocated"` + + // Attributes is an array of arbitrary metadata associated with allocations in the block. To find + // attributes for a given allocation, use the value of the allocation's entry in the Allocations array + // as the index of the element in this array. + Attributes []AllocationAttribute `json:"attributes"` + + // We store a sequence number that is updated each time the block is written. + // Each allocation will also store the sequence number of the block at the time of its creation. + // When releasing an IP, passing the sequence number associated with the allocation allows us + // to protect against a race condition and ensure the IP hasn't been released and re-allocated + // since the release request. + SequenceNumber uint64 `json:"sequenceNumber"` + + // Map of allocated ordinal within the block to sequence number of the block at + // the time of allocation. Kubernetes does not allow numerical keys for maps, so + // the key is cast to a string. + SequenceNumberForAllocation map[string]uint64 `json:"sequenceNumberForAllocation"` + + // Deleted is an internal boolean used to workaround a limitation in the Kubernetes API whereby + // deletion will not return a conflict error if the block has been updated. + Deleted bool `json:"deleted"` // HostAffinity is deprecated in favor of Affinity. // This is only to keep compatibility with existing deployments. @@ -110,6 +146,21 @@ type AllocationBlock struct { HostAffinity *string `json:"hostAffinity,omitempty"` } +func (b *AllocationBlock) SetSequenceNumberForOrdinal(ordinal int) { + if b.SequenceNumberForAllocation == nil { + b.SequenceNumberForAllocation = map[string]uint64{} + } + b.SequenceNumberForAllocation[fmt.Sprintf("%d", ordinal)] = b.SequenceNumber +} + +func (b *AllocationBlock) GetSequenceNumberForOrdinal(ordinal int) uint64 { + return b.SequenceNumberForAllocation[fmt.Sprintf("%d", ordinal)] +} + +func (b *AllocationBlock) ClearSequenceNumberForOrdinal(ordinal int) { + delete(b.SequenceNumberForAllocation, fmt.Sprintf("%d", ordinal)) +} + func (b *AllocationBlock) MarkDeleted() { b.Deleted = true } @@ -120,7 +171,7 @@ func (b *AllocationBlock) IsDeleted() bool { func (b *AllocationBlock) Host() string { if b.Affinity != nil && strings.HasPrefix(*b.Affinity, "host:") { - return strings.TrimLeft(*b.Affinity, "host:") + return strings.TrimPrefix(*b.Affinity, "host:") } return "" } @@ -175,8 +226,7 @@ func (b *AllocationBlock) IPToOrdinal(ip net.IP) (int, error) { // Calculates the IP at the given position within the block. ord=0 gives the first IP in the block. func (b *AllocationBlock) OrdinalToIP(ord int) net.IP { - sum := big.NewInt(0).Add(net.IPToBigInt(net.IP{IP: b.CIDR.IP}), big.NewInt(int64(ord))) - return net.BigIntToIP(sum) + return b.CIDR.NthIP(ord) } type AllocationAttribute struct { diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/block_affinity.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/block_affinity.go similarity index 93% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/block_affinity.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/block_affinity.go index 099da83ae..083e728b7 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/block_affinity.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/block_affinity.go @@ -20,9 +20,10 @@ import ( "regexp" "strings" - "github.com/projectcalico/libcalico-go/lib/errors" - "github.com/projectcalico/libcalico-go/lib/net" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/net" ) var ( @@ -99,6 +100,10 @@ func (options BlockAffinityListOptions) KeyFromDefaultPath(path string) Key { } cidrStr := strings.Replace(r[0][2], "-", "/", 1) _, cidr, _ := net.ParseCIDR(cidrStr) + if cidr == nil { + log.Debugf("Failed to parse CIDR in block affinity path: %q", path) + return nil + } host := r[0][1] if options.Host != "" && options.Host != host { diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/deletion.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/deletion.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/deletion.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/deletion.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/felixconfig.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/felixconfig.go similarity index 98% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/felixconfig.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/felixconfig.go index 8a1184a7e..cce75e474 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/felixconfig.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/felixconfig.go @@ -21,7 +21,7 @@ import ( log "github.com/sirupsen/logrus" - "github.com/projectcalico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/hostendpoint.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/hostendpoint.go similarity index 96% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/hostendpoint.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/hostendpoint.go index cd0b924e8..5c8e66ac2 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/hostendpoint.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/hostendpoint.go @@ -21,9 +21,10 @@ import ( "reflect" - "github.com/projectcalico/libcalico-go/lib/errors" - "github.com/projectcalico/libcalico-go/lib/net" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/net" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/hostendpointstatus.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/hostendpointstatus.go similarity index 98% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/hostendpointstatus.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/hostendpointstatus.go index 447c21d9d..be6625cc2 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/hostendpointstatus.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/hostendpointstatus.go @@ -21,8 +21,9 @@ import ( "reflect" - "github.com/projectcalico/libcalico-go/lib/errors" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ipam_config.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ipam_config.go similarity index 92% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ipam_config.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ipam_config.go index 6bdd61405..ce6acf488 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ipam_config.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ipam_config.go @@ -22,9 +22,7 @@ const ( IPAMConfigGlobalName = "default" ) -var ( - typeIPAMConfig = reflect.TypeOf(IPAMConfig{}) -) +var typeIPAMConfig = reflect.TypeOf(IPAMConfig{}) type IPAMConfigKey struct{} @@ -51,4 +49,5 @@ func (key IPAMConfigKey) String() string { type IPAMConfig struct { StrictAffinity bool `json:"strict_affinity,omitempty"` AutoAllocateBlocks bool `json:"auto_allocate_blocks,omitempty"` + MaxBlocksPerHost int `json:"maxBlocksPerHost,omitempty"` } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ipam_handle.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ipam_handle.go similarity index 94% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ipam_handle.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ipam_handle.go index fb8a0e248..e0c387f78 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ipam_handle.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ipam_handle.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Tigera, Inc. All rights reserved. +// Copyright (c) 2016,2020 Tigera, 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. @@ -19,8 +19,9 @@ import ( "reflect" "regexp" - "github.com/projectcalico/libcalico-go/lib/errors" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ipam_host.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ipam_host.go similarity index 95% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ipam_host.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ipam_host.go index cc5c9cd3e..aa8d4719e 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ipam_host.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ipam_host.go @@ -18,7 +18,7 @@ import ( "fmt" "reflect" - "github.com/projectcalico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ippool.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ippool.go similarity index 80% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ippool.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ippool.go index e4dc9b919..15d5c75d1 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/ippool.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/ippool.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Tigera, Inc. All rights reserved. +// Copyright (c) 2016,2021 Tigera, 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. @@ -16,15 +16,15 @@ package model import ( "fmt" + "reflect" "regexp" "strings" - "reflect" - - "github.com/projectcalico/libcalico-go/lib/backend/encap" - "github.com/projectcalico/libcalico-go/lib/errors" - "github.com/projectcalico/libcalico-go/lib/net" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/backend/encap" + "github.com/projectcalico/calico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/net" ) var ( @@ -96,11 +96,12 @@ func (options IPPoolListOptions) KeyFromDefaultPath(path string) Key { } type IPPool struct { - CIDR net.IPNet `json:"cidr"` - IPIPInterface string `json:"ipip"` - IPIPMode encap.Mode `json:"ipip_mode"` - VXLANMode encap.Mode `json:"vxlan_mode"` - Masquerade bool `json:"masquerade"` - IPAM bool `json:"ipam"` - Disabled bool `json:"disabled"` + CIDR net.IPNet `json:"cidr"` + IPIPInterface string `json:"ipip"` + IPIPMode encap.Mode `json:"ipip_mode"` + VXLANMode encap.Mode `json:"vxlan_mode"` + Masquerade bool `json:"masquerade"` + IPAM bool `json:"ipam"` + Disabled bool `json:"disabled"` + DisableBGPExport bool `json:"disableBGPExport"` } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/keys.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/keys.go similarity index 61% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/keys.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/keys.go index dcbbe9b2f..043b6044d 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/keys.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/keys.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Tigera, Inc. All rights reserved. +// Copyright (c) 2016-2020 Tigera, 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. @@ -16,17 +16,18 @@ package model import ( "bytes" - "encoding/json" "fmt" net2 "net" "reflect" "strings" "time" - v3 "github.com/projectcalico/libcalico-go/lib/apis/v3" - "github.com/projectcalico/libcalico-go/lib/net" log "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/types" + + "github.com/projectcalico/calico/libcalico-go/lib/json" + "github.com/projectcalico/calico/libcalico-go/lib/namespace" + "github.com/projectcalico/calico/libcalico-go/lib/net" ) // RawString is used a value type to indicate that the value is a bare non-JSON string @@ -85,10 +86,10 @@ type ListInterface interface { // // The Value is dependent on the Key, but in general will be on of the following // types: -// - A pointer to a struct -// - A slice or map -// - A bare string, boolean value or IP address (i.e. without quotes, so not -// JSON format). +// - A pointer to a struct +// - A slice or map +// - A bare string, boolean value or IP address (i.e. without quotes, so not +// JSON format). type KVPair struct { Key Key Value interface{} @@ -134,10 +135,6 @@ func KeyToDefaultDeletePath(key Key) (string, error) { return key.defaultDeletePath() } -func KeyToValueType(key Key) (reflect.Type, error) { - return key.valueType() -} - // KeyToDefaultDeleteParentPaths returns a slice of '/'-delimited // paths which are used to delete parent entries that may be auto-created // by directory-based KV stores (e.g. etcd v3). These paths should also be @@ -147,16 +144,19 @@ func KeyToValueType(key Key) (reflect.Type, error) { // in the order supplied in the slice and only if the directory is empty. // // For example, -// KeyToDefaultDeletePaths(WorkloadEndpointKey{ -// Nodename: "h", -// OrchestratorID: "o", -// WorkloadID: "w", -// EndpointID: "e", -// }) +// +// KeyToDefaultDeletePaths(WorkloadEndpointKey{ +// Nodename: "h", +// OrchestratorID: "o", +// WorkloadID: "w", +// EndpointID: "e", +// }) +// // returns // // ["/calico/v1/host/h/workload/o/w/endpoint", -// "/calico/v1/host/h/workload/o/w"] +// +// "/calico/v1/host/h/workload/o/w"] // // indicating that these paths should also be deleted when they are empty. // In this example it is equivalent to deleting the workload when there are @@ -192,10 +192,249 @@ func IsListOptionsLastSegmentPrefix(listOptions ListInterface) bool { // of our Key structs. Returns nil if the string doesn't match one of // our key types. func KeyFromDefaultPath(path string) Key { + // "v3" resource keys strictly require a leading slash but older "v1" keys were permissive. + // For ease of parsing, strip the slash off now but pass it down to keyFromDefaultPathInner so + // it can check for it later. + normalizedPath := path + if strings.HasPrefix(normalizedPath, "/") { + normalizedPath = normalizedPath[1:] + } + + parts := strings.Split(normalizedPath, "/") + if len(parts) < 3 { + // After removing the optional `/` prefix, should have at least 3 segments. + return nil + } + + return keyFromDefaultPathInner(path, parts) +} + +func keyFromDefaultPathInner(path string, parts []string) Key { + if parts[0] != "calico" { + return nil + } + + switch parts[1] { + case "v1": + switch parts[2] { + case "ipam": + return IPPoolListOptions{}.KeyFromDefaultPath(path) + case "config": + return GlobalConfigKey{Name: strings.Join(parts[3:], "/")} + case "host": + if len(parts) < 5 { + return nil + } + hostname := parts[3] + switch parts[4] { + case "workload": + if len(parts) != 9 || parts[7] != "endpoint" { + return nil + } + return WorkloadEndpointKey{ + Hostname: unescapeName(hostname), + OrchestratorID: unescapeName(parts[5]), + WorkloadID: unescapeName(parts[6]), + EndpointID: unescapeName(parts[8]), + } + case "endpoint": + if len(parts) != 6 { + return nil + } + return HostEndpointKey{ + Hostname: unescapeName(hostname), + EndpointID: unescapeName(parts[5]), + } + case "config": + return HostConfigKey{ + Hostname: hostname, + Name: strings.Join(parts[5:], "/"), + } + case "metadata": + if len(parts) != 5 { + return nil + } + return HostMetadataKey{ + Hostname: hostname, + } + case "bird_ip": + if len(parts) != 5 { + return nil + } + return HostIPKey{ + Hostname: hostname, + } + case "wireguard": + if len(parts) != 5 { + return nil + } + return WireguardKey{ + NodeName: hostname, + } + } + case "netset": + if len(parts) != 4 { + return nil + } + return NetworkSetKey{ + Name: unescapeName(parts[3]), + } + case "Ready": + if len(parts) > 3 || path[0] != '/' { + return nil + } + return ReadyFlagKey{} + case "policy": + if len(parts) < 6 { + return nil + } + switch parts[3] { + case "tier": + if len(parts) < 6 { + return nil + } + switch parts[5] { + case "policy": + if len(parts) != 7 { + return nil + } + return PolicyKey{ + Name: unescapeName(parts[6]), + } + } + case "profile": + pk := unescapeName(parts[4]) + switch parts[5] { + case "rules": + return ProfileRulesKey{ProfileKey: ProfileKey{pk}} + case "labels": + return ProfileLabelsKey{ProfileKey: ProfileKey{pk}} + } + } + } + case "bgp": + switch parts[2] { + case "v1": + if len(parts) < 5 { + return nil + } + switch parts[3] { + case "global": + return GlobalBGPConfigListOptions{}.KeyFromDefaultPath(path) + case "host": + if len(parts) < 6 { + return nil + } + return NodeBGPConfigListOptions{}.KeyFromDefaultPath(path) + } + } + case "ipam": + if len(parts) < 5 { + return nil + } + switch parts[2] { + case "v2": + switch parts[3] { + case "assignment": + return BlockListOptions{}.KeyFromDefaultPath(path) + case "handle": + if len(parts) > 5 { + return nil + } + return IPAMHandleKey{ + HandleID: parts[4], + } + case "host": + return BlockAffinityListOptions{}.KeyFromDefaultPath(path) + } + } + case "resources": + switch parts[2] { + case "v3": + // v3 resource keys strictly require the leading slash. + if len(parts) < 6 || parts[3] != "projectcalico.org" || path[0] != '/' { + return nil + } + switch len(parts) { + case 6: + ri, ok := resourceInfoByPlural[unescapeName(parts[4])] + if !ok { + log.Warnf("(BUG) unknown resource type: %v", path) + return nil + } + if namespace.IsNamespaced(ri.kind) { + log.Warnf("(BUG) Path is a global resource, but resource is namespaced: %v", path) + return nil + } + log.Debugf("Path is a global resource: %v", path) + return ResourceKey{ + Kind: ri.kind, + Name: unescapeName(parts[5]), + } + case 7: + ri, ok := resourceInfoByPlural[unescapeName(parts[4])] + if !ok { + log.Warnf("(BUG) unknown resource type: %v", path) + return nil + } + if !namespace.IsNamespaced(ri.kind) { + log.Warnf("(BUG) Path is a namespaced resource, but resource is global: %v", path) + return nil + } + log.Debugf("Path is a namespaced resource: %v", path) + return ResourceKey{ + Kind: ri.kind, + Namespace: unescapeName(parts[5]), + Name: unescapeName(parts[6]), + } + } + } + case "felix": + if len(parts) < 4 { + return nil + } + switch parts[2] { + case "v1": + switch parts[3] { + case "host": + if len(parts) != 7 || parts[5] != "endpoint" { + return nil + } + return HostEndpointStatusKey{ + Hostname: parts[4], + EndpointID: unescapeName(parts[6]), + } + } + case "v2": + if len(parts) < 7 { + return nil + } + if parts[4] != "host" { + return nil + } + switch parts[6] { + case "status": + return ActiveStatusReportListOptions{}.KeyFromDefaultPath(path) + case "last_reported_status": + return LastStatusReportListOptions{}.KeyFromDefaultPath(path) + case "workload": + return WorkloadEndpointStatusListOptions{}.KeyFromDefaultPath(path) + } + } + } + log.Debugf("Path is unknown: %v", path) + return nil +} + +// OldKeyFromDefaultPath is the old, (slower) implementation of KeyFromDefaultPath. It is kept to allow +// fuzzing the new version against it. Parses the default path representation of a key into one +// of our Key structs. Returns nil if the string doesn't match one of +// our key types. +func OldKeyFromDefaultPath(path string) Key { if m := matchWorkloadEndpoint.FindStringSubmatch(path); m != nil { log.Debugf("Path is a workload endpoint: %v", path) return WorkloadEndpointKey{ - Hostname: m[1], + Hostname: unescapeName(m[1]), OrchestratorID: unescapeName(m[2]), WorkloadID: unescapeName(m[3]), EndpointID: unescapeName(m[4]), @@ -203,7 +442,7 @@ func KeyFromDefaultPath(path string) Key { } else if m := matchHostEndpoint.FindStringSubmatch(path); m != nil { log.Debugf("Path is a host endpoint: %v", path) return HostEndpointKey{ - Hostname: m[1], + Hostname: unescapeName(m[1]), EndpointID: unescapeName(m[2]), } } else if m := matchNetworkSet.FindStringSubmatch(path); m != nil { @@ -211,6 +450,37 @@ func KeyFromDefaultPath(path string) Key { return NetworkSetKey{ Name: unescapeName(m[1]), } + } else if m := matchGlobalResource.FindStringSubmatch(path); m != nil { + ri, ok := resourceInfoByPlural[unescapeName(m[1])] + if !ok { + log.Warnf("(BUG) unknown resource type: %v", path) + return nil + } + if namespace.IsNamespaced(ri.kind) { + log.Warnf("(BUG) Path is a global resource, but resource is namespaced: %v", path) + return nil + } + log.Debugf("Path is a global resource: %v", path) + return ResourceKey{ + Kind: ri.kind, + Name: unescapeName(m[2]), + } + } else if m := matchNamespacedResource.FindStringSubmatch(path); m != nil { + ri, ok := resourceInfoByPlural[unescapeName(m[1])] + if !ok { + log.Warnf("(BUG) unknown resource type: %v", path) + return nil + } + if !namespace.IsNamespaced(ri.kind) { + log.Warnf("(BUG) Path is a namespaced resource, but resource is global: %v", path) + return nil + } + log.Debugf("Path is a namespaced resource: %v", path) + return ResourceKey{ + Kind: resourceInfoByPlural[unescapeName(m[1])].kind, + Namespace: unescapeName(m[2]), + Name: unescapeName(m[3]), + } } else if m := matchPolicy.FindStringSubmatch(path); m != nil { log.Debugf("Path is a policy: %v", path) return PolicyKey{ @@ -220,9 +490,6 @@ func KeyFromDefaultPath(path string) Key { log.Debugf("Path is a profile: %v (%v)", path, m[2]) pk := ProfileKey{unescapeName(m[1])} switch m[2] { - case "tags": - log.Debugf("Profile tags") - return ProfileTagsKey{ProfileKey: pk} case "rules": log.Debugf("Profile rules") return ProfileRulesKey{ProfileKey: pk} @@ -234,6 +501,9 @@ func KeyFromDefaultPath(path string) Key { } else if m := matchHostIp.FindStringSubmatch(path); m != nil { log.Debugf("Path is a host ID: %v", path) return HostIPKey{Hostname: m[1]} + } else if m := matchWireguard.FindStringSubmatch(path); m != nil { + log.Debugf("Path is a node name: %v", path) + return WireguardKey{NodeName: m[1]} } else if m := matchIPPool.FindStringSubmatch(path); m != nil { log.Debugf("Path is a pool: %v", path) mungedCIDR := m[1] @@ -261,14 +531,6 @@ func KeyFromDefaultPath(path string) Key { return k } else if k := (BlockListOptions{}).KeyFromDefaultPath(path); k != nil { return k - } else if k := (ResourceListOptions{Kind: v3.KindNode}).KeyFromDefaultPath(path); k != nil { - return k - } else if k := (ResourceListOptions{Kind: v3.KindBGPPeer}).KeyFromDefaultPath(path); k != nil { - return k - } else if k := (ResourceListOptions{Kind: v3.KindNetworkPolicy}).KeyFromDefaultPath(path); k != nil { - return k - } else if k := (ResourceListOptions{Kind: v3.KindIPPool}).KeyFromDefaultPath(path); k != nil { - return k } else if k := (HostEndpointStatusListOptions{}).KeyFromDefaultPath(path); k != nil { return k } else if k := (WorkloadEndpointStatusListOptions{}).KeyFromDefaultPath(path); k != nil { @@ -304,7 +566,7 @@ func ParseValue(key Key, rawData []byte) (interface{}, error) { if ip == nil { return nil, nil } - return &net.IP{ip}, nil + return &net.IP{IP: ip}, nil } value := reflect.New(valueType) elem := value.Elem() @@ -342,7 +604,7 @@ func ParseValue(key Key, rawData []byte) (interface{}, error) { return iface, nil } -// Serialize a value in the model to a []byte to stored in the datastore. This +// SerializeValue serializes a value in the model to a []byte to be stored in the datastore. This // performs the opposite processing to ParseValue() func SerializeValue(d *KVPair) ([]byte, error) { valueType, err := d.Key.valueType() diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/scope/scope.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/kubeendpointslice.go similarity index 77% rename from vendor/github.com/projectcalico/libcalico-go/lib/scope/scope.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/kubeendpointslice.go index d6935045e..ffffa55e0 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/scope/scope.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/kubeendpointslice.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Tigera, Inc. All rights reserved. +// Copyright (c) 2021 Tigera, 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. @@ -12,12 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package scope - -type Scope string +package model const ( - Undefined Scope = "" - Global = "global" - Node = "node" + KindKubernetesEndpointSlice = "KubernetesEndpointSlice" ) diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/namespace/resource.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/kubenetworkpolicy.go similarity index 63% rename from vendor/github.com/projectcalico/libcalico-go/lib/namespace/resource.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/kubenetworkpolicy.go index ab5a42c2f..2580e52a0 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/namespace/resource.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/kubenetworkpolicy.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2019 Tigera, Inc. All rights reserved. +// Copyright (c) 2021 Tigera, 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. @@ -12,15 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package namespace +package model -import apiv3 "github.com/projectcalico/libcalico-go/lib/apis/v3" - -func IsNamespaced(kind string) bool { - switch kind { - case apiv3.KindWorkloadEndpoint, apiv3.KindNetworkPolicy, apiv3.KindNetworkSet: - return true - default: - return false - } -} +const ( + KindKubernetesNetworkPolicy = "KubernetesNetworkPolicy" +) diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/scope/doc.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/kubeservice.go similarity index 56% rename from vendor/github.com/projectcalico/libcalico-go/lib/scope/doc.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/kubeservice.go index 01b755ab7..b77fcead5 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/scope/doc.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/kubeservice.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Tigera, Inc. All rights reserved. +// Copyright (c) 2021 Tigera, 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. @@ -12,12 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* -Package scope implements field types that represent different scopes for resource -types. For example, a resource may be valid at the global scope in that applies to -all Calico nodes, or may be at a node scope in that applies to a specific node. +package model -The internal representation is an integer, but the JSON serialization of these -values is a string. -*/ -package scope +const ( + KindKubernetesService = "KubernetesService" +) diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/name.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/name.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/name.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/name.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/globalnetworkset.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/networkset.go similarity index 85% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/globalnetworkset.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/networkset.go index c8dda187e..faa61f23b 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/globalnetworkset.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/networkset.go @@ -21,9 +21,10 @@ import ( "reflect" - "github.com/projectcalico/libcalico-go/lib/errors" - "github.com/projectcalico/libcalico-go/lib/net" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/net" ) var ( @@ -88,6 +89,7 @@ func (options NetworkSetListOptions) KeyFromDefaultPath(path string) Key { } type NetworkSet struct { - Nets []net.IPNet `json:"nets,omitempty" validate:"omitempty,dive,cidr"` - Labels map[string]string `json:"labels,omitempty" validate:"omitempty,labels"` + Nets []net.IPNet `json:"nets,omitempty" validate:"omitempty,dive,cidr"` + Labels map[string]string `json:"labels,omitempty" validate:"omitempty,labels"` + ProfileIDs []string `json:"profile_ids,omitempty" validate:"omitempty,dive,name"` } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/node.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/node.go similarity index 75% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/node.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/node.go index 9e9715264..2a648a6d4 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/node.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/node.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Tigera, Inc. All rights reserved. +// Copyright (c) 2016,2020 Tigera, 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. @@ -21,10 +21,12 @@ import ( "reflect" - "github.com/projectcalico/libcalico-go/lib/errors" - "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/numorstring" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/api/pkg/lib/numorstring" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/net" ) var ( @@ -32,8 +34,10 @@ var ( typeHostMetadata = reflect.TypeOf(HostMetadata{}) typeOrchRefs = reflect.TypeOf([]OrchRef{}) typeHostIp = rawIPType + typeWireguard = reflect.TypeOf(Wireguard{}) matchHostMetadata = regexp.MustCompile(`^/?calico/v1/host/([^/]+)/metadata$`) matchHostIp = regexp.MustCompile(`^/?calico/v1/host/([^/]+)/bird_ip$`) + matchWireguard = regexp.MustCompile(`^/?calico/v1/host/([^/]+)/wireguard$`) ) type Node struct { @@ -57,6 +61,13 @@ type OrchRef struct { NodeName string `json:"nodeName,omitempty"` } +type Wireguard struct { + InterfaceIPv4Addr *net.IP `json:"interfaceIPv4Addr,omitempty"` + PublicKey string `json:"publicKey,omitempty"` + InterfaceIPv6Addr *net.IP `json:"interfaceIPv6Addr,omitempty"` + PublicKeyV6 string `json:"publicKeyV6,omitempty"` +} + type NodeKey struct { Hostname string } @@ -218,3 +229,54 @@ func (options OrchRefListOptions) defaultPathRoot() string { func (options OrchRefListOptions) KeyFromDefaultPath(path string) Key { return OrchRefKey{Hostname: options.Hostname} } + +// The Felix Wireguard Key. +type WireguardKey struct { + NodeName string +} + +func (key WireguardKey) defaultPath() (string, error) { + if key.NodeName == "" { + return "", errors.ErrorInsufficientIdentifiers{Name: "name"} + } + return fmt.Sprintf("/calico/v1/host/%s/wireguard", + key.NodeName), nil +} + +func (key WireguardKey) defaultDeletePath() (string, error) { + return key.defaultPath() +} + +func (key WireguardKey) defaultDeleteParentPaths() ([]string, error) { + return nil, nil +} + +func (key WireguardKey) valueType() (reflect.Type, error) { + return typeWireguard, nil +} + +func (key WireguardKey) String() string { + return fmt.Sprintf("Node(nodename=%s)", key.NodeName) +} + +type WireguardListOptions struct { + NodeName string +} + +func (options WireguardListOptions) defaultPathRoot() string { + if options.NodeName == "" { + return "/calico/v1/host" + } else { + return fmt.Sprintf("/calico/v1/host/%s/wireguard", options.NodeName) + } +} + +func (options WireguardListOptions) KeyFromDefaultPath(path string) Key { + log.Debugf("Get Node key from %s", path) + if r := matchWireguard.FindAllStringSubmatch(path, -1); len(r) == 1 { + return WireguardKey{NodeName: r[0][1]} + } else { + log.Debugf("%s didn't match regex", path) + return nil + } +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/policy.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/policy.go similarity index 98% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/policy.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/policy.go index 958f65538..3f13f124f 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/policy.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/policy.go @@ -22,8 +22,9 @@ import ( "strings" - "github.com/projectcalico/libcalico-go/lib/errors" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/profile.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/profile.go similarity index 87% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/profile.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/profile.go index 0cfcdf03e..0b5c3a856 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/profile.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/profile.go @@ -22,12 +22,13 @@ import ( "sort" - "github.com/projectcalico/libcalico-go/lib/errors" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( - matchProfile = regexp.MustCompile("^/?calico/v1/policy/profile/([^/]+)/(tags|rules|labels)$") + matchProfile = regexp.MustCompile("^/?calico/v1/policy/profile/([^/]+)/(rules|labels)$") typeProfile = reflect.TypeOf(Profile{}) ) @@ -80,24 +81,6 @@ func (key ProfileRulesKey) String() string { return fmt.Sprintf("ProfileRules(name=%s)", key.Name) } -// ProfileTagsKey implements the KeyInterface for the profile tags -type ProfileTagsKey struct { - ProfileKey -} - -func (key ProfileTagsKey) defaultPath() (string, error) { - e, err := key.ProfileKey.defaultPath() - return e + "/tags", err -} - -func (key ProfileTagsKey) valueType() (reflect.Type, error) { - return reflect.TypeOf([]string{}), nil -} - -func (key ProfileTagsKey) String() string { - return fmt.Sprintf("ProfileTags(name=%s)", key.Name) -} - // ProfileLabelsKey implements the KeyInterface for the profile labels type ProfileLabelsKey struct { ProfileKey @@ -144,8 +127,6 @@ func (options ProfileListOptions) KeyFromDefaultPath(path string) Key { } pk := ProfileKey{Name: name} switch kind { - case "tags": - return ProfileTagsKey{ProfileKey: pk} case "labels": return ProfileLabelsKey{ProfileKey: pk} case "rules": @@ -174,8 +155,6 @@ func (_ *ProfileListOptions) ListConvert(ds []*KVPair) []*KVPair { var name string for _, d := range ds { switch t := d.Key.(type) { - case ProfileTagsKey: - name = t.Name case ProfileLabelsKey: name = t.Name case ProfileRulesKey: @@ -197,10 +176,6 @@ func (_ *ProfileListOptions) ListConvert(ds []*KVPair) []*KVPair { p := pd.Value.(*Profile) switch t := d.Value.(type) { - case []string: // must be tags #TODO should type these - log.Debugf("Store tags %v", t) - p.Tags = t - pd.Revision = d.Revision case map[string]string: // must be labels log.Debugf("Store labels %v", t) p.Labels = t diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/region.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/region.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/region.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/region.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/resource.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/resource.go similarity index 75% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/resource.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/resource.go index b8100744c..b0a5ea844 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/resource.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/resource.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Tigera, Inc. All rights reserved. +// Copyright (c) 2016-2021 Tigera, 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. @@ -22,33 +22,40 @@ import ( log "github.com/sirupsen/logrus" - apiv3 "github.com/projectcalico/libcalico-go/lib/apis/v3" - "github.com/projectcalico/libcalico-go/lib/namespace" + kapiv1 "k8s.io/api/core/v1" + discovery "k8s.io/api/discovery/v1" + + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + + libapiv3 "github.com/projectcalico/calico/libcalico-go/lib/apis/v3" + "github.com/projectcalico/calico/libcalico-go/lib/namespace" ) // Name/type information about a single resource. type resourceInfo struct { - typeOf reflect.Type - plural string - kind string + typeOf reflect.Type + plural string + kindLower string + kind string } var ( matchGlobalResource = regexp.MustCompile("^/calico/resources/v3/projectcalico[.]org/([^/]+)/([^/]+)$") matchNamespacedResource = regexp.MustCompile("^/calico/resources/v3/projectcalico[.]org/([^/]+)/([^/]+)/([^/]+)$") - resourceInfoByKind = make(map[string]resourceInfo) + resourceInfoByKindLower = make(map[string]resourceInfo) resourceInfoByPlural = make(map[string]resourceInfo) ) func registerResourceInfo(kind string, plural string, typeOf reflect.Type) { - kind = strings.ToLower(kind) + kindLower := strings.ToLower(kind) plural = strings.ToLower(plural) ri := resourceInfo{ - typeOf: typeOf, - kind: kind, - plural: plural, + typeOf: typeOf, + kindLower: kindLower, + kind: kind, + plural: plural, } - resourceInfoByKind[kind] = ri + resourceInfoByKindLower[kindLower] = ri resourceInfoByPlural[plural] = ri } @@ -93,20 +100,40 @@ func init() { "ippools", reflect.TypeOf(apiv3.IPPool{}), ) + registerResourceInfo( + apiv3.KindIPReservation, + "ipreservations", + reflect.TypeOf(apiv3.IPReservation{}), + ) registerResourceInfo( apiv3.KindNetworkPolicy, "networkpolicies", reflect.TypeOf(apiv3.NetworkPolicy{}), ) + registerResourceInfo( + KindKubernetesNetworkPolicy, + "kubernetesnetworkpolicies", + reflect.TypeOf(apiv3.NetworkPolicy{}), + ) + registerResourceInfo( + KindKubernetesEndpointSlice, + "kubernetesendpointslices", + reflect.TypeOf(discovery.EndpointSlice{}), + ) registerResourceInfo( apiv3.KindNetworkSet, "networksets", reflect.TypeOf(apiv3.NetworkSet{}), ) registerResourceInfo( - apiv3.KindNode, + libapiv3.KindNode, "nodes", - reflect.TypeOf(apiv3.Node{}), + reflect.TypeOf(libapiv3.Node{}), + ) + registerResourceInfo( + apiv3.KindCalicoNodeStatus, + "caliconodestatuses", + reflect.TypeOf(apiv3.CalicoNodeStatus{}), ) registerResourceInfo( apiv3.KindProfile, @@ -114,9 +141,33 @@ func init() { reflect.TypeOf(apiv3.Profile{}), ) registerResourceInfo( - apiv3.KindWorkloadEndpoint, + libapiv3.KindWorkloadEndpoint, "workloadendpoints", - reflect.TypeOf(apiv3.WorkloadEndpoint{}), + reflect.TypeOf(libapiv3.WorkloadEndpoint{}), + ) + registerResourceInfo( + libapiv3.KindIPAMConfig, + "ipamconfigs", + reflect.TypeOf(libapiv3.IPAMConfig{}), + ) + registerResourceInfo( + apiv3.KindKubeControllersConfiguration, + "kubecontrollersconfigurations", + reflect.TypeOf(apiv3.KubeControllersConfiguration{})) + registerResourceInfo( + KindKubernetesService, + "kubernetesservice", + reflect.TypeOf(kapiv1.Service{}), + ) + registerResourceInfo( + libapiv3.KindBlockAffinity, + "blockaffinities", + reflect.TypeOf(libapiv3.BlockAffinity{}), + ) + registerResourceInfo( + apiv3.KindBGPFilter, + "BGPFilters", + reflect.TypeOf(apiv3.BGPFilter{}), ) } @@ -134,7 +185,7 @@ func (key ResourceKey) defaultPath() (string, error) { } func (key ResourceKey) defaultDeletePath() (string, error) { - ri, ok := resourceInfoByKind[strings.ToLower(key.Kind)] + ri, ok := resourceInfoByKindLower[strings.ToLower(key.Kind)] if !ok { return "", fmt.Errorf("couldn't convert key: %+v", key) } @@ -149,7 +200,7 @@ func (key ResourceKey) defaultDeleteParentPaths() ([]string, error) { } func (key ResourceKey) valueType() (reflect.Type, error) { - ri, ok := resourceInfoByKind[strings.ToLower(key.Kind)] + ri, ok := resourceInfoByKindLower[strings.ToLower(key.Kind)] if !ok { return nil, fmt.Errorf("Unexpected resource kind: " + key.Kind) } @@ -184,7 +235,7 @@ func (options ResourceListOptions) IsLastSegmentIsPrefix() bool { } func (options ResourceListOptions) KeyFromDefaultPath(path string) Key { - ri, ok := resourceInfoByKind[strings.ToLower(options.Kind)] + ri, ok := resourceInfoByKindLower[strings.ToLower(options.Kind)] if !ok { log.Panic("Unexpected resource kind: " + options.Kind) } @@ -231,7 +282,7 @@ func (options ResourceListOptions) KeyFromDefaultPath(path string) Key { kindPlural := r[0][1] name := r[0][2] if kindPlural != ri.plural { - log.Debugf("Didn't match kind %s != %s", kindPlural, kindPlural) + log.Debugf("Didn't match kind %s != %s", kindPlural, ri.plural) return nil } if len(options.Name) != 0 { @@ -247,7 +298,7 @@ func (options ResourceListOptions) KeyFromDefaultPath(path string) Key { } func (options ResourceListOptions) defaultPathRoot() string { - ri, ok := resourceInfoByKind[strings.ToLower(options.Kind)] + ri, ok := resourceInfoByKindLower[strings.ToLower(options.Kind)] if !ok { log.Panic("Unexpected resource kind: " + options.Kind) } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/rule.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/rule.go similarity index 84% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/rule.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/rule.go index 6f12a66d4..b99942cff 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/rule.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/rule.go @@ -19,9 +19,10 @@ import ( "strconv" "strings" - apiv3 "github.com/projectcalico/libcalico-go/lib/apis/v3" - "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/numorstring" + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + "github.com/projectcalico/api/pkg/lib/numorstring" + + "github.com/projectcalico/calico/libcalico-go/lib/net" ) type Rule struct { @@ -40,16 +41,20 @@ type Rule struct { NotICMPType *int `json:"!icmp_type,omitempty" validate:"omitempty,gte=0,lt=255"` NotICMPCode *int `json:"!icmp_code,omitempty" validate:"omitempty,gte=0,lte=255"` - SrcTag string `json:"src_tag,omitempty" validate:"omitempty,tag"` - SrcNet *net.IPNet `json:"src_net,omitempty" validate:"omitempty"` - SrcNets []*net.IPNet `json:"src_nets,omitempty" validate:"omitempty"` - SrcSelector string `json:"src_selector,omitempty" validate:"omitempty,selector"` - SrcPorts []numorstring.Port `json:"src_ports,omitempty" validate:"omitempty,dive"` - DstTag string `json:"dst_tag,omitempty" validate:"omitempty,tag"` - DstSelector string `json:"dst_selector,omitempty" validate:"omitempty,selector"` - DstNet *net.IPNet `json:"dst_net,omitempty" validate:"omitempty"` - DstNets []*net.IPNet `json:"dst_nets,omitempty" validate:"omitempty"` - DstPorts []numorstring.Port `json:"dst_ports,omitempty" validate:"omitempty,dive"` + SrcTag string `json:"src_tag,omitempty" validate:"omitempty,tag"` + SrcNet *net.IPNet `json:"src_net,omitempty" validate:"omitempty"` + SrcNets []*net.IPNet `json:"src_nets,omitempty" validate:"omitempty"` + SrcSelector string `json:"src_selector,omitempty" validate:"omitempty,selector"` + SrcPorts []numorstring.Port `json:"src_ports,omitempty" validate:"omitempty,dive"` + SrcService string `json:"src_service,omitempty" validate:"omitempty"` + SrcServiceNamespace string `json:"src_service_ns,omitempty" validate:"omitempty"` + DstTag string `json:"dst_tag,omitempty" validate:"omitempty,tag"` + DstSelector string `json:"dst_selector,omitempty" validate:"omitempty,selector"` + DstNet *net.IPNet `json:"dst_net,omitempty" validate:"omitempty"` + DstNets []*net.IPNet `json:"dst_nets,omitempty" validate:"omitempty"` + DstPorts []numorstring.Port `json:"dst_ports,omitempty" validate:"omitempty,dive"` + DstService string `json:"dst_service,omitempty" validate:"omitempty"` + DstServiceNamespace string `json:"dst_service_ns,omitempty" validate:"omitempty"` NotSrcTag string `json:"!src_tag,omitempty" validate:"omitempty,tag"` NotSrcNet *net.IPNet `json:"!src_net,omitempty" validate:"omitempty"` @@ -80,6 +85,8 @@ type Rule struct { HTTPMatch *HTTPMatch `json:"http,omitempty" validate:"omitempty"` LogPrefix string `json:"log_prefix,omitempty" validate:"omitempty"` + + Metadata *RuleMetadata `json:"metadata,omitempty" validate:"omitempty"` } type HTTPMatch struct { @@ -87,6 +94,10 @@ type HTTPMatch struct { Paths []apiv3.HTTPPath `json:"paths,omitempty" validate:"omitempty"` } +type RuleMetadata struct { + Annotations map[string]string `json:"annotations,omitempty"` +} + func combineNets(n *net.IPNet, nets []*net.IPNet) []*net.IPNet { if n == nil { return nets diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/statusreports.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/statusreports.go similarity index 98% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/statusreports.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/statusreports.go index 289d1295e..c770ac109 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/statusreports.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/statusreports.go @@ -20,8 +20,9 @@ import ( "regexp" "strings" - "github.com/projectcalico/libcalico-go/lib/errors" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/workloadendpoint.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/workloadendpoint.go similarity index 78% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/workloadendpoint.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/workloadendpoint.go index 0cd517521..e8893d40b 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/workloadendpoint.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/workloadendpoint.go @@ -21,10 +21,12 @@ import ( "reflect" - "github.com/projectcalico/libcalico-go/lib/errors" - "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/numorstring" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/api/pkg/lib/numorstring" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" + "github.com/projectcalico/calico/libcalico-go/lib/net" ) var ( @@ -148,20 +150,22 @@ func (options WorkloadEndpointListOptions) KeyFromDefaultPath(path string) Key { } type WorkloadEndpoint struct { - State string `json:"state"` - Name string `json:"name"` - ActiveInstanceID string `json:"active_instance_id"` - Mac *net.MAC `json:"mac"` - ProfileIDs []string `json:"profile_ids"` - IPv4Nets []net.IPNet `json:"ipv4_nets"` - IPv6Nets []net.IPNet `json:"ipv6_nets"` - IPv4NAT []IPNAT `json:"ipv4_nat,omitempty"` - IPv6NAT []IPNAT `json:"ipv6_nat,omitempty"` - Labels map[string]string `json:"labels,omitempty"` - IPv4Gateway *net.IP `json:"ipv4_gateway,omitempty" validate:"omitempty,ipv4"` - IPv6Gateway *net.IP `json:"ipv6_gateway,omitempty" validate:"omitempty,ipv6"` - Ports []EndpointPort `json:"ports,omitempty" validate:"dive"` - GenerateName string `json:"generate_name,omitempty"` + State string `json:"state"` + Name string `json:"name"` + ActiveInstanceID string `json:"active_instance_id"` + Mac *net.MAC `json:"mac"` + ProfileIDs []string `json:"profile_ids"` + IPv4Nets []net.IPNet `json:"ipv4_nets"` + IPv6Nets []net.IPNet `json:"ipv6_nets"` + IPv4NAT []IPNAT `json:"ipv4_nat,omitempty"` + IPv6NAT []IPNAT `json:"ipv6_nat,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + IPv4Gateway *net.IP `json:"ipv4_gateway,omitempty" validate:"omitempty,ipv4"` + IPv6Gateway *net.IP `json:"ipv6_gateway,omitempty" validate:"omitempty,ipv6"` + Ports []EndpointPort `json:"ports,omitempty" validate:"dive"` + GenerateName string `json:"generate_name,omitempty"` + AllowSpoofedSourcePrefixes []net.IPNet `json:"allow_spoofed_source_ips,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` } type EndpointPort struct { diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/workloadendpointstatus.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/workloadendpointstatus.go similarity index 98% rename from vendor/github.com/projectcalico/libcalico-go/lib/backend/model/workloadendpointstatus.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/workloadendpointstatus.go index 6cee93c5b..8eaf10d75 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/backend/model/workloadendpointstatus.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/backend/model/workloadendpointstatus.go @@ -22,8 +22,9 @@ import ( "reflect" - "github.com/projectcalico/libcalico-go/lib/errors" log "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/errors" ) var ( diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/errors/doc.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/errors/doc.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/errors/doc.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/errors/doc.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/errors/errors.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/errors/errors.go similarity index 59% rename from vendor/github.com/projectcalico/libcalico-go/lib/errors/errors.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/errors/errors.go index 280293026..164d71b73 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/errors/errors.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/errors/errors.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Tigera, Inc. All rights reserved. +// Copyright (c) 2020 Tigera, 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. @@ -16,6 +16,11 @@ package errors import ( "fmt" + "net/http" + + networkingv1 "k8s.io/api/networking/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // Error indicating a problem connecting to the backend. @@ -28,8 +33,25 @@ func (e ErrorDatastoreError) Error() string { return e.Err.Error() } +func (e ErrorDatastoreError) Status() metav1.Status { + if i, ok := e.Err.(apierrors.APIStatus); ok { + return i.Status() + } + + // Just wrap in a status error. + return metav1.Status{ + Status: metav1.StatusFailure, + Code: http.StatusBadRequest, + Reason: metav1.StatusReasonInvalid, + Message: fmt.Sprintf(e.Error()), + Details: &metav1.StatusDetails{ + Name: fmt.Sprintf("%v", e.Identifier), + }, + } +} + // Error indicating a resource does not exist. Used when attempting to delete or -// udpate a non-existent resource. +// update a non-existent resource. type ErrorResourceDoesNotExist struct { Err error Identifier interface{} @@ -100,7 +122,7 @@ func (e ErroredField) String() string { func (e ErrorValidation) Error() string { if len(e.ErroredFields) == 0 { - return fmt.Sprintf("unknown validation error: %v", e) + return "unknown validation error" } else if len(e.ErroredFields) == 1 { f := e.ErroredFields[0] return fmt.Sprintf("error with field %s", f) @@ -133,9 +155,33 @@ func (e ErrorResourceUpdateConflict) Error() string { return fmt.Sprintf("update conflict: %v", e.Identifier) } +// Error indicating that the caller has attempted to release an IP address using +// outdated information. +type ErrorBadHandle struct { + Requested string + Expected string +} + +func (e ErrorBadHandle) Error() string { + f := "the given handle (%s) does not match (%s) when attempting to release IP" + return fmt.Sprintf(f, e.Requested, e.Expected) +} + +// Error indicating that the caller has attempted to release an IP address using +// outdated information. +type ErrorBadSequenceNumber struct { + Requested uint64 + Expected uint64 +} + +func (e ErrorBadSequenceNumber) Error() string { + f := "the given sequence number (%d) does not match (%d) when attempting to release IP" + return fmt.Sprintf(f, e.Requested, e.Expected) +} + // Error indicating that the operation may have partially succeeded, then // failed, without rolling back. A common example is when a function failed -// in an acceptable way after it succesfully wrote some data to the datastore. +// in an acceptable way after it successfully wrote some data to the datastore. type ErrorPartialFailure struct { Err error } @@ -171,16 +217,6 @@ func UpdateErrorIdentifier(err error, id interface{}) error { return err } -// Error indicating the watcher has been terminated. -type ErrorWatchTerminated struct { - Err error - ClosedByRemote bool -} - -func (e ErrorWatchTerminated) Error() string { - return fmt.Sprintf("watch terminated (closedByRemote:%v): %v", e.ClosedByRemote, e.Err) -} - // Error indicating the datastore has failed to parse an entry. type ErrorParsingDatastoreEntry struct { RawKey string @@ -191,3 +227,84 @@ type ErrorParsingDatastoreEntry struct { func (e ErrorParsingDatastoreEntry) Error() string { return fmt.Sprintf("failed to parse datastore entry key=%s; value=%s: %v", e.RawKey, e.RawValue, e.Err) } + +type ErrorPolicyConversionRule struct { + EgressRule *networkingv1.NetworkPolicyEgressRule + IngressRule *networkingv1.NetworkPolicyIngressRule + Reason string +} + +func (e ErrorPolicyConversionRule) String() string { + var fieldString string + + switch { + case e.EgressRule != nil: + fieldString = fmt.Sprintf("%+v", e.EgressRule) + case e.IngressRule != nil: + fieldString = fmt.Sprintf("%+v", e.IngressRule) + default: + fieldString = "unknown rule" + } + + if e.Reason != "" { + fieldString = fmt.Sprintf("%s (%s)", fieldString, e.Reason) + } + + return fieldString +} + +type ErrorPolicyConversion struct { + PolicyName string + Rules []ErrorPolicyConversionRule +} + +func (e *ErrorPolicyConversion) BadEgressRule(rule *networkingv1.NetworkPolicyEgressRule, reason string) { + // Copy rule + badRule := *rule + + e.Rules = append(e.Rules, ErrorPolicyConversionRule{ + EgressRule: &badRule, + IngressRule: nil, + Reason: reason, + }) +} + +func (e *ErrorPolicyConversion) BadIngressRule( + rule *networkingv1.NetworkPolicyIngressRule, reason string) { + // Copy rule + badRule := *rule + + e.Rules = append(e.Rules, ErrorPolicyConversionRule{ + EgressRule: nil, + IngressRule: &badRule, + Reason: reason, + }) +} + +func (e ErrorPolicyConversion) Error() string { + s := fmt.Sprintf("policy: %s", e.PolicyName) + + switch { + case len(e.Rules) == 0: + s += ": unknown policy conversion error" + case len(e.Rules) == 1: + f := e.Rules[0] + + s += fmt.Sprintf(": error with rule %s", f) + default: + s += ": error with the following rules:\n" + for _, f := range e.Rules { + s += fmt.Sprintf("- %s\n", f) + } + } + + return s +} + +func (e ErrorPolicyConversion) GetError() error { + if len(e.Rules) == 0 { + return nil + } + + return e +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/errors/panic.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/errors/panic.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/errors/panic.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/errors/panic.go diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/lib/json/json.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/json/json.go new file mode 100644 index 000000000..b08deed39 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/json/json.go @@ -0,0 +1,27 @@ +// Copyright (c) 2022 Tigera, 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 json + +import jsoniter "github.com/json-iterator/go" + +// Marshal is a drop in replacement for encoding/json.Marshall, which uses jsoniter for better performance. +func Marshal(v any) ([]byte, error) { + return jsoniter.ConfigCompatibleWithStandardLibrary.Marshal(v) +} + +// Unmarshal is a drop in replacement for encoding/json.Unmarshal which uses jsoniter for better performance. +func Unmarshal(data []byte, v any) error { + return jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal(data, v) +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/names/cidr.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/names/cidr.go similarity index 94% rename from vendor/github.com/projectcalico/libcalico-go/lib/names/cidr.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/names/cidr.go index cd6ac3ed4..73d01a1c9 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/names/cidr.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/names/cidr.go @@ -17,8 +17,9 @@ package names import ( "strings" - "github.com/projectcalico/libcalico-go/lib/net" "github.com/sirupsen/logrus" + + "github.com/projectcalico/calico/libcalico-go/lib/net" ) // CIDRToName converts a CIDR to a valid resource name. diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/names/hostname.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/names/hostname.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/names/hostname.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/names/hostname.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/names/workloadendpoint.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/names/workloadendpoint.go similarity index 96% rename from vendor/github.com/projectcalico/libcalico-go/lib/names/workloadendpoint.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/names/workloadendpoint.go index e195254f9..f1f907fad 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/names/workloadendpoint.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/names/workloadendpoint.go @@ -20,7 +20,7 @@ import ( "reflect" "strings" - cerrors "github.com/projectcalico/libcalico-go/lib/errors" + cerrors "github.com/projectcalico/calico/libcalico-go/lib/errors" ) // WorkloadEndpointIdentifiers is a collection of identifiers that are used to uniquely @@ -40,10 +40,10 @@ import ( // NameMatches() method. This is necessary because a prefix match may return endpoints // that do not exactly match the required identifiers. For example, suppose you are // querying endpoints with node=node1, orch=k8s, pod=pod and endpoints is wild carded: -// - The name prefix would be `node1-k8s-pod-` -// - A list query using that prefix would also return endpoints with, for example, -// a pod call "pod-1", because the name of the endpoint might be `node1-k8s-pod--1-eth0` -// which matches the required name prefix. +// - The name prefix would be `node1-k8s-pod-` +// - A list query using that prefix would also return endpoints with, for example, +// a pod call "pod-1", because the name of the endpoint might be `node1-k8s-pod--1-eth0` +// which matches the required name prefix. // // The Node and Orchestrator are always required for both prefix and non-prefix name // construction. @@ -236,7 +236,7 @@ var ( // instance with fields populated according to the WorkloadEndpoint name format. func ParseWorkloadEndpointName(wepName string) (WorkloadEndpointIdentifiers, error) { if len(wepName) == 0 { - return WorkloadEndpointIdentifiers{}, errors.New("Cannot parse emty string") + return WorkloadEndpointIdentifiers{}, errors.New("Cannot parse empty string") } parts := extractParts(wepName) if parts == nil || len(parts) == 0 { diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/lib/namespace/resource.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/namespace/resource.go new file mode 100644 index 000000000..79e1fade8 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/namespace/resource.go @@ -0,0 +1,48 @@ +// Copyright (c) 2017-2021 Tigera, 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 namespace + +import ( + apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3" + + libapiv3 "github.com/projectcalico/calico/libcalico-go/lib/apis/v3" +) + +const ( + // Re-implement the model constants here + // to avoid an import loop. + KindKubernetesNetworkPolicy = "KubernetesNetworkPolicy" + KindKubernetesEndpointSlice = "KubernetesEndpointSlice" + KindKubernetesService = "KubernetesService" +) + +func IsNamespaced(kind string) bool { + switch kind { + case libapiv3.KindWorkloadEndpoint, apiv3.KindNetworkPolicy, apiv3.KindNetworkSet: + return true + case KindKubernetesNetworkPolicy: + // KindKubernetesNetworkPolicy is a special-case resource. We don't expose it over the + // v3 API, but it is used in the felix syncer to implement the Kubernetes NetworkPolicy API. + return true + case KindKubernetesEndpointSlice: + // KindKubernetesEndpointSlice is a special-case resource. We don't expose it over the + // v3 API, but it is used in the felix syncer. + return true + case KindKubernetesService: + return true + } + + return false +} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/net/doc.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/net/doc.go similarity index 100% rename from vendor/github.com/projectcalico/libcalico-go/lib/net/doc.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/net/doc.go diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/net/ip.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/net/ip.go similarity index 82% rename from vendor/github.com/projectcalico/libcalico-go/lib/net/ip.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/net/ip.go index 2577ef888..620ed3339 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/net/ip.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/net/ip.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2019 Tigera, Inc. All rights reserved. +// Copyright (c) 2016-2021 Tigera, 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. @@ -15,9 +15,10 @@ package net import ( - "encoding/json" "math/big" "net" + + "github.com/projectcalico/calico/libcalico-go/lib/json" ) // Sub class net.IP so that we can add JSON marshalling and unmarshalling. @@ -91,7 +92,7 @@ func (i *IP) Network() *IPNet { return n } -// MustParseIP parses the string into a IP. +// MustParseIP parses the string into an IP. func MustParseIP(i string) IP { var ip IP err := ip.UnmarshalText([]byte(i)) @@ -114,12 +115,21 @@ func IPToBigInt(ip IP) *big.Int { } } -func BigIntToIP(ipInt *big.Int) IP { - ip := IP{net.IP(ipInt.Bytes())} - return ip +func BigIntToIP(ipInt *big.Int, v6 bool) IP { + var netIP net.IP + // Older versions of this code tried to guess v4/v6 based on the length of the big.Int + // but then we can't tell the difference between 0.0.0.0/0 and ::/0. + if v6 { + netIP = make(net.IP, 16) + } else { + netIP = make(net.IP, 4) + } + ipInt.FillBytes(netIP) + return IP{netIP} } func IncrementIP(ip IP, increment *big.Int) IP { + expectingV6 := ip.To4() == nil sum := big.NewInt(0).Add(IPToBigInt(ip), increment) - return BigIntToIP(sum) + return BigIntToIP(sum, expectingV6) } diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/net/ipnet.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/net/ipnet.go similarity index 80% rename from vendor/github.com/projectcalico/libcalico-go/lib/net/ipnet.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/net/ipnet.go index 13ccaae2f..fb400e338 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/net/ipnet.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/net/ipnet.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2016-2017,2021 Tigera, 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. @@ -15,8 +15,10 @@ package net import ( - "encoding/json" + "math/big" "net" + + "github.com/projectcalico/calico/libcalico-go/lib/json" ) // Sub class net.IPNet so that we can add JSON marshalling and unmarshalling. @@ -61,6 +63,21 @@ func (i IPNet) IsNetOverlap(n net.IPNet) bool { return n.Contains(i.IP) || i.Contains(n.IP) } +// Covers returns true if the whole of n is covered by this CIDR. +func (i IPNet) Covers(n net.IPNet) bool { + if !i.Contains(n.IP) { + return false + } // else start of n is within our bounds, what about the end... + nPrefixLen, _ := n.Mask.Size() + iPrefixLen, _ := i.Mask.Size() + return iPrefixLen <= nPrefixLen +} + +func (i IPNet) NthIP(n int) IP { + bigN := big.NewInt(int64(n)) + return IncrementIP(IP{i.IP}, bigN) +} + // Network returns the masked IP network. func (i *IPNet) Network() *IPNet { _, n, _ := ParseCIDR(i.String()) @@ -118,7 +135,14 @@ func (i IPNet) String() string { return ip.String() } -// MustParseNetwork parses the string into a IPNet. The IP address in the +func (i IPNet) NumAddrs() *big.Int { + ones, bits := i.Mask.Size() + zeros := bits - ones + numAddrs := big.NewInt(1) + return numAddrs.Lsh(numAddrs, uint(zeros)) +} + +// MustParseNetwork parses the string into an IPNet. The IP address in the // IPNet is masked. func MustParseNetwork(c string) IPNet { _, cidr, err := ParseCIDR(c) @@ -128,7 +152,7 @@ func MustParseNetwork(c string) IPNet { return *cidr } -// MustParseCIDR parses the string into a IPNet. The IP address in the +// MustParseCIDR parses the string into an IPNet. The IP address in the // IPNet is not masked. func MustParseCIDR(c string) IPNet { ip, cidr, err := ParseCIDR(c) diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/net/mac.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/net/mac.go similarity index 95% rename from vendor/github.com/projectcalico/libcalico-go/lib/net/mac.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/net/mac.go index 3dfe5818c..a8013e93e 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/net/mac.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/net/mac.go @@ -15,8 +15,9 @@ package net import ( - "encoding/json" "net" + + "github.com/projectcalico/calico/libcalico-go/lib/json" ) // Sub class net.HardwareAddr so that we can add JSON marshalling and unmarshalling. diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/lib/set/boxed.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/set/boxed.go new file mode 100644 index 000000000..2ecbeea12 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/set/boxed.go @@ -0,0 +1,166 @@ +// Copyright (c) 2016-2022 Tigera, 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 set + +import ( + "bytes" + "fmt" + + log "github.com/sirupsen/logrus" +) + +// NewBoxed creates a new "boxed" Set, where the items stored in the set are boxed inside an interface. The values +// placed into the set must be comparable (i.e. suitable for use as a map key). This is checked at runtime and the +// code will panic on trying to add a non-comparable entry. +// +// This implementation exists because Go's generics currently have a gap. The type set of the "comparable" +// constraint currently doesn't include interface types, which under Go's normal rules _are_ comparable (but may +// panic at runtime if the interface happens to contain a non-comparable object). If possible use a typed map +// via New() or From(); use this if you really need a Set[any] or Set[SomeInterface]. +func NewBoxed[T any]() Boxed[T] { + return make(Boxed[T]) +} + +func FromBoxed[T any](members ...T) Boxed[T] { + s := NewBoxed[T]() + s.AddAll(members) + return s +} + +func FromArrayBoxed[T any](membersArray []T) Boxed[T] { + s := NewBoxed[T]() + s.AddAll(membersArray) + return s +} + +func Empty[T any]() Set[T] { + return (Boxed[T])(nil) +} + +type Boxed[T any] map[any]v + +func (set Boxed[T]) String() string { + var buf bytes.Buffer + _, _ = buf.WriteString("set.Set{") + first := true + set.Iter(func(item T) error { + if !first { + buf.WriteString(",") + } else { + first = false + } + _, _ = fmt.Fprint(&buf, item) + return nil + }) + _, _ = buf.WriteString("}") + return buf.String() +} + +func (set Boxed[T]) Len() int { + return len(set) +} + +func (set Boxed[T]) Add(item T) { + set[item] = emptyValue +} + +func (set Boxed[T]) AddAll(itemArray []T) { + for _, v := range itemArray { + set.Add(v) + } +} + +// AddSet adds the contents of set "other" into the set. +func (set Boxed[T]) AddSet(other Set[T]) { + other.Iter(func(item T) error { + set.Add(item) + return nil + }) +} + +func (set Boxed[T]) Discard(item T) { + delete(set, item) +} + +func (set Boxed[T]) Clear() { + for item := range set { + delete(set, item) + } +} + +func (set Boxed[T]) Contains(item T) bool { + _, present := set[item] + return present +} + +func (set Boxed[T]) Iter(visitor func(item T) error) { +loop: + for item := range set { + item := item.(T) + err := visitor(item) + switch err { + case StopIteration: + break loop + case RemoveItem: + delete(set, item) + case nil: + break + default: + log.WithError(err).Panic("Unexpected iteration error") + } + } +} + +func (set Boxed[T]) Copy() Set[T] { + cpy := NewBoxed[T]() + for item := range set { + item := item.(T) + cpy.Add(item) + } + return cpy +} + +func (set Boxed[T]) Slice() (s []T) { + for item := range set { + item := item.(T) + s = append(s, item) + } + return +} + +func (set Boxed[T]) Equals(other Set[T]) bool { + if set.Len() != other.Len() { + return false + } + for item := range set { + item := item.(T) + if !other.Contains(item) { + return false + } + } + return true +} + +func (set Boxed[T]) ContainsAll(other Set[T]) bool { + result := true + other.Iter(func(item T) error { + if !set.Contains(item) { + result = false + return StopIteration + } + return nil + }) + return result +} diff --git a/vendor/github.com/projectcalico/calico/libcalico-go/lib/set/interface.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/set/interface.go new file mode 100644 index 000000000..4521dbf71 --- /dev/null +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/set/interface.go @@ -0,0 +1,42 @@ +// 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 set + +import ( + "errors" + "fmt" +) + +type Set[T any] interface { + Len() int + Add(T) + AddAll(itemArray []T) + AddSet(other Set[T]) + Discard(T) + Clear() + Contains(T) bool + Iter(func(item T) error) + Copy() Set[T] + Equals(Set[T]) bool + ContainsAll(Set[T]) bool + Slice() []T + fmt.Stringer +} + +var ( + StopIteration = errors.New("stop iteration") + RemoveItem = errors.New("remove item") +) + +type v struct{} + +var emptyValue = v{} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/set/set.go b/vendor/github.com/projectcalico/calico/libcalico-go/lib/set/set.go similarity index 50% rename from vendor/github.com/projectcalico/libcalico-go/lib/set/set.go rename to vendor/github.com/projectcalico/calico/libcalico-go/lib/set/set.go index 3577d9bce..ce9a6f346 100644 --- a/vendor/github.com/projectcalico/libcalico-go/lib/set/set.go +++ b/vendor/github.com/projectcalico/calico/libcalico-go/lib/set/set.go @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved. +// Copyright (c) 2016-2022 Tigera, 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. @@ -15,88 +15,85 @@ package set import ( - "errors" - "reflect" + "bytes" + "fmt" log "github.com/sirupsen/logrus" ) -type Set interface { - Len() int - Add(interface{}) - AddAll(itemArray interface{}) - Discard(interface{}) - Clear() - Contains(interface{}) bool - Iter(func(item interface{}) error) - Copy() Set - Equals(Set) bool - ContainsAll(Set) bool +func New[T comparable]() Typed[T] { + return make(Typed[T]) } -type empty struct{} - -var emptyValue = empty{} - -var ( - StopIteration = errors.New("Stop iteration") - RemoveItem = errors.New("Remove item") -) - -func New() Set { - return make(mapSet) -} - -func From(members ...interface{}) Set { - s := New() +func From[T comparable](members ...T) Typed[T] { + s := New[T]() s.AddAll(members) return s } -func FromArray(membersArray interface{}) Set { - s := New() +func FromArray[T comparable](membersArray []T) Typed[T] { + s := New[T]() s.AddAll(membersArray) return s } -func Empty() Set { - return mapSet(nil) +type Typed[T comparable] map[T]v + +func (set Typed[T]) String() string { + var buf bytes.Buffer + _, _ = buf.WriteString("set.Set{") + first := true + set.Iter(func(item T) error { + if !first { + buf.WriteString(",") + } else { + first = false + } + _, _ = fmt.Fprint(&buf, item) + return nil + }) + _, _ = buf.WriteString("}") + return buf.String() } -type mapSet map[interface{}]empty - -func (set mapSet) Len() int { +func (set Typed[T]) Len() int { return len(set) } -func (set mapSet) Add(item interface{}) { +func (set Typed[T]) Add(item T) { set[item] = emptyValue } -func (set mapSet) AddAll(itemArray interface{}) { - - arrVal := reflect.ValueOf(itemArray) - for i := 0; i < arrVal.Len(); i++ { - set.Add(arrVal.Index(i).Interface()) +func (set Typed[T]) AddAll(itemArray []T) { + for _, v := range itemArray { + set.Add(v) } } -func (set mapSet) Discard(item interface{}) { +// AddSet adds the contents of set "other" into the set. +func (set Typed[T]) AddSet(other Set[T]) { + other.Iter(func(item T) error { + set.Add(item) + return nil + }) +} + +func (set Typed[T]) Discard(item T) { delete(set, item) } -func (set mapSet) Clear() { +func (set Typed[T]) Clear() { for item := range set { delete(set, item) } } -func (set mapSet) Contains(item interface{}) bool { +func (set Typed[T]) Contains(item T) bool { _, present := set[item] return present } -func (set mapSet) Iter(visitor func(item interface{}) error) { +func (set Typed[T]) Iter(visitor func(item T) error) { loop: for item := range set { err := visitor(item) @@ -113,15 +110,22 @@ loop: } } -func (set mapSet) Copy() Set { - cpy := New() +func (set Typed[T]) Copy() Set[T] { + cpy := New[T]() for item := range set { cpy.Add(item) } return cpy } -func (set mapSet) Equals(other Set) bool { +func (set Typed[T]) Slice() (s []T) { + for item := range set { + s = append(s, item) + } + return +} + +func (set Typed[T]) Equals(other Set[T]) bool { if set.Len() != other.Len() { return false } @@ -133,9 +137,9 @@ func (set mapSet) Equals(other Set) bool { return true } -func (set mapSet) ContainsAll(other Set) bool { +func (set Typed[T]) ContainsAll(other Set[T]) bool { result := true - other.Iter(func(item interface{}) error { + other.Iter(func(item T) error { if !set.Contains(item) { result = false return StopIteration diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/apiconfig.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/apiconfig.go deleted file mode 100644 index 770c37c9d..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/apiconfig.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2016-2017 Tigera, 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 v1 - -import "github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned" - -type DatastoreType string - -const ( - EtcdV2 DatastoreType = "etcdv2" - Kubernetes DatastoreType = "kubernetes" -) - -// CalicoAPIConfig contains the connection information for a Calico CalicoAPIConfig resource -type CalicoAPIConfig struct { - unversioned.TypeMetadata - Metadata CalicoAPIConfigMetadata `json:"metadata,omitempty"` - Spec CalicoAPIConfigSpec `json:"spec,omitempty"` -} - -// CalicoAPIConfigMetadata contains the metadata for a Calico CalicoAPIConfig resource. -type CalicoAPIConfigMetadata struct { - unversioned.ObjectMetadata -} - -// CalicoAPIConfigSpec contains the specification for a Calico CalicoAPIConfig resource. -type CalicoAPIConfigSpec struct { - DatastoreType DatastoreType `json:"datastoreType" envconfig:"APIV1_DATASTORE_TYPE" default:"etcdv2"` - - // Inline the ectd config fields - EtcdConfig - - // Inline the k8s config fields. - KubeConfig -} - -type EtcdConfig struct { - EtcdScheme string `json:"etcdScheme" envconfig:"APIV1_ETCD_SCHEME" default:""` - EtcdAuthority string `json:"etcdAuthority" envconfig:"APIV1_ETCD_AUTHORITY" default:""` - EtcdEndpoints string `json:"etcdEndpoints" envconfig:"APIV1_ETCD_ENDPOINTS"` - EtcdDiscoverySrv string `json:"etcdDiscoverySrv" envconfig:"APIV1_ETCD_DISCOVERY_SRV"` - EtcdUsername string `json:"etcdUsername" envconfig:"APIV1_ETCD_USERNAME"` - EtcdPassword string `json:"etcdPassword" envconfig:"APIV1_ETCD_PASSWORD"` - EtcdKeyFile string `json:"etcdKeyFile" envconfig:"APIV1_ETCD_KEY_FILE"` - EtcdCertFile string `json:"etcdCertFile" envconfig:"APIV1_ETCD_CERT_FILE"` - EtcdCACertFile string `json:"etcdCACertFile" envconfig:"APIV1_ETCD_CA_CERT_FILE"` -} - -type KubeConfig struct { - Kubeconfig string `json:"kubeconfig" envconfig:"APIV1_KUBECONFIG" default:""` - K8sAPIEndpoint string `json:"k8sAPIEndpoint" envconfig:"APIV1_K8S_API_ENDPOINT" default:""` - K8sKeyFile string `json:"k8sKeyFile" envconfig:"APIV1_K8S_KEY_FILE" default:""` - K8sCertFile string `json:"k8sCertFile" envconfig:"APIV1_K8S_CERT_FILE" default:""` - K8sCAFile string `json:"k8sCAFile" envconfig:"APIV1_K8S_CA_FILE" default:""` - K8sAPIToken string `json:"k8sAPIToken" ignore:"true"` - K8sInsecureSkipTLSVerify bool `json:"k8sInsecureSkipTLSVerify" envconfig:"APIV1_K8S_INSECURE_SKIP_TLS_VERIFY" default:""` - K8sDisableNodePoll bool `json:"k8sDisableNodePoll" envconfig:"APIV1_K8S_DISABLE_NODE_POLL" default:""` -} - -// NewCalicoAPIConfig creates a new (zeroed) CalicoAPIConfig struct with the -// TypeMetadata initialised to the current version. -func NewCalicoAPIConfig() *CalicoAPIConfig { - return &CalicoAPIConfig{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "calicoApiConfig", - APIVersion: unversioned.VersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/bgppeer.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/bgppeer.go deleted file mode 100644 index dce7852ee..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/bgppeer.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 2016 Tigera, 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 v1 - -import ( - "fmt" - - "github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned" - "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/numorstring" - "github.com/projectcalico/libcalico-go/lib/scope" -) - -// BGPPeer contains information about a BGP peer resource that is a peer of a Calico -// compute node. -type BGPPeer struct { - unversioned.TypeMetadata - - // Metadata for a BGPPeer. - Metadata BGPPeerMetadata `json:"metadata,omitempty"` - - // Specification for a BGPPeer. - Spec BGPPeerSpec `json:"spec,omitempty"` -} - -func (t BGPPeer) GetResourceMetadata() unversioned.ResourceMetadata { - return t.Metadata -} - -// String() returns the human-readable string representation of a BGPPeer instance -// which is defined by its PeerIP and Scope. -func (t BGPPeer) String() string { - if t.Metadata.Scope == scope.Node && t.Metadata.Node == "" { - return fmt.Sprintf("BGPPeer(PeerIP=%s, Scope=%s)", t.Metadata.PeerIP.IP.String(), t.Metadata.Scope) - } - return fmt.Sprintf("BGPPeer(PeerIP=%s, Scope=%s, Node=%s)", t.Metadata.PeerIP.IP.String(), t.Metadata.Scope, t.Metadata.Node) -} - -// BGPPeerMetadata contains the metadata for a BGPPeer resource. -type BGPPeerMetadata struct { - unversioned.ObjectMetadata - - // The scope of the peer. This may be global or node. A global peer is a - // BGP device that peers with all Calico nodes. A node peer is a BGP device that - // peers with the specified Calico node (specified by the node hostname). - Scope scope.Scope `json:"scope" validate:"omitempty,scopeglobalornode"` - - // The node name identifying the Calico node instance that is peering with this peer. - // When modifying a BGP peer, the node must be specified when the scope is `node`, and - // must be omitted when the scope is `global`. - Node string `json:"node,omitempty" validate:"omitempty,name"` - - // The IP address of the peer. - PeerIP net.IP `json:"peerIP" validate:"omitempty"` -} - -// BGPPeerSpec contains the specification for a BGPPeer resource. -type BGPPeerSpec struct { - // The AS Number of the peer. - ASNumber numorstring.ASNumber `json:"asNumber"` -} - -// NewBGPPeer creates a new (zeroed) BGPPeer struct with the TypeMetadata initialised to the current -// version. -func NewBGPPeer() *BGPPeer { - return &BGPPeer{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "bgpPeer", - APIVersion: unversioned.VersionCurrent, - }, - } -} - -// BGPPeerList contains a list of BGP Peer resources. List types are returned from List() -// enumerations in the client interface. -type BGPPeerList struct { - unversioned.TypeMetadata - Metadata unversioned.ListMetadata `json:"metadata,omitempty"` - Items []BGPPeer `json:"items" validate:"dive"` -} - -// NewBGPPeerList creates a new (zeroed) BGPPeerList struct with the TypeMetadata initialised to the current -// version. -func NewBGPPeerList() *BGPPeerList { - return &BGPPeerList{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "bgpPeerList", - APIVersion: unversioned.VersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/doc.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/doc.go deleted file mode 100644 index ce54fc7c4..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/doc.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2016 Tigera, 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 v1 implements the struct definitions used on the northbound client API. - -In particular this includes: - - The various resource types as exposed on the Northbound API. The valid resource - types are: - - BGPPeer - - HostEndpoint - - Policy - - Pool - - Profile - - The client configuration - -The resource structures include the JSON tags for each exposed field. These are standard -go-lang tags that define the JSON format of the structures as used by calicoctl. The YAML -format also used by calicoctl is directly mapped from the JSON. -*/ -package v1 diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/hostendpoint.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/hostendpoint.go deleted file mode 100644 index 3403df1e8..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/hostendpoint.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2016-2017 Tigera, 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 v1 - -import ( - "fmt" - - "github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned" - "github.com/projectcalico/libcalico-go/lib/net" -) - -// HostEndpoint contains information about a “bare-metal” interfaces attached to the host that is -// running Calico’s agent, Felix. By default, Calico doesn’t apply any policy to such interfaces. -type HostEndpoint struct { - unversioned.TypeMetadata - Metadata HostEndpointMetadata `json:"metadata,omitempty"` - Spec HostEndpointSpec `json:"spec,omitempty"` -} - -func (t HostEndpoint) GetResourceMetadata() unversioned.ResourceMetadata { - return t.Metadata -} - -// String() returns the human-readable string representation of a HostEndpoint instance -// which is defined by its Node and Name. -func (t HostEndpoint) String() string { - return fmt.Sprintf("HostEndpoint(Node=%s, Name=%s)", t.Metadata.Node, t.Metadata.Name) -} - -// HostEndpointMetadata contains the Metadata for a HostEndpoint resource. -type HostEndpointMetadata struct { - unversioned.ObjectMetadata - - // The name of the endpoint. - Name string `json:"name,omitempty" validate:"omitempty,namespacedName"` - - // The node name identifying the Calico node instance. - Node string `json:"node,omitempty" validate:"omitempty,name"` - - // The labels applied to the host endpoint. It is expected that many endpoints share - // the same labels. For example, they could be used to label all “production” workloads - // with “deployment=prod” so that security policy can be applied to production workloads. - Labels map[string]string `json:"labels,omitempty" validate:"omitempty,labels"` -} - -// HostEndpointSpec contains the specification for a HostEndpoint resource. -type HostEndpointSpec struct { - // The name of the linux interface to apply policy to; for example “eth0”. - // If "InterfaceName" is not present then at least one expected IP must be specified. - InterfaceName string `json:"interfaceName,omitempty" validate:"omitempty,interface"` - - // The expected IP addresses (IPv4 and IPv6) of the endpoint. - // If "InterfaceName" is not present, Calico will look for an interface matching any - // of the IPs in the list and apply policy to that. - // - // Note: - // When using the selector|tag match criteria in an ingress or egress security Policy - // or Profile, Calico converts the selector into a set of IP addresses. For host - // endpoints, the ExpectedIPs field is used for that purpose. (If only the interface - // name is specified, Calico does not learn the IPs of the interface for use in match - // criteria.) - ExpectedIPs []net.IP `json:"expectedIPs,omitempty" validate:"omitempty"` - - // A list of identifiers of security Profile objects that apply to this endpoint. Each - // profile is applied in the order that they appear in this list. Profile rules are applied - // after the selector-based security policy. - Profiles []string `json:"profiles,omitempty" validate:"omitempty,dive,namespacedName"` - - // Ports contains the endpoint's named ports, which may be referenced in security policy rules. - Ports []EndpointPort `json:"ports,omitempty" validate:"omitempty,dive"` -} - -// NewHostEndpoint creates a new (zeroed) HostEndpoint struct with the TypeMetadata initialised to the current -// version. -func NewHostEndpoint() *HostEndpoint { - return &HostEndpoint{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "hostEndpoint", - APIVersion: unversioned.VersionCurrent, - }, - } -} - -// HostEndpointList contains a list of Host Endpoint resources. List types are returned from List() -// enumerations in the client interface. -type HostEndpointList struct { - unversioned.TypeMetadata - Metadata unversioned.ListMetadata `json:"metadata,omitempty"` - Items []HostEndpoint `json:"items" validate:"dive"` -} - -// NewHostEndpoint creates a new (zeroed) HostEndpointList struct with the TypeMetadata initialised to the current -// version. -func NewHostEndpointList() *HostEndpointList { - return &HostEndpointList{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "hostEndpointList", - APIVersion: unversioned.VersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/ippool.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/ippool.go deleted file mode 100644 index de90071e2..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/ippool.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2016 Tigera, 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 v1 - -import ( - "fmt" - - "github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned" - "github.com/projectcalico/libcalico-go/lib/backend/encap" - "github.com/projectcalico/libcalico-go/lib/net" -) - -// IPPool contains the details of a Calico IP pool resource. -// A pool resource is used by Calico in two ways: -// - to provide a set of IP addresses from which Calico IPAM assigns addresses -// for workloads. -// - to provide configuration specific to IP address range, such as configuration -// for the BGP daemon (e.g. when to use a GRE tunnel to encapsulate packets -// between compute hosts). -type IPPool struct { - unversioned.TypeMetadata - Metadata IPPoolMetadata `json:"metadata,omitempty"` - Spec IPPoolSpec `json:"spec,omitempty"` -} - -func (t IPPool) GetResourceMetadata() unversioned.ResourceMetadata { - return t.Metadata -} - -// String() returns the human-readable string representation of an IPPool instance -// which is defined by its CIDR. -func (t IPPool) String() string { - return fmt.Sprintf("IPPool(CIDR=%s)", t.Metadata.CIDR.String()) -} - -// IPPoolMetadata contains the metadata for an IP pool resource. -type IPPoolMetadata struct { - unversioned.ObjectMetadata - CIDR net.IPNet `json:"cidr"` -} - -// IPPoolSpec contains the specification for an IP pool resource. -type IPPoolSpec struct { - // Contains configuration for ipip tunneling for this pool. If not specified, - // then ipip tunneling is disabled for this pool. - IPIP *IPIPConfiguration `json:"ipip,omitempty"` - - // When nat-outgoing is true, packets sent from Calico networked containers in - // this pool to destinations outside of this pool will be masqueraded. - NATOutgoing bool `json:"nat-outgoing,omitempty"` - - // When disabled is true, Calico IPAM will not assign addresses from this pool. - Disabled bool `json:"disabled,omitempty"` -} - -type IPIPConfiguration struct { - // When enabled is true, ipip tunneling will be used to deliver packets to - // destinations within this pool. - Enabled bool `json:"enabled,omitempty"` - - // The IPIP mode. This can be one of "always" or "cross-subnet". A mode - // of "always" will also use IPIP tunneling for routing to destination IP - // addresses within this pool. A mode of "cross-subnet" will only use IPIP - // tunneling when the destination node is on a different subnet to the - // originating node. The default value (if not specified) is "always". - Mode encap.Mode `json:"mode,omitempty" validate:"ipIpMode"` -} - -// NewIPPool creates a new (zeroed) Pool struct with the TypeMetadata initialised to the current -// version. -func NewIPPool() *IPPool { - return &IPPool{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "ipPool", - APIVersion: unversioned.VersionCurrent, - }, - } -} - -// IPPoolList contains a list of IP pool resources. List types are returned from List() -// enumerations in the client interface. -type IPPoolList struct { - unversioned.TypeMetadata - Metadata unversioned.ListMetadata `json:"metadata,omitempty"` - Items []IPPool `json:"items" validate:"dive"` -} - -// NewIPPool creates a new (zeroed) PoolList struct with the TypeMetadata initialised to the current -// version. -func NewIPPoolList() *IPPoolList { - return &IPPoolList{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "ipPoolList", - APIVersion: unversioned.VersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/node.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/node.go deleted file mode 100644 index f975a6a16..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/node.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2016 Tigera, 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 v1 - -import ( - "fmt" - - "github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned" - "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/numorstring" -) - -// Node contains the details of a node resource which contains the configuration -// for a Calico node instance running on a compute host. -// -// In addition to creating a Node resource through calicoctl or the Calico API, -// the Calico node instance must also be running on the specific host and should be -// provided the same Name as that configured on the Node resource. Note that, by -// default, the Calico node instance uses the hostname of the compute host when it -// is not explicitly specified - in this case, the equivalent Node resource should -// be created using the same hostname as the Name of the Node resource. -// -// Operations on the Node resources is expected to be required when adding a new -// host into a Calico network, and when removing a host from a Calico network, and -// occasionally to modify certain configuration. Care should be taken when operating -// on Node resources: deleting a Node resource will remove all Node specific data. -type Node struct { - unversioned.TypeMetadata - Metadata NodeMetadata `json:"metadata,omitempty"` - Spec NodeSpec `json:"spec,omitempty"` -} - -func (t Node) GetResourceMetadata() unversioned.ResourceMetadata { - return t.Metadata -} - -// String() returns the human-readable string representation of a Node instance -// which is defined by its Name. -func (t Node) String() string { - return fmt.Sprintf("Node(Name=%s)", t.Metadata.Name) -} - -// NodeMetadata contains the metadata for a Calico Node resource. -type NodeMetadata struct { - unversioned.ObjectMetadata - - // The name of the node. - Name string `json:"name,omitempty" validate:"omitempty,name"` -} - -// NodeSpec contains the specification for a Calico Node resource. -type NodeSpec struct { - // BGP configuration for this node. If this omitted, the Calico node - // will be run in policy-only mode. - BGP *NodeBGPSpec `json:"bgp,omitempty" validate:"omitempty"` - - // OrchRefs for this node. - OrchRefs []OrchRef `json:"orchRefs,omitempty" validate:"omitempty"` -} - -// OrchRef is used to correlate a Calico node to its corresponding representation in a given orchestrator -type OrchRef struct { - // NodeName represents the name for this node according to the orchestrator. - NodeName string `json:"nodeName,omitempty" validate:"omitempty"` - // Orchestrator represents the orchestrator using this node. - Orchestrator string `json:"orchestrator"` -} - -// NodeSpec contains the specification for a Calico Node resource. -type NodeBGPSpec struct { - // The AS Number of the node. If this is not specified, the global - // default value will be used. - ASNumber *numorstring.ASNumber `json:"asNumber,omitempty"` - - // IPv4Address is the IPv4 address and network of this node. At least - // one of the IPv4 and IPv6 addresses should be specified. - IPv4Address *net.IPNet `json:"ipv4Address,omitempty" validate:"omitempty"` - - // IPv6Address is the IPv6 address and network of this node. At least - // one of the IPv4 and IPv6 addresses should be specified. - IPv6Address *net.IPNet `json:"ipv6Address,omitempty" validate:"omitempty"` -} - -// NewNode creates a new (zeroed) NodeList struct with the TypeMetadata initialised to the current -// version. -func NewNode() *Node { - return &Node{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "node", - APIVersion: unversioned.VersionCurrent, - }, - } -} - -// A NodeList contains a list of Node resources. List types are returned from List() -// enumerations on the client interface. -type NodeList struct { - unversioned.TypeMetadata - Metadata unversioned.ListMetadata `json:"metadata,omitempty"` - Items []Node `json:"items" validate:"dive,omitempty"` -} - -// NewNodeList creates a new (zeroed) NodeList struct with the TypeMetadata initialised to the current -// version. -func NewNodeList() *NodeList { - return &NodeList{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "nodeList", - APIVersion: unversioned.VersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/policy.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/policy.go deleted file mode 100644 index 7a343991e..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/policy.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) 2016 Tigera, 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 v1 - -import ( - "fmt" - - "github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned" -) - -// Policy contains information about a security Policy resource. This contains a set of -// security rules to apply. Security policies allow a selector-based security model which can override -// the security profiles directly referenced by an endpoint. -// -// Each policy must do one of the following: -// -// - Match the packet and apply an “allow” action; this immediately accepts the packet, skipping -// all further policies and profiles. This is not recommended in general, because it prevents -// further policy from being executed. -// - Match the packet and apply a “deny” action; this drops the packet immediately, skipping all -// further policy and profiles. -// - Fail to match the packet; in which case the packet proceeds to the next policy. If there -// are no more policies then the packet is dropped. -// -// Calico implements the security policy for each endpoint individually and only the policies that -// have matching selectors are implemented. This ensures that the number of rules that actually need -// to be inserted into the kernel is proportional to the number of local endpoints rather than the -// total amount of policy. -type Policy struct { - unversioned.TypeMetadata - Metadata PolicyMetadata `json:"metadata,omitempty"` - Spec PolicySpec `json:"spec,omitempty"` -} - -func (t Policy) GetResourceMetadata() unversioned.ResourceMetadata { - return t.Metadata -} - -// String() returns the human-readable string representation of a Policy instance -// which is defined by its Name. -func (t Policy) String() string { - return fmt.Sprintf("Policy(Name=%s)", t.Metadata.Name) -} - -// PolicyMetadata contains the metadata for a selector-based security Policy resource. -type PolicyMetadata struct { - unversioned.ObjectMetadata - - // The name of the selector-based security policy. - Name string `json:"name,omitempty" validate:"omitempty,namespacedName"` - - // Arbitrary key-value information to be used by clients. - Annotations map[string]string `json:"annotations,omitempty" validate:"omitempty"` -} - -// PolicySpec contains the specification for a selector-based security Policy resource. -type PolicySpec struct { - // Order is an optional field that specifies the order in which the policy is applied. - // Policies with higher "order" are applied after those with lower - // order. If the order is omitted, it may be considered to be "infinite" - i.e. the - // policy will be applied last. Policies with identical order will be applied in - // alphanumerical order based on the Policy "Name". - Order *float64 `json:"order,omitempty"` - - // The ordered set of ingress rules. Each rule contains a set of packet match criteria and - // a corresponding action to apply. - IngressRules []Rule `json:"ingress,omitempty" validate:"omitempty,dive"` - - // The ordered set of egress rules. Each rule contains a set of packet match criteria and - // a corresponding action to apply. - EgressRules []Rule `json:"egress,omitempty" validate:"omitempty,dive"` - - // The selector is an expression used to pick pick out the endpoints that the policy should - // be applied to. - // - // Selector expressions follow this syntax: - // - // label == "string_literal" -> comparison, e.g. my_label == "foo bar" - // label != "string_literal" -> not equal; also matches if label is not present - // label in { "a", "b", "c", ... } -> true if the value of label X is one of "a", "b", "c" - // label not in { "a", "b", "c", ... } -> true if the value of label X is not one of "a", "b", "c" - // has(label_name) -> True if that label is present - // ! expr -> negation of expr - // expr && expr -> Short-circuit and - // expr || expr -> Short-circuit or - // ( expr ) -> parens for grouping - // all() or the empty selector -> matches all endpoints. - // - // Label names are allowed to contain alphanumerics, -, _ and /. String literals are more permissive - // but they do not support escape characters. - // - // Examples (with made-up labels): - // - // type == "webserver" && deployment == "prod" - // type in {"frontend", "backend"} - // deployment != "dev" - // ! has(label_name) - Selector string `json:"selector" validate:"selector"` - - // DoNotTrack indicates whether packets matched by the rules in this policy should go through - // the data plane's connection tracking, such as Linux conntrack. If True, the rules in - // this policy are applied before any data plane connection tracking, and packets allowed by - // this policy are marked as not to be tracked. - DoNotTrack bool `json:"doNotTrack,omitempty"` - - // PreDNAT indicates to apply the rules in this policy before any DNAT. - PreDNAT bool `json:"preDNAT,omitempty"` - - // Types indicates whether this policy applies to ingress, or to egress, or to both. When - // not explicitly specified (and so the value on creation is empty or nil), Calico defaults - // Types according to what IngressRules and EgressRules are present in the policy. The - // default is: - // - // - [ PolicyTypeIngress ], if there are no EgressRules (including the case where there are - // also no IngressRules) - // - // - [ PolicyTypeEgress ], if there are EgressRules but no IngressRules - // - // - [ PolicyTypeIngress, PolicyTypeEgress ], if there are both IngressRules and EgressRules. - // - // When the policy is read back again, Types will always be one of these values, never empty - // or nil. - Types []PolicyType `json:"types,omitempty" validate:"omitempty,dive,policyType"` -} - -// PolicyType enumerates the possible values of the PolicySpec Types field. -type PolicyType string - -const ( - PolicyTypeIngress PolicyType = "ingress" - PolicyTypeEgress PolicyType = "egress" -) - -// NewPolicy creates a new (zeroed) Policy struct with the TypeMetadata initialised to the current -// version. -func NewPolicy() *Policy { - return &Policy{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "policy", - APIVersion: unversioned.VersionCurrent, - }, - } -} - -// PolicyList contains a list of selector-based security Policy resources. List types are returned from List() -// enumerations on the client interface. -type PolicyList struct { - unversioned.TypeMetadata - Metadata unversioned.ListMetadata `json:"metadata,omitempty"` - Items []Policy `json:"items" validate:"dive"` -} - -// NewPolicyList creates a new (zeroed) PolicyList struct with the TypeMetadata initialised to the current -// version. -func NewPolicyList() *PolicyList { - return &PolicyList{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "policyList", - APIVersion: unversioned.VersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/profile.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/profile.go deleted file mode 100644 index f2efe04f3..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/profile.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2016 Tigera, 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 v1 - -import ( - "fmt" - - "github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned" -) - -// Profile contains the details a security profile resource. A profile is set of security rules -// to apply on an endpoint. An endpoint (either a host endpoint or an endpoint on a workload) can -// reference zero or more profiles. The profile rules are applied directly to the endpoint *after* -// the selector-based security policy has been applied, and in the order the profiles are declared on the -// endpoint. -type Profile struct { - unversioned.TypeMetadata - Metadata ProfileMetadata `json:"metadata,omitempty"` - Spec ProfileSpec `json:"spec,omitempty"` -} - -func (t Profile) GetResourceMetadata() unversioned.ResourceMetadata { - return t.Metadata -} - -// String() returns the human-readable string representation of a Profile instance -// which is defined by its Name. -func (t Profile) String() string { - return fmt.Sprintf("Profile(Name=%s)", t.Metadata.Name) -} - -// ProfileMetadata contains the metadata for a security Profile resource. -type ProfileMetadata struct { - unversioned.ObjectMetadata - - // The name of the endpoint. - Name string `json:"name,omitempty" validate:"omitempty,namespacedName"` - - // A list of tags that are applied to each endpoint that references this profile. - Tags []string `json:"tags,omitempty" validate:"omitempty,dive,tag"` - - // The labels to apply to each endpoint that references this profile. It is expected - // that many endpoints share the same labels. For example, they could be used to label all - // “production” workloads with “deployment=prod” so that security policy can be applied - // to production workloads. - Labels map[string]string `json:"labels,omitempty" validate:"omitempty,labels"` -} - -// ProfileSpec contains the specification for a security Profile resource. -type ProfileSpec struct { - // The ordered set of ingress rules. Each rule contains a set of packet match criteria and - // a corresponding action to apply. - IngressRules []Rule `json:"ingress,omitempty" validate:"omitempty,dive"` - - // The ordered set of egress rules. Each rule contains a set of packet match criteria and - // a corresponding action to apply. - EgressRules []Rule `json:"egress,omitempty" validate:"omitempty,dive"` -} - -// NewProfile creates a new (zeroed) Profile struct with the TypeMetadata initialised to the current -// version. -func NewProfile() *Profile { - return &Profile{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "profile", - APIVersion: unversioned.VersionCurrent, - }, - } -} - -// A ProfileList contains a list of security Profile resources. List types are returned from List() -// enumerations on the client interface. -type ProfileList struct { - unversioned.TypeMetadata - Metadata unversioned.ListMetadata `json:"metadata,omitempty"` - Items []Profile `json:"items" validate:"dive,omitempty"` -} - -// NewProfile creates a new (zeroed) Profile struct with the TypeMetadata initialised to the current -// version. -func NewProfileList() *ProfileList { - return &ProfileList{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "profileList", - APIVersion: unversioned.VersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/rule.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/rule.go deleted file mode 100644 index 17bcb38ea..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/rule.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2016-2017 Tigera, 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 v1 - -import ( - "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/numorstring" -) - -// A Rule encapsulates a set of match criteria and an action. Both selector-based security Policy -// and security Profiles reference rules - separated out as a list of rules for both -// ingress and egress packet matching. -// -// Each positive match criteria has a negated version, prefixed with ”Not”. All the match -// criteria within a rule must be satisfied for a packet to match. A single rule can contain -// the positive and negative version of a match and both must be satisfied for the rule to match. -type Rule struct { - Action string `json:"action" validate:"action"` - - // IPVersion is an optional field that restricts the rule to only match a specific IP - // version. - IPVersion *int `json:"ipVersion,omitempty" validate:"omitempty,ipVersion"` - - // Protocol is an optional field that restricts the rule to only apply to traffic of - // a specific IP protocol. Required if any of the EntityRules contain Ports - // (because ports only apply to certain protocols). - // - // Must be one of these string values: "tcp", "udp", "icmp", "icmpv6", "sctp", "udplite" - // or an integer in the range 1-255. - Protocol *numorstring.Protocol `json:"protocol,omitempty" validate:"omitempty"` - - // ICMP is an optional field that restricts the rule to apply to a specific type and - // code of ICMP traffic. This should only be specified if the Protocol field is set to - // "icmp" or "icmpv6". - ICMP *ICMPFields `json:"icmp,omitempty" validate:"omitempty"` - - // NotProtocol is the negated version of the Protocol field. - NotProtocol *numorstring.Protocol `json:"notProtocol,omitempty" validate:"omitempty"` - - // NotICMP is the negated version of the ICMP field. - NotICMP *ICMPFields `json:"notICMP,omitempty" validate:"omitempty"` - - // Source contains the match criteria that apply to source entity. - Source EntityRule `json:"source,omitempty" validate:"omitempty"` - - // Destination contains the match criteria that apply to destination entity. - Destination EntityRule `json:"destination,omitempty" validate:"omitempty"` -} - -// ICMPFields defines structure for ICMP and NotICMP sub-struct for ICMP code and type -type ICMPFields struct { - // Match on a specific ICMP type. For example a value of 8 refers to ICMP Echo Request - // (i.e. pings). - Type *int `json:"type,omitempty" validate:"omitempty,gte=0,lte=254"` - - // Match on a specific ICMP code. If specified, the Type value must also be specified. - // This is a technical limitation imposed by the kernel’s iptables firewall, which - // Calico uses to enforce the rule. - Code *int `json:"code,omitempty" validate:"omitempty,gte=0,lte=255"` -} - -// An EntityRule is a sub-component of a Rule comprising the match criteria specific -// to a particular entity (that is either the source or destination). -// -// A source EntityRule matches the source endpoint and originating traffic. -// A destination EntityRule matches the destination endpoint and terminating traffic. -type EntityRule struct { - // Tag is an optional field that restricts the rule to only apply to traffic that - // originates from (or terminates at) endpoints that have profiles with the given tag - // in them. - Tag string `json:"tag,omitempty" validate:"omitempty,tag"` - - // Net is an optional field that restricts the rule to only apply to traffic that - // originates from (or terminates at) IP addresses in the given subnet. - // Deprecated: superseded by the Nets field. - Net *net.IPNet `json:"net,omitempty" validate:"omitempty"` - - // Nets is an optional field that restricts the rule to only apply to traffic that - // originates from (or terminates at) IP addresses in any of the given subnets. - Nets []*net.IPNet `json:"nets,omitempty" validate:"omitempty"` - - // Selector is an optional field that contains a selector expression (see Policy for - // sample syntax). Only traffic that originates from (terminates at) endpoints matching - // the selector will be matched. - // - // Note that: in addition to the negated version of the Selector (see NotSelector below), the - // selector expression syntax itself supports negation. The two types of negation are subtly - // different. One negates the set of matched endpoints, the other negates the whole match: - // - // Selector = "!has(my_label)" matches packets that are from other Calico-controlled - // endpoints that do not have the label “my_label”. - // - // NotSelector = "has(my_label)" matches packets that are not from Calico-controlled - // endpoints that do have the label “my_label”. - // - // The effect is that the latter will accept packets from non-Calico sources whereas the - // former is limited to packets from Calico-controlled endpoints. - Selector string `json:"selector,omitempty" validate:"omitempty,selector"` - - // Ports is an optional field that restricts the rule to only apply to traffic that has a - // source (destination) port that matches one of these ranges/values. This value is a - // list of integers or strings that represent ranges of ports. - // - // Since only some protocols have ports, if any ports are specified it requires the - // Protocol match in the Rule to be set to "tcp" or "udp". - Ports []numorstring.Port `json:"ports,omitempty" validate:"omitempty,dive"` - - // NotTag is the negated version of the Tag field. - NotTag string `json:"notTag,omitempty" validate:"omitempty,tag"` - - // NotNet is an optional field that restricts the rule to only apply to traffic that - // does not originate from (or terminate at) an IP address in the given subnet. - // Deprecated: superseded by NotNets. - NotNet *net.IPNet `json:"notNet,omitempty" validate:"omitempty"` - - // NotNets is an optional field that restricts the rule to only apply to traffic that - // does not originate from (or terminate at) an IP address in any of the given subnets. - NotNets []*net.IPNet `json:"notNets,omitempty" validate:"omitempty"` - - // NotSelector is the negated version of the Selector field. See Selector field for - // subtleties with negated selectors. - NotSelector string `json:"notSelector,omitempty" validate:"omitempty,selector"` - - // NotPorts is the negated version of the Ports field. - // - // Since only some protocols have ports, if any ports are specified it requires the - // Protocol match in the Rule to be set to "tcp" or "udp". - NotPorts []numorstring.Port `json:"notPorts,omitempty" validate:"omitempty,dive"` -} - -func combineNets(n *net.IPNet, nets []*net.IPNet) []*net.IPNet { - if n == nil { - return nets - } - if len(nets) == 0 { - return []*net.IPNet{n} - } - combined := make([]*net.IPNet, len(nets)+1) - copy(combined, nets) - combined[len(combined)-1] = n - return combined -} - -// GetNets returns either r.Nets or a slice containing r.Net. It is useful for unifying the -// two representations. -func (r EntityRule) GetNets() []*net.IPNet { - return combineNets(r.Net, r.Nets) -} - -// GetNets returns either r.NotNets or a slice containing NotNet. It is useful for unifying the -// two representations. -func (r EntityRule) GetNotNets() []*net.IPNet { - return combineNets(r.NotNet, r.NotNets) -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned/types.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned/types.go deleted file mode 100644 index 4a6369f17..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned/types.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2016 Tigera, 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 unversioned - -// All resources (and resource lists) implement the Resource interface. -type Resource interface { - GetTypeMetadata() TypeMetadata -} - -// All singular resources (all resources not including lists) implement the ResourceObject interface. -type ResourceObject interface { - Resource - - // GetResourceMetadata returns the ResourceMetadata for each Resource Object. - GetResourceMetadata() ResourceMetadata - - // String returns a human-readable string representation of a ResourceObject which - // includes the important ID fields for a ResourceObject. - String() string -} - -// Define available versions. -var ( - // `apiVersion` in the config yaml files - VersionV1 = "v1" - VersionCurrent = VersionV1 -) - -// ---- Type metadata ---- -// -// All resource and resource lists embed a TypeMetadata as an anonymous field. -type TypeMetadata struct { - Kind string `json:"kind"` - APIVersion string `json:"apiVersion"` -} - -func (md TypeMetadata) GetTypeMetadata() TypeMetadata { - return md -} - -// All resource Metadata (not lists) implement the ResourceMetadata interface. -type ResourceMetadata interface { - // GetObjectMetadata returns the ObjectMetadata instance of the ResourceMetadata. - GetObjectMetadata() ObjectMetadata -} - -// ---- Metadata common to all resources ---- -type ObjectMetadata struct { - // Object revision used to perform atomic updates and deletes. Currently - // only supported on Get and Delete operations of the WorkloadEndpoint - // resource type. - Revision string `json:"-"` -} - -func (md ObjectMetadata) GetObjectMetadata() ObjectMetadata { - return md -} - -// ---- Metadata common to all lists ---- -type ListMetadata struct { -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/workloadendpoint.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/workloadendpoint.go deleted file mode 100644 index 4e8672255..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v1/workloadendpoint.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2016-2017 Tigera, 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 v1 - -import ( - "fmt" - - "github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned" - "github.com/projectcalico/libcalico-go/lib/net" - "github.com/projectcalico/libcalico-go/lib/numorstring" -) - -type WorkloadEndpoint struct { - unversioned.TypeMetadata - Metadata WorkloadEndpointMetadata `json:"metadata,omitempty"` - Spec WorkloadEndpointSpec `json:"spec,omitempty"` -} - -func (t WorkloadEndpoint) GetResourceMetadata() unversioned.ResourceMetadata { - return t.Metadata -} - -// String() returns the human-readable string representation of a WorkloadEndpoint which is -// defined by its Node, Orchestrator, Workload, Name, and Active Instance ID (if it exists). -func (t WorkloadEndpoint) String() string { - if t.Metadata.ActiveInstanceID == "" { - return fmt.Sprintf("WorkloadEndpoint(Node=%s, Orchestrator=%s, Workload=%s, Name=%s)", t.Metadata.Node, t.Metadata.Orchestrator, t.Metadata.Workload, t.Metadata.Name) - } - return fmt.Sprintf("WorkloadEndpoint(Node=%s, Orchestrator=%s, Workload=%s, Name=%s, ActiveInstanceID=%s)", t.Metadata.Node, t.Metadata.Orchestrator, t.Metadata.Workload, t.Metadata.Name, t.Metadata.ActiveInstanceID) -} - -// WorkloadEndpointMetadata contains the Metadata for a WorkloadEndpoint resource. -type WorkloadEndpointMetadata struct { - unversioned.ObjectMetadata - - // The name of the endpoint. This may be omitted on a create, in which case an endpoint - // ID will be automatically created, and the endpoint ID will be included in the response. - Name string `json:"name,omitempty" validate:"omitempty,namespacedName"` - - // The name of the workload. - Workload string `json:"workload,omitempty" validate:"omitempty,namespacedName"` - - // The name of the orchestrator. - Orchestrator string `json:"orchestrator,omitempty" validate:"omitempty,namespacedName"` - - // The node name identifying the Calico node instance. - Node string `json:"node,omitempty" validate:"omitempty,name"` - - // ActiveInstanceID is an optional field that orchestrators may use to store additional - // information about the endpoint. The primary use case is to store a unique identifier - // for the active instance of a container. For example, with Calico CNI, a re-spawned - // container may use the same endpoint indexing (Node, Orchestrator, Workload, Endpoint) - // for the new container as for the old - the ActiveInstanceID is used to store an additional - // unique ID which the CNI plugin uses to determine whether the DEL operation needs to - // delete the Calico WorkloadEndpoint. - // This field is not an index field of the WorkloadEndpoint resource. - ActiveInstanceID string `json:"activeInstanceID,omitempty" validate:"omitempty,name"` - - // The labels applied to the workload endpoint. It is expected that many endpoints share - // the same labels. For example, they could be used to label all “production” workloads - // with “deployment=prod” so that security policy can be applied to production workloads. - Labels map[string]string `json:"labels,omitempty" validate:"omitempty,labels"` -} - -// WorkloadEndpointMetadata contains the specification for a WorkloadEndpoint resource. -type WorkloadEndpointSpec struct { - // IPNetworks is a list of subnets allocated to this endpoint. IP packets will only be - // allowed to leave this interface if they come from an address in one of these subnets. - // - // Currently only /32 for IPv4 and /128 for IPv6 networks are supported. - IPNetworks []net.IPNet `json:"ipNetworks,omitempty" validate:"omitempty"` - - // IPNATs is a list of 1:1 NAT mappings to apply to the endpoint. Inbound connections - // to the external IP will be forwarded to the internal IP. Connections initiated from the - // internal IP will not have their source address changed, except when an endpoint attempts - // to connect one of its own external IPs. Each internal IP must be associated with the same - // endpoint via the configured IPNetworks. - IPNATs []IPNAT `json:"ipNATs,omitempty" validate:"omitempty,dive"` - - // IPv4Gateway is the gateway IPv4 address for traffic from the workload. - IPv4Gateway *net.IP `json:"ipv4Gateway,omitempty" validate:"omitempty"` - - // IPv6Gateway is the gateway IPv6 address for traffic from the workload. - IPv6Gateway *net.IP `json:"ipv6Gateway,omitempty" validate:"omitempty"` - - // A list of security Profile resources that apply to this endpoint. Each profile is - // applied in the order that they appear in this list. Profile rules are applied - // after the selector-based security policy. - Profiles []string `json:"profiles,omitempty" validate:"omitempty,dive,namespacedName"` - - // InterfaceName the name of the Linux interface on the host: for example, tap80. - InterfaceName string `json:"interfaceName,omitempty" validate:"interface"` - - // MAC is the MAC address of the endpoint interface. - MAC *net.MAC `json:"mac,omitempty" validate:"omitempty,mac"` - - // Ports contains the endpoint's named ports, which may be referenced in security policy rules. - Ports []EndpointPort `json:"ports,omitempty" validate:"omitempty,dive"` -} - -// IPNat contains a single NAT mapping for a WorkloadEndpoint resource. -type IPNAT struct { - // The internal IP address which must be associated with the owning endpoint via the - // configured IPNetworks for the endpoint. - InternalIP net.IP `json:"internalIP"` - - // The external IP address. - ExternalIP net.IP `json:"externalIP"` -} - -type EndpointPort struct { - Name string `json:"name" validate:"name"` - Protocol numorstring.Protocol `json:"protocol"` - Port uint16 `json:"port" validate:"gt=0"` -} - -// String returns a friendly form of an IPNAT. -func (i IPNAT) String() string { - return fmt.Sprintf("%s<>%s", i.InternalIP, i.ExternalIP) -} - -// NewWorkloadEndpoint creates a new (zeroed) WorkloadEndpoint struct with the TypeMetadata -// initialised to the current version. -func NewWorkloadEndpoint() *WorkloadEndpoint { - return &WorkloadEndpoint{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "workloadEndpoint", - APIVersion: unversioned.VersionCurrent, - }, - } -} - -// WorkloadEndpointList contains a list of Workload Endpoint resources. List types are returned -// from List() enumerations in the client interface. -type WorkloadEndpointList struct { - unversioned.TypeMetadata - Metadata unversioned.ListMetadata `json:"metadata,omitempty"` - Items []WorkloadEndpoint `json:"items" validate:"dive"` -} - -// NewWorkloadEndpointList creates a new (zeroed) NodeList struct with the TypeMetadata -// initialised to the current version. -func NewWorkloadEndpointList() *WorkloadEndpointList { - return &WorkloadEndpointList{ - TypeMetadata: unversioned.TypeMetadata{ - Kind: "workloadEndpointList", - APIVersion: unversioned.VersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/bgpconfig.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/bgpconfig.go deleted file mode 100644 index 4385df4bf..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/bgpconfig.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2017 Tigera, 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 v3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/projectcalico/libcalico-go/lib/numorstring" -) - -const ( - KindBGPConfiguration = "BGPConfiguration" - KindBGPConfigurationList = "BGPConfigurationList" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BGPConfiguration contains the configuration for any BGP routing. -type BGPConfiguration struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the BGPConfiguration. - Spec BGPConfigurationSpec `json:"spec,omitempty"` -} - -// BGPConfigurationSpec contains the values of the BGP configuration. -type BGPConfigurationSpec struct { - // LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: INFO] - LogSeverityScreen string `json:"logSeverityScreen,omitempty" validate:"omitempty,logLevel" confignamev1:"loglevel"` - - // NodeToNodeMeshEnabled sets whether full node to node BGP mesh is enabled. [Default: true] - NodeToNodeMeshEnabled *bool `json:"nodeToNodeMeshEnabled,omitempty" validate:"omitempty" confignamev1:"node_mesh"` - - // ASNumber is the default AS number used by a node. [Default: 64512] - ASNumber *numorstring.ASNumber `json:"asNumber,omitempty" validate:"omitempty" confignamev1:"as_num"` - - // ServiceExternalIPs are the CIDR blocks for Kubernetes Service External IPs. - // Kubernetes Service ExternalIPs will only be advertised if they are within one of these blocks. - ServiceExternalIPs []ServiceExternalIPBlock `json:"serviceExternalIPs,omitempty" validate:"omitempty,dive" confignamev1:"svc_external_ips"` - - // ServiceClusterIPs are the CIDR blocks from which service cluster IPs are allocated. - // If specified, Calico will advertise these blocks, as well as any cluster IPs within them. - ServiceClusterIPs []ServiceClusterIPBlock `json:"serviceClusterIPs,omitempty" validate:"omitempty,dive" confignamev1:"svc_cluster_ips"` -} - -// ServiceExternalIPBlock represents a single whitelisted CIDR External IP block. -type ServiceExternalIPBlock struct { - CIDR string `json:"cidr,omitempty" validate:"omitempty,net"` -} - -// ServiceClusterIPBlock represents a single whitelisted CIDR block for ClusterIPs. -type ServiceClusterIPBlock struct { - CIDR string `json:"cidr,omitempty" validate:"omitempty,net"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BGPConfigurationList contains a list of BGPConfiguration resources. -type BGPConfigurationList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []BGPConfiguration `json:"items"` -} - -// New BGPConfiguration creates a new (zeroed) BGPConfiguration struct with the TypeMetadata -// initialized to the current version. -func NewBGPConfiguration() *BGPConfiguration { - return &BGPConfiguration{ - TypeMeta: metav1.TypeMeta{ - Kind: KindBGPConfiguration, - APIVersion: GroupVersionCurrent, - }, - } -} - -// NewBGPConfigurationList creates a new zeroed) BGPConfigurationList struct with the TypeMetadata -// initialized to the current version. -func NewBGPConfigurationList() *BGPConfigurationList { - return &BGPConfigurationList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindBGPConfigurationList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/bgppeer.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/bgppeer.go deleted file mode 100644 index fdd1cd7f5..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/bgppeer.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2017 Tigera, 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 v3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/projectcalico/libcalico-go/lib/numorstring" -) - -const ( - KindBGPPeer = "BGPPeer" - KindBGPPeerList = "BGPPeerList" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BGPPeer contains information about a BGPPeer resource that is a peer of a Calico -// compute node. -type BGPPeer struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the BGPPeer. - Spec BGPPeerSpec `json:"spec,omitempty"` -} - -// BGPPeerSpec contains the specification for a BGPPeer resource. -type BGPPeerSpec struct { - // The node name identifying the Calico node instance that is peering with this peer. - // If this is not set, this represents a global peer, i.e. a peer that peers with - // every node in the deployment. - Node string `json:"node,omitempty" validate:"omitempty,name"` - // The IP address of the peer. - PeerIP string `json:"peerIP" validate:"omitempty,ip"` - // The AS Number of the peer. - ASNumber numorstring.ASNumber `json:"asNumber"` - // Selector for the nodes that should have this peering. When this is set, the Node - // field must be empty. - NodeSelector string `json:"nodeSelector,omitempty" validate:"omitempty,selector"` - // Selector for the remote nodes to peer with. When this is set, the PeerIP and - // ASNumber fields must be empty. For each peering between the local node and - // selected remote nodes, we configure an IPv4 peering if both ends have - // NodeBGPSpec.IPv4Address specified, and an IPv6 peering if both ends have - // NodeBGPSpec.IPv6Address specified. The remote AS number comes from the remote - // node’s NodeBGPSpec.ASNumber, or the global default if that is not set. - PeerSelector string `json:"peerSelector,omitempty" validate:"omitempty,selector"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BGPPeerList contains a list of BGPPeer resources. -type BGPPeerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []BGPPeer `json:"items"` -} - -// NewBGPPeer creates a new (zeroed) BGPPeer struct with the TypeMetadata initialised to the current -// version. -func NewBGPPeer() *BGPPeer { - return &BGPPeer{ - TypeMeta: metav1.TypeMeta{ - Kind: KindBGPPeer, - APIVersion: GroupVersionCurrent, - }, - } -} - -// NewBGPPeerList creates a new (zeroed) BGPPeerList struct with the TypeMetadata initialised to the current -// version. -func NewBGPPeerList() *BGPPeerList { - return &BGPPeerList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindBGPPeerList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/felixconfig.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/felixconfig.go deleted file mode 100644 index 33fc018d9..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/felixconfig.go +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) 2017-2019 Tigera, 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 v3 - -import ( - "github.com/projectcalico/libcalico-go/lib/numorstring" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -type IptablesBackend string - -const ( - KindFelixConfiguration = "FelixConfiguration" - KindFelixConfigurationList = "FelixConfigurationList" - IptablesBackendLegacy = "Legacy" - IptablesBackendNFTables = "NFT" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Felix Configuration contains the configuration for Felix. -type FelixConfiguration struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the FelixConfiguration. - Spec FelixConfigurationSpec `json:"spec,omitempty"` -} - -// FelixConfigurationSpec contains the values of the Felix configuration. -type FelixConfigurationSpec struct { - UseInternalDataplaneDriver *bool `json:"useInternalDataplaneDriver,omitempty"` - DataplaneDriver string `json:"dataplaneDriver,omitempty"` - - IPv6Support *bool `json:"ipv6Support,omitempty" confignamev1:"Ipv6Support"` - IgnoreLooseRPF *bool `json:"ignoreLooseRPF,omitempty"` - - // RouterefreshInterval is the period at which Felix re-checks the routes - // in the dataplane to ensure that no other process has accidentally broken Calico’s rules. - // Set to 0 to disable route refresh. [Default: 90s] - RouteRefreshInterval *metav1.Duration `json:"routeRefreshInterval,omitempty" configv1timescale:"seconds"` - // IptablesRefreshInterval is the period at which Felix re-checks the IP sets - // in the dataplane to ensure that no other process has accidentally broken Calico’s rules. - // Set to 0 to disable IP sets refresh. Note: the default for this value is lower than the - // other refresh intervals as a workaround for a Linux kernel bug that was fixed in kernel - // version 4.11. If you are using v4.11 or greater you may want to set this to, a higher value - // to reduce Felix CPU usage. [Default: 10s] - IptablesRefreshInterval *metav1.Duration `json:"iptablesRefreshInterval,omitempty" configv1timescale:"seconds"` - // IptablesPostWriteCheckInterval is the period after Felix has done a write - // to the dataplane that it schedules an extra read back in order to check the write was not - // clobbered by another process. This should only occur if another application on the system - // doesn’t respect the iptables lock. [Default: 1s] - IptablesPostWriteCheckInterval *metav1.Duration `json:"iptablesPostWriteCheckInterval,omitempty" configv1timescale:"seconds" confignamev1:"IptablesPostWriteCheckIntervalSecs"` - // IptablesLockFilePath is the location of the iptables lock file. You may need to change this - // if the lock file is not in its standard location (for example if you have mapped it into Felix’s - // container at a different path). [Default: /run/xtables.lock] - IptablesLockFilePath string `json:"iptablesLockFilePath,omitempty"` - // IptablesLockTimeout is the time that Felix will wait for the iptables lock, - // or 0, to disable. To use this feature, Felix must share the iptables lock file with all other - // processes that also take the lock. When running Felix inside a container, this requires the - // /run directory of the host to be mounted into the calico/node or calico/felix container. - // [Default: 0s disabled] - IptablesLockTimeout *metav1.Duration `json:"iptablesLockTimeout,omitempty" configv1timescale:"seconds" confignamev1:"IptablesLockTimeoutSecs"` - // IptablesLockProbeInterval is the time that Felix will wait between - // attempts to acquire the iptables lock if it is not available. Lower values make Felix more - // responsive when the lock is contended, but use more CPU. [Default: 50ms] - IptablesLockProbeInterval *metav1.Duration `json:"iptablesLockProbeInterval,omitempty" configv1timescale:"milliseconds" confignamev1:"IptablesLockProbeIntervalMillis"` - // IpsetsRefreshInterval is the period at which Felix re-checks all iptables - // state to ensure that no other process has accidentally broken Calico’s rules. Set to 0 to - // disable iptables refresh. [Default: 90s] - IpsetsRefreshInterval *metav1.Duration `json:"ipsetsRefreshInterval,omitempty" configv1timescale:"seconds"` - MaxIpsetSize *int `json:"maxIpsetSize,omitempty"` - // IptablesBackend specifies which backend of iptables will be used. The default is legacy. - IptablesBackend *IptablesBackend `json:"iptablesBackend,omitempty" validate:"omitempty,iptablesBackend"` - - // XDPRefreshInterval is the period at which Felix re-checks all XDP state to ensure that no - // other process has accidentally broken Calico's BPF maps or attached programs. Set to 0 to - // disable XDP refresh. [Default: 90s] - XDPRefreshInterval *metav1.Duration `json"xdpRefreshInterval,omitempty" configv1timescale:"seconds"` - - NetlinkTimeout *metav1.Duration `json:"netlinkTimeout,omitempty" configv1timescale:"seconds" confignamev1:"NetlinkTimeoutSecs"` - - // MetadataAddr is the IP address or domain name of the server that can answer VM queries for - // cloud-init metadata. In OpenStack, this corresponds to the machine running nova-api (or in - // Ubuntu, nova-api-metadata). A value of none (case insensitive) means that Felix should not - // set up any NAT rule for the metadata path. [Default: 127.0.0.1] - MetadataAddr string `json:"metadataAddr,omitempty"` - // MetadataPort is the port of the metadata server. This, combined with global.MetadataAddr (if - // not ‘None’), is used to set up a NAT rule, from 169.254.169.254:80 to MetadataAddr:MetadataPort. - // In most cases this should not need to be changed [Default: 8775]. - MetadataPort *int `json:"metadataPort,omitempty"` - - // OpenstackRegion is the name of the region that a particular Felix belongs to. In a multi-region - // Calico/OpenStack deployment, this must be configured somehow for each Felix (here in the datamodel, - // or in felix.cfg or the environment on each compute node), and must match the [calico] - // openstack_region value configured in neutron.conf on each node. [Default: Empty] - OpenstackRegion string `json:"openstackRegion,omitempty"` - - // InterfacePrefix is the interface name prefix that identifies workload endpoints and so distinguishes - // them from host endpoint interfaces. Note: in environments other than bare metal, the orchestrators - // configure this appropriately. For example our Kubernetes and Docker integrations set the ‘cali’ value, - // and our OpenStack integration sets the ‘tap’ value. [Default: cali] - InterfacePrefix string `json:"interfacePrefix,omitempty"` - // InterfaceExclude is a comma-separated list of interfaces that Felix should exclude when monitoring for host - // endpoints. The default value ensures that Felix ignores Kubernetes' IPVS dummy interface, which is used - // internally by kube-proxy. If you want to exclude multiple interface names using a single value, the list - // supports regular expressions. For regular expressions you must wrap the value with '/'. For example - // having values '/^kube/,veth1' will exclude all interfaces that begin with 'kube' and also the interface - // 'veth1'. [Default: kube-ipvs0] - InterfaceExclude string `json:"interfaceExclude,omitempty"` - - // ChainInsertMode controls whether Felix hooks the kernel’s top-level iptables chains by inserting a rule - // at the top of the chain or by appending a rule at the bottom. insert is the safe default since it prevents - // Calico’s rules from being bypassed. If you switch to append mode, be sure that the other rules in the chains - // signal acceptance by falling through to the Calico rules, otherwise the Calico policy will be bypassed. - // [Default: insert] - ChainInsertMode string `json:"chainInsertMode,omitempty"` - // DefaultEndpointToHostAction controls what happens to traffic that goes from a workload endpoint to the host - // itself (after the traffic hits the endpoint egress policy). By default Calico blocks traffic from workload - // endpoints to the host itself with an iptables “DROP” action. If you want to allow some or all traffic from - // endpoint to host, set this parameter to RETURN or ACCEPT. Use RETURN if you have your own rules in the iptables - // “INPUT” chain; Calico will insert its rules at the top of that chain, then “RETURN” packets to the “INPUT” chain - // once it has completed processing workload endpoint egress policy. Use ACCEPT to unconditionally accept packets - // from workloads after processing workload endpoint egress policy. [Default: Drop] - DefaultEndpointToHostAction string `json:"defaultEndpointToHostAction,omitempty" validate:"omitempty,dropAcceptReturn"` - IptablesFilterAllowAction string `json:"iptablesFilterAllowAction,omitempty" validate:"omitempty,acceptReturn"` - IptablesMangleAllowAction string `json:"iptablesMangleAllowAction,omitempty" validate:"omitempty,acceptReturn"` - // LogPrefix is the log prefix that Felix uses when rendering LOG rules. [Default: calico-packet] - LogPrefix string `json:"logPrefix,omitempty"` - - // LogFilePath is the full path to the Felix log. Set to none to disable file logging. [Default: /var/log/calico/felix.log] - LogFilePath string `json:"logFilePath,omitempty"` - - // LogSeverityFile is the log severity above which logs are sent to the log file. [Default: Info] - LogSeverityFile string `json:"logSeverityFile,omitempty" validate:"omitempty,logLevel"` - // LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: Info] - LogSeverityScreen string `json:"logSeverityScreen,omitempty" validate:"omitempty,logLevel"` - // LogSeveritySys is the log severity above which logs are sent to the syslog. Set to None for no logging to syslog. - // [Default: Info] - LogSeveritySys string `json:"logSeveritySys,omitempty" validate:"omitempty,logLevel"` - - IPIPEnabled *bool `json:"ipipEnabled,omitempty" confignamev1:"IpInIpEnabled"` - // IPIPMTU is the MTU to set on the tunnel device. See Configuring MTU [Default: 1440] - IPIPMTU *int `json:"ipipMTU,omitempty" confignamev1:"IpInIpMtu"` - - VXLANEnabled *bool `json:"vxlanEnabled,omitempty"` - // VXLANMTU is the MTU to set on the tunnel device. See Configuring MTU [Default: 1440] - VXLANMTU *int `json:"vxlanMTU,omitempty"` - VXLANPort *int `json:"vxlanPort,omitempty"` - VXLANVNI *int `json:"vxlanVNI,omitempty"` - - // ReportingInterval is the interval at which Felix reports its status into the datastore or 0 to disable. - // Must be non-zero in OpenStack deployments. [Default: 30s] - ReportingInterval *metav1.Duration `json:"reportingInterval,omitempty" configv1timescale:"seconds" confignamev1:"ReportingIntervalSecs"` - // ReportingTTL is the time-to-live setting for process-wide status reports. [Default: 90s] - ReportingTTL *metav1.Duration `json:"reportingTTL,omitempty" configv1timescale:"seconds" confignamev1:"ReportingTTLSecs"` - - EndpointReportingEnabled *bool `json:"endpointReportingEnabled,omitempty"` - EndpointReportingDelay *metav1.Duration `json:"endpointReportingDelay,omitempty" configv1timescale:"seconds" confignamev1:"EndpointReportingDelaySecs"` - - // IptablesMarkMask is the mask that Felix selects its IPTables Mark bits from. Should be a 32 bit hexadecimal - // number with at least 8 bits set, none of which clash with any other mark bits in use on the system. - // [Default: 0xff000000] - IptablesMarkMask *uint32 `json:"iptablesMarkMask,omitempty"` - - DisableConntrackInvalidCheck *bool `json:"disableConntrackInvalidCheck,omitempty"` - - HealthEnabled *bool `json:"healthEnabled,omitempty"` - HealthHost *string `json:"healthHost,omitempty"` - HealthPort *int `json:"healthPort,omitempty"` - - // PrometheusMetricsEnabled enables the Prometheus metrics server in Felix if set to true. [Default: false] - PrometheusMetricsEnabled *bool `json:"prometheusMetricsEnabled,omitempty"` - // PrometheusMetricsHost is the host that the Prometheus metrics server should bind to. [Default: empty] - PrometheusMetricsHost string `json:"prometheusMetricsHost,omitempty" validate:"omitempty,prometheusHost"` - // PrometheusMetricsPort is the TCP port that the Prometheus metrics server should bind to. [Default: 9091] - PrometheusMetricsPort *int `json:"prometheusMetricsPort,omitempty"` - // PrometheusGoMetricsEnabled disables Go runtime metrics collection, which the Prometheus client does by default, when - // set to false. This reduces the number of metrics reported, reducing Prometheus load. [Default: true] - PrometheusGoMetricsEnabled *bool `json:"prometheusGoMetricsEnabled,omitempty"` - // PrometheusProcessMetricsEnabled disables process metrics collection, which the Prometheus client does by default, when - // set to false. This reduces the number of metrics reported, reducing Prometheus load. [Default: true] - PrometheusProcessMetricsEnabled *bool `json:"prometheusProcessMetricsEnabled,omitempty"` - - // FailsafeInboundHostPorts is a comma-delimited list of UDP/TCP ports that Felix will allow incoming traffic to host endpoints - // on irrespective of the security policy. This is useful to avoid accidently cutting off a host with incorrect configuration. Each - // port should be specified as tcp: or udp:. For back-compatibility, if the protocol is not specified, it - // defaults to “tcp”. To disable all inbound host ports, use the value none. The default value allows ssh access and DHCP. - // [Default: tcp:22, udp:68] - FailsafeInboundHostPorts *[]ProtoPort `json:"failsafeInboundHostPorts,omitempty"` - // FailsafeOutboundHostPorts is a comma-delimited list of UDP/TCP ports that Felix will allow outgoing traffic from host endpoints to - // irrespective of the security policy. This is useful to avoid accidently cutting off a host with incorrect configuration. Each port - // should be specified as tcp: or udp:. For back-compatibility, if the protocol is not specified, it defaults - // to “tcp”. To disable all outbound host ports, use the value none. The default value opens etcd’s standard ports to ensure that Felix - // does not get cut off from etcd as well as allowing DHCP and DNS. [Default: tcp:2379, tcp:2380, tcp:4001, tcp:7001, udp:53, udp:67] - FailsafeOutboundHostPorts *[]ProtoPort `json:"failsafeOutboundHostPorts,omitempty"` - - // KubeNodePortRanges holds list of port ranges used for service node ports. Only used if felix detects kube-proxy running in ipvs mode. - // Felix uses these ranges to separate host and workload traffic. [Default: 30000:32767]. - KubeNodePortRanges *[]numorstring.Port `json:"kubeNodePortRanges,omitempty" validate:"omitempty,dive"` - - // PolicySyncPathPrefix is used to by Felix to communicate policy changes to external services, - // like Application layer policy. [Default: Empty] - PolicySyncPathPrefix string `json:"policySyncPathPrefix,omitempty"` - - // UsageReportingEnabled reports anonymous Calico version number and cluster size to projectcalico.org. Logs warnings returned by the usage - // server. For example, if a significant security vulnerability has been discovered in the version of Calico being used. [Default: true] - UsageReportingEnabled *bool `json:"usageReportingEnabled,omitempty"` - // UsageReportingInitialDelay controls the minimum delay before Felix makes a report. [Default: 300s] - UsageReportingInitialDelay *metav1.Duration `json:"usageReportingInitialDelay,omitempty" configv1timescale:"seconds" confignamev1:"UsageReportingInitialDelaySecs"` - // UsageReportingInterval controls the interval at which Felix makes reports. [Default: 86400s] - UsageReportingInterval *metav1.Duration `json:"usageReportingInterval,omitempty" configv1timescale:"seconds" confignamev1:"UsageReportingIntervalSecs"` - - // NATPortRange specifies the range of ports that is used for port mapping when doing outgoing NAT. When unset the default behavior of the - // network stack is used. - NATPortRange *numorstring.Port `json:"natPortRange,omitempty"` - - // NATOutgoingAddress specifies an address to use when performing source NAT for traffic in a natOutgoing pool that - // is leaving the network. By default the address used is an address on the interface the traffic is leaving on - // (ie it uses the iptables MASQUERADE target) - NATOutgoingAddress string `json:"natOutgoingAddress,omitempty"` - - // This is the source address to use on programmed device routes. By default the source address is left blank, - // leaving the kernel to choose the source address used. - DeviceRouteSourceAddress string `json:"deviceRouteSourceAddress,omitempty"` - - // This defines the route protocol added to programmed device routes, by default this will be RTPROT_BOOT - // when left blank. - DeviceRouteProtocol *int `json:"deviceRouteProtocol,omitempty"` - // Whether or not to remove device routes that have not been programmed by Felix. Disabling this will allow external - // applications to also add device routes. This is enabled by default which means we will remove externally added routes. - RemoveExternalRoutes *bool `json:"removeExternalRoutes,omitempty"` - - // ExternalNodesCIDRList is a list of CIDR's of external-non-calico-nodes which may source tunnel traffic and have - // the tunneled traffic be accepted at calico nodes. - ExternalNodesCIDRList *[]string `json:"externalNodesList,omitempty"` - - DebugMemoryProfilePath string `json:"debugMemoryProfilePath,omitempty"` - DebugDisableLogDropping *bool `json:"debugDisableLogDropping,omitempty"` - DebugSimulateCalcGraphHangAfter *metav1.Duration `json:"debugSimulateCalcGraphHangAfter,omitempty" configv1timescale:"seconds"` - DebugSimulateDataplaneHangAfter *metav1.Duration `json:"debugSimulateDataplaneHangAfter,omitempty" configv1timescale:"seconds"` - - IptablesNATOutgoingInterfaceFilter string `json:"iptablesNATOutgoingInterfaceFilter,omitempty" validate:"omitempty,ifaceFilter"` - - // SidecarAccelerationEnabled enables experimental sidecar acceleration [Default: false] - SidecarAccelerationEnabled *bool `json:"sidecarAccelerationEnabled,omitempty"` - - // XDPEnabled enables XDP acceleration for suitable untracked incoming deny rules. [Default: true] - XDPEnabled *bool `json:"xdpEnabled,omitempty" confignamev1:"XDPEnabled"` - - // GenericXDPEnabled enables Generic XDP so network cards that don't support XDP offload or driver - // modes can use XDP. This is not recommended since it doesn't provide better performance than - // iptables. [Default: false] - GenericXDPEnabled *bool `json:"genericXDPEnabled,omitempty" confignamev1:"GenericXDPEnabled"` -} - -// ProtoPort is combination of protocol and port, both must be specified. -type ProtoPort struct { - Protocol string `json:"protocol"` - Port uint16 `json:"port"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// FelixConfigurationList contains a list of FelixConfiguration resources. -type FelixConfigurationList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []FelixConfiguration `json:"items"` -} - -// New FelixConfiguration creates a new (zeroed) FelixConfiguration struct with the TypeMetadata -// initialized to the current version. -func NewFelixConfiguration() *FelixConfiguration { - return &FelixConfiguration{ - TypeMeta: metav1.TypeMeta{ - Kind: KindFelixConfiguration, - APIVersion: GroupVersionCurrent, - }, - } -} - -// NewFelixConfigurationList creates a new 9zeroed) FelixConfigurationList struct with the TypeMetadata -// initialized to the current version. -func NewFelixConfigurationList() *FelixConfigurationList { - return &FelixConfigurationList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindFelixConfigurationList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ipam_block.go b/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ipam_block.go deleted file mode 100644 index e0a6dbc1e..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/apis/v3/ipam_block.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2019 Tigera, 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 v3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const ( - KindIPAMBlock = "IPAMBlock" - KindIPAMBlockList = "IPAMBlockList" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IPAMBlock contains information about a block for IP address assignment. -type IPAMBlock struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the IPAMBlock. - Spec IPAMBlockSpec `json:"spec,omitempty"` -} - -// IPAMBlockSpec contains the specification for a IPAMBlock resource. -type IPAMBlockSpec struct { - CIDR string `json:"cidr"` - Affinity *string `json:"affinity"` - StrictAffinity bool `json:"strictAffinity"` - Allocations []*int `json:"allocations"` - Unallocated []int `json:"unallocated"` - Attributes []AllocationAttribute `json:"attributes"` - Deleted bool `json:"deleted"` -} - -type AllocationAttribute struct { - AttrPrimary *string `json:"handle_id"` - AttrSecondary map[string]string `json:"secondary"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IPAMBlockList contains a list of IPAMBlock resources. -type IPAMBlockList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []IPAMBlock `json:"items"` -} - -// NewIPAMBlock creates a new (zeroed) IPAMBlock struct with the TypeMetadata initialised to the current -// version. -func NewIPAMBlock() *IPAMBlock { - return &IPAMBlock{ - TypeMeta: metav1.TypeMeta{ - Kind: KindIPAMBlock, - APIVersion: GroupVersionCurrent, - }, - } -} - -// NewIPAMBlockList creates a new (zeroed) IPAMBlockList struct with the TypeMetadata initialised to the current -// version. -func NewIPAMBlockList() *IPAMBlockList { - return &IPAMBlockList{ - TypeMeta: metav1.TypeMeta{ - Kind: KindIPAMBlockList, - APIVersion: GroupVersionCurrent, - }, - } -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/hash/unique_id.go b/vendor/github.com/projectcalico/libcalico-go/lib/hash/unique_id.go deleted file mode 100644 index 15775eb82..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/hash/unique_id.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016 Tigera, 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 hash - -import ( - "crypto" - "encoding/base64" -) - -// MakeUniqueID uses a secure hash to create a unique ID from content. -// The hash is prefixed with ":". -func MakeUniqueID(prefix, content string) string { - hash := crypto.SHA224.New() - bytes := []byte(prefix + ":" + content) - written, err := hash.Write(bytes) - if err != nil { - panic(err) - } - if written != len(bytes) { - panic("Failed to write to Hash") - } - hashBytes := hash.Sum(make([]byte, 0, hash.Size())) - return prefix + ":" + base64.RawURLEncoding.EncodeToString(hashBytes) -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/selector/parser/ast.go b/vendor/github.com/projectcalico/libcalico-go/lib/selector/parser/ast.go deleted file mode 100644 index f729e28bc..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/selector/parser/ast.go +++ /dev/null @@ -1,431 +0,0 @@ -// Copyright (c) 2016-2019 Tigera, 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 parser - -import ( - _ "crypto/sha256" // register hash func - "fmt" - "strings" - - log "github.com/sirupsen/logrus" - - "github.com/projectcalico/libcalico-go/lib/hash" -) - -// Labels defines the interface of labels that can be used by selector -type Labels interface { - // Get returns value and presence of the given labelName - Get(labelName string) (value string, present bool) -} - -// MapAsLabels allows you use map as labels -type MapAsLabels map[string]string - -// Get returns the value and presence of the given labelName key in the MapAsLabels -func (l MapAsLabels) Get(labelName string) (value string, present bool) { - value, present = l[labelName] - return -} - -// Selector represents a label selector. -type Selector interface { - // Evaluate evaluates the selector against the given labels expressed as a concrete map. - Evaluate(labels map[string]string) bool - - // EvaluateLabels evaluates the selector against the given labels expressed as an interface. - // This allows for labels that are calculated on the fly. - EvaluateLabels(labels Labels) bool - - // String returns a string that represents this selector. - String() string - - // UniqueID returns the unique ID that represents this selector. - UniqueID() string - - // AcceptVisitor allows an external visitor to modify this selector. - AcceptVisitor(v Visitor) -} - -type Visitor interface { - Visit(n interface{}) -} - -// PrefixVisitor implements the Visitor interface to allow prefixing of -// label names within a selector. -type PrefixVisitor struct { - Prefix string -} - -func (v PrefixVisitor) Visit(n interface{}) { - log.Debugf("PrefixVisitor visiting node %#v", n) - switch np := n.(type) { - case *LabelEqValueNode: - np.LabelName = fmt.Sprintf("%s%s", v.Prefix, np.LabelName) - case *LabelNeValueNode: - np.LabelName = fmt.Sprintf("%s%s", v.Prefix, np.LabelName) - case *LabelContainsValueNode: - np.LabelName = fmt.Sprintf("%s%s", v.Prefix, np.LabelName) - case *LabelStartsWithValueNode: - np.LabelName = fmt.Sprintf("%s%s", v.Prefix, np.LabelName) - case *LabelEndsWithValueNode: - np.LabelName = fmt.Sprintf("%s%s", v.Prefix, np.LabelName) - case *HasNode: - np.LabelName = fmt.Sprintf("%s%s", v.Prefix, np.LabelName) - case *LabelInSetNode: - np.LabelName = fmt.Sprintf("%s%s", v.Prefix, np.LabelName) - case *LabelNotInSetNode: - np.LabelName = fmt.Sprintf("%s%s", v.Prefix, np.LabelName) - default: - log.Debug("Node is a no-op") - } -} - -type selectorRoot struct { - root node - cachedString *string - cachedHash *string -} - -func (sel *selectorRoot) Evaluate(labels map[string]string) bool { - return sel.EvaluateLabels(MapAsLabels(labels)) -} - -func (sel *selectorRoot) EvaluateLabels(labels Labels) bool { - return sel.root.Evaluate(labels) -} - -func (sel *selectorRoot) AcceptVisitor(v Visitor) { - sel.root.AcceptVisitor(v) -} - -func (sel *selectorRoot) String() string { - if sel.cachedString == nil { - fragments := sel.root.collectFragments([]string{}) - joined := strings.Join(fragments, "") - sel.cachedString = &joined - } - return *sel.cachedString -} - -func (sel *selectorRoot) UniqueID() string { - if sel.cachedHash == nil { - hash := hash.MakeUniqueID("s", sel.String()) - sel.cachedHash = &hash - } - return *sel.cachedHash -} - -var _ Selector = (*selectorRoot)(nil) - -type node interface { - Evaluate(labels Labels) bool - AcceptVisitor(v Visitor) - collectFragments(fragments []string) []string -} - -type LabelEqValueNode struct { - LabelName string - Value string -} - -func (node *LabelEqValueNode) Evaluate(labels Labels) bool { - val, ok := labels.Get(node.LabelName) - if ok { - return val == node.Value - } - return false -} - -func (node *LabelEqValueNode) AcceptVisitor(v Visitor) { - v.Visit(node) -} - -func (node *LabelEqValueNode) collectFragments(fragments []string) []string { - return appendLabelOpAndQuotedString(fragments, node.LabelName, " == ", node.Value) -} - -type LabelContainsValueNode struct { - LabelName string - Value string -} - -func (node *LabelContainsValueNode) Evaluate(labels Labels) bool { - val, ok := labels.Get(node.LabelName) - if ok { - return strings.Contains(val, node.Value) - } - return false -} - -func (node *LabelContainsValueNode) AcceptVisitor(v Visitor) { - v.Visit(node) -} - -func (node *LabelContainsValueNode) collectFragments(fragments []string) []string { - return appendLabelOpAndQuotedString(fragments, node.LabelName, " contains ", node.Value) -} - -type LabelStartsWithValueNode struct { - LabelName string - Value string -} - -func (node *LabelStartsWithValueNode) Evaluate(labels Labels) bool { - val, ok := labels.Get(node.LabelName) - if ok { - return strings.HasPrefix(val, node.Value) - } - return false -} - -func (node *LabelStartsWithValueNode) AcceptVisitor(v Visitor) { - v.Visit(node) -} - -func (node *LabelStartsWithValueNode) collectFragments(fragments []string) []string { - return appendLabelOpAndQuotedString(fragments, node.LabelName, " starts with ", node.Value) -} - -type LabelEndsWithValueNode struct { - LabelName string - Value string -} - -func (node *LabelEndsWithValueNode) Evaluate(labels Labels) bool { - val, ok := labels.Get(node.LabelName) - if ok { - return strings.HasSuffix(val, node.Value) - } - return false -} - -func (node *LabelEndsWithValueNode) AcceptVisitor(v Visitor) { - v.Visit(node) -} - -func (node *LabelEndsWithValueNode) collectFragments(fragments []string) []string { - return appendLabelOpAndQuotedString(fragments, node.LabelName, " ends with ", node.Value) -} - -type LabelInSetNode struct { - LabelName string - Value StringSet -} - -func (node *LabelInSetNode) Evaluate(labels Labels) bool { - val, ok := labels.Get(node.LabelName) - if ok { - return node.Value.Contains(val) - } - return false -} - -func (node *LabelInSetNode) AcceptVisitor(v Visitor) { - v.Visit(node) -} - -func (node *LabelInSetNode) collectFragments(fragments []string) []string { - return collectInOpFragments(fragments, node.LabelName, "in", node.Value) -} - -type LabelNotInSetNode struct { - LabelName string - Value StringSet -} - -func (node *LabelNotInSetNode) AcceptVisitor(v Visitor) { - v.Visit(node) -} - -func (node *LabelNotInSetNode) Evaluate(labels Labels) bool { - val, ok := labels.Get(node.LabelName) - if ok { - return !node.Value.Contains(val) - } - return true -} - -func (node *LabelNotInSetNode) collectFragments(fragments []string) []string { - return collectInOpFragments(fragments, node.LabelName, "not in", node.Value) -} - -// collectInOpFragments is a shared implementation of collectFragments -// for the 'in' and 'not in' operators. -func collectInOpFragments(fragments []string, labelName, op string, values StringSet) []string { - var quote string - fragments = append(fragments, labelName, " ", op, " {") - first := true - for _, s := range values { - if strings.Contains(s, `"`) { - quote = `'` - } else { - quote = `"` - } - if !first { - fragments = append(fragments, ", ") - } else { - first = false - } - fragments = append(fragments, quote, s, quote) - } - fragments = append(fragments, "}") - return fragments -} - -type LabelNeValueNode struct { - LabelName string - Value string -} - -func (node *LabelNeValueNode) Evaluate(labels Labels) bool { - val, ok := labels.Get(node.LabelName) - if ok { - return val != node.Value - } - return true -} - -func (node *LabelNeValueNode) AcceptVisitor(v Visitor) { - v.Visit(node) -} - -func (node *LabelNeValueNode) collectFragments(fragments []string) []string { - return appendLabelOpAndQuotedString(fragments, node.LabelName, " != ", node.Value) -} - -type HasNode struct { - LabelName string -} - -func (node *HasNode) Evaluate(labels Labels) bool { - _, ok := labels.Get(node.LabelName) - if ok { - return true - } - return false -} - -func (node *HasNode) AcceptVisitor(v Visitor) { - v.Visit(node) -} - -func (node *HasNode) collectFragments(fragments []string) []string { - return append(fragments, "has(", node.LabelName, ")") -} - -type NotNode struct { - Operand node -} - -func (node *NotNode) Evaluate(labels Labels) bool { - return !node.Operand.Evaluate(labels) -} - -func (node *NotNode) AcceptVisitor(v Visitor) { - v.Visit(node) - node.Operand.AcceptVisitor(v) -} - -func (node *NotNode) collectFragments(fragments []string) []string { - fragments = append(fragments, "!") - return node.Operand.collectFragments(fragments) -} - -type AndNode struct { - Operands []node -} - -func (node *AndNode) Evaluate(labels Labels) bool { - for _, operand := range node.Operands { - if !operand.Evaluate(labels) { - return false - } - } - return true -} - -func (node *AndNode) AcceptVisitor(v Visitor) { - v.Visit(node) - for _, op := range node.Operands { - op.AcceptVisitor(v) - } -} - -func (node *AndNode) collectFragments(fragments []string) []string { - fragments = append(fragments, "(") - fragments = node.Operands[0].collectFragments(fragments) - for _, op := range node.Operands[1:] { - fragments = append(fragments, " && ") - fragments = op.collectFragments(fragments) - } - fragments = append(fragments, ")") - return fragments -} - -type OrNode struct { - Operands []node -} - -func (node *OrNode) Evaluate(labels Labels) bool { - for _, operand := range node.Operands { - if operand.Evaluate(labels) { - return true - } - } - return false -} - -func (node *OrNode) AcceptVisitor(v Visitor) { - v.Visit(node) - for _, op := range node.Operands { - op.AcceptVisitor(v) - } -} - -func (node *OrNode) collectFragments(fragments []string) []string { - fragments = append(fragments, "(") - fragments = node.Operands[0].collectFragments(fragments) - for _, op := range node.Operands[1:] { - fragments = append(fragments, " || ") - fragments = op.collectFragments(fragments) - } - fragments = append(fragments, ")") - return fragments -} - -type AllNode struct { -} - -func (node *AllNode) Evaluate(labels Labels) bool { - return true -} - -func (node *AllNode) AcceptVisitor(v Visitor) { - v.Visit(node) -} - -func (node *AllNode) collectFragments(fragments []string) []string { - return append(fragments, "all()") -} - -func appendLabelOpAndQuotedString(fragments []string, label, op, s string) []string { - var quote string - if strings.Contains(s, `"`) { - quote = `'` - } else { - quote = `"` - } - return append(fragments, label, op, quote, s, quote) -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/selector/parser/parser.go b/vendor/github.com/projectcalico/libcalico-go/lib/selector/parser/parser.go deleted file mode 100644 index bca901b07..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/selector/parser/parser.go +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) 2016, 2019 Tigera, 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 parser - -import ( - "errors" - "fmt" - - "github.com/projectcalico/libcalico-go/lib/selector/tokenizer" - log "github.com/sirupsen/logrus" -) - -const parserDebug = false - -// Parse parses a string representation of a selector expression into a Selector. -func Parse(selector string) (sel Selector, err error) { - log.Debugf("Parsing %#v", selector) - tokens, err := tokenizer.Tokenize(selector) - if err != nil { - return - } - if tokens[0].Kind == tokenizer.TokEOF { - return &selectorRoot{root: &AllNode{}}, nil - } - log.Debugf("Tokens %v", tokens) - // The "||" operator has the lowest precedence so we start with that. - node, remTokens, err := parseOrExpression(tokens) - if err != nil { - return - } - if len(remTokens) != 1 { - err = errors.New(fmt.Sprint("unexpected content at end of selector ", remTokens)) - return - } - sel = &selectorRoot{root: node} - return -} - -// parseOrExpression parses a one or more "&&" terms, separated by "||" operators. -func parseOrExpression(tokens []tokenizer.Token) (sel node, remTokens []tokenizer.Token, err error) { - if parserDebug { - log.Debugf("Parsing ||s from %v", tokens) - } - // Look for the first expression. - andNodes := make([]node, 0) - sel, remTokens, err = parseAndExpression(tokens) - if err != nil { - return - } - andNodes = append(andNodes, sel) - - // Then loop looking for "||" followed by an - for { - switch remTokens[0].Kind { - case tokenizer.TokOr: - remTokens = remTokens[1:] - sel, remTokens, err = parseAndExpression(remTokens) - if err != nil { - return - } - andNodes = append(andNodes, sel) - default: - if len(andNodes) == 1 { - sel = andNodes[0] - } else { - sel = &OrNode{andNodes} - } - return - } - } -} - -// parseAndExpression parses a one or more operations, separated by "&&" operators. -func parseAndExpression(tokens []tokenizer.Token) (sel node, remTokens []tokenizer.Token, err error) { - if parserDebug { - log.Debugf("Parsing &&s from %v", tokens) - } - // Look for the first operation. - opNodes := make([]node, 0) - sel, remTokens, err = parseOperation(tokens) - if err != nil { - return - } - opNodes = append(opNodes, sel) - - // Then loop looking for "&&" followed by another operation. - for { - switch remTokens[0].Kind { - case tokenizer.TokAnd: - remTokens = remTokens[1:] - sel, remTokens, err = parseOperation(remTokens) - if err != nil { - return - } - opNodes = append(opNodes, sel) - default: - if len(opNodes) == 1 { - sel = opNodes[0] - } else { - sel = &AndNode{opNodes} - } - return - } - } -} - -// parseOperations parses a single, possibly negated operation (i.e. ==, !=, has()). -// It also handles calling parseOrExpression recursively for parenthesized expressions. -func parseOperation(tokens []tokenizer.Token) (sel node, remTokens []tokenizer.Token, err error) { - if parserDebug { - log.Debugf("Parsing op from %v", tokens) - } - if len(tokens) == 0 { - err = errors.New("Unexpected end of string looking for op") - return - } - - // First, collapse any leading "!" operators to a single boolean. - negated := false - for { - if tokens[0].Kind == tokenizer.TokNot { - negated = !negated - tokens = tokens[1:] - } else { - break - } - } - - // Then, look for the various types of operator. - switch tokens[0].Kind { - case tokenizer.TokHas: - sel = &HasNode{tokens[0].Value.(string)} - remTokens = tokens[1:] - case tokenizer.TokAll: - sel = &AllNode{} - remTokens = tokens[1:] - case tokenizer.TokLabel: - // should have an operator and a literal. - if len(tokens) < 3 { - err = errors.New(fmt.Sprint("Unexpected end of string in middle of op", tokens)) - return - } - switch tokens[1].Kind { - case tokenizer.TokEq: - if tokens[2].Kind == tokenizer.TokStringLiteral { - sel = &LabelEqValueNode{tokens[0].Value.(string), tokens[2].Value.(string)} - remTokens = tokens[3:] - } else { - err = errors.New("Expected string") - } - case tokenizer.TokNe: - if tokens[2].Kind == tokenizer.TokStringLiteral { - sel = &LabelNeValueNode{tokens[0].Value.(string), tokens[2].Value.(string)} - remTokens = tokens[3:] - } else { - err = errors.New("Expected string") - } - case tokenizer.TokContains: - if tokens[2].Kind == tokenizer.TokStringLiteral { - sel = &LabelContainsValueNode{tokens[0].Value.(string), tokens[2].Value.(string)} - remTokens = tokens[3:] - } else { - err = errors.New("Expected string") - } - case tokenizer.TokStartsWith: - if tokens[2].Kind == tokenizer.TokStringLiteral { - sel = &LabelStartsWithValueNode{tokens[0].Value.(string), tokens[2].Value.(string)} - remTokens = tokens[3:] - } else { - err = errors.New("Expected string") - } - case tokenizer.TokEndsWith: - if tokens[2].Kind == tokenizer.TokStringLiteral { - sel = &LabelEndsWithValueNode{tokens[0].Value.(string), tokens[2].Value.(string)} - remTokens = tokens[3:] - } else { - err = errors.New("Expected string") - } - case tokenizer.TokIn, tokenizer.TokNotIn: - if tokens[2].Kind == tokenizer.TokLBrace { - remTokens = tokens[3:] - values := []string{} - for { - if remTokens[0].Kind == tokenizer.TokStringLiteral { - value := remTokens[0].Value.(string) - values = append(values, value) - remTokens = remTokens[1:] - if remTokens[0].Kind == tokenizer.TokComma { - remTokens = remTokens[1:] - } else { - break - } - } else { - break - } - } - if remTokens[0].Kind != tokenizer.TokRBrace { - err = errors.New("Expected }") - } else { - // Skip over the } - remTokens = remTokens[1:] - - labelName := tokens[0].Value.(string) - set := ConvertToStringSetInPlace(values) // Mutates values. - if tokens[1].Kind == tokenizer.TokIn { - sel = &LabelInSetNode{labelName, set} - } else { - sel = &LabelNotInSetNode{labelName, set} - } - } - } else { - err = errors.New("Expected set literal") - } - default: - err = errors.New(fmt.Sprint("Expected == or != not ", tokens[1])) - return - } - case tokenizer.TokLParen: - // We hit a paren, skip past it, then recurse. - sel, remTokens, err = parseOrExpression(tokens[1:]) - if err != nil { - return - } - // After parsing the nested expression, there should be - // a matching paren. - if len(remTokens) < 1 || remTokens[0].Kind != tokenizer.TokRParen { - err = errors.New("Expected )") - return - } - remTokens = remTokens[1:] - default: - err = errors.New(fmt.Sprint("Unexpected token: ", tokens[0])) - return - } - if negated && err == nil { - sel = &NotNode{sel} - } - return -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/selector/parser/stringset.go b/vendor/github.com/projectcalico/libcalico-go/lib/selector/parser/stringset.go deleted file mode 100644 index 11e208b01..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/selector/parser/stringset.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2016 Tigera, 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 parser - -import "sort" - -type StringSet []string - -// Contains returns true if a given string in current set -func (ss StringSet) Contains(s string) bool { - if len(ss) == 0 { - // Empty set or nil. - return false - } - // There's at least one item, do a binary chop to find the correct - // entry. [minIdx, maxIdx) defines the (half-open) search interval. - minIdx := 0 - maxIdx := len(ss) - for minIdx < (maxIdx - 1) { - // Select the partition index. The loop condition ensures that - // minIdx < partitionIdx < maxIdx so we'll always shrink the - // search interval on each iteration. - partitionIdx := (minIdx + maxIdx) / 2 - partition := ss[partitionIdx] - if s < partition { - // target is strictly less than the partition, we can - // move maxIdx down. - maxIdx = partitionIdx - } else { - // Target is >= the partition, move minIdx up. - minIdx = partitionIdx - } - } - // When we exit the loop, minIdx == (maxIdx - 1). Since the interval - // is half-open that means that, if the value is present, it must be at - // minIdx. (minIdx cannot equal maxIdx due to the empty list check - // above and the loop condition.) - return ss[minIdx] == s -} - -func ConvertToStringSetInPlace(s []string) StringSet { - if s != nil { - sort.Strings(s) - } - j := 0 - var last string - for _, v := range s { - if j != 0 && last == v { - // Same as last value, skip. - continue - } - s[j] = v - j++ - last = v - } - s = s[:j] - return StringSet(s) -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/selector/selector.go b/vendor/github.com/projectcalico/libcalico-go/lib/selector/selector.go deleted file mode 100644 index 7fe094a31..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/selector/selector.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2016-2017 Tigera, 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 selector - -import "github.com/projectcalico/libcalico-go/lib/selector/parser" - -// Selector represents a label selector. -type Selector interface { - // Evaluate evaluates the selector against the given labels expressed as a concrete map. - Evaluate(labels map[string]string) bool - - // EvaluateLabels evaluates the selector against the given labels expressed as an interface. - // This allows for labels that are calculated on the fly. - EvaluateLabels(labels parser.Labels) bool - - // String returns a string that represents this selector. - String() string - - // UniqueID returns the unique ID that represents this selector. - UniqueID() string -} - -// Parse a string representation of a selector expression into a Selector. -func Parse(selector string) (sel Selector, err error) { - return parser.Parse(selector) -} diff --git a/vendor/github.com/projectcalico/libcalico-go/lib/selector/tokenizer/tokenizer.go b/vendor/github.com/projectcalico/libcalico-go/lib/selector/tokenizer/tokenizer.go deleted file mode 100644 index f4ec23223..000000000 --- a/vendor/github.com/projectcalico/libcalico-go/lib/selector/tokenizer/tokenizer.go +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) 2016, 2019 Tigera, 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 tokenizer - -import ( - "errors" - "fmt" - "regexp" - "strings" - - log "github.com/sirupsen/logrus" -) - -type tokenKind uint8 - -const ( - TokNone tokenKind = iota - TokLabel - TokStringLiteral - TokLBrace - TokRBrace - TokComma - TokEq - TokNe - TokIn - TokNot - TokNotIn - TokContains - TokStartsWith - TokEndsWith - TokAll - TokHas - TokLParen - TokRParen - TokAnd - TokOr - TokEOF -) - -const tokenizerDebug = false - -var whitespace = " \t" - -// Token has a kind and a value -type Token struct { - Kind tokenKind - Value interface{} -} - -const ( - // LabelKeyMatcher is the base regex for a valid label key. - LabelKeyMatcher = `[a-zA-Z0-9_./-]{1,512}` - hasExpr = `has\(\s*(` + LabelKeyMatcher + `)\s*\)` - allExpr = `all\(\s*\)` - notInExpr = `not\s*in\b` - inExpr = `in\b` -) - -var ( - identifierRegex = regexp.MustCompile("^" + LabelKeyMatcher) - containsRegex = regexp.MustCompile(`^contains`) - startsWithRegex = regexp.MustCompile(`^starts\s*with`) - endsWithRegex = regexp.MustCompile(`^ends\s*with`) - hasRegex = regexp.MustCompile("^" + hasExpr) - allRegex = regexp.MustCompile("^" + allExpr) - notInRegex = regexp.MustCompile("^" + notInExpr) - inRegex = regexp.MustCompile("^" + inExpr) -) - -// Tokenize transforms string to token slice -func Tokenize(input string) (tokens []Token, err error) { - for { - if tokenizerDebug { - log.Debug("Remaining input: ", input) - } - startLen := len(input) - input = strings.TrimLeft(input, whitespace) - if len(input) == 0 { - tokens = append(tokens, Token{TokEOF, nil}) - return - } - var lastTokKind = TokNone - if len(tokens) > 0 { - lastTokKind = tokens[len(tokens)-1].Kind - } - switch input[0] { - case '(': - tokens = append(tokens, Token{TokLParen, nil}) - input = input[1:] - case ')': - tokens = append(tokens, Token{TokRParen, nil}) - input = input[1:] - case '"': - input = input[1:] - index := strings.Index(input, `"`) - if index == -1 { - return nil, errors.New("unterminated string") - } - value := input[0:index] - tokens = append(tokens, Token{TokStringLiteral, value}) - input = input[index+1:] - case '\'': - input = input[1:] - index := strings.Index(input, `'`) - if index == -1 { - return nil, errors.New("unterminated string") - } - value := input[0:index] - tokens = append(tokens, Token{TokStringLiteral, value}) - input = input[index+1:] - case '{': - tokens = append(tokens, Token{TokLBrace, nil}) - input = input[1:] - case '}': - tokens = append(tokens, Token{TokRBrace, nil}) - input = input[1:] - case ',': - tokens = append(tokens, Token{TokComma, nil}) - input = input[1:] - case '=': - if len(input) > 1 && input[1] == '=' { - tokens = append(tokens, Token{TokEq, nil}) - input = input[2:] - } else { - return nil, errors.New("expected ==") - } - case '!': - if len(input) > 1 && input[1] == '=' { - tokens = append(tokens, Token{TokNe, nil}) - input = input[2:] - } else { - tokens = append(tokens, Token{TokNot, nil}) - input = input[1:] - } - case '&': - if len(input) > 1 && input[1] == '&' { - tokens = append(tokens, Token{TokAnd, nil}) - input = input[2:] - } else { - return nil, errors.New("expected &&") - } - case '|': - if len(input) > 1 && input[1] == '|' { - tokens = append(tokens, Token{TokOr, nil}) - input = input[2:] - } else { - return nil, errors.New("expected ||") - } - default: - // Handle less-simple cases with regex matches. We've already stripped any whitespace. - if lastTokKind == TokLabel { - // If we just saw a label, look for a contains/starts with/ends with operator instead of another label. - if idxs := containsRegex.FindStringIndex(input); idxs != nil { - // Found "all" - tokens = append(tokens, Token{TokContains, nil}) - input = input[idxs[1]:] - } else if idxs := startsWithRegex.FindStringIndex(input); idxs != nil { - // Found "all" - tokens = append(tokens, Token{TokStartsWith, nil}) - input = input[idxs[1]:] - } else if idxs := endsWithRegex.FindStringIndex(input); idxs != nil { - // Found "all" - tokens = append(tokens, Token{TokEndsWith, nil}) - input = input[idxs[1]:] - } else if idxs := notInRegex.FindStringIndex(input); idxs != nil { - // Found "not in" - tokens = append(tokens, Token{TokNotIn, nil}) - input = input[idxs[1]:] - } else if idxs := inRegex.FindStringIndex(input); idxs != nil { - // Found "in" - tokens = append(tokens, Token{TokIn, nil}) - input = input[idxs[1]:] - } else { - err = fmt.Errorf("unexpected characters after label '%v', was expecting an operator", - tokens[len(tokens)-1].Value) - return - } - } else if idxs := hasRegex.FindStringSubmatchIndex(input); idxs != nil { - // Found "has(label)" - wholeMatchEnd := idxs[1] - labelNameMatchStart := idxs[2] - labelNameMatchEnd := idxs[3] - labelName := input[labelNameMatchStart:labelNameMatchEnd] - tokens = append(tokens, Token{TokHas, labelName}) - input = input[wholeMatchEnd:] - } else if idxs := allRegex.FindStringIndex(input); idxs != nil { - // Found "all" - tokens = append(tokens, Token{TokAll, nil}) - input = input[idxs[1]:] - } else if idxs := identifierRegex.FindStringIndex(input); idxs != nil { - // Found "label" - endIndex := idxs[1] - identifier := input[:endIndex] - log.Debug("Identifier ", identifier) - tokens = append(tokens, Token{TokLabel, identifier}) - input = input[endIndex:] - } else { - err = errors.New("unexpected characters") - return - } - } - if len(input) >= startLen { - err = errors.New("infinite loop detected in tokenizer") - return - } - } -} diff --git a/vendor/modules.txt b/vendor/modules.txt index b4d81b4e7..28556856c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -153,7 +153,7 @@ github.com/containernetworking/cni/pkg/types/internal # github.com/coreos/go-oidc v2.1.0+incompatible => github.com/coreos/go-oidc v2.1.0+incompatible ## explicit github.com/coreos/go-oidc -# github.com/coreos/go-semver v0.3.0 => github.com/coreos/go-semver v0.3.0 +# github.com/coreos/go-semver v0.3.1 => github.com/coreos/go-semver v0.3.0 ## explicit github.com/coreos/go-semver/semver # github.com/coreos/go-systemd/v22 v22.4.0 => github.com/coreos/go-systemd/v22 v22.4.0 @@ -431,7 +431,7 @@ github.com/golang/protobuf/ptypes/timestamp # github.com/golang/snappy v0.0.4 => github.com/golang/snappy v0.0.4 ## explicit github.com/golang/snappy -# github.com/google/btree v1.0.1 => github.com/google/btree v1.0.1 +# github.com/google/btree v1.1.2 => github.com/google/btree v1.0.1 ## explicit; go 1.12 github.com/google/btree # github.com/google/cel-go v0.12.6 => github.com/google/cel-go v0.12.6 @@ -742,7 +742,7 @@ github.com/onsi/ginkgo/reporters/stenographer github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty github.com/onsi/ginkgo/types -# github.com/onsi/gomega v1.26.0 => github.com/onsi/gomega v1.26.0 +# github.com/onsi/gomega v1.27.1 => github.com/onsi/gomega v1.26.0 ## explicit; go 1.18 github.com/onsi/gomega github.com/onsi/gomega/format @@ -903,29 +903,24 @@ github.com/pmezard/go-difflib/difflib ## explicit; go 1.16 github.com/pquerna/cachecontrol github.com/pquerna/cachecontrol/cacheobject -# github.com/projectcalico/kube-controllers v3.8.8+incompatible => github.com/projectcalico/kube-controllers v3.8.8+incompatible -## explicit -github.com/projectcalico/kube-controllers/pkg/cache -github.com/projectcalico/kube-controllers/pkg/converter -# github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056 => github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056 -## explicit; go 1.12 -github.com/projectcalico/libcalico-go/lib/apis/v1 -github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned -github.com/projectcalico/libcalico-go/lib/apis/v3 -github.com/projectcalico/libcalico-go/lib/backend/encap -github.com/projectcalico/libcalico-go/lib/backend/k8s/conversion -github.com/projectcalico/libcalico-go/lib/backend/model -github.com/projectcalico/libcalico-go/lib/errors -github.com/projectcalico/libcalico-go/lib/hash -github.com/projectcalico/libcalico-go/lib/names -github.com/projectcalico/libcalico-go/lib/namespace -github.com/projectcalico/libcalico-go/lib/net -github.com/projectcalico/libcalico-go/lib/numorstring -github.com/projectcalico/libcalico-go/lib/scope -github.com/projectcalico/libcalico-go/lib/selector -github.com/projectcalico/libcalico-go/lib/selector/parser -github.com/projectcalico/libcalico-go/lib/selector/tokenizer -github.com/projectcalico/libcalico-go/lib/set +# github.com/projectcalico/api v0.0.0 => github.com/kubesphere/calico/api v0.0.0-20230227071013-a73515ddc939 +## explicit; go 1.16 +github.com/projectcalico/api/pkg/apis/projectcalico/v3 +github.com/projectcalico/api/pkg/lib/numorstring +# github.com/projectcalico/calico v3.25.0+incompatible => github.com/kubesphere/calico v0.0.0-20230227071013-a73515ddc939 +## explicit; go 1.18 +github.com/projectcalico/calico/kube-controllers/pkg/cache +github.com/projectcalico/calico/kube-controllers/pkg/converter +github.com/projectcalico/calico/libcalico-go/lib/apis/v3 +github.com/projectcalico/calico/libcalico-go/lib/backend/encap +github.com/projectcalico/calico/libcalico-go/lib/backend/k8s/conversion +github.com/projectcalico/calico/libcalico-go/lib/backend/model +github.com/projectcalico/calico/libcalico-go/lib/errors +github.com/projectcalico/calico/libcalico-go/lib/json +github.com/projectcalico/calico/libcalico-go/lib/names +github.com/projectcalico/calico/libcalico-go/lib/namespace +github.com/projectcalico/calico/libcalico-go/lib/net +github.com/projectcalico/calico/libcalico-go/lib/set # github.com/prometheus-community/prom-label-proxy v0.6.0 => github.com/prometheus-community/prom-label-proxy v0.6.0 ## explicit; go 1.17 github.com/prometheus-community/prom-label-proxy/injectproxy @@ -1081,7 +1076,7 @@ github.com/spf13/jwalterweatherman # github.com/spf13/pflag v1.0.5 => github.com/spf13/pflag v1.0.5 ## explicit; go 1.12 github.com/spf13/pflag -# github.com/spf13/viper v1.13.0 => github.com/spf13/viper v1.13.0 +# github.com/spf13/viper v1.14.0 => github.com/spf13/viper v1.13.0 ## explicit; go 1.17 github.com/spf13/viper github.com/spf13/viper/internal/encoding @@ -1129,7 +1124,7 @@ github.com/xlab/treeprint # github.com/yashtewari/glob-intersection v0.1.0 => github.com/yashtewari/glob-intersection v0.1.0 ## explicit; go 1.17 github.com/yashtewari/glob-intersection -# go.etcd.io/etcd/api/v3 v3.5.5 => go.etcd.io/etcd/api/v3 v3.5.5 +# go.etcd.io/etcd/api/v3 v3.5.7 => go.etcd.io/etcd/api/v3 v3.5.5 ## explicit; go 1.16 go.etcd.io/etcd/api/v3/authpb go.etcd.io/etcd/api/v3/etcdserverpb @@ -1137,7 +1132,7 @@ go.etcd.io/etcd/api/v3/membershippb go.etcd.io/etcd/api/v3/mvccpb go.etcd.io/etcd/api/v3/v3rpc/rpctypes go.etcd.io/etcd/api/v3/version -# go.etcd.io/etcd/client/pkg/v3 v3.5.5 => go.etcd.io/etcd/client/pkg/v3 v3.5.5 +# go.etcd.io/etcd/client/pkg/v3 v3.5.7 => go.etcd.io/etcd/client/pkg/v3 v3.5.5 ## explicit; go 1.16 go.etcd.io/etcd/client/pkg/v3/fileutil go.etcd.io/etcd/client/pkg/v3/logutil @@ -1145,7 +1140,7 @@ go.etcd.io/etcd/client/pkg/v3/systemd go.etcd.io/etcd/client/pkg/v3/tlsutil go.etcd.io/etcd/client/pkg/v3/transport go.etcd.io/etcd/client/pkg/v3/types -# go.etcd.io/etcd/client/v3 v3.5.5 => go.etcd.io/etcd/client/v3 v3.5.5 +# go.etcd.io/etcd/client/v3 v3.5.7 => go.etcd.io/etcd/client/v3 v3.5.5 ## explicit; go 1.16 go.etcd.io/etcd/client/v3 go.etcd.io/etcd/client/v3/credentials @@ -1235,7 +1230,7 @@ go.uber.org/atomic ## explicit; go 1.18 go.uber.org/goleak go.uber.org/goleak/internal/stack -# go.uber.org/multierr v1.7.0 => go.uber.org/multierr v1.7.0 +# go.uber.org/multierr v1.8.0 => go.uber.org/multierr v1.7.0 ## explicit; go 1.14 go.uber.org/multierr # go.uber.org/zap v1.24.0 => go.uber.org/zap v1.24.0 @@ -1280,7 +1275,7 @@ golang.org/x/crypto/ssh/knownhosts ## explicit; go 1.18 golang.org/x/exp/constraints golang.org/x/exp/slices -# golang.org/x/net v0.5.0 => golang.org/x/net v0.5.0 +# golang.org/x/net v0.7.0 => golang.org/x/net v0.5.0 ## explicit; go 1.17 golang.org/x/net/context golang.org/x/net/context/ctxhttp @@ -1307,7 +1302,7 @@ golang.org/x/oauth2/internal golang.org/x/sync/errgroup golang.org/x/sync/semaphore golang.org/x/sync/singleflight -# golang.org/x/sys v0.4.0 => golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d +# golang.org/x/sys v0.5.0 => golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d ## explicit; go 1.17 golang.org/x/sys/cpu golang.org/x/sys/execabs @@ -1316,10 +1311,10 @@ golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/term v0.4.0 => golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 +# golang.org/x/term v0.5.0 => golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 ## explicit; go 1.11 golang.org/x/term -# golang.org/x/text v0.6.0 => golang.org/x/text v0.6.0 +# golang.org/x/text v0.7.0 => golang.org/x/text v0.6.0 ## explicit; go 1.17 golang.org/x/text/encoding golang.org/x/text/encoding/charmap @@ -2311,7 +2306,7 @@ k8s.io/klog/v2/internal/severity ## explicit; go 1.19 k8s.io/kms/apis/v1beta1 k8s.io/kms/apis/v2alpha1 -# k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 => k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 +# k8s.io/kube-openapi v0.0.0-20230224204730-66828de6f33b => k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 ## explicit; go 1.18 k8s.io/kube-openapi/cmd/openapi-gen k8s.io/kube-openapi/cmd/openapi-gen/args @@ -2781,8 +2776,8 @@ sigs.k8s.io/yaml # github.com/pkg/errors => github.com/pkg/errors v0.9.1 # github.com/pmezard/go-difflib => github.com/pmezard/go-difflib v1.0.0 # github.com/pquerna/cachecontrol => github.com/pquerna/cachecontrol v0.1.0 -# github.com/projectcalico/kube-controllers => github.com/projectcalico/kube-controllers v3.8.8+incompatible -# github.com/projectcalico/libcalico-go => github.com/projectcalico/libcalico-go v1.7.2-0.20191014160346-2382c6cdd056 +# github.com/projectcalico/api => github.com/kubesphere/calico/api v0.0.0-20230227071013-a73515ddc939 +# github.com/projectcalico/calico => github.com/kubesphere/calico v0.0.0-20230227071013-a73515ddc939 # github.com/prometheus-community/prom-label-proxy => github.com/prometheus-community/prom-label-proxy v0.6.0 # github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring => github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 # github.com/prometheus-operator/prometheus-operator/pkg/client => github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0 @@ -2875,6 +2870,8 @@ sigs.k8s.io/yaml # k8s.io/client-go => k8s.io/client-go v0.26.1 # k8s.io/code-generator => k8s.io/code-generator v0.26.1 # k8s.io/component-base => k8s.io/component-base v0.26.1 +# k8s.io/component-helpers => k8s.io/component-helpers v0.21.2 +# k8s.io/cri-api => k8s.io/cri-api v0.26.1 # k8s.io/gengo => k8s.io/gengo v0.0.0-20220902162205-c0856e24416d # k8s.io/klog/v2 => k8s.io/klog/v2 v2.90.0 # k8s.io/kms => k8s.io/kms v0.26.1